PDU introduction and its format

Source: Internet
Author: User
PDU is the core of most text messages, and only a few mobile phones only support the text mode (for example, the author's Moto c330 ). The PDU mode provides powerful functions than the text mode, but its encoding is more difficult than the text mode. In either mode, we can use the AT command control terminal to manage SMS sending, receiving, and deletion. The following describes the structure and encoding and decoding of PDU. PDU StructurePDU is composed of a string consisting of 0-9 and A-F. It looks like a group of hexadecimal numbers. The following is an example of sending and receiving. 1. a pdu string sent by the mobile phone: the token is obtained from the 3GPP Protocol: (the binary code is high-> low-level from left to right) SMS center address field 08Address length: 8 bytes, including the last 91 91Address type: 10010001
Bit7: 1. Always 1
Bits 6, 5, 4: type-of-number (number type): 001, representing the internation number. That is, add "+" before the number ". Note:: For some special numbers, for example, when a mobile phone is connected to PHS, it cannot be set to 001, but to 000, which indicates that the number is not "+", otherwise it cannot be received. Bits 0001, 1: Numbering-plan-Identification: Generally, the default value is, indicating the phone number type. 683104200805f 0SMS center number: The number is reversed in one byte, Which is 8613800280500. If the length is an odd number, you need to add "F" to the number. Firstoctet Field 11Contains TP-MTI (2bit), TP-RD (1bit), TP-VPF (2bit), TP-RP (1bit), TP-UDHI (1bit), TP-SRR (1bit) binary representation: 0 0 0 0 01 TP-MTI : 01TP-message-type-indicator (Message Type Indicator) bit1, 0: 01 indicates SMS-SUBMIT type
TP-RD : 0TP-reject-Duplicates (whether to reject identical duplicate messages) bit2: 0 indicates that the short message center accepts messages that are not forwarded with the same TP-MR. TP-VPF : 10TP-validity-period-format (validity period format) bit4, indicates that the relative format is used. TP-SRR : 0 TP-status-report-request bit5: 0 indicates no status report is used. TP-UDHI : 0 TP-user-data-header-indicator (user data header)
Bit6: 0 indicates that this is an SMS message without a user data header. You need to set the EMS message.
  TP-RP : 0 TP-reply-path (reply path)
Bit7: 0 indicates that no reply path is set.
Reference message TP-MR19 TP-message-Reference Peer number field 0d91683188902848f4 its structure is similar to that of the text message center number field. Protocol Identifier TP-PID 00 TP-Protocol-identifier (upper-layer protocol indication), generally set to 00, indicating common GSM, point-to-point
Coding Method TP-DCS08 TP-data-coding-Scheme (data encoding settings), indicating the encoding method of the TP-UD. 08 represents the Unicode mode. 00 is 7-bit encoded Validity Period TP-VPFf tp-validity-period (validity period ). FF indicates the maximum value. User Data Length TP-UDL10 TP-user-data-length (User Data Length) 0x10 length. Note that the user length is defined differently under different codes. User Data TP-UD8FD9662F4E0067616D4B8BD577ED4FE1 TP-user-Data
Unicode code 2. PDU string received by the mobile phone SMS center address field 08916830000200805f0: + 861380280500 Firstoctet04 its binary code: 00000100 TP-MTI: 00 TP-MMS (TP-more-message-to-send): 1 sms center no more messages send TP-SRI: 0 TP-UDHI: 0 TP-RP: 0 Sender number0d91683188902848f4: + 8613880982844 Protocol Identification 00 TP-DCS point-to-point Encoding Method08 TP-DCS unicode encoding SMS center Timestamp
50208151754500 TP-SCTS byte reversal 05/02/18 15:57:45 last 00 represents the time zone, here 0 user data length 10 TP-DHL user data 8fd9662f4e0067616d4b8bd577ed4fe1 TP-UD Chinese "this is a test SMS" unicode encoding

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.