ASN.1 Telecom Guide 3GPP Encoding & Decoding
Understanding ASN.1 (Abstract Syntax Notation One), the cornerstone of 3GPP signaling. This guide covers the role of ASN.1 in the RRC, S1AP, NGAP and X2AP protocols, the BER, PER and UPER encoding schemes, and real-time decoding in the field.
In a nutshell
ASN.1 is the language used by 3GPP to define the structure of all radio and network signaling messages. Every RRC, S1AP or NGAP message is described by an ASN.1 schema and then encoded into binary according to specific rules (BER, PER or UPER). To decode a signaling message captured in the field, you need an ASN.1 parser capable of interpreting the binary stream using the corresponding 3GPP schema. This is exactly what the HiCellTek Layer 3 decoder does in real time.
What is ASN.1?
ASN.1 (Abstract Syntax Notation One) is an international standard defined by ITU-T in recommendations X.680 through X.683. It is a formal data description language that defines the structure of information independently of any programming language or binary encoding.
The fundamental concept of ASN.1 is the separation between the abstract definition of data (the schema) and its concrete representation (the encoding). The same message can be encoded in BER, PER or UPER depending on the protocol and usage context. The ASN.1 schema remains identical; only the encoding rules change.
In telecom, ASN.1 is ubiquitous. It has been used since the 1990s in GSM signaling protocols (MAP), UMTS (RRC, RANAP), and today across the entire 4G LTE and 5G NR protocol stack. Its ability to describe complex structures with optional fields, extensible sequences and value constraints makes it the ideal tool for the evolving 3GPP protocols.
The role of ASN.1 in 3GPP protocols
The 3GPP protocols that rely on ASN.1 schemas for message definition and encoding.
RRC (Radio Resource Control)
TS 36.331 (LTE) / TS 38.331 (NR) — UPER encoding
The RRC protocol uses UPER (Unaligned PER) encoding to minimize message size over the radio interface. Every RRC message (RRC Setup, RRC Reconfiguration, Measurement Report, UE Capability Information) is defined by an ASN.1 schema in the specification annexes. The schema evolves with each 3GPP Release thanks to the ASN.1 extension mechanism.
S1AP (S1 Application Protocol)
TS 36.413 — APER encoding
S1AP manages the interface between the eNodeB and the MME (4G core network). It uses APER (Aligned PER) encoding as a good trade-off between compactness and parsing ease. S1AP messages carry inter-eNodeB handover procedures, paging, and E-RAB bearer establishment.
NGAP (NG Application Protocol)
TS 38.413 — APER encoding
NGAP is the 5G equivalent of S1AP, operating on the NG interface between the gNodeB and the AMF. It handles UE management procedures (registration, handover, paging) and PDU sessions. NGAP inherits its ASN.1 structure from S1AP with extensions for 5G capabilities: network slicing, URLLC, mMTC.
X2AP / XnAP
TS 36.423 / TS 38.423 — APER encoding
X2AP (LTE) and XnAP (5G NR) manage the direct interfaces between base stations for intra-RAT handovers, load balancing and interference coordination (eICIC/ICIC). These protocols also use APER encoding and extensible ASN.1 schemas to maintain compatibility between equipment of different generations.
Encoding schemes: BER, PER, UPER
ASN.1 defines several sets of encoding rules to transform abstract structures into binary streams. Each set offers a different trade-off between compactness, parsing complexity and data self-description.
BER (Basic Encoding Rules)
Classic TLV (Type-Length-Value) format. Each field carries its ASN.1 tag and length explicitly. Advantage: self-descriptive, easy to parse without a schema. Disadvantage: significant overhead, suited to protocols where bandwidth is not critical (e.g., LDAP, SNMP, some core network protocols).
PER (Packed Encoding Rules)
Removes redundant tags by relying on the ASN.1 schema. The decoder must know the schema to interpret the stream. Two variants: APER (byte-aligned) and UPER (unaligned). PER reduces message size by 50 to 80% compared to BER, which is crucial for the radio interface.
UPER (Unaligned PER)
The most compact PER variant. Fields are encoded bit by bit with no byte-alignment padding. Used by RRC (3GPP TS 36.331 / 38.331) to minimize message size over the radio interface. A typical RRC Reconfiguration message is between 50 and 500 bytes in UPER, compared to 200 to 2,000 bytes in BER.
Real-time ASN.1 decoding with HiCellTek
Real-time ASN.1 decoding on a mobile device presents specific challenges. The decoding engine must load the complete ASN.1 schemas from 3GPP specifications (several thousand defined types), parse UPER and APER binary streams in real time, and display results in a structured format, all within the memory and CPU constraints of a mobile device compared to a PC.
HiCellTek integrates a native C++ ASN.1 decoding engine optimized for ARM architectures. The ASN.1 schemas from 3GPP specifications Release 15, 16 and 17 are pre-compiled into binary decoding tables, eliminating schema parsing at runtime. Decoding a full RRC Reconfiguration message (the most complex message in the RRC protocol) takes less than one millisecond on a current-generation smartphone.
This performance allows the Layer 3 decoder to display decoded messages in real time in the user interface, with no perceptible delay. The field engineer sees each decoded and structured signaling message as soon as it is captured via the Qualcomm DIAG interface, enabling immediate diagnosis without any post-processing step.
Decoded data can be exported in multiple formats: Excel with structured fields, CSV for integration with analysis tools, QMDL for compatibility with existing post-processing chains, and encrypted HLOG for secure storage and transmission to the HiCellTek cloud.
Why field engineers should understand ASN.1
Reading 3GPP specifications
The ASN.1 annexes in 3GPP specifications (TS 36.331, TS 38.331) define the exact structure of each message. Understanding ASN.1 notation allows you to read these specifications and verify whether a captured message is compliant.
Understanding Release extensions
ASN.1 uses an extension mechanism (extension marker '...') that allows new fields to be added without breaking backward compatibility. Understanding this mechanism explains why a Release 15 terminal can communicate with a Release 17 network.
Diagnosing decoding errors
A poorly decoded message may indicate a tool bug, an incorrect schema version, or a non-compliant message. Understanding ASN.1 allows you to distinguish between these cases and determine whether the problem lies with the terminal, the network or the tool.
Related resources
FAQ: ASN.1 in Telecom
What is ASN.1 and why is it used in telecom?
ASN.1 (Abstract Syntax Notation One) is a data description language standardized by ITU-T (X.680). In telecom, it is used to define the structure of 3GPP signaling messages: RRC, NAS, S1AP, NGAP, X2AP. Its key advantage is separating data definition from binary encoding, enabling a compact and unambiguous representation of messages exchanged between the terminal and the network.
What is the difference between BER, PER and UPER?
BER (Basic Encoding Rules) is the oldest encoding format, using explicit Type-Length-Value (TLV) fields. PER (Packed Encoding Rules) removes redundant tags for more compact encoding. UPER (Unaligned PER) goes further by eliminating byte-alignment padding. In 3GPP, RRC uses UPER (most compact), S1AP and NGAP use APER (Aligned PER), and some core network protocols use BER.
Which 3GPP protocols use ASN.1 encoding?
The main 3GPP protocols encoded in ASN.1 are: RRC (TS 36.331 / TS 38.331) in UPER, S1AP (TS 36.413) in APER, X2AP (TS 36.423) in APER, NGAP (TS 38.413) in APER, XnAP (TS 38.423) in APER, and E1AP / F1AP for the CU-DU split in 5G. NAS uses a specific encoding (non-ASN.1) defined in the TS 24.xxx series.
How does HiCellTek decode ASN.1 in real time?
HiCellTek integrates a native C++ ASN.1 decoding engine optimized for ARM processors on Android smartphones. The engine loads the ASN.1 schemas from 3GPP specifications (Release 15 through 17) and decodes UPER and APER messages in real time as they are captured via the Qualcomm DIAG interface. Decoding a typical RRC message takes less than one millisecond.
Decode 3GPP ASN.1 in real time in the field
HiCellTek's native ASN.1 engine decodes RRC, S1AP and NGAP messages directly on your Android smartphone. Release 15 through 17, UPER and APER.