"send" below refers to the command I typed, and "receive" refers to the information displayed after pressing Enter, including other received information.
~ >: microcom -s 115200 /dev/ttyUSB1
Send: at
Receive: OK
Set to text mode Read:
Send: at+cmgf=1
Receive: OK
Save the information in the SIM card:
Send: at+cpms="SM","SM","SM"
Receive: +CPMS: 0,50,0,50,0,50
Receive: OK
Waiting to receive text messages. . . . . .
After receiving, there will be this prompt message:
Receive: +CMTI: "SM", 0
View information:
Send: at+cmgl="rec unread"
Receive: +CMGL: 0,"REC UNREAD","+8613135699576",,"13/07/14,22:11:10+32"
Receive: 4F60597D
After a unicode converter 4F60597D ===> Hello
Receive: OK
2. PDU mode view
The following is an example from the Internet
Suppose the terminal receives a text message:
+CMT: ,24
0891683108200205F0240D91683157121468F0000860800331220000044F60597D
The current task is to reverse the code to obtain the information.
The following is an analysis of the received PDU data:
(1) 08 //The length of the information center number, the length of 91+683108200205F0 is divided by 2 and formatted into a 2-digit hexadecimal string
(2) 91 //SMS center number type
(3) 683108200205F0 //SMS center number, the conversion method has been mentioned before
==>+8613800220500
(4) 24 //TPDU header byte
(5) 0D //The length of the source number, the length of 8613752141860 is formatted into a 2-digit hexadecimal string
(6) 91 //Sending source number type
(7) 683157121468F0 //Sending source number, the sending end number is:
==>+8613752141860
(8) 00 //Protocol identifier TP-PID
(9) 08 //Data encoding scheme, 08: Chinese encoding, 00 is English or number, Bit No.7 and Bit No.6
(10) 608003312200 //Date and time, odd and even swapped: 06-08-30 13:22:00. Some forums say that the received number is 026080... that is, there is a '02' in front, indicating 2006-08... But when I use different mobile phones to send text messages, the received number is 06, and 2006 cannot be obtained. I don’t know if it is a problem with the sender’s mobile phone settings or somewhere else. I am still studying it.
(11) 00 //Time zone
(12) 04 //User data length TP-UDL (TP-User-Data-Length), the length of 4F60597D divided by 2 and formatted into a 2-digit hexadecimal number
(13) 4F60597D //UNICODE code for "Hello":
Providing an example:
PDU mode view
The SMS prompt information received by the terminal:
+CMTI: "SM",2
+CMGL: 2,0,,28
0891683108200705F4240D91685123377660F0000831704132305423084F60597D00200020
The current task is to reverse the encoding to obtain the information.
The following is an analysis of the received PDU data:
(1) 08 //The length of the information center number, the length of 91+683108200205F0 is divided by 2 and formatted into a 2-digit hexadecimal string
(2) 91 //SMS center number type
(3) 683108200705F4 //SMS center number, the conversion method has been mentioned before
==>+8613800270504
(4) 24 //TPDU header byte
(5) 0D //The length of the source number, the length of 8613752141860 is formatted into a 2-digit hexadecimal string
(6) 91 //Sending source number type
(7) 685123377660F0 //Sending source number, the sending end number is:
==>+8615327367060
(8) 00 //Protocol identifier TP-PID
(9) 08 //Data encoding scheme, 08: Chinese encoding, 00 is English or number, Bit No.7 and Bit No.6
(10) 317041323054 //Date and time, odd and even swapped: 13-07-14 23:03:45, some forums say that the received number is 026080... that is, there is a '02' in front, indicating 2006-08... But I used different mobile phones to send text messages and the received number was 06. I couldn't get 2006. I don't know if it is a problem with the sender's mobile phone settings or somewhere else. I am still studying it.
(11) 23 //Time zone
(12) 08 //User data length TP-UDL (TP-User-Data-Length), the length of 4F60597D is divided by 2 and formatted into a 2-digit hexadecimal number
(13) 4F60597D00200020 //"Hello" UNICODE code with two spaces:
IV. View the 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
0891683108200705F6240D91685123377660F000003 170413200052311E8329BFD769DDF6F3208747FCBD72E
+CMGL: 2,1,,28
0891683108200705F4240D91685123377660F0000831704132305423084F60597D00200020
OK
Previous article:Analysis of ARM Linux interrupt mechanism
Next article:ARM interrupt processing bottom-level analysis
Recommended ReadingLatest update time:2024-11-16 14:34
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Repost] An article summarizes eight IO port modes of STM32 microcontrollers
- Microchip live replay: MCU programming is no longer difficult, use MPLAB code configurator to achieve rapid development
- [Raspberry Pi 3B+ Review] Install libjpeg library & drive USB camera
- C language BCD code to decimal (hexadecimal HEX) program
- From ERM to X-axis LRA, TI provides you with a comprehensive Haptics Solution
- 【TI mmWave Radar Evaluation】+Configuration File Test (Part 2)
- TI Live: Overview and application introduction of 60G millimeter wave sensors, "packaged antenna" makes building and factory detection solutions simpler
- First day of the journey in Shenzhen
- Ethernet Problems
- MicroPython precompiled firmware for TB-01 (W600)