Use python to implement sms pdu encoding and python SMS pdu Encoding
A few days ago, I started a 3G module, and then I went backwards. You need to send text messages in both Chinese and English, so the PDU mode is used (not familiar with google pai_^ ).
The biggest problem is of course splicing PDU encoding (python is
I searched a lot of articles on PDU parsing on the Internet, but I had no clue. Finally, I made some progress after referring to the Google Code.
Sodino has not obtained the formal MMS specification, and everything comes from Google search. I hope that the majority of users will pick up and correct the mistakes. I am very grateful.
After the mobile phone receives the text message, Android (Android 2.2.1 from cyanogenmod for G6) will output the follow
PDU
(Protocol data Unit)The Edit Protocol Data unit PDU (Protocol Data Unit) refers to the data units passed between peer levels. The PDU on the physical layer of the Protocol Data Unit (Protocol Data unit) is the data bit (bit), the PDU on the data link layer is the data frame (frame), the
One of the things that I used to do, to sort out the data. Today I studied the SMS PDU format for a morning and found a way to set up SMS receipts in the PDU string. It's in Pdu-type. This 8-bit group is generally set to 11: Contains TP-MTI (2bit), Tp-rd (1bit), TP-VPF (2bit), TP-RP (1bit), Tp-udhi (1bit), TP-SRR (1bit)
Binary representation: 0 0 0 10 0 01
Tp-mti
Tian haili @ csdn
2012-06-29
Wap push is encapsulated in sms pdu. To resolve wap push, you must first read the sms pdu code, which is the basis of services such as SMS, MMS, and wap push. Wap push is sent to the terminal. Therefore, this article mainly describes the delivery PDU encoding. In addition, if the content to be encapsulated by the
PDU codec details
Brief Introduction
SMS is a specification developed by ETSI (GSM 03.40 and GSM 03.38 ). It can send up to 160 characters, when using 7-bits encoding. 8-bit encoding (up to 140 characters) is usually not displayed directly through the mobile phone; it is usually used as a data message, such as pictures and ringtones in smart messaging) and ota wap settings. 16-bit information (up to 70 characters) is used to display Unicode (ucs2) tex
Assuming that there are L variables in the getbulkrequest PDU variable binding table, the "non-duplicate" field has the value N, and the "maximum successor" value is M, then the R=L-N variable should return up to M-dictionary successors. Getbulkrequest
A major improvement in SNMPv2 is the Getbulkrequest PDU. The purpose of this PDU is to minimize the number of pr
7-bit encoding: Send common ASCII characters; 8-bit encoding: usually used to send data messages; ucs2 encoding: used to send Unicode characters.
Generally, the PDU code consists of 13 items, namely, a B c d e f g h I j k l m. The meaning of these 13 items are as follows:
A: The length of the SMS center address, two hexadecimal digits (1 byte ). B: The number type of the SMS center, which is a two-digit hexadecimal number. C: the number of the short m
The encoder of the PDU works as a reverse process of the decoder. It is relatively straightforward to work with the PDU code sent only by the encoder as required . This article explains the coding idea, the specific code please refer to the Blog pduencoder partI took The PDU code is divided into two parts,SMS and EMS. the EMS section I only provided the Concatena
Five SNMP protocol data units
SNMP specifies five protocol data units PDU (that is, SNMP Packets) for exchange between management processes and proxies.
Ø
Get-Request: extract one or more parameter values from the Agent process (sent by the Network Management System)
Ø
Get-next-Request: extract the next parameter value that follows the current parameter value from the Agent process (sent by the Network Management System)
Ø
Set-Request: sets o
MMS in Android to MMS (multimedia messaging Service) The operation of the MMS protocol is done through the APIs provided in frameworks: Com.google.android.mms This package is not open in the SDK and can only be used by internal programs, encapsulating all the APIs required by MMS.
This package is the implementation of the MMS protocol in Android, including some data structures: genericpdu,multimediamessagepdu,sendreq,sendconf,notificationind,retrieveconf, Pduheaders,pdubody,pdupart and so on. It
The MMS operation on the MMS (Multimedia Messaging Service) in Android is related to the MMS protocol, which is completed through the API provided in frameworks: COM. google. android. the MMS package is not open in the SDK and can only be used by internal programs. It encapsulates all the APIS required by MMS.This package is the implementation of the MMS protocol in Android, including some data structures: genericpdu, multimediamessagepdu, sendreq, sendconf, icationicationind, retrieveconf, pduh
PDU Coding Rules
Currently, text and PDU (Protocol Data Unit) are commonly used for sending short messages. Use text mode to send and receive short message code simple, easy to achieve, but the biggest drawback is not to send and receive Chinese text messages, and PDU mode not only support Chinese text messages, but also send English text messages.
The decoding part was simply completed yesterday, and the encoding part is added today (in the same class ). This method is similar to the encoding part. The attribute is used to decode fields.ProgramWritten in the attribute access section. The decoded function only needs to read these attribute values to complete PDU decoding.
The PDU string received by the mobile phone or sms cat contains eight parts:
There are also a lot of materials on the Internet for sending Chinese text messages in the gsm pdu mode. However, after so many days, I wrote my own experience as a record, it is also convenient for other later users to refer.
Many materials on the Internet do not talk about the development environment, so I still feel confused in some places.
My development environment:
Hardware: the GSM module uses the mc52i of Siemens, and the control chip is stm32
There are three methods to send and receive SMS messages: block mode, text mode, and PDU mode. PDU mode is supported by all mobile phones and can use any character set. This is also the default encoding method for mobile phones.
Text and PDU (Protocol Data Unit) modes are commonly used to send short messages. Sending and receiving text messages in text mode is si
Original link: http://www.cppblog.com/zhangyq/archive/2009/07/04/89245.html
There are three ways to send and receive SMS information: Block Mode, Text Mode, and PDU mode. PDU mode is supported by all mobile phones and can use any character set, which is the default encoding of the phone.Send short messages commonly used text and PDU (Protocol Data Unit, Protocol)
TCP segment of a reassembled PDU Grab packet found a TCP segment of a reassembled PDU, search a blog, find some Bo friends of the article, very well solve my problem, then share "TCP segment of a reassembled PDU" refers to not the IP layer of the Shard, IP shards in the Wireshark with "fragmented IP protocol" to identify. A detailed look, found that "TCP segment
In a layered network structure, for example, in an Open Systems Interconnection (OSI) model, a Protocol Data Unit (PDU) is established at each layer of the transmission system ). PDU contains information from the upper layer and the object attaching information of the current layer. The PDU is then transmitted to the lower layer. The physical layer actually trans
Principle and Implementation of GSM Chinese text message sms pdu encoding in Linux development
SMS is a specification developed by Esti (GSM 03.40 and GSM 03.38 ). There are two ways to send and receive SMS messages: text mode or PDU (protocol description unit) mode. In text mode, only common ASCII characters can be sent. To send images, ringtones, and other encoded characters (such as Chinese), The
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.