MD-649 User Manual
50
Appendix 5: DTU SMS Mode and
SMS Data Format
By default DTU is in data transfer mode. It can be switched to SMS mode by
sending AT command on DTU serial port. In SMS mode, it can be used to send
short messages via AT commands, but it cannot transfer data in this mode. Below
is the detailed description of the way to enter/exit SMS mode with AT commands
and the data format when sending/receiving SMS with DTU.
Note
:
AT commands for this purpose must be entered in uppercase. Currently long
SMS is not supported, i.e. the length of messages in English cannot exceed 160
characters, and the length of messages in Chinese cannot exceed 70 words. AT
commands must end with CR (0x0d), expressed below as “\r”.
1.
Enter/exit SMS mode with AT commands
1)
Send the AT command below on the serial port to enter SMS mode:
AT+ENTERSMS\r
DTU will send the following reply
:
\r\nOK\r\n
2)
Send the AT command below on the serial port to exit SMS mode:
AT+EXITSMS\r
DTU will send the following reply
:
\r\nOK\r\n
2.
Using AT command to send short messages
1)
Special AT command for sending short messages with ASCII encoding via
serial port
:
AT+SMSA=<target number>,<data length>,<data>\r
DTU will send the following reply
:
\r\nOK\r\n
Or:
\r\nERROR\r\n
Target Number
:
Phone number to receive the short message
Data Length
:
The actual data length behind
Data: The data to be sent, MUST with ASCII encoding.
Examples
:
Send “1234” with ASCII encoding to 13812345678:
AT+SMSA=13812345678,4,1234\r