Joke Collection Website - Public benefit messages - Analysis of SMS sending and receiving function
Analysis of SMS sending and receiving function
This paper mainly introduces the sending and receiving functions of short messages, including the process that the sender sends short messages to the short message center, the process that the short message centers forward short messages to each other, and the process that the short message center sends short messages to the receiver, and specifically introduces the connection process between them and the role of the gateway in it. In addition, it also introduces the store-and-forward mode, gateway, register, mobile switching center, how to confirm the location of the receiver and different transmission modes of the short message center, and specifically introduces the role of gateway in security and the protocol adopted in short message sending. Then, several short message encryption algorithms are briefly introduced, and the principle and insecurity of the algorithms are analyzed. Finally, it introduces the development process of short message, the progress in sending content, the classification of various short message services and the difference of routing in the sending process.
* * Keywords: SMS protocol encryption algorithm SMS development * *
First, the sender edits the message and fills in the recipient number. Then the chip in the mobile phone encodes the text information, writes the corresponding AT instruction into the serial port, and then transmits the information to the baseband, which is modulated into electromagnetic waves by the modem. Finally, the electromagnetic wave is sent to the short message center.
A. firstly, the MS initiates an access request to the MSC, which includes the iMSi or TMSI number of the ms; B. MSC initiates an access request to VLR, and VLR can authenticate and encrypt during the access process; C. VLR returns an access confirmation message to MSC; D, the MSC sends back an access confirmation message to the MS to allow the MS to enter the GSM network for communication; The MS sends a short message to the MSC, including the content of the short message and the destination SC address; F. MSC inquires VLR whether MS can send short messages; G. after vlr confirMS that ms has short message service and is not prohibited, it informs MSC that ms can send short messages at present and provides MSISDN number; H, MSC forwards the short message to IWMSC, and the short message includes the content of the short message, the MSISDN number of the source MS and the destination SC address; I. IWMSC forwards a short message to SC, which includes the content of the short message, the MSISDN number of the source MS and the address of the destination SC; J and SC inform IWMSC that the short message has been accepted; K. IWMSC informs MSC that the short message has been received; L, MSC informs ms that the short message was sent successfully.
The short message parameters are coded in PDU (Protocol Data Unit) format, and the short message is transmitted after hexadecimal coding, which contains not only the message characters, but also a lot of metadata, such as the address of the short message center, the character coding format, time stamp and so on.
Whenever the Mobile Application Part (MAP) of SS7 protocol is used, SMS will be sent between SMSC and mobile phone. The message operates with MAP MO-ForwardSM and MT-ForwardSM, and its payload length is constrained by the signaling protocol to accurately send 140 bytes (140 bytes ×8 bits/byte = 1 120 bits). When a single message is encoded with 7 bits, the maximum length can reach 160 characters.
First, the SMS center decodes the received information for the first time, determines the key information such as the number of the recipient, and then finds the location of the recipient, and then sends the message to the SMS center where the recipient is located.
After the short message is sent, it is stored in SMSC (Short Message Service Center) and then sent to the receiver by the short message center. If the recipient is not in the service area, SMSC will automatically save the information and wait until the recipient appears in the service area before sending it.
Obtain the short message sent by SMSC, read the routing information through HLR, and send the short message to the base station where the receiver is located after meeting the transmission conditions.
The home location register is used to store and manage the related information of mobile users, and the location information of mobile devices is also stored in HLR, which records the location information at regular intervals. With this mechanism, the recipient can be found quickly when the service is carried out.
When users move from one service area to another, the mobile switching center that controls data connection and transmission can switch areas.
Although you don't use your mobile phone to make calls, your mobile phone keeps sending and receiving messages. It communicates with the cell phone tower through a channel called control channel. The purpose of this communication is to let the mobile phone system know its signal area, so that when you move, the mobile phone can switch to other signal areas. Every once in a while, the mobile phone and the transmission tower will exchange data packets to ensure that everything works properly.
Cross-network transmission: SMS centers of different operators send messages to each other. First, the sender sends information to the SMS center of the receiver operator, and the SMS center of the sender operator sends information to the SMS center of the receiver operator, and the SMS center of the receiver sends information to the receiver.
Transmission on the same network: SMS centers of the same operator send messages to each other. First, the sender sends the message to the short message center, and then the short message center sends the message to the receiver.
The user's mobile phone timer triggers to start reading serial port data for judgment, and when there is no data in the serial port, wait for the next timer trigger; When the SMS center sends electromagnetic waves to the receiver, that is, when there is data in the serial port, it reads the data in the serial port, and then the receiver decodes the received data. Finally, it parses the data encoded by PDU into text and displays it on the mobile phone with UI interface.
A, SC sends a short message to GMSC, which includes the content of the short message, the address of the source SC, the MSISDN number of the destination MS and the short message that SC is waiting to send; B. GMSC queries the HLR to which the destination MS belongs for routing information; C. HLR returns the query result to GMSC. There are two situations: success, return routing information, including MSC number where the destination MS is located, IMSI number and LMSI number of the destination user; ; Failure, return the cause of the error, or return the Alert_MSISDN number. D. GMSC sends a short message to the destination MSC according to the obtained routing information, including the content of the short message, the address of the source SC and the IMSI or LMSI number of the destination MS; The MSC inquires the VLR about the relevant information of the destination MS, including whether the MS is accessible; F. the vlr sends a paging request message to the MSC to request the establishment of a wireless connection; G. after receiving the paging request from VLR, MSC sends the paging request to MS; H. MS paging is successful, and the access process is carried out; I. MSC sends an access request message to inform VLR that the paging is successful; After the VLR completes the authentication, data update and encryption of the mobile station, it informs the mobile switching center that the access is successful. K. MSC sends an access confirmation message to MS; L. MSC forwards the short message to MS, including the content of the short message and the source SC address; M. MS returns a short message to MSC to successfully receive the message; N. MSC informs GMSC MS that the short message has been successfully received; O. GmsC informs SC that MS has successfully received the short message. Line judgment; When there is a new message prompt in the data, the message is decoded according to the decoding format of PDU message, and the UI interface is called to prompt the arrival of the new message.
SMS can reliably transmit the sent message in both directions, that is, after sending the message, SMS will receive a confirmation message to obtain the sending result, and different results will show different information to the sender, that is, sending succeeded or failed.
Synchronization of SMS transmission means that SMS can be transmitted synchronously with data, voice and other services, which can ensure the smooth transmission of information even when the data volume of the service channel is at the peak.
Peer-to-peer communication mode, the sender only needs to know the other party's mobile phone number, and can send information to the other party, just like asking for the ip address of the computer first. Once bound, he can establish a connection with other addresses through this address.
SMS is a stateless communication protocol, in which each SMS message is regarded as completely independent of other messages. Enterprise applications that use SMS as a communication channel for stateful conversations in which MO reply messages are paired with specific MT messages need to maintain session management outside the protocol.
Smpp (short message peer-to-peer protocol), peer-to-peer short message protocol.
1) defines the data communication interface between the external short message entity ESME and the short message center SMSC.
2) Define a series of short message exchange operations between ESME and SMSC.
3) Define the data format exchanged between ESME and SMSC.
Based on SMPP protocol, operators have formulated their own protocol standards: CMPP protocol of China Mobile, SGIP protocol of China Unicom and SMGP protocol of China Telecom.
The frequency of mobile phone signal is very high, generally around 900Mhz, and it propagates through ionospheric reflection. The signal of the calling mobile phone is transmitted to the nearest base station, that is, the mobile or connected signal tower, and then the frequency of the high-frequency signal is reduced by the base station, and the base station communicates with the base station. This kind of signal travels in a straight line and will be blocked when it meets tall buildings, so those towers are erected very high, and then transmitted to the base station near the mobile phone that answers the phone, and then converted into high-frequency signals and sent to the mobile phone.
The full name of ISMG is Internet SMS Gateway, which mainly solves the problem of SMS interworking and SP access between networks and operators. It provides a dynamic data exchange platform system for users to send and receive short messages. Through the interface software of the system, the short message platform can be seamlessly and efficiently connected with various systems and software, and the dynamic information generated by the system of the application unit at any time can be converted into mobile phone short messages. By connecting the short message centers of China Mobile and China Unicom with the port special service number through the mobile Monternet platform, short messages can be sent and received in real time, thus establishing a fast two-way (or one-way) channel for short messages for various systems (or software), so that mobile phone users can communicate with SP in a two-way through short messages and receive information provided by SP.
The functions of each component of SMS gateway are as follows:
(1)SMPP agent system is connected with SMS center in GSM network according to version 3.3 protocol to realize efficient and reliable data transmission. The system supports the flow control function and can control the transmission flow according to the flow of SMSC.
(2) The communication agent system realizes the connection and protocol intercommunication with SP and other content providers. Based on TCP/IP protocol, it establishes a safe and efficient transmission channel between CMPP protocol and SP. The system supports the flow control function and can control the received flow according to its own business volume.
(3) As an important functional component of SMS gateway, firewall protects other related modules inside SMS gateway and realizes packet filtering and proxy for internal and external access.
(4) The short message gateway processing system completes the business processing of the gateway, including: routing inquiry to the tandem gateway, locally establishing the cache of the corresponding tables of the short message gateway ID, the user's mobile phone number, the SP ID and its IP address, establishing the corresponding table of the user's mobile phone number segment and the SMSC (Short Message Center) address, supporting the data distribution function, providing and processing the original billing bill, etc.
(5) The billing system of SMS gateway provides the original bill record (CDR) of SMS gateway.
(6) The service management system includes service management and gateway monitoring functions.
The short message gateway and the short message center should be interconnected by a dedicated line.
In the design of hardware and software structure, SMS gateway should adopt distributed and modular equipment, in which the hardware equipment can adopt multiple hosts, and the load on the network can be shared through four-layer switches to avoid a single point of failure and realize the safety of the equipment.
At the same time, SMS gateway adopts firewall technology, which can support IP packet filtering and application proxy to prevent external attacks and realize information security.
When establishing CMPP protocol connection between SMS gateway and SP, MD5 is used to authenticate each other's identities to realize business security.
The connection between SMS gateway, SMS center and billing center adopts a dedicated line, and the connection with billing center also needs to add a firewall at the billing center side to ensure that the security of existing network equipment will not be reduced due to the connection with SMS gateway.
For the encryption algorithm used in GSM standard, the security of short messages has been proved to be fragile, and the specific content of short messages can be solved in the time of 2 to 32 power through violent cracking.
CDMA standard with strong encryption can be used for the transmission of confidential information.
A5/ 1 is used to generate a key stream of 1 14 bit sequence for each pulse sequence. Before XOR, it is modulated with 1 14 bits. A5/ 1 Initialize with a 64-bit key and a recognizable 22-bit frame number. The old GSM implementation using Comp 128v 1 for key generation fixed 10 key bits to zero, thus generating an effective key length of 54 bits. The introduction of Comp 128v2 corrects this weakness, and it can generate an appropriate 64-bit key.
Using two security loopholes in GSM communication encryption, with the help of common commercial hardware, it took 55 days to calculate a Zhang Caihong table. The size of this rainbow watch is 984GB. After getting the rainbow table, the security expert can determine the key used to encrypt the communication data in only nine seconds.
The cipher is based on the combination of four linear feedback shift registers with irregular clocks and a nonlinear combiner.
KASUMI algorithm is specified in 3GPP technical specification. KASUMI is a 128-bit key and a 64-bit input-output block cipher. The core of KASUMI is an eight-wheel Feistel network. The wheel function in the main Feistel network is an irreversible Feistel-like network transformation. In each round, the loop function uses a loop key, which consists of eight 16 subkeys, which are derived from the original 128-bit key by using a fixed key schedule.
A. Communication data transmitted through fixed network is not protected by encryption; B. unable to resist some active attacks; C only by connecting to a secure fixed network can the security of GSM communication be guaranteed; Legal interception in d. d. GSM is only a remedy afterwards; E. the terminal identification code is not credible.
Only text can be sent. According to whether the sender and the client are roaming, the basic short message service can be divided into point-to-point short messages within the network, point-to-point short messages between networks, international short messages and international short message roaming.
Monternet short message service is an important part of Monternet service, and it is the general name of data application services based on Monternet short message platform provided by China Mobile. Monternet SMS service is provided by a partner who signed a contract with China Mobile. At present, it has accessed hundreds of content providers (SP) and provided tens of thousands of services.
Can support sending formatted text, sound effects, small pictures and photos. Among them, the sound effect is voice short message service. Voice short message service refers to recording what you want to say through fixed telephone, PHS or mobile phone and sending it to one or more users so that they can listen to your message. At the same time, you can also receive, forward, query and reply voice messages as needed according to the prompt tone of the mobile phone. It makes up for the shortcomings that traditional short messages are difficult to transmit sound and input information, solves the problem of sending short messages by people who are not familiar with Pinyin for a long time, and effectively solves the interconnection problem of sending short messages between telephones, PHS or mobile phones.
Can support SMS, animation, audio and video files. The English name of MMS is MMS, which is the abbreviation of multimedia messaging service, meaning multimedia messaging service, and is often called MMS. Its biggest feature is that it supports multimedia functions and can transmit comprehensive content and information, including text, image, sound, data and other multimedia formats.
Technically speaking, MMS is not a short message, but with the support of GPRS network and WAP wireless application protocol as the carrier to transmit pictures, sounds, words and other information. MMS service can realize instant multimedia information transmission from mobile phone end-to-end, from mobile phone terminal to Internet or from Internet to mobile phone terminal.
The user edits the information content on the mobile phone, inputs the other party's mobile phone number and chooses to send a short message to the receiver's mobile phone. The maximum length of a single message is 140 bytes, that is, 70 Chinese characters.
China Mobile and China Unicom realize short message interconnection, and mobile users and Unicom users can send short messages through their mobile phones.
China Mobile has achieved short message intercommunication with 134 mobile operators in 89 countries and regions around the world, that is, mobile users can send and receive short messages with users of major mobile operators in Hong Kong, Macao, Taiwan, Southeast Asia, North America, South America and other countries and regions.
China mobile users can use local mobile networks and domestic mobile users to send and receive short messages after roaming in countries and regions that have signed GSM roaming agreements with China Mobile.
- Previous article:What is the longest unpaid vacation?
- Next article:Get the same message in one second.
- Related articles
- What is the tct exam? What do you think of the results of tct exam?
- Nanning Xingning District Education Bureau telephone number
- How to check after spending on Nianbaotong
- How can a cultural worker inform others when dancing in our village?
- Ask for a watch that can receive short messages.
- When does Zhengzhou Railway Vocational and Technical College start?
- Xpeng Motors 2065 438+09: have you found the key to sustainable development?
- Where are the classic adult allegorical sayings, brain teasers, funny text messages, jokes and so on?
- How to log in to Sichuan Tianfu Tong?
- My number is mobile phone. Why should I send a text message to Unicom? Whether the other party receives it or not, the information report is immediately displayed as sent to?