Wednesday, January 16, 2013

How to Receive an SMS Through a GSM Modem


1. Check whether your modem supports SMS text mode by typing 'AT+CMGF=1' and pressing Enter. The modem should return 'OK'.
2. Enter the PIN code of your SIM card by typing 'AT+CPIN='1111'', where the 1111 is the PIN code.
3. Put the modem into SMS text mode by typing 'AT+CMGF=1' and pressing Enter.
4. Type 'AT+CMGL='ALL'' and press Enter. This command will list the received messages. For example:+CMGL: 1,'REC UNREAD','+11111111111',,'07/09/10,09:55:16+08'[Text of message 1]+CMGL: 2,'REC UNREAD','+11111111111',,'07/09/10,09:56:03+08'[Text of message 2]OKThe '+11111111111' is the phone number where the message came from. 'REC UNREAD' says that the message is unread. The date and time indicate when the message was received by the modem.

No comments:

Post a Comment