nrf9160

Set command

The set command sends a message in Protocol Data Unit (PDU) mode.

Note: This command can be issued only by a client registered with the +CNMI command.

Syntax:

+CMGS=<length><CR><pdu><ctrl-Z>

Response syntax:

+CMGS: <mr>[,<ackpdu>]
+CMS ERROR code
300 – ME failure.
301 – SMS service of ME reserved.
304 – Invalid PDU mode parameter.
330 – SMSC address unknown.
331 – No network service.
332 – Network timeout.
517 – Modem not activated.

The set command parameters and their defined values are the following:

<length>
ASCII, 1–3 characters. Number of hexadecimal octets in <pdu>.
<pdu>
Hexadecimal numbers containing two International Reference Alphabet (IRA) characters per octet.
<mr>
Message reference value.
<ackpdu>
RP-User-Data element of RP-ACK PDU.

<pdu> is expected to be received in the same command after <CR>. Interactive mode is not supported. PDU consists of hexadecimal numbers containing two IRA characters per octet.

The following command example sends the message "Testing a SMS messaging over LTE" to +358401234567, Service Center Address +448888888:

AT+CMGS=42<CR>069144888888F811000C9153481032547600000B20D4F29C9E769F4161
         D0BC3D07B5CBF379F89C769F416F7B590E62D3CB<ctrl-z>
+CMGS: 2
OK