Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A brief introduction to PDU and its format in the development of .net platform

2025-03-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you the brief introduction of PDU and its format in the development of. Net platform. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Brief introduction and format of PDU

PDU is the core of most SMS communication, and only a few mobile phones only support Text mode (for example, the author's MOTO C330). PDU mode can provide more powerful functions than Text mode, but its coding is more difficult than Text mode. No matter which mode, we can send, receive and delete short messages through the AT command control terminal. The following mainly introduces the composition and coding and decoding of PDU.

The composition of PDU

PDU is made up of a string of "0-9" and "A-murf". On the surface, it is made up of a set of hexadecimal numbers.

Here is an example of sending and receiving. . A PDU string sent by a mobile phone: 0891683108200805F011190D91683188902848F40008FF108FD9662F4E0067616D4B8BD577ED4FE

Compared with the 3GPP protocol, we get: (the binary code is high-> low-order from left to right)

SMS center address field 08 address length: 8 bytes, including the next 91

91 address type: 10010001 Bit7:1. Always 1 Bits 6, 5, 5, 5, 7, 7, 7, 7, 7, 4, 7, 4, 7, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 That is, the number is preceded by "+".

Note: for some special numbers, such as the interworking between mobile phone and PHS, it cannot be set to 001, but to 000, which means there is no "+" before the number, otherwise it cannot be received. Bits 3pyrrine 2jinghuanghuanghuang: generally default is 0001, indicating the type of phone number. 683108200805F****0 SMS center number: reverse within one byte, 8613800280500. If the length is odd, you need to add "F" to complete * * FirstOctet**** field * 11 * * including TP-MTI (2bit), TP-RD (1bit), TP-VPF (2bit), TP-RP (1bit), TP-UDHI (1bit), TP-SRR (1bit).

Binary representation: 0 000 100 0 01

TP-MTI**:01** TP-Message-Type-Indicator (message type indicator)

Bit1,0:01 indicates as SMS-SUBMIT type

TP-RD**:0** TP-Reject-Duplicates (whether to reject the same duplicate message) Bit2:0 instructs the short message center to accept unforwarded messages with the same TP-MR. * * TP-VPF****:10** TP-Validity-Period-Format (validity format) Bit4,3:10 indicates the use of relative format. * * TP-SRR****:0** TP-Status-Report-Request Bit5:0 indicates that status reports are not used.

TP-UDHI**:0 * * TP-User-Data-Header-Indicator (user data header indication) Bit6:0 indicates that this is a SMS message and there is no user data header. The EMS message needs to be set up.

TP-RP**:0 * * TP-Reply-Path (reply path) Bit7:0 indicates that the reply path is not set. * * message reference value TP-MR** 19 TP-Message-Reference * other number field * 0D91683188902848F4

Its structure is similar to the short message center number field, so I won't repeat it any more.

Protocol identity TP-PID

* * 00 TP-Protocol-Identifier (upper layer protocol instruction). Generally set to 00, indicating ordinary GSM, peer-to-peer * *

The encoding method TP-DCS 08 TP-Data-Coding-Scheme (data encoding setting) indicates the encoding mode of TP-UD. 08 stands for Unicode mode. 00 is the 7Bit code * * validity period TP-VP FF TP-Validity-Period (validity period). FF stands for maximum. TP-UDL 10 TP-User-Data-Length (user data length) 0x10 length. Note that the definition of user length is different under different codes.

User data TP-UD

8FD9662F4E0067616D4B8BD577ED4FE TP-User-Data

Unicode coding of "this is a test message" in Chinese

. PDU string 0891683108200805F0040D91683188902848F4000850208151754500108FD9662F4E0067616D4B8BD577ED4FE1 received by mobile phone

SMS center address field * 0891683108200805F0:+861380280500 FirstOctet * 04

Its binary code: 00000100 TP-MTI:00 TP-MMS (TP-More-Message-to-Send): 1 SMS center has no more messages to send TP-SRI:0 TP-UDHI:0 TP-RP:0

Sender number 0D91683188902848F4:+8613880982844

Protocol ID 00 TP-DCS point-to-point

Encoding method 08 TP-DCS Unicode coding

SMS Center timestamp 50208151754500 TP-SCTS byte reversal 05swap 02max 18 15:57:45 the last 00 represents the time zone, here is 0

User data length 10 TP-DHL

User data 8FD9662F4E0067616D4B8BD577ED4FE1 TP-UD

The above content is the PDU introduction and format of SMS in the development of. Net platform. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report