本文摘录3gpp27005中关于CNMI的片段,充分理解此文章可以充分根据GSM-MODEM的提示功能,主动打开GSM-MODEM的新短信、状态报告,小区广播提示。
New Message Indications to TE +CNMI
Parameter Command Syntax
Command |
Possible response(s) |
+CNMI=[<mode>[,<mt>[,<bm>[,<ds>[, <bfr>]]]]] |
+CMS ERROR: <err> |
+CNMI? |
+CNMI: <mode>,<mt>,<bm>,<ds>,<bfr> |
+CNMI=? |
+CNMI: (list of supported <mode>s),(list of supported <mt>s),(list of supported <bm>s),(list of supported <ds>s),(list of supported <bfr>s) |
Description
Set command selects the procedure, how receiving of new messages from the network is indicated to the TE when TE is active, e.g. DTR signal is ON. If TE is inactive (e.g. DTR signal is OFF), message receiving should be done as specified in 3G TS 23.038 [2].
NOTE: When DTR signal is not available or the state of the signal is ignored (V.25ter command &D0), reliable message transfer can be assured by using +CNMA acknowledgement procedure.
<mode> controls the processing of unsolicited result codes specified within this command, <mt> sets the result code indication routing for SMS-DELIVERs, <bm> for CBMs and <ds> for SMS-STATUS-REPORTs. <bfr> defines the handling method for buffered result codes when <mode> 1, 2 or 3 is enabled. If ME does not support requested item (although TA does), final result code +CMS ERROR: <err> is returned. See chapter Message Service Failure Result Code for a list of <err> values.
Test command gives the settings supported by the TA as compound values.
NOTE: Command Select Message Service +CSMS should be used to detect ME support of mobile terminated SMs and CBMs, and to define whether a message routed directly to TE should be acknowledged or not (refer command +CNMA).
Defined Values
<mode> (refer figure 2;
NOTE: The buffering mechanism may as well be located in the ME; the setting affects only to unsolicited result codes specified within this command):
0 Buffer unsolicited result codes in the TA. If TA result code buffer is full, indications can be buffered in some other place or the oldest indications may be discarded and replaced with the new received indications.
1 Discard indication and reject new received message unsolicited result codes when TA-TE link is reserved (e.g. in on-line data mode). Otherwise forward them directly to the TE.
2 Buffer unsolicited result codes in the TA when TA-TE link is reserved (e.g. in on-line data mode) and flush them to the TE after reservation. Otherwise forward them directly to the TE.
3 Forward unsolicited result codes directly to the TE. TA-TE link specific inband technique used to embed result codes and data