Concatenated SMS
From Wikipedia, the free encyclopedia
It has been suggested that this article or section be merged into Short message service technical realisation (GSM). (Discuss) |
This article may require cleanup to meet Wikipedia's quality standards. Please improve this article if you can. (August 2007) |
In the cellular phone industry, mobile phones and their networks sometimes support concatenated short message service (or concatenated SMS) to overcome the limitation on the number of characters that can be sent in a single SMS text message transmission (which is usually 160). Using this method, long messages are split into smaller messages by the sending device and recombined at the receiving end. Each message is then billed separately. When the feature works properly, it is nearly transparent to the user, appearing as a single long text message. Previously, due to incompatibilities between providers and lack of support in some phone models, there was not widespread use of this feature.
In recent years, this feature has been adopted more widely. Not only do many handsets support this feature, but support for the feature also exists amongst SMS gateway providers.
Contents |
[edit] PDU Mode SMS
In technical terms, the concatenated SMS could also be referred to as a PDU Mode SMS. The number of parts that a multi-part or PDU mode SMS message may contain depends technically upon a header message but mostly upon the device sending or receiving the SMS and also upon the service provider.
In theory, the concatenated SMS may consist of up to 255 separate SMS messages that are concatenated in order to create a single long SMS message. Because of the nature of the SMS, the chance that these parts of the SMS message arrive in order is slim and therefore a strategy is implemented in order for the original long message to be reconstructed.
[edit] Sending a concatenated sms using a User Data Header[1]
One way of sending concatenated SMS (CSMS) is to split the message into 153 7-bit character parts (135 bytes), and sending each part with a User Data Header (UDH) tacked onto the beginning. A UDH can be used for various purposes and its contents and size varies accordingly, but a UDH for concatenating SMSes look like this:
- Byte 00: Information Element Identifier, 0 for concatenated sms with 8-bit CSMS reference number
- Byte 01: Length of the header, excluding these two first bytes; always 3 for a CSMS
- Byte 02: 00-FF, CSMS reference number, must be same for all the SMS parts in the CSMS
- Byte 03: 00-FF, total number of parts
- Byte 04: 00-FF, this part's number in the sequence
Example of the UDH for an sms split into two parts:
00 03 CC 02 00 [ message ] 00 03 CC 02 01 [ message ]
[edit] Sending binary data via SMS
Alternative applications for concatenated SMS messages are transfer of binary data files. The way that concatenated SMS messages work is to send data as pairs of hexadecimal bytes of binary data.
[edit] Transmitting Long Plain Text Messages
Since most SMS messages are used to transfer long plain text messages, the binary data is converted from octets 8 bits into septets 7 bits. This is effectively done by removing the high bit from the octets and reconstructing the septets into new groups of octets that are effectivily binary data again, but shorter in length.
[edit] Converting Octets to Septets
To convert the octets to septets is a simple procedure of byte shifting according to the following set of (simplified) rules: The first octet is shifted left; For the rest of the string, each of the octets loses one high bit. In the place of that high bit, a low bit from the next octet is taken.
Taken in groups of seven:
The first octet loses one high bit and the lowest bit of the next octet is placed in the highest bit position of the first bit. The second octet loses its high bit and the entire octet shifts one bit to the right (the bit that was given to the first octet). The second octet now has the two highest bits free. These are filled with the lowest two bits of the next octet. The third octet loses the high bit again and is shifted two positions to the right, this frees up the three highest bits of the third octet. This process continues up to the seventh octet, at which point it becomes apparent that the eight octet consists only of the highest bit. Chopping this bit off completes such a cycle, which are repeated.
To convert septets into octets the reverse actions are applied.