SMS messages and the PDU format

SMS and the PDU format

Introduction

The SMS message, as specified by the Etsi organization (documents GSM 03.40 and GSM 03.38), can be up to 160 characters long, where each character is 7 bits according to the 7-bit default alphabet. Eight-bit messages (max 140 characters) are usually not viewable by the phones as text messages; instead they are used for data in e.g. smart messaging (images and ringing tones) and OTA provisioning of WAP settings. 16-bit messages (max 70 characters) are used for Unicode (UCS2) text messages, viewable by most phones. A 16-bit text message of class 0 will on some phones appear as a Flash SMS (aka blinking SMS or alert SMS).

The PDU format

There are two ways of sending and receiving SMS messages: by text mode and by PDU (protocol description unit) mode. The text mode (unavailable on some phones) is just an encoding of the bit stream represented by the PDU mode. Alphabets may differ and there are several encoding alternatives when displaying an SMS message. The most common options are "PCCP437", "PCDN", "8859-1", "IRA" and "GSM". These are all set by the at-command AT+CSCS, when you read the message in a computer application. If you read the message on your phone, the phone will choose a proper encoding. An application capable of reading incoming SMS messages, can thus use text mode or PDU mode. If text mode is used, the application is bound to (or limited by) the set of preset encoding options. In some cases, that's just not good enough. If PDU mode is used, any encoding can be implemented.

Receiving a message in the PDU mode

The PDU string contains not only the message, but also a lot of meta-information about the sender, his SMS service center, the time stamp etc. It is all in the form of hexa-decimal octets or decimal semi-octets. The following string is what I received on a Nokia 6110 when sending the message containing "hellohello" from www.mtn.co.za.

07 917283010010F5 040BC87238880900F10000993092516195800AE8329BFD4697D9EC37

This octet sequence consists of three parts: An initial octet indicating the length of the SMSC information ("07"), the SMSC information itself ("917283010010F5"), and the SMS_DELIVER part (specified by ETSI in GSM 03.40).

Note: on some phones (e.g. Ericssson 888?) the first three (colored) parts are omitted when showing the message in PDU mode!

Octet(s) | Description
07 | Length of the SMSC information (in this case 7 octets)
91 | Type-of-address of the SMSC. (91 means international format of the phone number)
72 83 01 00 10 F5 | Service center number(in decimal semi-octets). The length of the phone number is odd (11), so a trailing F has been added to form proper octets. The phone number of this service center is "+27381000015". See below.
04 | First octet of this SMS-DELIVER message.
0B | Address-Length. Length of the sender number (0B hex = 11 dec)
C8 | Type-of-address of the sender number
72 38 88 09 00 F1 | Sender number (decimal semi-octets), with a trailing F
00 | TP-PID. Protocol identifier.
00 | TP-DCS Data coding scheme
99 30 92 51 61 95 80 | TP-SCTS. Time stamp (semi-octets)
0A | TP-UDL. User data length, length of message. The TP-DCS field indicated 7-bit data, so the length here is the number of septets (10). If the TP-DCS field were set to indicate 8-bit data or Unicode, the length would be the number of octets (9).
E8329BFD4697D9EC37 | TP-UD. Message "hellohello" , 8-bit octets representing 7-bit data.

All the octets above are hexa-decimal 8-bit octets, except the Service center number, the sender number and the timestamp; they are decimal semi-octets. The message part in the end of the PDU string consists of hexa-decimal 8-bit octets, but these octets represent 7-bit data (see below).

The semi-octets are decimal, and e.g. the sender number is obtained by performing internal swapping within the semi-octets from "72 38 88 09 00 F1" to "27 83 88 90 00 1F". The length of the phone number is odd, so a proper octet sequence cannot be formed by this number. This is the reason why the trailing F has been added. The time stamp, when parsed, equals "99 03 29 15 16 59 08", where the 6 first characters represent date, the following 6 represents time, and the last two represents time-zone related to GMT.

Interpreting 8-bit octets as 7-bit messages

This transformation is described in detail in GSM 03.38, and an example of the "hellohello" transformation is shown here. The transformation is based on the 7 bit default alphabet , but an application built on the PDU mode can use any character encoding.

Sending a message in the PDU mode

The following example shows how to send the message "hellohello" in the PDU mode from a Nokia 6110.

AT+CMGF=0 //Set PDU mode AT+CSMS=0 //Check if modem supports SMS commands AT+CMGS=23 //Send message, 23 octets (excluding the two initial zeros) >0011000B916407281553F80000AA0AE8329BFD4697D9EC37<ctrl-z> There are 23 octets in this message (46 'characters'). The first octet ("00") doesn't count, it is only an indicator of the length of the SMSC information supplied (0). The PDU string consists of the following:

