This is my understanding on these three confusing parameters !!!
1) User Data is used to send the default 7 bit GSM character text.
The maximum size is 160.
2) User Data Header is present ONLY if the User Data Binary is
3) User Data binary is used to send the binary hex data. The maximum
size of the User Data Binary is 140 - Size of User Data Header.
Formatting of these parameters
1) The SMS text can be directly added to the User Data if the size is
less than 160 octets and requires 7 bit encoding. Since it is 7
bit, the GSM to CIMD conversion of the escape sequences needs to
2) If 8 bit encoding is required then text is placed in the User Data
Binary in the hex format !!! User Data header is also required.
DOUBT: What is the format of the header now ?
2) If the size is greater than 160, then the message needs to be
segmented. To do this the User Data header has to be set and the
data is placed in the User Data Binary. DCS needs to be set to F5
to indicate 8 bit encoding.
The formatting of the User Data Header is as follows
06 - Length of the User Data Header
00 - IEI ( concatenated short message)
03 - IEDL
01 - IE reference number
05 - IE total number of messages
01 - IE sequence number
DOUBT : Does the IEI ( application port addressing scheme, 16 bit
port address) need to be added ?
The text is placed in the User Data Binary in the hex format !!!