This article was reproduced from: http://blog.csdn.net/hanmengaidudu/article/details/17099755
First, use the text view mode
The following "Hair" refers to the command I knocked, "collect" refers to the information displayed after carriage return including other received information.
~: Microcom-s 115200/DEV/TTYUSB1
Hair: at
Received: OK
Set into text mode read:
Hair: at+cmgf=1
Received: OK
Save the information in the SIM card:
Hair: at+cpms= "sm", "SM", "SM"
Received: +cpms:0,50,0,50,0,50
Received: OK
Waiting to receive SMS ...
You will receive this message:
Received: +cmti: "SM", 0
View information:
Hair: at+cmgl= "Rec Unread"
Received: +cmgl:0, "REC unread", "+8613135699576",, "13/07/14,22:11:10+32"
Received: 4f60597d
After a Unicode converter 4f60597d ===> Hello
Received: OK
Second, PDU mode view
Take an example on the internet below
Let's say the SMS received by the terminal is:
+CMT:, 24
0891683108200205f0240d91683157121468f0000860800331220000044f60597d
The task now is to reverse-encode and get information.
The following is an analysis of the received PDU data:
(1) 08///The length of the Information center number, the length of the 91+683108200205F0 except 2, formatted as 2 bits of the 16 binary string obtained
(2) 91//SMS Center number Type
(3) 683108200205f0//SMS Center number, conversion method mentioned earlier
==>+8613800220500
(4)//TPDU head byte
(5) 0D//Send source number length, 8613752141860 length formatted as 2-bit 16 binary derived
(6) 91//Send source Number type
(7) 683157121468F0//Send the source number, the number of the sending side is:
==>+8613752141860
(8) 00//protocol ID TP-PID
(9) 08//Data encoding scheme, 08: Chinese encoding, 00 English or digital, bit No.7 with bit No.6
(10) 608003312200//Date time, Parity Interchange: 06-08-30 13:22:00, there is a forum to write received is 026080 ... There is ' 02 ' in front, which means 2006-08 ... But I use different mobile phone to send text messages come to receive is 06, can not get 2006, do not know is the sender of the phone set problems or where the problem, still in the study.
(11) 00//Time Zone
(12) 04//User Data length Tp-udl (tp-user-data-length), length of 4f60597d except 2 formatted as 2-bit 16 decimal
Unicode code for 4f60597d//"Hello":
In providing an example:
PDU Mode view
SMS prompt message received by terminal:
+CMTI: "SM", 2
+cmgl:2,0,,28
0891683108200705f4240d91685123377660f0000831704132305423084f60597d00200020
The task now is to reverse-encode and get information.
The following is an analysis of the received PDU data:
(1) 08///The length of the Information center number, the length of the 91+683108200205F0 except 2, formatted as 2 bits of the 16 binary string obtained
(2) 91//SMS Center number Type
(3) 683108200705F4//SMS Center number, conversion method mentioned earlier
==>+8613800270504
(4)//TPDU head byte
(5) 0D//Send source number length, 8613752141860 length formatted as 2-bit 16 binary derived
(6) 91//Send source Number type
(7) 685123377660F0//Send the source number, the number of the sending side is:
==>+8615327367060
(8) 00//protocol ID TP-PID
(9) 08//Data encoding scheme, 08: Chinese encoding, 00 English or digital, bit No.7 with bit No.6
(10) 317041323054//Date time, Parity Interchange: 13-07-14 23:03:45, there is a forum to write received is 026080 ... There is ' 02 ' in front, which means 2006-08 ... But I use different mobile phone to send text messages come to receive is 06, can not get 2006, do not know is the sender of the phone set problems or where the problem, still in the study.
(11) 23//Time zone
(12) 08//User Data length Tp-udl (tp-user-data-length), length of 4f60597d except 2 formatted as 2-bit 16 decimal
4f60597d00200020//"Hello" has a Unicode code of two spaces:
Iv. viewing read information
Ok
At+cmgl=0
Ok
At+cmgf=1
Ok
At+cmgl= "Rec Read"
+cmgl:0, "REC READ", "+8613135699576",, "13/07/14,22:11:10+32"
4f60597d
+cmgl:1, "REC READ", "+8615327367060",, "13/07/14,23:00:50+32"
Hello.good work.
+cmgl:2, "REC READ", "+8615327367060",, "13/07/14,23:03:45+32"
4f60597d00200020
Ok
At+cmgl=1
ERROR
At+cmgf=0
Ok
At+cmgl=1
+cmgl:0,1,,24
0891683108200705f6240d91683131659975f6000831704122110123044f60597d
+cmgl:1,1,,35
0891683108200705f6240d91685123377660f000003170413200052311e8329bfd769ddf6f3208747fcbd72e
+cmgl:2,1,,28
0891683108200705f4240d91685123377660f0000831704132305423084f60597d00200020
Arm+linux System porting 3G Dial-up SMS (c) "Turn"