We are reading from NOKIA 5110 using data cable using java com API.
Now the problem
Usually, we receive the message in the format
+CMT: "+919810030301" ,,"02/09/11,16:32:44+00"
How are you?
which is sent to TE (Terminal end)
But yesterday it came in the format shown below.
+ CMTI: "SM",1
+ CMTI: "SM",2
and the SMS were stored in the phone itself. Which means, messages are stored in memory locations 1 and 2 and are of class 2.
On analyzing I found that I issued, AT+CNMI=1,2,0,0,0
Which means that send incoming messages TE (terminal end) except messages in CLASS 2 format. And above messages were in format CLASS 2.
If I do AT+CNMI=1,1,0,0,0
then no message will be sent to TE, and all messages will be stored in phones memory
If I do AT+CNMI=1,3,0,0,0
It is same as AT+CNMI=1,2,0,0, but class is 3 also
So when messages of type 2 and 3 comes? and how to instruct the GSM phone to send those messages to TE even if they are class 2 or 3.
There is no way you can get class 0 or class 2 messages directly
to TE. Class 2 can be read though with at+cmgr. Some older Nokia
phones may be a bit different.
AT+CNMI=1,2,0,0,0 (all others except class 2 and class 0 (no class, class 1, class 3))
AT+CNMI=1,3,0,0,0 (only class 3)
If you want to get as many types of messages as possible use
AT+CNMI=1,2 or AT+CNMI=2,2
M, Forum Nokia
about 99% of times, I received classs 1 messages (+CMT: <message>. Can you please tell me why class 2 message came?
The message class is defined by the sender of the message.
What is class 2 message?
Class 2 is SIM specific message, should be automatically stored to SIM
after arriving to the phone.
When it can come to my phone, Why only phone can understand it?
why it can not be sent to TE.
Routing of messages is defined by GSM specification 07.05.
Is it property of phone or SMSC?
Sender of the message can define data coding scheme, GSM specification
How can I set my phone to convert class 2 in to class 1 messages? Is there any way?
There is no way to make the phone to convert received messages.
You can set the message class from the messages you send yourself.