Page 1 of 1

Help me send binary message...

Posted: Mon Dec 07, 2009 4:17 am
by chaoraksa
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,

Posted: Wed Dec 09, 2009 9:19 am
by BenEllis
Have you changed the EsmClass to flag there is a UDH?

Posted: Wed Dec 16, 2009 5:53 pm
by alt
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.