I am developing a library that can be used to encode and decode SMS text messages. I have attached a debug log from the DLL.
The DLL works perfectly for plain text SMSs (with no EMS content), including concatenated/multi-part SMSs. My challenge is when the SMS has an EMS attachement like a SmallPicture, PredefinedSound, or Formated Text. It fails to decode the User Data part (SM) when the Default 7Bit Alphabet has been used... see the attached log for details. However, if you remove some bytes from the beginning of the User Data, you will be able to decode part of the message correctly.
For example, in the log there is the PDU message (the very last message in the log as received from the GSM modem):
All details (MTI, Addresses, Time Stamp, User Data Header, Short Message) are correct, but I am failing to decode the User Data (i.e. Short Message):
When I try to decode this message using my DLL I am getting garbage like this:
whereas I should be getting the text:
"in two parts. 2nd part has a melody: "
If I remove the first 6 characters from the beginning of the user data, I am able to get part of the text like so:
gives me this:
"two parts. 2nd part has a melody: "
Any Idea where I could be getting it all wrong?