Long Message format (two formats)

Source: Internet
Author: User

Ultra-long text message: if the text message contains more than 70 Chinese characters, it must be divided into multiple text messages when submitted to the gateway, but one text message is sent by the user's mobile phone (SP-angle, the concept of long text message sent by the mobile phone is the same ).

In the CMPP protocol, the CMPP-_SUBMIT message definition has the corresponding parameter configuration:
Tp_udhi: 0 indicates that the content body does not contain the protocol header information. 1 indicates that the content contains the protocol header information (long messages, push messages, and so on, that is to say, the basic parameters (TP-MTI/VFP) value is set to 0x51) when the content body contains the protocol header, you need to write the corresponding information according to the protocol, there are two kinds of long message protocol header:
6-bit protocol Header Format: 05 00 03 xx mm NN
Byte 1: 05, indicating the length of the remaining protocol header
Byte 2: 00, which is defined in GSM 03.40 specification 9.2.3.24.1, indicates that the identification space length of the subsequent ultra-long messages is 1 (xx value in the format ).
Byte 3: 03. This value indicates the length of the remaining text message identifier.
Byte 4: XX, the unique identifier of this batch of messages (This value must be consistent for multiple split messages). In fact, after SME (mobile phone or SP) merges the messages, record, so is this flag unique?
It is not very important.
Byte 5: Mm, the number of messages in this batch. For a total of five ultra-long text messages, the value here is 5.
Byte 6: NN, number of messages in this batch. If the value of the first text message in this batch is 1, the value of the second text message is 2.
Example: 05 00 03 39 02 01

 

The header consists of 6 bytes, as shown below:
1. byte 1: Header Length, fixed to 0x05;
2. byte 2: indicates the header type, which is fixed to 0x00, indicating long messages;
3. byte 3: the length of the sub-package. The value 0x03 indicates the length of the next three bytes;
4. byte 4 to byte 6: Package content:
1) byte 4: Long Message Reference Number. Each SP should send a different reference number to each user. It can start from 0 and Add 1 at a time. The maximum value is 255, it is easy for a terminal to identify different long messages of the same sp;
2) byte 5: Total number of long messages in this Section, from 1 to 255. The general value should be greater than 2;
3) byte 6: the position or serial number of the message in a long message, from 1 to 255. The first message is 1, the second message is 2, and the last message is equal to the value of the fourth byte.
7-bit protocol Header Format: 06 08 04 xx mm NN
Byte 1: 06, indicating the length of the remaining protocol header
Byte 2: 08, which indicates that the identification space length of the subsequent ultra-long messages is 2 (XX value in the format) according to the GSM 03.40 specification 9.2.3.24.1 ).
Byte 3: 04. This value indicates the length of the remaining text message identifier.
Byte 4-5: XX, the only sign of this batch of text messages. In fact, after SME (mobile phone or SP) merges the messages, record them, therefore, it is not important to determine whether the logo is unique.
Byte 6: Mm, the number of messages in this batch. For a total of five ultra-long text messages, the value here is 5.
Byte 7: NN, the number of messages in this batch. If the value of the first text message in this batch is 1, the value of the second text message is 2.
Example: 06 08 04 00 39 02 01

At this point, the sending setting of long text messages is basically complete, but note that this field in the src_id protocol must be the same in a long text message. Otherwise, the mobile phone will be parsed into three,
And all three are error messages.

 

This article is from the csdn blog. For more information, see file: // E:/Long and Short Message format: 20-20.20xzdwfwt111 20-20csdn .htm.

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.