SMS for Plugboard V2
Hi
I'm just finding my way and got my first lua script to trigger.
Anyone got a LUA script to send or receive sms in V2 plugboard.
thanks
John
Hi John,
Here are the first steps you need to take to get the HAH to process text messages, I've just done this myself so I know it works. If we can work through it together and find the right method I'll update the wiki to make it more useful.
So, firstly you need xFx Viewer, it's essential for anything you do on the HAH, I'm assuming Windows here, anything else and we'll have to look at xap-snoop. Get xFx Viewer, get it running and then go into the next step, It's better to use version 3.x, NOT 4, here's the link http://www.edjo.pwp.blueyonder.co.uk/edward/xAP/downloads/xFx%20Viewer%20Installer.msi.
Next, telnet, ssh, whatever to the HAH and make sure your plugboard directory is empty, or at least rename any *Applet.lua files so they don't run, ie just remove the "Applet" bit.
Next, connect you phone to the HAH. Then type dmesg from the telnet session, you should see something like :-
hub.c: USB new device connect on bus1/1, assigned device number 3
usbserial.c: FTDI 8U232AM converter detected
usbserial.c: FTDI 8U232AM converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
You seem to be missing the debug level at the end of the line, the "-d " specifies debug, try "-d 5" to start, if that works and you want more detailed, read LOTS more information, then just increase the number.
Indeed you need a number after -d but still the program should not SEGV like that. I'll look into it.
Brett
xap-sms will open the modem at 19200 baud, you can't adjust this. I would need to make some code changes to allow the baud rate to be adjustable.
Brett
>Derek if you read this can you check your spam mail, Ive sent you 5 emails with no response.
I'm still here! haven't seen any mail from you (and just spam in the old spam bin). i'll send you an email to the address that I've used previously.
Derek.
If the serial cable isn't recognized then its not supported. As this is a 2.4 kernel there are some later chips for which there is no driver. You will be ok with PL2303 and some FTDI chips, all others your mileage may vary. You should not have to load any modules into the kernel. Check your # dmesg output if no driver is found well .... there you go.
I also added some code for allowing you to choose a different baud rate - that'll be in the next release.
Brett
However, I'm not sure if you intend to put any hi volts near this one.
If there are any hi volts just be very, very careful with how you go. Earthing, proper enclosures, IP ratings, overload protection, protection for inquisitive youngsters with thin fingers, fire considerations, warning labels etc, etc.
The HAH team don't endorse direct connection of the Livebox or HAH PCB to anything that has high voltages. RF to a CE approved RF mains socket is our recommended route for handling mains.
Many folks know all this and do all the right things. It might sound like a bit of a cliche but if in doubt, do get a qualified electrician to certify your work.
Derek.
I'm getting a similiar problem :-
[inf][sms.c:67:processSerialMsg] Serial Rx: MT",1
[inf][tx.c:19:xapSend] send
[inf][sms.c:67:processSerialMsg] Serial Rx:
So, running 306.5 and changing the baud rate to 9600 seemed to make it drop more characters :-
[inf][sms.c:67:processSerialMsg] Serial Rx:
[inf][sms.c:67:processSerialMsg] Serial Rx: ,1
Increasing it 38400 didn't help either :-
[inf][sms.c:67:processSerialMsg] Serial Rx:
[inf][sms.c:67:processSerialMsg] Serial Rx: ",1
Is this more of a buffer problem in the code?
Karl
Karl what happened between it working and then not working? These seems odd. From the debug you just aren't recieving any data. Or the data that you are getting is gibberish.
Brett
Nothings significant, a couple of reboots, phone switched off and on, cables checked, usually stuff just to try and get it working. John and I were going to document the steps to get him going and then update the wiki with a step by step implementation.
It does look like it's only getting part of the command, I've had a look at the code, but haven't yet got my head around C strings and pointers. And of course, it isn't consistent, although it fails more than it works. I sent about 20 messages last night and none of them worked. The xap-sms "usually" gets something, but as you can see, it's only part of the AT command. I don't have anything else connected to the USB, so I don't think there is any interference from anything else.
I used this in v1, but haven't touched it for a while. If you're struggling I could take another look, I think the original script was fairly straight forward, have a look and if your not sure let us know,
Karl