How to format a WAP Push Message as a Hexadecimal String

WAP PUSH enables the delivery of multimedia content to mobile devices without the need for the full-fledged MMS delivery protocol. Instead, a hyperlink is delivered to the mobile device of the recipient as a Service Indication message. The recipient mobile device will automatically prompt the recipient to download the content on the hyperlink and display it over a GPRS/WAP connection.
Formatting a proper WAP PUSH message as hexadecimal string has been something of a mystery to many people, as there is close to no useful documentation on the Web on this, and Nokia’s own documentation is very cryptic at best.
Hopefully, the following provides a clear and easy-to-understand guide on how to construct WAP PUSH messages!
Basics: ASCII to Hex Conversion
A WAP Push message essentially consists of the Internet URL containing your multimedia content, and this URL is wrapped by some SMS-specific headers, which we will explain below
Your need to first convert your URL into a hexadecimal string. Use the table found at the following page to convert each character in your URL string into its hexadecimal equivalent:
http://www.commzgate.sg/blog/2007/07/the-gsm-default-alphabet-set-gsm-0338-7-bit/
A Sample WAP Push string
A WAP Push example which we will use here is as follows:
http://gateway8.commzgate.net:8081/gateway/SendMsg?ID=acme&Password=x3e2ts&Mobile=6598181818&Type=H&
UserHeader=0605040b8423f0
&Message=DC0601AE02056A0045C60C03
7777772e636f6d6d7a676174652e636f6d2f6b6f6e672f6b6f6e672e676966
0001034b6f6e67000101
The UDH or User Data Header explained : UserHeader=0605040b8423f0
In the string above, the UserHeader parameter can be explained as follows:
06 is the Length of the User Data Header
05 is the Information Element Identifier (IEI; application port addressing scheme, 16-bit port address)
04 is the Information Element Data Length (IEDL)
0B84 is the destination port no.
23F0 is the origin port no.
Data Wrapping: DC0601AE02056A0045C60C03
Next comes the data wrapping info that goes around the URL string itself:
DC is the Transaction ID (Push ID)
06 is the PDU type (Push PDU)
01 is the Header Length (just leave it at 01)
AE represents Content Type=application/vnd.wap.sic (0×80 | 0×2E)
02 represents <version>
05 represents <si>
6A represents <charset=utf-8>
00 represents <string>
45 represents <si>
C6 represents <indication>
0C represents http://
03 refers to “next is an ASCII string for the URL, to be terminated with 00″
The URL string itself in Hexadecimal form
Then comes your URL string. In our example, this string is:
7777772e636f6d6d7a676174652e636f6d2f6b6f6e672f6b6f6e672e676966
Ending Wrapper: 0001034b6f6e67000101
Finally, we wrap up the string with some final pieces of information.
00 refers to terminate string with 00
01 represents <indication>
03 refers to “next is an ASCII string for title, terminate with 00″
The title in our example is
4b6f6e67
00 we terminate the title string with 00
01 represents <indication>
01 represents <si>
The final complete hexadecimal WAP PUSH string is hence completed!
For further reference, the Nokia Smart Messaging FAQ can be found HERE
You can also try our free online Text-to-Hex converter for an instant conversion of the WAP-PUSH hex string that you require.

December 30th, 2008 at 12:14 am
hola
January 9th, 2009 at 5:47 am
WapPush is not working, at least with my Nokia E71. The SMS has arrived, but full of junk links and hexadecimals.
OBS: I have used free online Text-to-Hex converter and the resulting URL was
http://gateway3.commzgate.net/gateway/SendMsg?ID=my_ID_is_OK&Password=my_Pwd_is_OK&Mobile=my_phone_is_OK_ofcourse&Type=H&UserHeader=0605040b8423f0&Message=DC0601AE02056A0045C60C037777772e6176616e757472692e6e6574000103434f4d4d5a47415445000101
What’s wrong?
January 12th, 2009 at 3:27 pm
Hi Lek, what is the HTTP URL you are trying to send, can you post it here so we can advise further?
February 4th, 2009 at 2:54 am
thnx admin…but please let me know if i can use a text before the URL…like my requirement is
“hi please check this link” http://http://116.141.193.254:8080 “you are seeing the test link”
I think if i can insert the “you are seeing the test link” in the title and “hi please check this link” before the OC(http://) and after & it should work…
anyway i will give it a try tomorrow…
February 4th, 2009 at 2:56 am
also please make a small correction that http://www.prepressure.com/library/binhex.htm is not available anymore…but can use http://www.commzgate.net/tools/hexConvertor.php
February 4th, 2009 at 2:59 am
and http://www.codecall.net/resources/ascii.html for hex to ascii or decimal…sry for scribbling toomuch
February 8th, 2009 at 9:41 am
March 7th, 2009 at 12:11 pm
Very Helpfull. I want to add some text before the URL. How? Plz help any one.
July 3rd, 2009 at 4:28 am
Hi,
I’m trying to send the following binary messege:
http://gateway3.commzgate.net/gateway/SendMsg?ID=XXXX0002&Password=XXXXX3&Mobile=972544324553&Type=H&UserHeader=0605040b8423f0&Message=DC0601AE02056A0045C60C03612e64336d61696c2e636f6d2f612e736973000103434f4d4d5a47415445000101
for the following URL:
http://a.d3mail.com/a.sis
But I get only Hex chars in th emessege.
Please advise.
Thanks!
July 3rd, 2009 at 6:22 am
Just to add - I’m sending the messege to Nokia E71. Thanks!