SMS AT commands
This page describes SMS-related AT commands.
Note
nRF91M1 module’s SMS implementation is based on the SMS library, which uses the following AT commands: AT+CMGS, AT+CNMI, AT+CNMA.
These modem AT commands should not be used in conjunction with the #XSMS command by the host in order to avoid unexpected behavior.
The implementation always acknowledges incoming +CMT and +CDS notifications with AT+CNMA command.
SMS support #XSMS
The #XSMS command supports functionalities for sending and receiving SMS messages.
Set command
The set command allows you to start or stop SMS, as well as send SMS text. Only GSM-7 encoding is supported, 8-bit and UCS2 encodings are not supported.
Syntax
AT#XSMS=<op>[,<number>,<text>]
The parameters and their defined values are the following:
- <op>
0- Stop SMS.1- Start SMS, ready to receive.2- Send SMS.
- <number>
String. The SMS recipient’s phone number, including the country code (for example
+81xxxxxxx).- <text>
String. The SMS text to be sent.
Unsolicited notification
This is the notification syntax when an SMS message is received:
#XSMS: <datetime>,<number>,<text>
The parameters and their defined values are the following:
- <datetime>
String. The time when the SMS is received. It has a format of
YY-MM-DD HH:MM:SS UTC[+|-]HH:MM.- <number>
String. The SMS sender’s phone number.
- <text>
String. The SMS text that has been received.
When receiving concatenated SMS messages, there will be only one notification.
Example
at#xsms=1
OK
at#xsms=2,"+8190xxxxxxxx","SM test"
OK
#XSMS: "21-05-24 11:58:22 UTC+09:30","090xxxxxxxx","Tested OK"
at#xsms=2,"+8190xxxxxxxx","0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
OK
#XSMS: "21-05-24 13:29:47 UTC-09:00","090xxxxxxxx","0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
Read command
The read command is not supported.
Test command
The test command tests the existence of the command and provides information about the type of its subparameters.
Syntax
AT#XSMS=?
Response syntax
#XSMS: <list of op value>,<number>,<text>
Examples
at#xsms=?
#XSMS: (0,1,2),<number>,<text>
OK