MD-309 User Manual
58
2)
General AT command for sending short messages via serial port
:
AT+SMS=<target number>,<encoding format>,<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
Encoding Format
:
1
:
ASCII encoding
,
2
:
8bit encoding
,
3
:
Unicode encoding
Data Length
:
The actual data length behind
Data: The data to be sent, each byte should be formatted to a 2-byte
hexadecimal number, for instance “1234” should be written as“31323334”.
Examples
:
Send “1234” with ASCII encoding to 13812345678:
AT+SMS=13812345678,1,4,31323334\r
Use 8bit encoding to send “1234”to 13812345678:
AT+SMS=13812345678,2,4,31323334\r
Use Unicode encoding to send “
你好
” to 13812345678:
AT+SMS=13812345678,3,4,4F60597D\r
3.
The received SMS messages will be output via the serial port in the format
below:
1)
Format for SMS messages received with ASCII encoding
If the content of received SMSs is in ASCII format, the output is in the
following format:
\r\n+SMSA:<phone number>,<data length>,<data>\r\n
Examples:
“1234” received from 13812345678 in ASCII format:
\r\n+SMSA:13812345678,4,31323334\r\n
If the received SMS has more than one message, the format is as below:
\r\n+SMSAL:<identifier>,<total>,<sequence
number>,<phone
number>,<data length>,<data>\r\n
The messages with the same identifier can be assembled into one long
SMS.
For example, a long SMS is received from 10001, with identifier 05000376,
total 4 messages, and below is the fourth message:
\r\n+SMSAL:05000376,4,4,10001,6,123456
2)
Format for SMS messages received with encodings other than ASCII
If the content of received SMSs is not in ASCII encoding, for example with
Chinese characters, the output is in the following format:
\r\n+SMS:<phone
number>,<encoding
format>,<data
length>,<data>\r\n
Examples:
Summary of Contents for MD-309 2G DTU
Page 8: ...MD 309 User Manual 8 Figure 1 5 9 pin and 9 hole direct serial line Figure 1 6 Power supply ...
Page 9: ...MD 309 User Manual 9 1 4 Dimensions Figure 1 7 MD 309 dimension with shell ...
Page 40: ...MD 309 User Manual 40 Figure Appendix 1 4 Map virtual serial port ...
Page 46: ...MD 309 User Manual 46 Figure Appendix 2 6 Map virtual serial port in vircom ...