I'm receiving a PDU like message, but I'm only receiving the message "C824"
PDU example, 040C9119898392752300008010610014412202C834
04 - first octet
0C - phone number length
91 - phone number type
198983927523 - phone number
00 - protocol identifier
00 - data coding scheme
80106100144122 - time stamp
02 - message length
C834 - message, i.e. "Hi"
I need to know the format what format is this("C834") that translates to "Hi". How can I possibly translate this to human readable language?
Best Regards,
There is a very easy solution:
Convert the hex in binary octets Put each octet in a array but in reverse mode (the whole octet, not the bits) Read the string from right to left in 7 bits groups The number is the character code in the GSM 7 bit table
For example:
C7F7FBCC2E03 stands for 'Google'
The strin in reverse order is
03-2E-CC-FB-F7-C7
The six octets are
00000011-00101110-11001100-11111011-11110111-11000111
The septets are
000000-1100101-1101100-1100111-1101111-1101111-1000111
Read then from right to left are:
septet-decimal valor-Char in GSM 7bit table
1000111-71-G
1101111-111-o
1101111-111-o
1100111-103-g
1101100-108-l
1100101-101-e
Discard the last 0000000 value
SMS messages are 7-bit ASCII packed into an 8-bit stream. You can read about the format in section 6.1 of the specification (pdf)
In your example "C8 34" is equal to:
When split using the rules in the document it looks like this:
To parse this you want to do something like this:
Not the most elegant solution but it should work. Here's a JavaScript implementation that may also help.