User Data Header (UDH) is a binary structure which may be present at the start of a short message in the Short Message Service in GSM. It does not contain any text, but it specifies how the message should be formatted and processed.
UDH can be used to form Concatenated SMS, to enrich the content of the message with colors, text formatting, small pictures and animations and simple music which are used in Enhanced Messaging Service (EMS), to convey port numbers which may cause start of an application in the mobile phone, which is used for Multimedia Messaging Service (MMS) or to indicate using of national language shift tables. [1]
UDH is defined in 3GPP 23.040 (originally GSM 03.40). [2]
Presence of User Data Header is indicated by the TP-UDHI (Transfer Layer Protocol User Data Header Indicator) bit - 6th bit of the first octet of the GSM 03.40 or 3GPP 23.040 message.
If UDH is present, it is at the beginning of the TP-UD (TP-User Data) field and it always starts with an UDHL (UDH Length) octet. The rest of UDH is a sequence of Tag-Length-Value triplets. The Tag is named Information-Element-Identifier (IEI) and is always 1 octet long, the Length field is always 1 octet long and it specifies the length of the Information Element Data.
UDH uses space intended for the message payload. The longer the UDH, the less space remains for the message text or other contents. When TP-UD contains seven-bit data, the length of TP-UD is given in septets (but UDHL is still in octets, so length in septets is (UDHL + 1) * 8 / 7) and the UDH is filled to a septet boundary with 0-6 zero bits. The next table shows how a TP-UD of a message in the GSM 7 bit default alphabet containing text 'Hi' with a predefined sound 'Chord high' will be encoded:
TP-UD Octet | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
Value (hex) | 04 | 0B | 02 | 00 | 08 | 20 | D3 |
Meaning | UDH Length | IEI: Predefined sound | IE Length | Position | Chord high | 6 lower bits of the 1st char + 2 fill bits | 7 lower bits of the 2nd char + 1 upper bit of the first char |
The total message length TP-UDL will be 8. (UDH has 8 * (1 + 4) = 40 bits, 2 bits is the padding as (40 + 2) / 7 = 6 without remainder, 2 * 7 = 14 bits for text; total TP-UD length is 40 + 2 + 14 = 56 bits = 7 octets = 8 septets.)
IEI (hex) | Meaning | Classification | Length | May repeat |
---|---|---|---|---|
00 | Concatenated short messages, 8-bit reference number | SMS Control | 3 | no |
01 | Special SMS Message Indication | SMS Control | 2 | yes |
02 | Reserved | N/A | N/A | yes |
03 | Not used to avoid misinterpretation as <LF> character | N/A | N/A | yes |
04 | Application port addressing scheme, 8 bit address | SMS Control | 2 | no |
05 | Application port addressing scheme, 16 bit address | SMS Control | 4 | no |
06 | SMSC Control Parameters | SMS Control | 1 | no |
07 | UDH Source Indicator | SMS Control | 1 | yes |
08 | Concatenated short message, 16-bit reference number | SMS Control | 4 | no |
09 | Wireless Control Message Protocol | SMS Control | 1-255 | yes |
0A | Text Formatting | EMS Control | 3-4 | yes |
0B | Predefined Sound | EMS Content | 2 | yes |
0C | User Defined Sound (iMelody max 128 bytes) | EMS Content | 2-129 | yes |
0D | Predefined Animation | EMS Content | 2 | yes |
0E | Large Animation (16*16 times 4 = 32*4 =128 bytes) | EMS Content | 129 | yes |
0F | Small Animation (8*8 times 4 = 8*4 =32 bytes) | EMS Content | 33 | yes |
10 | Large Picture (32*32 = 128 bytes) | EMS Content | 129 | yes |
11 | Small Picture (16*16 = 32 bytes) | EMS Content | 33 | yes |
12 | Variable Picture | EMS Content | 4-255 | yes |
13 | User prompt indicator | EMS Control | 1 | yes |
14 | Extended Object | EMS Content | 7-255 | yes |
15 | Reused Extended Object | EMS Control | 3 | yes |
16 | Compression Control | EMS Control | 3-255 | no |
17 | Object Distribution Indicator | EMS Control | 2 | yes |
18 | Standard WVG object | EMS Content | 1-255 | yes |
19 | Character Size WVG object | EMS Content | 1-255 | yes |
1A | Extended Object Data Request Command | EMS Control | 0-255 | no |
1B | Reserved for future EMS features | N/A | 0-255 | yes |
1C | Reserved for future EMS features | N/A | 0-255 | yes |
1D | Reserved for future EMS features | N/A | 0-255 | yes |
1E | Reserved for future EMS features | N/A | 0-255 | yes |
1F | Reserved for future EMS features | N/A | 0-255 | yes |
20 | RFC 822 E-Mail Header | SMS Control | 1 | no |
21 | Hyperlink format element | SMS Control | 0-255 | yes |
22 | Reply Address Element | SMS Control | 1-255 | no |
23 | Enhanced Voice Mail Information | SMS Control | 0-255 | no |
24 | National Language Single Shift | SMS Control | 1 | no |
25 | National Language Locking Shift | SMS Control | 1 | no |
26 | Filler | SMS Control | 0-255 | yes |
27 – 6F | Reserved for future use | N/A | 0-255 | N/A |
70 – 7F | (U)SIM Toolkit Security Headers | SMS Control | 0-255 | ? |
80 – 9F | SME to SME specific use | SMS Control | 0-255 | ? |
A0 – BF | Reserved for future use | N/A | 0-255 | ? |
C0 – DF | SC specific use | SMS Control | 0-255 | ? |
E0 – FF | Reserved for future use | N/A | 0-255 | ? |
The UDH is used in other protocols for short message transport - Short Message Peer-to-Peer (SMPP), Universal Computer Protocol (UCP) and in WEMT teleservice in CDMA2000.
General Packet Radio Service (GPRS), also called 2.5G, is a packet oriented mobile data standard on the 2G cellular communication network's global system for mobile communications (GSM). GPRS was established by European Telecommunications Standards Institute (ETSI) in response to the earlier CDPD and i-mode packet-switched cellular technologies. It is now maintained by the 3rd Generation Partnership Project (3GPP).
Short Message/Messaging Service, commonly abbreviated as SMS, is a text messaging service component of most telephone, Internet and mobile device systems. It uses standardized communication protocols that let mobile devices exchange short text messages. An intermediary service can facilitate a text-to-voice conversion to be sent to landlines.
Short Message Peer-to-Peer (SMPP) in the telecommunications industry is an open, industry standard protocol designed to provide a flexible data communication interface for the transfer of short message data between External Short Messaging Entities (ESMEs), Routing Entities (REs) and SMSC.
In computer programming, Base64 is a group of tetrasexagesimal binary-to-text encoding schemes that represent binary data in sequences of 24 bits that can be represented by four 6-bit Base64 digits.
Multimedia Messaging Service (MMS) is a standard way to send messages that include multimedia content to and from a mobile phone over a cellular network. Users and providers may refer to such a message as a PXT, a picture message, or a multimedia message. The MMS standard extends the core SMS capability, allowing the exchange of text messages greater than 160 characters in length. Unlike text-only SMS, MMS can deliver a variety of media, including up to forty seconds of video, one image, a slideshow of multiple images, or audio.
External Machine Interface (EMI), an extension to Universal Computer Protocol (UCP), is a protocol primarily used to connect to short message service centres (SMSCs) for mobile telephones. The protocol was developed by CMG Wireless Data Solutions, now part of Mavenir.
Unstructured Supplementary Service Data (USSD), sometimes referred to as "quick codes" or "feature codes", is a communications protocol used by GSM cellular telephones to communicate with the mobile network operator's computers. USSD can be used for WAP browsing, prepaid callback service, mobile-money services, location-based content services, menu-based information services, and as part of configuring the phone on the network. The service does not require a messaging app, and does not incur charges.
The IP Multimedia Subsystem or IP Multimedia Core Network Subsystem (IMS) is a standardised architectural framework for delivering IP multimedia services. Historically, mobile phones have provided voice call services over a circuit-switched-style network, rather than strictly over an IP packet-switched network. Various voice over IP technologies are available on smartphones; IMS provides a standard protocol across vendors.
Enhanced Messaging Service (EMS) was a cross-industry collaboration between magic4, Ericsson, Motorola, Siemens and Alcatel among others, which provided an application-level extension to Short Message Service (SMS) for cellular phones available on GSM, TDMA and CDMA networks.
GPRS Tunnelling Protocol (GTP) is a group of IP-based communications protocols used to carry general packet radio service (GPRS) within GSM, UMTS, LTE and 5G NR radio networks. In 3GPP architectures, GTP and Proxy Mobile IPv6 based interfaces are specified on various interface points.
The Mobile Application Part (MAP) is an SS7 protocol that provides an application layer for the various nodes in GSM and UMTS mobile core networks and GPRS core networks to communicate with each other in order to provide services to users. The Mobile Application Part is the application-layer protocol used to access the Home Location Register, Visitor Location Register, Mobile Switching Center, Equipment Identity Register, Authentication Centre, Short message service center and Serving GPRS Support Node (SGSN).
Cell Broadcast (CB) is a method of sending messages to multiple mobile telephone users in a defined area at the same time. It is defined by the ETSI's GSM committee and 3GPP and is part of the 2G, 3G, 4G LTE (telecommunication) and 5G standards. It is also known as Short Message Service-Cell Broadcast (SMS-CB) or CB SMS.
UDP-Lite is a connectionless protocol that allows a potentially damaged data payload to be delivered to an application rather than being discarded by the receiving station. This is useful as it allows decisions about the integrity of the data to be made in the application layer, where the significance of the bits is understood. UDP-Lite is described in RFC 3828.
The Short Message Service is realised by the use of the Mobile Application Part (MAP) of the SS7 protocol, with Short Message protocol elements being transported across the network as fields within the MAP messages. These MAP messages may be transported using "traditional" TDM based signalling, or over IP using SIGTRAN and an appropriate adaptation layer.
In the cellular phone industry, mobile phones and their networks sometimes support concatenated short message service to overcome the limitation on the number of characters that can be sent in a single SMS text message transmission. Using this method, long messages are split into smaller messages by the sending device and recombined at the receiving end. Each message is then billed separately. When the feature works properly, it is nearly transparent to the user, appearing as a single long text message. Previously, due to incompatibilities between providers and lack of support in some phone models, there was not widespread use of this feature.
GTP' is an IP based protocol used within GSM and UMTS networks. It can be used with UDP or TCP. GTP' uses the same message structure as GTP, but it is largely a separate protocol. GTP' uses registered UDP/TCP port 3386.
LAPDm in telecommunications is a data link layer protocol used in GSM cellular networks. LAPDm forms Layer 2 of the Um interface between the Base Transceiver Station and Mobile station, which is to say that it is used in the radio link between the cellular network and the subscriber handset.
In mobile telephony GSM 03.38 or 3GPP 23.038 is a character encoding used in GSM networks for SMS, CB and USSD. The 3GPP TS 23.038 standard defines GSM 7-bit default alphabet which is mandatory for GSM handsets and network elements, but the character set is suitable only for English and a number of Western-European languages. Languages such as Chinese, Korean or Japanese must be transferred using the 16-bit UCS-2 character encoding. A limited number of languages, like Portuguese, Spanish, Turkish and a number of languages used in India written with a Brahmic scripts may use 7-bit encoding with national language shift table defined in 3GPP 23.038. For binary messages, 8-bit encoding is used.
GSM 03.40 or 3GPP TS 23.040 is a mobile telephony standard describing the format of the Transfer Protocol Data Units (TPDU) of the Short Message Transfer Protocol (SM-TP) used in the GSM networks to carry Short Messages. This format is used throughout the whole transfer of the message in the GSM mobile network. In contrast, application servers use different protocols, like Short Message Peer-to-Peer or Universal Computer Protocol, to exchange messages between them and the Short Message Service Center (SMSC).
Data Coding Scheme is a one-octet field in Short Messages (SM) and Cell Broadcast Messages (CB) which carries a basic information how the recipient handset should process the received message. The information includes: