[Solved] SMS Function
Hi Guys,
Try to fire up my nokia 7310 with HAH. I have the cable, the usb serial adapter etc...and although I was haveing trouble getting xap-sms to start, I am now up and running.
Problem is I have no idea where to start. I have sent a couple of msgs to the phone and was expecting xap-sms to spurt out a xap message which I was then going to use to start a lua script but nothing happens. When I debug and watch when a msg cmes in I get:
[inf][sms.c:67:processSerialMsg] Serial Rx:
[inf][sms.c:67:processSerialMsg] Serial Rx: 30
[inf][tx.c:19:xapSend] send
So somethings working.
Any pointers?
Cheers
Gary
When an SMS message is received from your phone this will result in a +CMTI: notification which xap-sms will pick up.
As I don't see any message like that in the above debug then I can only assume the phone has not generated one (yet).
sms.c
if(strncmp(a_cmd,"+CMTI:",6) == 0) {
int message_number;
// Recieved an SMS notification event: +CMTI: "MT",3
This notification event is parsed and it tells us the new SMS message has just arrrived that is stored.
Using the example: +CMTI: "MT",3
We would then read this message "AT+CMGR=3" and generate an xap Frame.
The AT command +CNMI is used to specify how newly arrived SMS messages should be handled. You can tell the GSM/GPRS modem or mobile phone either to forward newly arrived SMS messages directly to the serial port, or to save them in message storage and then notify on the serial port about their locations in message storage. (We do the later).
AT+CNMI as seen in the modem init sequence.
[inf][modem.c:34:put_command] Serial Tx: AT&FE0+CMGF=1;+CNMI=2,1,0,0,0
If you are sending a sms to your phone the the phone is not telling you a message is waiting, then this should be diagnosed without using the xap-sms program using the command I've indicated above using some serial comms program.
Brett
Gary
I went through all of this Nokia stuff last year and fought with various flavours of phones and several cables. I gave up.
I now use the email function and have bought credits from a company called "Text Marketer". This converts emails to SMS at about 3p a time which is probably cheaper than topping up a sim card. Also sim credit gets trashed if phone is not used for approx 90 days.
John