|
Question : How to get signalled when a new message is recieved?
|
|
hi, I am having a samsung c100, and i use to send and recieve messages through it using hyperterminal. But how to know when a new message arrived in the mobile. I just want to have an indication that a new message arrived, so that i can give AT commands to read it, as soon as it comes.
|
Answer : How to get signalled when a new message is recieved?
|
|
You will have to use the "AT+CNMI" command (New Message Indication)
Syntax: AT+CNMI=,,,<ds>, Description: This command selects the procedure for message reception from the network. Values: : controls the processing of unsolicited result codes
Any other value for (0,1 or 3) is accepted (return code will be OK), but the processing of unsolicited result codes will be the same as with =2. 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. Otherwise forward them directly to the TE 2: Buffer unsolicited result codes in the TA when TA-TE link is reserved 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 used to embed result codes and data when TA is in on-line data mode
********************************************************* : sets the result code indication routing for SMS-DELIVERs. Default is 0. *********************************************************
0: No SMS-DELIVER indications are routed. 1: SMS-DELIVERs are routed using unsolicited code: +CMTI: SM, 2: SMS-DELIVERs (except class 2 messages) are routed using unsolicited code: +CMT: [,] (PDU mode) or +CMT: ,[,] [,, , , , , , ] (text mode) 3: Class 3 SMS-DELIVERs are routed directly using code in =2 ; Message of other classes result in indication =1
********************************************************* : set the rules for storing received CBMs (Cell Broadcast Message) types depend on its coding scheme, the setting of Select CBM Types (+CSCB command) and . Default is 0. *********************************************************
0: No CBM indications are routed to the TE. The CBMs are stored. 1: The CBM is stored and an indication of the memory location is routed to the customer application using unsolicited result code: +CBMI: BM, 2: New CBMs are routed directly to the TE using unsolicited result code. +CBM: (PDU mode) or +CBM:,,,e>,(Text mode) 3: Class 3 CBMs: as =2. Other classes CBMs: as =1.
********************************************************* for SMS-STATUS-REPORTs. Default is 0. *********************************************************
0: No SMS-STATUS-REPORTs are routed. 1: SMS-STATUS-REPORTs are routed using unsolicited code: +CDS: (PDU mode) or +CDS: ,, [] , [], ,, (Text mode) 2: SMS-STATUS-REPORTs are stored and routed using the unsolicited result code: +CDSI: SR,
********************************************************* Default is 0. *********************************************************
0: TA buffer of unsolicited result codes defined within this command is flushed to the TE when 1
3 is entered (OK response shall be given before flushing the codes) 1: TA buffer of unsolicited result codes defined within this command is cleared when 1
3 is entered.
Following you will find the various ways this command can be used and Possible responses **************************************** AT+CNMI=2,1,0,0,0 Note: =1 OK AT+CMTI: SM,1 Note: message received ****************************************
**************************************** AT+CNMI=2,2,0,0,0 Note: =2 OK +CMT: 123456,98/10/01,12:30 00+00,129,4,32,240, 15379,129,5 Note: message received ****************************************
|
|
|
|