: microcom -s 115200 dev ttyUSB1 send: a" />

ARM+linux system transplantation 3G dial-up Internet access to send and receive text messages Part 3

Publisher:森绿企鹅Latest update time:2016-06-20 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1. Use text viewing mode The
"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

Keywords:ARM Reference address:ARM+linux system transplantation 3G dial-up Internet access to send and receive text messages Part 3

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

Cross-compile Python-2.7.13 to ARM (aarch64) platform
The method is basically the same as cross-compiling Python-2.7.13 to ARM (aarch32) platform. The only difference is that the toolchain is replaced with the toolchain for compiling aarch64. You can refer to using qemu to build an aarch64 learning environment. Create a directory: mkdir python2_7_13_for_aarch64 Here
[Microcontroller]
ARM11 S3C6410 address table
Reference: 1) "ARM1176 JZF-S Technical Reference Manual": Chapter 3 System Control Coprocessor Chapter 6 Memory Management Unit 2) u-boot source code: u-boot-xxx/cpu/s3c64xx/start.S u-boot-xxx/board/samsung/smdk6410/lowlevel_init.S 1. Brief description of ARMv6 MMU 1) MMU is controlled by coprocessor CP15; 2) MMU func
[Microcontroller]
Design and implementation of a logistics distribution system based on S3C2440 on Linux platform
  introduction   The logistics distribution system includes multiple links such as cargo concentration, inventory management, vehicle scheduling, distribution transportation, etc. The ultimate goal of the distribution system is to reduce the total distribution cost and thus obtain the "third profit". Among them, the
[Microcontroller]
Design and implementation of a logistics distribution system based on S3C2440 on Linux platform
Software/Hardware Design of Web Server Boa Based on ARM9
1. Introduction to ARM Generally speaking, any dedicated hardware and software system with a microprocessor can be called an embedded system. It is a dedicated computer system embedded in an object system, centered on applications and based on computer technology. The hardware and software can be tailored to meet the
[Power Management]
Software/Hardware Design of Web Server Boa Based on ARM9
Understanding of ARM's definition of special registers *(volatile unsigned long *))
        I used to not understand the (*(volatile unsigned long *)) in ARM programs. Today, I will analyze this type conversion by consulting materials and reading articles written by others. This usage is not only useful in defining internal special registers, but also in defining the addresses of external devices when
[Microcontroller]
ARM Technology independently develops IP and standards based on ARM technology in line with the needs of the Chinese market
In 2018, ARM completed the split of its China business and established a joint venture company with the Chinese side holding 51%. As the headquarters of ARM's IP business in China, ARM Technology (China) Co., Ltd. will provide integrated circuit intellectual property (IP) licensing and technical services to partners h
[Embedded]
ARM Technology independently develops IP and standards based on ARM technology in line with the needs of the Chinese market
TQ2440 Study Notes - 10. Basic knowledge of embedded programming [arm-linux-ld option]
arm-linux-ld is used to link multiple target files and library files into an executable file. Introducing the "-T" option, which can be used directly to specify the starting address of the code segment, data segment, and bss segment. It can also be used to specify a link script to perform more complex address settin
[Microcontroller]
TQ2440 Study Notes - 10. Basic knowledge of embedded programming [arm-linux-ld option]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号