How to create UDH

How to create UDH SearchSearch
Author Message
Mahesh Joshi
New member
Username: Rishabhmahesh

Post Number: 2
Registered: 11-2006
Posted on Tuesday, December 05, 2006 - 01:06 pm:   


Can anybody tell me the steps for creating UDH for SMS using MS Visual Studio .Net 2005. I need to specify the destination port number for the SMS to be delivered on the Nextel i265 mobile device. Please help me because I am very new to this SMS technology.

Thanks in advance.

Mahesh Joshi
deepkamal singh
New member
Username: Deepkamal

Post Number: 4
Registered: 12-2006
Posted on Tuesday, December 12, 2006 - 10:36 pm:   

well there are two main kind of SMS sytems one is Smart Messaging which is for NOKIA supported handsets(include almost all brand except older version of Sony and Ericsson),
and other one is EMS (Enhanced messaging system),

both have different type of content and UDH encoding , first lemme tell u what is common between them

1) both have same algo to build UDH .
2)data and udh for both systems are only in hex i.e char havin 0-9 or A-F.
3) both have same Header for split messages i.e. concatinated messages,

for nokia it goes like for each binary messages there is data and UDH part now Nokia identifies coming binary message as ringtone, pic ,logo etc because of port number present in its header, lets consider full UDH of Nokia
06 05 04 1581 1581
06 :- length of whole UDH i.e 6 octet now each octet has two char so 050415811581 counts to 6 octet,got it?,
05 :- it represents as keyword for 16-bit nokia port addressing(according to specs of smartmessaging)
04 :-its again count of upcoming octets i.e. 4 ,

1581 :- it is destination port mentioning port number in hex for ringtone, in other words this the thing which identifies upcoming message as ringtone.

1581 :-it is source port , when a ringtone is sent from handset to handset it automatically becomes 1581, but when u send it via GSM modem or SMPP connection it can be assigend to any valid hex string, preferrably 0000.

so instead of ringtone if we are sending picture message, or logo or anything else then we just have to change destination port number for different binary messages it is as follows

Ringtone - 1581
CGI /CLI - 1583
Picture Msg- 158A
Operator Logo 1582
vCard 23F4
vCard Secure 23F6
vCalendar 23F5
vCalendar Secure 23F7
eMail Notification 1588
DMCP(obsolete) 1584

now if our message is bigger than preferrably 260 chars we need to break it into more than one part ,, thats called concatenation for that u need to append concat header in UDH which goes like

00 03 XX 0N 0n

it looks confusing but let me explain it ,

00 is offset to mention its new part of UDH
03 is according to specs concat header
XX it can be from 00 to FF , it is called message reference header , its same in UDH of all splited message in order to make recieving body understand that incoming splitted message is part of earlier received message becoz it has same reference string, get it??

0N represents total count of mesages, like after splitting there are 3 parts then it is 03 , so here u can deduce that SMS support maximum 255 splits, becoz 25 if FF and it is largest 2 digit hex number.

0n represents sequence number of upcoming sms part like for first part it will be 01 for next it will be 02 and so on upto 0N,

now there is somthing u should take care of
when we append concat header whole UDH becomes of 22 char i.e. 11 octets so UDH begins with 0B instead of 06

so for SMS of 3 splits of ringtone type UDHs will be


this is all about SMart messaging ,,
now EMS is even more simpler,
there is no data part in EMS all is bundled together in UDH
its like

XX0CXX00<data hex string>
first XX = length of total data
0C is accorfding to EMS specs octet for melody sound
second XX is length of rest part of data,
00 is offset to show start of data part
data part it hex form of iMelody string,

now even in EMS concat system is same , as mentioned earlier, so just append 0003XX0N0n before 00 offset of EMS,, count the chars and make changes accordingly,

hope all this typing work solves ur purpose,
and next time when u mail tell me where are u working and what solution are u looking, coz i have so many tools and solutions already developed ,

Deepkamal Singh
New member
Username: Jelevy

Post Number: 1
Registered: 02-2007
Posted on Sunday, February 25, 2007 - 02:06 am:   

Huge help! Thank you!

One thing that I got caught up on, and you pointed it out was changing the 06 to 0B in the begining of the UDH when it's multipart.
Harish Singh Negi
New member
Username: Harish

Post Number: 1
Registered: 07-2007
Posted on Thursday, July 26, 2007 - 12:52 pm:   

Hi Every Body,

I have a problem that i am unable to send ringtone through my SMPP client application.
I can send/receipt text message successfully.I can also send/receipt file successfully.
But beside no other file is been sent/receipt below i am attaching code snippets.

ByteBuffer message = new ByteBuffer();
ByteBuffer toneData = loadByteBuffer("C:\Filename");
when i am debugging the request i get the following hexacode:
06050415810000486F7365613A643D342C6F3D352C623D36333A38672C3864362C3865362C65362C 38702C38672C3864362C3865362C65362C38702C38612C3863362C63362C38702C38662C38662C38 672C672C38702C3864362C3865362C65362C38702C38672C3864362C3865362C65362C38702C3861 2C3863362C63362C38702C38662C3136662C3136662C38672C672C38702C64362C3864362C386436 2C3867362C3866362C3865362C3864362C63362C63362C3864362C3863362C38622C38612C672C38 65362C38702C3864362C38672C3865362C3864362C63360D0A

I am unable to get response kindly help me.I did all the things from my side i read specifications of nokia.but still.
New member
Username: Chezhiank

Post Number: 2
Registered: 08-2007
Posted on Friday, August 03, 2007 - 08:35 am:   

Can anybody tell what is the UDH to send Rights content through WAP push?


New member
Username: Pawanbits

Post Number: 1
Registered: 09-2009
Posted on Tuesday, September 01, 2009 - 12:48 am:   

I am new to SMS. I have HEX code of a picture sms and want to sent this pic by SMS. I am using OPENSMPP. Can anyone tell what is the UDH to send picture SMS through SMPP 3.4 ??

Pawan Kumar
New member
Username: Harishpm

Post Number: 1
Registered: 06-2012
Posted on Monday, September 03, 2012 - 11:32 am:   

Hi Jeremy ,

I have been trying very hard to send SMS to a particular port on mobile using SMPP.

I have set esm_class flag to as below

SubmitSm submitSm = new SubmitSm();

Please help me in creating UserDataHeader to set destination port

Using java code and SmppConnection
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4090
Registered: 08-2008
Posted on Tuesday, September 04, 2012 - 09:02 pm:   

It doesn't have a Java example, but the following article might help as it explains the format for port addressing within UDH:

Add Your Message Here, or click here to start a new topic.
Bold text Italics Underline Create a hyperlink Insert a clipart image
Options: Automatically activate URLs in message