Set command

The command registers or unregisters an SMS client. Only one AT client can be registered as an SMS client. An existing registration must be released before registering a new client.

Syntax:

+CNMI=[<mode>[,<mt>[,<bm>[,<ds>]]]]

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

<mode>
0 – Do not forward unsolicited result codes to the Terminal Equipment (TE) (default).
3 – Forward unsolicited result codes directly to the TE.
<mt>
0 – No received message notifications, the modem acts as an SMS client. Forces also <ds> to 0.
2 – SMS-DELIVERs (except class 2 and message waiting indication group) are routed directly to the TE using unsolicited result code +CMT: [<alpha>],<length><CR><LF><pdu>. TE needs to ack with +CNMA.
<bm>
Ignored
<ds>
0 – No SMS-STATUS-REPORTs are routed to the TE. The only option if <mt> is set to 0.
1 – SMS-STATUS-REPORTs are routed to the TE using unsolicited result code: +CDS: <length><CR><LF><pdu>. TE needs to ack with +CNMA.

The TE needs to handle both SMS-DELIVER and SMS-STATUS-REPORT or neither of them, <mt> and <ds> shall both be set to 0 at the same time, equals to <mode> 0.

The following command example registers as a client for mobile-terminated SMS and status reports:

AT+CNMI=3,2,0,1
OK