How to decode Chinese text message received by SMS
1. Send unread SMS instructions:
QStrCmd = "AT + CMGL = 0 \ r ";
QDebug () <qStrCmd;
MyCom-> write (qStrCmd. toAscii ());
2. Determine whether to receive unread text messages
3. receive, analyze the text message, and extract the PDU of the text message content.
4. Analyze the SMS content PDU
SMS Decoding
08 91 683104501905f0 04 0D 91 685158191026F4 00 08 217021811074 23 04 60A8597D (Hello)
1. SMSC
08 the length of the address information is 8 8 bytes (including 91)
91 Number in international format
Fill in 'f' for the 683127501905f0 address to generate an even number.
2. PDUType
04
3. OA reply address
0D number: a total of 13 decimal numbers (excluding 91 and 'F ')
91 international format
Add 'F' to the reply address of 685158191026F4 to generate an even number.
4. How does SMSC process SMSC?
00 protocol identifier (TP-PID) is a common GSM type, point-to-point method
5. encoding method
08 UCS2 Encoding
6. SMS time
217021811074 23 service timestamp (TP-SCTS) 12-07-12 18:01:47
7. Text message length
04
8. Text message content
60A8597D "hello"
Source code download: http://download.csdn.net/detail/wyz365889/4431313