GSM 03.40 specification (TP-06 7.4.0) specifies the SME for ultra-long text message merging processing. The specification has been in use for more than six years, and most mobile phones currently support this function.
In CMPP protocol, CMPP_SUBMIT_MESSAGE has two fields pk_total and pk_numer. It looks like this is the Setting Parameter for sending ultra-long messages. Otherwise, the setting of these two parameters should be useless.
To send an ultra-long message, you need to do two things: set the value of TP_udhi to 1 and add the protocol header to the message body. The protocol can be in the following two formats: 6 protocol headers and 7 protocol headers. 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, 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 only identifier of this batch of text messages. In fact, SME (mobile phone or SP) record the message after merging, so it is not very important to determine whether this identifier is unique.
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
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
The difference between the 7-bit protocol header and the 6-bit protocol header is that the ID field of the 6-bit protocol header text message is one byte, and the flag field of the 7-bit protocol header text message is two bytes. Most mobile phones use 6-bit protocol headers, that is, 05 00 03 xx mm nn.
The text message sent can be processed in this way. The above content has been tested and verified on the CMPP protocol and multiple mobile phones.