Octet(s) | Description
00 | Length of SMSC information. Here the length is 0, which means that the SMSC stored in the phone should be used. Note: This octet is optional. On some phones this octet should be omitted! (Using the SMSC stored in phone is thus implicit)
11 | First octet of the SMS-SUBMIT message.
00 | TP-Message-Reference. The "00" value here lets the phone set the message reference number itself.
0B | Address-Length. Length of phone number (11)
91 | Type-of-Address. (91 indicates international format of the phone number).
6407281553F8 | The phone number in semi octets (46708251358). The length of the phone number is odd (11), therefore a trailing F has been added, as if the phone number were "46708251358F". Using the unknown format (i.e. the Type-of-Address 81 instead of 91) would yield the phone number octet sequence 7080523185 (0708251358). Note that this has the length 10 (A), which is even.
00 | TP-PID. Protocol identifier
00 | TP-DCS. Data coding scheme.This message is coded according to the 7bit default alphabet. Having "04" instead of "00" here, would indicate that the TP-User-Data field of this message should be interpreted as 8bit rather than 7bit (used in e.g. smart messaging, OTA provisioning etc).
AA | TP-Validity-Period. "AA" means 4 days. Note: This octet is optional, see bits 4 and 3 of the first octet
0A | TP-User-Data-Length. Length of message. The TP-DCS field indicated 7-bit data, so the length here is the number of septets (10). If the TP-DCS field were set to 8-bit data or Unicode, the length would be the number of octets.
E8329BFD4697D9EC37 | TP-User-Data. These octets represent the message "hellohello". How to do the transformation from 7bit septets into octets is shown here

Links

  • CMS error codes
  • Versenden von Kurznachrichten mittels PDU
  • Etsi

This page has been visited 118277 times and is written and maintained by Lars Pettersson (lars.pettersson@email.nu).


Flash SMS

On some phones (all Nokias, some Siemens, Ericsson, Motorola etc..) a class 0 message will appear as a flash SMS message. These messages appear on the screen immediately upon arrival, without the need to press any buttons on the phone. If the data coding scheme is set to 16-bit unicode (ucs2), and the message starts with "0001", it will appear as a blinking flash message.

Octet | Value | Description
TP-DCS | 18 | 16 bits (UCS2), message class 0
TP-VP | AA | Validity period
TP-UDL | 0C | User Data Length, 12 octets
TP-UD | 00 01 00 41 00 6C 00 65 00 72 00 74 | User Data, message "Alert"
This table shows some relevant octets in a flash SMS message

The first unicode character ("00 01") enables the blinking. The maximum length of such a message will then be 69 unicode characters.


+CMS ERROR

Message service error

Description | These are the error codes for +CMS ERROR.
Error code | Meaning
0-127 | GSM 04.11 Annex E-2 values
128-255 | GSM 03.40 section 9.2.3.22 values
300 | Phone failure
301 | SMS service of phone reserved
302 | Operation not allowed
303 | Operation not supported
304 | Invalid PDU mode parameter
305 | Invalid text mode parameter
310 | SIM not inserted
311 | SIM PIN necessary
312 | PH-SIM PIN necessary
313 | SIM failure
314 | SIM busy
315 | SIM wrong
320 | Memory failure
321 | Invalid memory index
322 | Memory full
330 | SMSC (message service center) address unknown
331 | No network service
332 | Network timeout
500 | Unknown error
512 | Manufacturer specific


Data Coding Scheme (TP-DCS)

The TP-Data-Coding-Scheme field, defined in GSM 03.40, indicates the data coding scheme of the TP-UD field, and may indicate a message class. Any reserved codings shall be assumed to be the GSM default alphabet (the same as codepoint 00000000) by a receiving entity. The octet is used according to a coding group which is indicated in bits 7..4. The octet is then coded as follows:
Coding Group Bits 7..4 | Use of bits 3..0
00xx General Data Coding indication
Bits 5..0 indicate the following:
Bit 5
0 | Text is uncompressed
1 | Text is compressed

Bit 4
0 | Bits 1 and 0 are reserved and have no message class meaning
1 | Bits 1 and 0 have a message class meaning

Bit 3 | Bit 2 | Alphabet being used
0 | 0 | Default alphabet
0 | 1 | 8 bit data
1 | 0 | UCS2 (16bit)
1 | 1 | Reserved

