B&B Electronics RT3G-300_310_320_330_340-W - Configuration Manual User Manual
Page 59
B&B Electronics, Inc.
SPECTRE Configuration Manual
59
SPECTRE_Configuration_Manual_2912m
www.bb-elec.com
www.bb-europe.com
1.23.1. Send SMS
Standard AT commands are used to send and receive SMS messages over the serial
ports or a TCP connection. They can be sent to the router using a terminal program such as
Hyper Terminal. After establishing a connection with the router via the serial interface or
Ethernet, AT commands are used to read and delete incoming messages and send outgoing
messages. Table 52 lists the AT commands that are used for sending and receiving SMS
messages.
AT commands
Description
AT+CMGF=1
Set the text mode for SMS writing
AT+CMGS=”tel. number”
Commands enables to send SMS on entered tel. number
AT+CMGL=ALL
List of all SMS messages
AT+CMGR=
Read of the definite SMS (all SMS has our index)
AT+CMGD=
SMS delete according to index
Table 51: AT commands to send and receive SMS messages
In order to send an SMS message, text mode must first be selected by sending the
command AT+CMGF=1 to the router.
Command: AT+CMGF=1
Response: OK
The SMS message is created and sent using the command AT+CMGS=
”tel.
number
” where tel. number is the telephone number to send the message to. After
pressing the Enter button, the router will respond with a
„>‟ prompt and the text of the SMS
message can be entered. After entering the text, press CTRL+Z to send the message. It may
take a few minutes for the SMS message to be sent depending on the network. You may
cancel SMS text input by pressing Esc.
Example: To send “Hello World” to telephone number 712-123-4567
Command:
AT+CMGS=”7121234567”
Press Enter
Response: >
Enter SMS Text: Hello World!
Press CTRL+Z (keys combination)
Response: OK
To see a list of all incoming messages, type:
Command:
AT+CMGL=”ALL”
Press Enter
Response: +CMGL:
where
REC UNREAD
– SMS unread
REC READ
– SMS read
STO UNSENT
– stored unsent SMS
STO SENT
– stored sent SMS