I am using Sim900 for sending and receiving SMS for new M2M home automation project
Here’s my settings
For initialization AT\r\n
ATE0\r\n
AT+CMGF=1\r\n
AT+CNMI=2,1,0,0,0\r\n
And for receiving SMS I wait for new message indication conataining “+CMTI” and when receiving this I extract the messahe index from the “+CNMI”message and do the following to read the message "AT+CMGR=index,0\r\n"
Then delete the message using "AT+CMGD=index,0\r"
And for sending a message is use "AT+CMGS= \" SIMCardNumber \" \r\n
And then wait for receiving “>” and send message and "\x1a"
I can receive several messages as I didn’t send any but after sending a message I didn’t get the “+CMTI” new message index from the module.
In order to receive more messages after sending a message I restart the module and do the initialization again.