Short and Long letter format

Source: Internet
Author: User

Long message: SMS content more than 70 characters, submitted to the gateway needs to be divided into more than one, but the user's mobile phone reception is a (SP angle, mobile phone to send the concept of long letter).

In the CMPP protocol, the CMPP-_SUBMIT message definition has a corresponding parameter configuration:
Tp_udhi:0 represents the content body does not contain the protocol header information 1 represents the content contains the protocol header information (long letter, push SMS, etc. are in the content body contains the header content, that is, the basic parameter (TP-MTI/VFP) value set to 0x51) when the content Body contains the protocol header, Need to write the appropriate information according to the protocol, there are two types of long and long letter protocol head:
6-bit Protocol header format: XX MM NN
Byte 1:05, indicating the length of the remaining protocol header
Byte 2:00, this value is specified in the GSM 03.40 specification 9.2.3.24.1, indicating that the subsequent long text message has an identity bit length of 1 (the XX value in the format).
Byte 3:03, this value indicates the length of the remaining SMS identity
Byte 4:xx, the only sign of this message (which must be consistent with multiple text messages being split) is that, in fact, the SME (cell phone or SP) records the message after it has been merged, so this flag is only
One is not very important.
Byte 5:mm, the number of this batch of SMS. If an extra long text message totals 5, the value here is 5.
Byte 6:nn, the number of this batch of SMS. If the current text message is the first of these messages, the value is 1, and the second value is 2.
For example: 05 00 03 39 02 01


Baotou is a total of 6 bytes, as follows:
1, byte one: Baotou length, fixed fill 0x05;
2, byte two: Baotou type identification, fixed fill in 0x00, indicating the length of letter;
3, byte Three: the length of the child packet, fixed fill 0x03, indicating the length of the following three bytes;
4, byte four to byte six: package content:
1 byte four: Long message reference number, each SP sent each user should be different, can start from 0, each time add 1, maximum 255, convenient for the same terminal to the same SP message of different short and long letters to identify;
2 byte Five: The total message number of the long message, from 1 to 255, the general value should be greater than 2;
3 byte Six: The position or ordinal number of this message in a long message, from 1 to 255, the first is 1, the second is 2, and the last is the value of the four byte.

7-bit Protocol header format: xx xx MM NN
Byte 1:06, indicating the length of the remaining protocol header
Byte 2:08, this value is specified in the GSM 03.40 specification 9.2.3.24.1, indicating that the subsequent long text message has an identity bit length of 2 (the XX value in the format).
Byte 3:04, this value indicates the length of the remaining SMS identity
byte 4-5: xx xx, the only sign of this batch of SMS, in fact, the SME (cell phone or SP) after the message is merged, the record, so this flag is not very important.
Byte 6:mm, the number of this batch of SMS. If an extra long text message totals 5, the value here is 5.
Byte 7:nn, the number of this batch of SMS. If the current text message is the first of these messages, the value is 1, and the second value is 2.
Example: 06 08 04 00 39 02 01

To this end, the short and long letter sent to the basic completion, but one thing to note: src_id agreement in this field in a long letter must be the same, otherwise the cell phone will be resolved into three,
and three are all error messages.

Toss 2 days, for cmpp long letter, simply said, is the Cmpp field pk_total and Pk_number need to set, in addition to the Udhi need to set to 1, if the use of 6 bytes of Udhi, the message content by 134 bytes to split in the head to add 6 bytes Udhi, just 140 bytes. (This is a boundary point, some CMPP server, must be less than 140 bytes, equal to not, you have to try). Also note that the following three bytes of the Udhi header, the first is a sequential number, to ensure that the row is not repeated, the other two bytes, and pk_total/pk_num consistent; In addition, the seq_num of these messages should be consistent. I use Nokia6630 to receive normal, mobile phone will automatically splicing into 1 long letter.

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.