Bit 1 | Bit 0 | Message class | Description
0 | 0 | Class 0 | Immediate display (alert)
0 | 1 | Class 1 | ME specific
1 | 0 | Class 2 | SIM specific
1 | 1 | Class 3 | TE specific

NOTE: The special case of bits 7..0 being 0000 0000 indicates the Default Alphabet as in Phase 2

0100..1011 | Reserved coding groups
1100 Message Waiting Indication Group: Discard Message

Bits 3..0 are coded exactly the same as Group 1101, however with bits 7..4 set to 1100 the mobile may discard the contents of the message, and only present the indication to the user.

1101 Message Waiting Indication Group: Store Message

This Group allows an indication to be provided to the user about status of types of message waiting on systems connected to the GSM PLMN. The mobile may present this indication as an icon on the screen, or other MMI indication. The mobile may take note of the Origination Address for message in this group and group 1100. For each indication supported, the mobile may provide storage for the Origination Address which is to control the mobile indication.
Text included in the user data is coded in the Default Alphabet.
Ehere a message is received with bits 7..4 set to 1101, the mobile shall store the text of the SMS message in addition to setting the indication.
Bit 3 | Description
0 | Set Indication Inactive
1 | Set Indication Active

Bit 2 is reserved, and set to 0
Bit 1 | Bit 0 | Indication Type
0 | 0 | Voicemail Message Waiting
0 | 1 | Fax Message Waiting
1 | 0 | Electronic Mail Message Waiting
1 | 1 | Other Message Waiting*

* Mobile manufacturers may implement the "Other Message Waiting" indication as an additional indication without specifying the meaning. The meaning of this indication is intended to be standardized in the future, so Operators should not make use of this indication until the standard for this indication is finalized.

1110 Message Waiting Indication Group: Store Message

The coding of bits 3..0 and functionality of this feature are the same as for the Message Waiting Indication Group above, (bits 7..4 set to 1101) with the exception that the text included in the user data is coded in the uncompressed UCS2 alphabet.

1111 Data coding/message class

Bit 3 is reserved, set to 0.
Bit 2 | Message coding
0 | Default alphabet
1 | 8-bit data

Bit 1 | Bit 0 | Message Class | Description
0 | 0 | Class 0 | Immediate display (alert)
0 | 1 | Class 1 | ME specific
1 | 0 | Class 2 | SIM specific
1 | 1 | Class 3 | TE specific


The 7 bit default alphabet

This is the 7 bit default alphabet as specified by GSM 03.38. The corresponding ISO-8859-1 decimal codes are shown in the rightmost column. Note that the euro sign (€) is a member of the ISO-8859-15 character set.

