The content of each smart message sent is divided into two parts. The data header and the data content.
The Data header is again divided into two parts, the first part is exceptionally small, only one byte in length, and defines the total length of the header.
After this there are one or more 'Information Elements', these tell the phone what to do with the information when it receives it. The two most common Information Elements are for Port Number Addressing (code 05) and concatenation (code 00) (telling the phone how to put together two or more SMS messages to make a single message).
The first byte of the Information Element Identifies (IEI) what information is to follow. The second byte of the Information Element is the 'Information Element Data Length' or IEDL. It tells the phone how many of the following bytes are part of the Information Identifier. The third and subsequent bytes of the Information Element are the actual information being conveyed. This is called the IED or Information Element Data.
A valid example of a Smart Message Header, expressed in hex is 0B0504158200000003010201.
This means:
0B 0B is hex for 11. There are 11 more bytes to follow.
05 This is the code for port addressing.
04 The next 4 bytes of data belong to this Information Element
15 82 Send it to Port 1582 (in other words, it is an Operator Logo)
00 00 It was sent from Port 0000. This is not relevant for most Smart Message types, but must be included nonetheless
00 This is the code for Concatenation. This content is being sent as multiple SMS messages
03 Three more bytes of information belong to this Information Element.
01 Message Reference No. If two or more items are being sent, giving them different reference numbers makes sure the phone knows which SMS messages belong to which Smart Message.
02 Overall, there are two messages.
01 This is the first message in the sequence.