Binary SMS

Binary SMS is an SMS message type that can include rich content for being sent to mobile phones or devices through SMS. Binary SMS is used to send more complex data than standard text messages. The maximum message length is 140 octets.

Binary SMS can also have direct access to the PID, DCS and UDH fields in the SMS PDU (this SMS type is SMS:BINARY:XML). This message type allows you to send all types of binary messages.

Binary SMS XML can be sent with a thorough knowledge of the structure of an SMS message. You need to be familiar with the following: Data Coding Scheme (TP-DCS), Protocol Identifier (TP-PID), User Data Header (UDH) and User Data (UD).

Also, you need to be able to encode different message types into WBXML format. This is usually different with each message type.
In the SMS message to be sent, the values mentioned above have to specified as hexadecimal numbers.

Binary SMS has a maximum amount of 140 bytes of data that can be used. This amount of bytes can be split into two components; the data header, and the actual content data. The data header is used generally to notify mobile phones about that particular message type. Because of this an SMS message can be used to deliver multimedia content, like ringtones, operator logos, WAP push messages, phonebook contacts, and telephone settings.

Usually newer standard mobile phones are capable of not only receiving, but also composing binary SMS messages, if the device allows to insert sound, photo, or video into a standard SMS message. This allows DCS, PID, UDH (User Data Header) and UD (User Data) values to be defined within the message.

A Binary SMS message consists of the following:

  <pid>PID in hexadecimal format (1 byte)</pid>
  <dcs>DCS in hexadecimal format (1 byte)</dcs>
  <udh>UDH in hexadecimal format</udh>
  <ud>UD in hexadecimal format</ud>

In this code PID means Data Coding Scheme, DC is a Protocol Identifier.

This structure can be implemented as it is shown in the following example:

Interpretation of the string of characters between the UDH tags:

06: User Data Header length (6 bytes follow)
05: UDH IE Identifier: Port numbers
04: UDH Port number IE length (4 bytes follow: 2 for Destinating port, 2 for Originating port)
0B84: Destinating port
23F0: Originating port

Interpretation of the string of characters between the UD tags:

EA: Transaction ID
06: PDU type (push)
01: Length of header (1 byte follows)
AE: Content-type: application/vnd.wap.sic
These are followed by the XML of the WAP Push message type encoded into WBXML format, following the respective encoding rules. This is the Wap Push message:

    <indication href="..." action="...">




Binary SMS messages are XML-formatted textual SMS messages that have been formatted with WBXML (WAP Binary Extensible Markup Language). WBXMLs are "tag transformers", which means that for individual XML tags, a binary byte is associated. The outcome of the WBXML transformation will be small in the number of generated bytes. For instance even URL content can be shortened by WBXML, where 0D stands for http://www. which will result the following content:


You can find the WBXML specification here:

To get more information, please visit the following websites:
The Ozeki NG SMS Gateway website
The best site about SMS integration

  Site map

Get the right SMS software!

Ozeki NG SMS Gateway
v3.15 (4.5 Mb)

This is a 30 day trial
of the world's best
SMS software
7 things to avoid when
choosing an SMS gateway
for your organization!
Find out more...