Hex | Dec | Character name | Character | ISO-8859-1 DEC
0x00 | 0 | COMMERCIAL AT | @ | 64
0x01 | 1 | POUND SIGN | £ | 163
0x02 | 2 | DOLLAR SIGN | $ | 36
0x03 | 3 | YEN SIGN | ¥ | 165
0x04 | 4 | LATIN SMALL LETTER E WITH GRAVE | è | 232
0x05 | 5 | LATIN SMALL LETTER E WITH ACUTE | é | 233
0x06 | 6 | LATIN SMALL LETTER U WITH GRAVE | ù | 249
0x07 | 7 | LATIN SMALL LETTER I WITH GRAVE | ì | 236
0x08 | 8 | LATIN SMALL LETTER O WITH GRAVE | ò | 242
0x09 | 9 | LATIN CAPITAL LETTER C WITH CEDILLA | Ç | 199
0x0A | 10 | LINE FEED |  | 10
0x0B | 11 | LATIN CAPITAL LETTER O WITH STROKE | Ø | 216
0x0C | 12 | LATIN SMALL LETTER O WITH STROKE | ø | 248
0x0D | 13 | CARRIAGE RETURN |  | 13
0x0E | 14 | LATIN CAPITAL LETTER A WITH RING ABOVE | Å | 197
0x0F | 15 | LATIN SMALL LETTER A WITH RING ABOVE | å | 229
0x10 | 16 | GREEK CAPITAL LETTER DELTA | Δ |
0x11 | 17 | LOW LINE | _ | 95
0x12 | 18 | GREEK CAPITAL LETTER PHI | Φ |
0x13 | 19 | GREEK CAPITAL LETTER GAMMA | Γ |
0x14 | 20 | GREEK CAPITAL LETTER LAMBDA | Λ |
0x15 | 21 | GREEK CAPITAL LETTER OMEGA | Ω |
0x16 | 22 | GREEK CAPITAL LETTER PI | Π |
0x17 | 23 | GREEK CAPITAL LETTER PSI | Ψ |
0x18 | 24 | GREEK CAPITAL LETTER SIGMA | Σ |
0x19 | 25 | GREEK CAPITAL LETTER THETA | Θ |
0x1A | 26 | GREEK CAPITAL LETTER XI | Ξ |
0x1B | 27 | ESCAPE TO EXTENSION TABLE |  |
0x1B0A | 27 10 | FORM FEED |  | 12
0x1B14 | 27 20 | CIRCUMFLEX ACCENT | ^ | 94
0x1B28 | 27 40 | LEFT CURLY BRACKET | { | 123
0x1B29 | 27 41 | RIGHT CURLY BRACKET | } | 125
0x1B2F | 27 47 | REVERSE SOLIDUS (BACKSLASH) | \ | 92
0x1B3C | 27 60 | LEFT SQUARE BRACKET | [ | 91
0x1B3D | 27 61 | TILDE | ~ | 126
0x1B3E | 27 62 | RIGHT SQUARE BRACKET | ] | 93
0x1B40 | 27 64 | VERTICAL BAR | | | 124
0x1B65 | 27 101 | EURO SIGN | € | 164 (ISO-8859-15)
0x1C | 28 | LATIN CAPITAL LETTER AE | Æ | 198
0x1D | 29 | LATIN SMALL LETTER AE | æ | 230
0x1E | 30 | LATIN SMALL LETTER SHARP S (German) | ß | 223
0x1F | 31 | LATIN CAPITAL LETTER E WITH ACUTE | É | 201
0x20 | 32 | SPACE |  | 32
0x21 | 33 | EXCLAMATION MARK | ! | 33
0x22 | 34 | QUOTATION MARK | " | 34
0x23 | 35 | NUMBER SIGN | # | 35
0x24 | 36 | CURRENCY SIGN | ¤ | 164 (ISO-8859-1)
0x25 | 37 | PERCENT SIGN | % | 37
0x26 | 38 | AMPERSAND | & | 38
0x27 | 39 | APOSTROPHE | ' | 39
0x28 | 40 | LEFT PARENTHESIS | ( | 40
0x29 | 41 | RIGHT PARENTHESIS | ) | 41
0x2A | 42 | ASTERISK | * | 42
0x2B | 43 | PLUS SIGN | + | 43
0x2C | 44 | COMMA | , | 44
0x2D | 45 | HYPHEN-MINUS | - | 45
0x2E | 46 | FULL STOP | . | 46
0x2F | 47 | SOLIDUS (SLASH) | / | 47
0x30 | 48 | DIGIT ZERO | 0 | 48
0x31 | 49 | DIGIT ONE | 1 | 49
0x32 | 50 | DIGIT TWO | 2 | 50
0x33 | 51 | DIGIT THREE | 3 | 51
0x34 | 52 | DIGIT FOUR | 4 | 52
0x35 | 53 | DIGIT FIVE | 5 | 53
0x36 | 54 | DIGIT SIX | 6 | 54
0x37 | 55 | DIGIT SEVEN | 7 | 55
0x38 | 56 | DIGIT EIGHT | 8 | 56
0x39 | 57 | DIGIT NINE | 9 | 57
0x3A | 58 | COLON | : | 58
0x3B | 59 | SEMICOLON | ; | 59
0x3C | 60 | LESS-THAN SIGN | < | 60
0x3D | 61 | EQUALS SIGN | = | 61
0x3E | 62 | GREATER-THAN SIGN | > | 62
0x3F | 63 | QUESTION MARK | ? | 63
0x40 | 64 | INVERTED EXCLAMATION MARK | ¡ | 161
0x41 | 65 | LATIN CAPITAL LETTER A | A | 65
0x42 | 66 | LATIN CAPITAL LETTER B | B | 66
0x43 | 67 | LATIN CAPITAL LETTER C | C | 67
0x44 | 68 | LATIN CAPITAL LETTER D | D | 68
0x45 | 69 | LATIN CAPITAL LETTER E | E | 69
0x46 | 70 | LATIN CAPITAL LETTER F | F | 70
0x47 | 71 | LATIN CAPITAL LETTER G | G | 71
0x48 | 72 | LATIN CAPITAL LETTER H | H | 72
0x49 | 73 | LATIN CAPITAL LETTER I | I | 73
0x4A | 74 | LATIN CAPITAL LETTER J | J | 74
0x4B | 75 | LATIN CAPITAL LETTER K | K | 75
0x4C | 76 | LATIN CAPITAL LETTER L | L | 76
0x4D | 77 | LATIN CAPITAL LETTER M | M | 77
0x4E | 78 | LATIN CAPITAL LETTER N | N | 78
0x4F | 79 | LATIN CAPITAL LETTER O | O | 79
0x50 | 80 | LATIN CAPITAL LETTER P | P | 80
0x51 | 81 | LATIN CAPITAL LETTER Q | Q | 81
0x52 | 82 | LATIN CAPITAL LETTER R | R | 82
0x53 | 83 | LATIN CAPITAL LETTER S | S | 83
0x54 | 84 | LATIN CAPITAL LETTER T | T | 84
0x55 | 85 | LATIN CAPITAL LETTER U | U | 85
0x56 | 86 | LATIN CAPITAL LETTER V | V | 86
0x57 | 87 | LATIN CAPITAL LETTER W | W | 87
0x58 | 88 | LATIN CAPITAL LETTER X | X | 88
0x59 | 89 | LATIN CAPITAL LETTER Y | Y | 89
0x5A | 90 | LATIN CAPITAL LETTER Z | Z | 90
0x5B | 91 | LATIN CAPITAL LETTER A WITH DIAERESIS | Ä | 196
0x5C | 92 | LATIN CAPITAL LETTER O WITH DIAERESIS | Ö | 214
0x5D | 93 | LATIN CAPITAL LETTER N WITH TILDE | Ñ | 209
0x5E | 94 | LATIN CAPITAL LETTER U WITH DIAERESIS | Ü | 220
0x5F | 95 | SECTION SIGN | § | 167
0x60 | 96 | INVERTED QUESTION MARK | ¿ | 191
0x61 | 97 | LATIN SMALL LETTER A | a | 97
0x62 | 98 | LATIN SMALL LETTER B | b | 98
0x63 | 99 | LATIN SMALL LETTER C | c | 99
0x64 | 100 | LATIN SMALL LETTER D | d | 100
0x65 | 101 | LATIN SMALL LETTER E | e | 101
0x66 | 102 | LATIN SMALL LETTER F | f | 102
0x67 | 103 | LATIN SMALL LETTER G | g | 103
0x68 | 104 | LATIN SMALL LETTER H | h | 104
0x69 | 105 | LATIN SMALL LETTER I | i | 105
0x6A | 106 | LATIN SMALL LETTER J | j | 106
0x6B | 107 | LATIN SMALL LETTER K | k | 107
0x6C | 108 | LATIN SMALL LETTER L | l | 108
0x6D | 109 | LATIN SMALL LETTER M | m | 109
0x6E | 110 | LATIN SMALL LETTER N | n | 110
0x6F | 111 | LATIN SMALL LETTER O | o | 111
0x70 | 112 | LATIN SMALL LETTER P | p | 112
0x71 | 113 | LATIN SMALL LETTER Q | q | 113
0x72 | 114 | LATIN SMALL LETTER R | r | 114
0x73 | 115 | LATIN SMALL LETTER S | s | 115
0x74 | 116 | LATIN SMALL LETTER T | t | 116
0x75 | 117 | LATIN SMALL LETTER U | u | 117
0x76 | 118 | LATIN SMALL LETTER V | v | 118
0x77 | 119 | LATIN SMALL LETTER W | w | 119
0x78 | 120 | LATIN SMALL LETTER X | x | 120
0x79 | 121 | LATIN SMALL LETTER Y | y | 121
0x7A | 122 | LATIN SMALL LETTER Z | z | 122
0x7B | 123 | LATIN SMALL LETTER A WITH DIAERESIS | ä | 228
0x7C | 124 | LATIN SMALL LETTER O WITH DIAERESIS | ö | 246
0x7D | 125 | LATIN SMALL LETTER N WITH TILDE | ñ | 241
0x7E | 126 | LATIN SMALL LETTER U WITH DIAERESIS | ü | 252
0x7F | 127 | LATIN SMALL LETTER A WITH GRAVE | à | 224


