PDA

View Full Version : Problem with SMS IO Controller



dario.costa
- 26th November 2009, 08:41
Hi,
I have some question about this project I found on internet and i think created by a member of this forum, aratti.
It's 3 days that I'm going 'mad' :o trying to find the problem of communication between the PIC and the modem GSM.
I'm using a Wavecom WMOD2 modem ( http://ajilimojili.iespana.es/ciencia/pdf/wavecom_wmod2.pdf ) and it seems to be quite different from the Siemens used in the project.

I created a sniffer to check the communication between the PIC and the modem, so I can verify that at the AT+CMGF=1 command sent by the PIC, the GSM doesn't reply, so on the Hyperterminal I continue to see:


AT+CMGF=1
AT+CMGF=1
AT+CMGF=1
AT+CMGF=1

If I send the same command over Hyperterminal, the reply is:


AT+CMGF=1


OK

So the modem reply correctly at mine command... there is a problem with the carriage return from the PIC?
At the same, if the PIC send AT+CPMS="SM", no reply, but if I send the same command I receive:


AT+CPMS="SM"

+CPMS: 5,50,5,50

OK

After this initialization, I see that the PIC continue to send AT^SMGR=1, but without reply from the modem.
If I send AT^SMGR=1, I receive ERROR from the modem.

When the sms arrive to the modem, I can see a string from the modem: +CMTI:"SM",1 that advice me that there is a message in 1

I tried some command without good result (AT^SMGR=1, AT^CMGR=1) but the only one message that reply me correctly is:


AT+CMGR=1


+CMGR: "REC UNREAD","+39xxxxxxxxxx",,"09/11/26,09:12:47+04"

Device :AAA#10011111111



OK


I hope someone could help me to understand the way to solve my problem... I want to use this sistem to light on the heating of my mountain house :D

Thanks
Dario

Ioannis
- 26th November 2009, 08:44
Your code please?

Ioannis

dario.costa
- 26th November 2009, 08:48
Your code please?

Ioannis

Sorry, I have no code, because I found this project here: http://techni.caliti.es/blog/2008/12/sms-io-controller.html

The only things I can do is to decompile the hex file inside the zip file.
I hope aratti (the coder of the project) could help us to understand where the problem could be :(

aratti
- 29th November 2009, 18:25
Dario, the problem you are facing derives from the different modem you are using in place of Siemens TC35i used in my project.

Your modem very likely requiers a carriage return + line feed (ascii 13 + ascii 10)
where Siemens requires only a carriage return (ascii 13).

From your report, I also understand that also the AT commands are somehow different which make my program useless for that modem.

Verify if I am correct for ascii 13 + ascii 10 modifying the option of hyperteminal and see how the modem respond (check if you have no answer when you send only ascii 13)

The other problem (the bigger one) are the AT commands which seems different from the Siemens and unfortunatly I have not one Wavecom WMOD2 modem to verify the code and eventually change the AT commands structure.

I strongly suggest you to search around for a Siemens TC35i which will solve all your problems without any additional effort.

Al.

dario.costa
- 30th November 2009, 07:04
Finally I fixed all the problem with the Wavecom WMOD2 modem.
I rewrote part of the disassembled code, applying some changes at the AT command for to make that standard AT and not specific for the Siemens.
I added also some delay and at the end all starts to working perfectly.

Thanks a lot :)
Dario