Hi,
I am working on a project where i have to send some information using SMS from a microcontroller (8051). I have succeeded in sending and receiving the SMS with a "small" problem.
I am using as modem GenPro 20e. the problem is the following: I send the following string to the modem (through the serial interface) AT+CMGS="PPPPPPP"<CR> Data to be sent: ABCDEFG <ctrl-Z> (where PPPPPP is the phone number)
the message i receive is missing the first 10 letters of the data part, so i receive the message on the phone as follows: "e sent: ABCDEFG" While testing, i realised that if i send an SMS containing less than 33 letters, the modem will not reply correctly. I have some displays on my circuit which i am using to display the string i am sending to the modem. The displays show that the string sent to the modem contains all the letters of the data part in the right order. I also saved the message in the modem's memory (using the command +CMGW) and read it on the PC using the hyperterminal it showed that the message is missing the first 10 letters :(
I went through all of the documents that come with the modem and made sure that the format of the command is correct. Also the code i am working on was previously tested using another modem and no error was detected. Also i have connected the modem to the PC and sent the same message to it and the message was received correctly.
Any help on this topic will be greatly appreciated. Thanks a lot in advance. FIF
"I send the following string to the modem (through the serial interface) AT+CMGS="PPPPPPP"<CR> Data to be sent: ABCDEFG <ctrl-Z>"
No, that is wrong.
As Per says, after sending the phone number, you need to wait for the ">" prompt before sending the text of the message.
In other words:
Transmit: AT+CMGS="PPPPPPP"<CR> Wait for: > Transmit: ABCDEFG <ctrl-Z>
Im a bit confused because all the documents i read did not say anything about waiting for the prompt before sending the body of the message (I have seen it on the hyperterminal though but i thought that its just a differentiation between the actual commands and the message). Does that mean that the modem will reply with the prompt after the carriage return? if so does that apply to all modem types?? because my program is supposed to work with all modems...
Thanks
Have a look at this page: www.smssolutions.net/.../
Thanks a lot
View all questions in Keil forum