PDU format

zhaozj2021-02-16  56

1. Brief introduction The SMS is a specification established 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 typically not displayed directly from mobile phones; commonly used as data messages, such as images and ringtones in Smart Messaging) and OTA WAP settings. 16-bit information (up to 70 characters) is used to display Unicode (UCS2) text information, which can be displayed by most mobile phones. A 16-bit text message starting with Class 0 will appear as Flash SMS as Flash SMS (flashing SMS and warning SMS) on some mobile phones. There are two ways to send and receive SMS information: using text mode or using the PDU (Protocol Description Unit) mode. Text mode (possibly some mobile phone does not support) is actually a way of expressing PDU encoding. In displaying SMS information, there may be different character sets and different encoding methods. The most common choice is "PCCP437", "PCDN", "8859-1", "IRA", and "GSM". These are specified by reading AT CSCs in AT-COMMANs in the application. If you want to read the information on your phone, the phone will choose a suitable code for you. Then one can read the application of the SMS message either use Test mode, or the PDU mode. If you use text mode, the application will bind (or restriction) some possible coding selections. In some cases, it is not enough. If you use a PDU mode, you can use any encoding mode. 2. Receive the PDU string not only contains messages, but also many senders' metacroof information, his SMS service center, time mark, and more. These are all the number of pieces of 1 in 8th bytes, or the decimal number of half-8 bytes. The following character book I received information from Nokia 6110, when the string sent from www.mtn.co.za is "Hellohello". 07 91723801001010900F100009930925161958003000925161958003C16010, this eight-bit string contains three parts: the first 8 bits represent the length of the SMSC information ("07"), the SMSC information ("917238010010f5"), and the SMS_DELIVER section (specified in GSM 03.40). Note: Some mobile phones (eg, ericssssson 888?), Three parts (colored) are omitted in PDU mode. 8-bit describes the length of 07 SMSC information. (In this example, 7 eight digits) 91 SMSC address type (91 means international format phone number) 72 38 01 00 10 F5 service center number (half-eight decimal number) Phone number is a odd number (11 Therefore, add F to ensure 8 bits. The number of this service center is the first 8 digits of " 27381000015" 04 SMS_DELIVER. 0B address length. The length of the transmission number (0B HEX = 11 DEC) C8 Send Number 72 38 88 09 00 F1 Send Number (half-eight-bit decimal number), there is a F end. 00 TP-PID. Protocol Identification 00 TP-DCS Encoding Method 99 30 92 51 61 95 80 TP-SCTS. Timetricrm (half 8 bits) 0A TP-UDL. User Data Length, Length of Information. The TP-DCS domain indicates data in the 7-bit format. Therefore, the length is here a 10 7-bits.

If the TP-DCS is set to 8-bit or Unicode, then the length should be 9 eight-bit lengths. E8329BFD4697D9EC37 TP-UD. 7-bit encoded information. All 8 bits are 16-based encoding, except for the service center number, send numbers and time postmarks; they are a decimal half-8-bit encoding. At the end of the PDU string contains some 16-BITS data, but they actually 7-bits data. The decimal half-8 bits only need to exchange high and statically exchanges can get actual values. For example: "72 38 88 09 00 f1" to "27 83 88 90 00 1F". Because the phone number is a odd number, there is no way to form 8-bit encoding, so use f to make up. When parsing time postmarks ("99 03 29 15 16 59 08"), the top 6 represents the date, the last 6 bits of the time, the last 2 is the time zone. 3.Flash SMS On some mobile phones (all Nokias, some Siemens, Ericsson, Motorola, etc.) will be displayed as a Flash SMS information. This information will be displayed immediately on the screen as long as it arrives, without pressing any buttons. If the encoding mode of the data is set to 16-bit Unicode (UCS2), and the information starts with "0001", then it will be displayed as a flashing Flash Message.

Octet Value Description TP-DCS 18 16 BITS (UCS2), Message Class 0TP-VP AA Validity Period TP-UDL 0C User Data Length, 12 OCTS TP-UD 00 01 00 71 00 6C 00 65 00 72 00 74 USER DATA, Message "Alert" shows the information in the Flash SMS. The first Unicode character ("00 01") enables flashing. Such a message is the longest 69 Unicode characters. 4.Nokia icon This is an OTA (on the air) bitmap. This file is downloaded from the Nokia forum. In the "Smart Messaging" connection. PDU Type 44 RP: 0 (NO REPLY PATH) UDHI: 1 (NO STATUS Report Will Be Returned) MMS: 1 (No more Messages) MTI: 00 (SMS-DELIVER) OA 0B 91 6302752852f1 Length: 11 Digit Type: International, E.164 / E.163 Number: 36 20 5782251 PID 00 PDU Content: Short Message DCS F5 Data Coding: 8 Bit Message Class: 1 SCTS 991012 114343 40 DATE: 99/01 / 21 time: 11:34:34 timezone: GMT 1 UDL 89 137 octets UD UDH 06 05 04 1583 1583 length of header: 6 octets information element type: NBS port addressing information element length: 4 octets destination port: CLI icon source port : CLI icon OTA bitmaphdr 00 48 0E 01 infofield: last octet, no compression, no palette, 8 bit, 0 animated icons width: 72 pixel height: 14 pixel depth: 1 imagedata3FF00110005B0001E8 7FF802A801A500021C 3FF80C470101000408 7FF808010081001C04 3FF008150081001304 7E10183F0058803A84 7DF030490064802C9C 7E501855002D80473C 3AD0082A8058404218 39B005010060C04930 105005BE0042203220 1A1007620046600C40? 09E001BB003B900840 04200 0960001080EA0

5.7bit encoding "HelloHello" contains 10 characters, they must be represented by 7-bits one by one. H E L L o h E L L o 104 101 108 108 111 104 101 108 108 111 110100 11011 110100 11011 110100 11011 11011 00101 100 110 1111 110100 11011 1101100 1101100 11011 1101100 1101100 110111 1101100 1101100 110111 1

First convert the characters to a 7-bit binary, then adjust the bits of the back characters to the front, fill the difference in front. For example: h translated into 1101000, E translated into 1100101, obviously H's binary coding is less than eight bits, then the last bit of E makes up to the front of the H. Then become 11101000 (E8). The following table: 1 1101000 00 110010 100 11011 1111 1101 01000 110100101 11 1101100 1

1 1101100 110111 E8 32 9B FD 46 97 D9 EC 37

Then become 9 octal number E8 32 9b FD 46 97 D9 EC 37. 6. Error Error Code Description 0-127 GSM 04.11 Annex E-2 values ​​128-255 GSM 03.40 section 9.2.3.22 values ​​300 Phone failure 301 SMS service of phone reserved 302 Operation not allowed303 Operation not supported 304 Invalid PDU mode parameter 305 Invalid text mode parameter 310 SIM not inserted 311 SIM PIN necessary 312 PH-SIM PIN necessary 313 SIM failure 314 SIM busy 315 SIM wrong 320 Memory failure 321 Invalid memory index 322 Memory full 330 SMSC (message service center) address unknown 331 No network service 332 NetWork Timeout 500 Unknown Error 512 Manufacturer Specific

转载请注明原文地址:https://www.9cbs.com/read-23459.html

New Post(0)