First octet of the SMS-DELIVER PDU

The first octet of the SMS-DELIVER PDU has the following layout:

Bit no | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Name | TP-RP | TP-UDHI | TP-SRI | (unused) | (unused) | TP-MMS | TP-MTI | TP-MTI

where the fields have the following meaning:

Name | Meaning
TP-RP | Reply path. Parameter indicating that reply path exists.
TP-UDHI | User data header indicator. This bit is set to 1 if the User Data field starts with a header
TP-SRI | Status report indication. This bit is set to 1 if a status report is going to be returned to the SME
TP-MMS | More messages to send. This bit is set to 0 if there are more messages to send
TP-MTI | Message type indicator. Bits no 1 and 0 are both set to 0 to indicate that this PDU is an SMS-DELIVER

Example

A first octet of "04" (hex) has the following meaning:

Bit no | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Name | TP-RP | TP-UDHI | TP-SRI | (unused) | (unused) | TP-MMS | TP-MTI | TP-MTI
Value | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0


Message "hellohello" coded into octets

Coding 7-bit data (septets) into octets

The message "hellohello" consists of 10 characters, called septets when represented by 7 bits each. These septets need to be transformed into octets for the SMS transfer.

h | e | l | l | o | h | e | l | l | o
104 | 101 | 108 | 108 | 111 | 104 | 101 | 108 | 108 | 111
1101000 | 1100101 | 1101100 | 1101100 | 1101111 | 1101000 | 1100101 | 1101100 | 1101100 | 1101111
1101000
110010 1
11011 00
1101 100
110 1111
11 01000
1 100101
1101100
1101100
110111 1

