Help me send binary message...

Smpp v3.4 client

Moderator: alt

Locked
chaoraksa
Posts: 55
Joined: Wed Sep 17, 2008 7:06 am

Help me send binary message...

Post by chaoraksa » Mon Dec 07, 2009 4:17 am

Hi alt,

I try this method many time using submit mode Payload and it is always corrupt.

Code: Select all

foreach (SubmitSm sm in req)
                {
                    //sm.ValidityPeriod = DateTime.Now.AddDays(2).ToString("yyMMddhhmmss000+");
                    sm.UserDataPdu.Headers = HexStringToByteArray("06050415810000");
                    sm.ShortMessageBytes = HexStringToByteArray("024A3A6949A59194813D988151A004004D215D2690568698A22820C49A4106288A126A8A22C2A820C22820C2A82342AC30820C4984106288A12628A22C2A420800");
                    
                }
Any solution bec i want to send binary message 256bytes. I also try to split the message into 3 part as well but still got corrupt.

Thanks,
Raksa,
BenEllis
Posts: 21
Joined: Mon Nov 09, 2009 4:30 pm
Location: Leicester, United Kingdom
Contact:

Post by BenEllis » Wed Dec 09, 2009 9:19 am

Have you changed the EsmClass to flag there is a UDH?
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Wed Dec 16, 2009 5:53 pm

UDHI flag is set automatically when you use User Data Headers.

chaoraksa,

With Payload mode sm.UserDataPdu.Headers and sm.ShortMessageBytes cannot be used, because sm_length should be 0 for this mode.
Please try with mode ShortMessage. But you need to add headers instead of overwrite it as in your example.

Code: Select all

sm.UserDataPdu.Headers.Add(InformationElementIdentifiers.ApplicationPortAddressingScheme16bit, HexStringToByteArray("15810000"));

In version 2.8.0 I'm going to add PrepareSubmit method for byte array.
Locked