SMS-DELIVER TPDU Structure

This article is a continuation article to SMS TPDU Parameters Representations

SMS-DELIVER is the SMS message forwarded by the SMSC to the destination ME, on behalf of the originator ME.

I think it’s important to understand how the destination entity will receive the SMS, before understanding how to send one.

Therefore, I’ll first describe (in this article), what is the structure of SMS-DELIVER.


TPDU Structure Description

The SMS-DELIVER TPDU consists of 7 fields and the message’s content :

The above fields describes the addresses, the type of the message, the features of the messages, the SMC’s sending time stamp and the message’s content. Those fields are very technical and pretty easy to understand.

The following figure describes the structure :

image004
Figure 1. SMS-DELIVER PDU structure.

As you may noticed, the number of octets building a single SMS-DELIVER TPDU is 14-175 octets. However, much longer messages can be sent using the concatenation feature.


SCA

Representation : address representation.

The SCA field describes the address of the service center whom forwarded the SMS message.

The size of the SCA field may vary from 1 to 12 octets.


PDU Type

Representation : integer representation.

The PDU Type field consists of 5 subfields (indicators). Those indicators help the ME parse the message correctly and indicates the receiving entity how to react to the message.

The size of the PDU Type field is 1 octet.

image010-1
Figure 2. PDU Type in SMS-DELIVER.

The first indicator is the TP-MTI (TP-Message-Type-Indicator). It’s a 2 bits indicator, which indicates the message type (for SMS-DELIVER it will always be 00).

The second indicator is TP-MMS (TP-More-Messages-to-Send). It’s a 1 bit indicator, which indicates the receiving entity if there are more messages waiting at the SMSC.

bit 2      Meaning
0          More messages are waiting for the MS in the SMSC.
1          No more messages are waiting for the MS in the SMSC.

The third indicator is TP-SRI (TP-Status-Report-Indicator). It’s a 1 bit indicator, which indicates the receiving entity if a status report of the message recipient will be return to the originator entity.

bit 5      Meaning
0          A status report will not be returned to the SME.
1          A status report will be returned to the SME.

The fourth indicator is TP-UDHI (TP-User-Data-Header-Indicator). It’s a 1 bit indicator, which indicates if the received message contains headers (for further protocols/features) in the TP-UD field.

bit 6      Meaning
0          The UD field contains only the short message.
1          The UD field contains a header in addition of the short message.

The last indicator is TP-RP (TP-Reply-Path). It’s a 1 bit indicator, which indicates if a reply path presents and set in the message (there was an old vulnerability with the reply path at the SMS, which enabled SMS spoofing in some phones).

bit 7      Meaning
0          Reply Path parameter is not set in this PDU.
1          Reply Path parameter is set in this PDU.


TP-OA

Representation : address representation.

The TP-OA field consists of the address of the message’s originator.

The size of this field may vary between 2-12 octets.


TP-PID

Representation : integer representation.

The TP-PID indicates the existence of  a higher layer protocol in the message, such as telemetric interworking, replace message, return call message and etc.

The size of this field is 1 octet and its values formatted as the following figure :

untitled-1
Figure 3. possible values for TP-PID.

TP-DCS

Representation : integer representation.

The TP-DCS is an octet which defines basic information of how the recipient handset should process the received message. Its size is 1 octet and it contain the following information :

  • The character set used to encode the message content.
  • The message class, which determines the component to process the message (ME/UICC/TE).
  • Store/Discard the message after processing it.
  • The state of MWI indicators (voicemail, email, fax and etc).
  • The indication of compressed content in the message.

A description about the coding of this parameter can be found at 3GPP TS 23.038 (or here).


TP-SCTS

Representation : absolute time representation.

The TP-SCTS defines the time of delivery of the message, from the SMSC to the handset. Its size (as all the absolute time represented field) is 7 octets.

image006
Figure 4. TP-SCTS format.

TP-UDL

Representation : integer representation.

The TP-UDL is a 1 octet field which defines the size of the TP-UD (user data) by octets or septets.
If the TP-DCS indicates the the coding scheme is a GSM 7-bit alphabet, the TP-UDL will indicate the number of septets the TP-UDhas. 
Otherwise (no matter if 8-bit data alphabet or 16-bit UCS-2 alphabet), the TP-UDL will indicate the number of octets the TP-UD has.

TP-UD

 The TP-UD is the content of message.

The content of the message can be a simple text or a binary data, which can have extra features (such as concatenation). In order to add additional features, some headers should be added.

TP-UD with headers (or TP-UDH, TP-User Data Header)can be constructed as th following figure :

sms-udh
Figure 5. TP-UDH format.

As the above figure describes, more than 1 header can be added to the user data.
The UDHL (User Data Header Length) defines the number of octets of the headers (all of them).
the IEI (Information Element Identifier) is the identifier of the header – determine what feature will the current header will apply to.
The IEIDL(Information Element Identifier Data Length) defines the number of octets the header’s data will have.
The IED (Information Element Data) contains the actual data of the header.

The IEI can be coded as the following table :

iei-table
Figure 6. IEI coding.

Notes
  • SMSC – SMS Center.
  • TP – Transport Protocol.
  • TPDU – Transport Protocol Data Unit.
  • SME – Short Message Entity (message’s originator or destination entity).
  • SM – Short Message.

Resources

Leave a comment