The first septet (h) is turned into an octet by adding the rightmost bit of the second septet. This bit is inserted to the left which yields 1 + 1101000 = 11101000 ("E8"). The rightmost bit of the second character is then consumed, so the second character (septet) needs two bits (yellow) of the third character to make an 8bit octet. This process goes on and on yielding the following octets:

1 1101000
00 110010
100 11011
1111 1101
01000 110
100101 11
1101100 1
1 1101100
110111
E8 32 9B FD 46 97 D9
EC 37

The 9 octets from "hellohello" are E8 32 9B FD 46 97 D9 EC 37


Protocol Identifier (TP-PID)

The TP-Protocol-Identifier parameter consists of one octet, and the bits in the octet are used as follows: The MS will interpret reserved or unsupported values as the value 00000000 but shall store them exactly as received. The SC may reject messages with a TP-Protocol-Identifier containing a reserved value or one which is not supported.
Bit 7 | Bit 6 | Usage
0 | 0 | Assigns bits 0..5 as defined below
0 | 1 | Assigns bits 0..5 as defined below
1 | 0 | Reserved
1 | 1 | Assigns bits 0..5 for SC specific use
In case where bits 7 and 6 both are 0:
Bit 5 | Description
0 | no interworking, but SME-to-SME protocol
1 | telematic interworking
In the case of telematic interworking, the following five bit patterns in bits 4..0 are used to indicate types of telematic devices:
Bits 4..0 | Description
00000 | implicit - device type is specific to this SC, or can be concluded on the basis of the address
00001 | telex (or teletex reduced to telex format)
00010 | group 3 telefax
00011 | group 4 telefax
00100 | voice telephone (i.e. conversion to speech)
00101 | ERMES (European Radio Messaging System)
00110 | National Paging System (known to the SC)
00111 | Videotex (T.100/T.101)
01000 | teletex, carrier unspecified
01001 | teletex, in PSPDN
01010 | teletex, in CSPDN
01011 | teletex, in analog PSTN
01100 | teletex, in digital ISDN
01101 | UCI (Universal Computer Interface, ETSI DE/PS 3 01-3)
01110..
..01111 		(reserved, 2 combinations)
10000 | a message handling facility (known to the SC)
10001 | any public X.400-based message handling system
10010 | Internet Electronic Mail
10011..
..10111 		(reserved, 5 combinations)
11000..
..11110 		values specific to each SC, usage based on mutual agreement between the SME and the SC (7 combinations available for each SC)
11111 | A GSM mobile station. The SC converts the SM from the received TP-DCS to any data coding scheme supported by that MS (e.g. the default).
If bit 5 has value 1 in an SMS-SUBMIT PDU, it indicates that the SME is a telematic device of a type which is indicated in bits 4..0, and requests the SC to convert the SM into a form suited for that device type. If the destination network is ISDN, the SC must also select the proper service indicators for connecting to a device of that type.

If bit 5 has value 1 in an SMS-DELIVER PDU, it indicates that the SME is a telematic device of a type which is indicated in bits 4..0.

If bit 5 has value 0 in an SMS-DELIVER PDU, the value in bits 4..0 indicates the SM-AL protocol being used between the SME and the MS.

Note that for the straightforward case of simple MS-to-SC short message transfer the Protocol Identifier is set to the value 0.

