UDH for concatenated binary

UDH for concatenated binary SearchSearch
Author Message
Romain
New member
Username: 971style

Post Number: 1
Registered: 05-2007
Posted on Wednesday, May 02, 2007 - 06:23 pm:   

Hi,

I'm trying to send a concatenated binary message.
I would like to use a long UDH like


:0b:05:04:15:81:15:81:00:03:6d:02:01

It seems that 1581 is used for ringtones.

Would someone know the port for normal messages? Or any default value that I could use ?

Many thanks

Rom
deepkamal singh
New member
Username: Deepkamal

Post Number: 8
Registered: 12-2006
Posted on Thursday, July 26, 2007 - 04:17 am:   

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?,
now
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

0B0504158115810003AF0301
0B0504158115810003AF0302
0B0504158115810003AF0303

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
deepkamal@gmail.com