Post by a***@gmail.comwhy it = 11 (xxxxxxx3D "11"xxxxxxx)
not : 00 7bit //04 8bit //08 16
That "11" is the DCS (data coding scheme) octet. In binary,
it's "00010001". Working through those bits from left to
right:
00 data coding: general
0 SMS is not compressed
1 the right most 2 bits indicate the message class
00 message is encoded using 7-bit default alphabet
01 message class 1, ME specific
The message class indicates the intended "destination" of the
SMS once received. The two bits gives us 4 possible classes,
from class 0 to class 3, as follows:
class 0: if possible, display the message immediately on the
screen, and don't store it anywhere.
class 1: ME (handset/modem/device) specific. Store the message
in the phone memory if possible.
class 2: SIM specific. Store the message on the SIM if
possible.
class 3: TE (terminal equipment) specific. If possible, pass
the message directly to another piece of equipment that is
connected to the phone. This will be connected via a serial
cable (RS232 or USB), IrDA, or Bluetooth.
GSM 03.38 has this to say about class 1:
"When a mobile terminated message is Class 1, the MS shall send
an acknowledgement to the SC when the message has
successfully reached the MS and can be stored. The MS shall
normally store the message in the ME by default, if that is
possible, but otherwise the message may be stored elsewhere,
e.g. in the SIM. The user may be able to override the
default meaning and select their own routing."
As to why the sender used DCS = "11" instead of "00", I can't
answer that. Effectively, there'd be no difference in the
result.
Post by a***@gmail.comAnd how I can know if PDU data contains pseudo-characters ??
They'll be there every time the UD contains a UDH. And that
information is given to you by the UDHI (user data header
indicator) bit being turned on within the PDU-type octet. The
standards sometimes refer to the PDU-type octet as the "first
octet" (or just "<fo>"), because it's the first octet after the
SCA (service centre address).
UDHI is the second bit from the left in the PDU-type octet. In
your PDU, the PDU-type octet was "40" hex, or "01000000"
binary. So UDHI = 1, and therefore the UD contains a UDH.
The length of the UDH is given by UDHL (user data header
length). This is the first octet in the UD. In your case, it
is "05" (hex). This means that the UD contains 5 octets of
UDH, plus the 1 octet for the UDHL itself. That's 6 octets of
UD taken by UDH. But the text doesn't start immediately after
the UDH, because the text must be padded to a septet boundary.
Given 48 bits (6 octets) of UDH, the next septet boundary is at
bit 49 (7 * 7). And bit 49 of the UD is where my decode
started, although it was aligned all the way back to the UDHL.
Post by a***@gmail.comsorry for frequent questions..
That's OK. They were questions for me once too :)
John