In the case where bit 7 = 0, bit 6 = 1, bits 5..0 are used as defined below
Bits 5..0 | Description
000000 | Short Message Type 0
000001 | Replace Short Message Type 1
000010 | Replace Short Message Type 2
000011 | Replace Short Message Type 3
000100 | Replace Short Message Type 4
000101 | Replace Short Message Type 5
000110 | Replace Short Message Type 6
000111 | Replace Short Message Type 7
001000..011110 | Reserved
011111 | Return Call Message
100000..111100 | Reserved
111101 | ME Data download
111110 | ME De-personalization Short MEssage
111111 | SIM Data download

A short message type 0 indicates that the ME must acknowledge receipt of the short message but may discard its contents.

The Replace Short Message feature is optional for the ME and the SIM but if implemented it shall be performed as descriped here.

For MT short messages, on receipt of a short message from from the SC, the MS shall check to see if the associated Protocol Identifier contains a Replace Short Message Type code.

If such a code is present, the the MS will check the originating address and replace any existing stored message having the same Protocol Identifier code and originating address with the new short message and other parameter values. If there is no message to be replaced, the MS shall store the message in the normal way. The MS may also check the SC address as well as the Originating Address. However, in a network which has multiple SCs, it is possible for a Replace Message type for a SM to be sent via different SCs and so it is recommended that the SC address should not be checked by the MS unless the application specifically requires such a check.

If a Replace Short Message Type code is not present then the MS will will store the message in the normal way.

In MO short messages the SC reacts similarly but only the address of the originating MS or any other source is checked.

A Return Call Message indicates to the MS to inform the user that a call (e.g. a telephone call) can be established to the address specified within the TP-OA. The RP-OA contains the address of the SC as usual. The message content (if present) gives displayable information (e.g. the number of waiting voice messages). The message is handled in the same way as all other messages of the Replace Short Message Types.

The ME De-personalization Short Message is an ME-specific message which instructs the ME to de-personalities the ME (see GSM 2.22). The TP-DCS shall be set to Uncompressed, Default Alphabet, and Message Class 1 (Me-specific), which corresponds to a bit coding og 00010001. The TP-UD field contains de-personalization information coded according to GSM 02.22. This information shall not be displayed by an ME which supports the scheme. The acknowledgement to this message is a SMS-DELIVER-REPORT for RP-ACK in ehich the TP-User-Data shall be coded according to GSM 02.22.

SIM Data download is a facility whereby the ME must pass the short message in its entirety including all SMS elements contained in the SMS deliver to the SIM using the mechanism descriped in GSM 11.11. The DCS shall be set to 8 bit message class 2 (either bit coding 11110110 or 00010110). The entire user data field is available for SIM Data download.

ME Data download is facility whereby the ME shall process the short message in its entirety including all SMS elements contained in the SMS deliver to the ME. The DCS shall be set to message class 1. The entire user data field is available for ME data download.


Service Centre Time Stamp (TP-SCTS)

The TP-Service-Centre-Time-Stamp field is given in semi-octet representation (each semi-octet consists of two digital decimals), and represents the local time in the following way:
Field | Length | Description
Year | 1 | These semi-octets are in "Swapped Nibble" mode
Month | 1
Day | 1
Hour | 1
Minute | 1
Second | 1
Timezone | 1 | Relation to GMT. One unit is 15min. If MSB=1, value is negative.
E.g.: 0x99 0x20 0x21 0x50 0x75 0x03 0x21 means 12. Feb 1999 05:57:30 GMT+3

Swapped Nibble presentation

BCD code where nibbles within octet is swapped. E.g.: 0x31 Represents value of 13


First octet of the SMS-SUBMIT PDU

The first octet of the SMS-SUBMIT PDU has the following layout:

Bit no | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Name | TP-RP | TP-UDHI | TP-SRR | TP-VPF | TP-VPF | TP-RD | TP-MTI | TP-MTI

where the fields have the following meaning:

Fieldname | Meaning
TP-RP | Reply path. Parameter indicating that reply path exists.
TP-UDHI | User data header indicator. This bit is set to 1 if the User Data field starts with a header
TP-SRR | Status report request. This bit is set to 1 if a status report is requested
TP-VPF | Validity Period Format. Bit4 and Bit3 specify the TP-VP field according to this table: bit4 bit3 0 0 : TP-VP field not present 1 0 : TP-VP field present. Relative format (one octet) 0 1 : TP-VP field present. Enhanced format (7 octets) 1 1 : TP-VP field present. Absolute format (7 octets)
TP-RD | Reject duplicates. Parameter indicating whether or not the SC shall accept an SMS-SUBMIT for an SM still held in the SC which has the same TP-MR and the same TP-DA as a previously submitted SM from the same OA.
TP-MTI | Message type indicator. Bits no 1 and 0 are set to 0 and 1 respectively to indicate that this PDU is an SMS-SUBMIT

