Application Port Numbers in SMS
On this page software developers can learn how to use application port numbers in SMS using the Ozeki SMS software.
Application port numbers can be used in SMS messages to deliver a particular SMS to an application on a mobile phone. In most cases, applications on mobile phones are developed using Java technology (J2ME). The application port addressing feature of SMS messages allows specifying a source port and a destination port number for an SMS message (Figure 1).
The Ozeki SMS software supports the setting of both the source port and the destination port. You can perform this by putting the source port number after the sender phone number, and the destination port number after the receiver phone number. Put a colon between the phone number and the port number, without using any spaces.
Look at the example SMS below:
Message: Hello World
The source port number in the example is 1128, and the destination port number is 3224. The port number has to be specified as a decimal value. This value can range between 0 and 65535. The application port number information is transmitted in the user data header (UDH) of the SMS message.
For example to send a message to the hexadecimal destination port 3333, with the following user data header (UDH): 06050433330000, you should send a message to phone number: 13107. The reason for this, is that the decimal port number 13107
To check if your outgoing message contain a port number, you can enable low
level communication logging in the GSM Modem configuration form. After low
level communication logging is enabled, you will see the PDU, that is
submitted when a message is sent. The should contain a user data header field
(UDH), that includes the port number.
If you send the message: From: +44777888:1128, To: +441234567:3224, Message: Hello World through a GSM modem your message will contain the following user data header: 0605040C980468 (Figure 2). In this PDU, the 06 is the length, 05 means port number, 04 means data length, 0C98 is the destination port, that has a hexadecimal value of 3224, and 0468 is the source port, which has a hexadecimal value of 1128.
This port number functionality is available from all Application Programming Interfaces (API) with the help of modifying the telephone numbers.
If you use a GMS modem, please note that port numbers work only if PDU mode is configured (PDU mode is the default configuration).