Set up to send long text messages

In the CMPP protocol, there are two fields pk_total and pk_numer in CMPP_SUBMIT_MESSAGE. It seems that these are the setting parameters for sending super-long short messages. In fact, the settings of these two parameters should be useless.

To send a long SMS, you need to do two things: set the value of TP_udhi to 1, and add a protocol header to the message body. There are two formats after the protocol, namely the protocol header with length 6 and length 7. The format is as follows:
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, this value is specified in GSM 03.40 specification 9.2.3.24.1, indicating the subsequent batch The length of the identification bit of a super long message is 1 (XX value in the format).
byte 3 : 03, this value indicates the length of the remaining SMS ID.
byte 4 : XX, the unique symbol of this batch of SMS messages. In fact, after SME (mobile phone or SP) merges the messages, it will be re-recorded, so is this symbol unique? Not very important.
byte 5 : MM, the number of this batch of short messages. If there are 5 super long text messages in total, the value here is 5.
byte 6 : NN, the number of this batch of text messages. If the current text message is the first one in this batch of text messages, the value is 1, and the value of the second one is 2.
For example: 05 00 03 39 02 01

7-bit protocol header format: 06 08 04 XX XX MM NN
byte 1 : 06, indicating the length of the remaining protocol header
byte 2 : 08, this value is in GSM 03.40 specification 9.2.3.24.1 It is stipulated that the length of the identification bits indicating the subsequent batch of super-long short messages is 2 (XX value in the format).
byte 3 : 04, this value indicates the length of the remaining SMS ID
byte 4-5 : XX XX, the only sign of this batch of short messages, in fact, after SME (mobile phone or SP) merges the messages, it will be re-recorded, so whether this sign is unique is not very important.
byte 6 : MM, the number of this batch of short messages. If there are 5 super long text messages in total, the value here is 5.
byte 7 : NN, the number of this batch of text messages. If the current text message is the first one in this batch of text messages, the value is 1, and the value of the second one is 2.
For example: 06 08 04 00 39 02 01

The difference between the 7-bit protocol header and the 6-bit protocol header is that the identification field of the 6-bit protocol header message is 1 byte, while the flag field of the 7-bit protocol header message is 2 bytes. Most mobile phones use a 6-bit protocol header, which is 05 00 03 XX MM NN.

The sent text messages are processed in this way, and the received text messages can be reversed. The above content has been tested and verified on the CMPP protocol and a variety of mobile phones. Transferred from bbs.sendsms.cn

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327058766&siteId=291194637