Example

A first octet of "11" (hex) has the following meaning:

Bit no | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Name | TP-RP | TP-UDHI | TP-SRR | TP-VPF | TP-VPF | TP-RD | TP-MTI | TP-MTI
Value | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1


The Type-of-Address octet

The Type-of-Address octet indicates the format of a phone number. The most common value of this octet is 91 hex (10010001 bin), which indicates international format. A phone number in international format looks like 46708251358 (where the country code is 46). In the national (or unknown) format the same phone number would look like 0708251358. The international format is the most generic, and it has to be accepted also when the message is destined to a recipient in the same country as the MSC or as the SGSN.

Bit no | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Name | Always set to 1 | Type-of-number |  |  | Numbering Plan Identification

Note that bit no 7 should always be set to 1
Bits 6, 5 and 4 deonte the Type-of-number
Bits 3, 2, 1, 0 denote the Numbering-Plan-Identification

Type of number

Bits 6 5 4 | Meaning of the Type-of-number bits (6, 5 and 4)
0 0 0 | Unknown. This is used when the user or network has no a priori information about the numbering plan. In this case, the Address-Value field is organized according to the network dialling plan, e.g. prefix or escape digits might be present.
0 0 1 | International number.
0 1 0 | National number. Prefix or escape digits shall not be included.
0 1 1 | Network specific number. This is used to indicate administration/service number specific to the serving network, e.g. used to access an operator.
1 0 0 | Subscriber number. This is used when a specific short number representation is stored in one or more SCs as part of a higher layer application. (Note that "Subscriber number" shall only be used in connection with the proper PID referring to this application).
1 0 1 | Alphanumeric, (coded according to GSM TS 03.38 7-bit default alphabet)
1 1 0 | Abbreviated number
1 1 1 | Reserved for extension

Numbering Plan Identification

The Numbering-plan-identification applies for Type-of-number = 000, 001 and 010. For Type-of-number = 101 bits 3,2,1,0 are reserved and shall be transmitted as 0000. Note that for addressing any of the entities SC, MSC, SGSN or MS, Numbering-plan-identification = 0001 will always be used. However, for addressing the SME, any specified Numbering-plan-identification value may be used.

Bits 3 2 1 0 | Meaning of the Numbering Plan Identifiation bits (3, 2, 1 and 0)
0 0 0 0 | Unknown.
0 0 0 1 | ISDN/telephone numbering plan (E.164/E.163).
0 0 1 1 | Data numbering plan (X.121).
0 1 0 0 | Telex numbering plan
1 0 0 0 | National numbering plan
1 0 0 1 | Private numbering plan
1 0 1 0 | ERMES numbering plan (ETSI DE/PS 3 01-3)
1 1 1 1 | Reserved for extension
All other values are reserved.

Example

A Type-of-Address octet of "81" (hex), unknown phone number format, looks like:

Bit no | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Name | Always set to 1 | Type of number |  |  | Numbering plan identification
Value | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1


Validity Period (TP-VP)

Validity period specifies the time when SM expires. If SM is't delivered before that moment, it is discarded by SC. Validity-Period can be in three different format; Relative, Absolute and Enhanced.

Relative:

The TP-Validity-Period comprises 1 octet in integer representation, giving the length of the validity period, counted from when the SMS-SUBMIT is received by the SC. The representation of time is as follows:
TP-VP value | Validity period value
0 to 143 | (TP-VP + 1) * 5 minutes (i.e. 5 minutes intervals up to 12 hours)
144 to 167 | 12 hours + ((TP-VP - 143) * 30 minutes)
168 to 196 | (TP-VP - 166) * 1 day
197 to 255 | (TP-VP - 192) * 1 week

Absolute

TP-VP field is 7 octets long, containing TP-SCTS formatted time when SM expires. See ETSI 03.40 for more information.

Enhanced

See ETSI 03.40


Teleport Pro Messages

http://www.etsi.org/: This file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.
http://www.3glab.org/ota.html: This file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.
http://www.fastlogic.co.za/faq59.htm: This file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.
http://www.nokia.com/phones/6110/index.html: This file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.
http://www.mtn.co.za/: This file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.
http://www.nobbi.com/sms_pdu.htm: This file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.