RRC

RRC States —
Three modes of existence

5G NR defines three RRC states for a UE: IDLE, INACTIVE, and CONNECTED. Each has a different power profile, paging behaviour, and network resource usage. Understanding these states and their transitions is essential for understanding mobility, power saving, and connection management.

TS 38.331 §4.2 TS 38.304 §5 TS 38.300 §9.2

The three RRC states

The RRC layer is specified in TS 38.331. It supports three RRC states: RRC_IDLE, RRC_INACTIVE, and RRC_CONNECTED. The RRC state machine is controlled by the network through RRC messages.
3GPP TS 38.300, Section 9.2.1
IDLE
No RRC context
Minimum power. Cell reselection. Paging monitored.
INACTIVE
RRC context stored
Low power. Fast resume. New in 5G NR.
CONNECTED
Active connection
Full resources. C-RNTI assigned. Data flows.
RRC state machine — transitions and triggers TS 38.331 §4.2

RRC_IDLE — camping state

This is where our UE has been since completing cell selection. In RRC_IDLE:

RRC_IDLE — characteristicsTS 38.304 §5
AspectDetail
RRC contextNone stored at network. UE unknown to gNB.
NAS state5GMM-REGISTERED or 5GMM-DEREGISTERED
PLMN/cellUE selects and monitors one cell (camped)
PagingUE wakes up at Paging Occasions (derived from IMSI and SFN)
MobilityCell reselection — UE-autonomous, no network involvement
PowerMinimum — only wakes for paging and SI acquisition
To leaveRACH procedure — see Random Access

RRC_INACTIVE — the 5G innovation

RRC_INACTIVE is new in 5G NR (not present in LTE). It solves a key problem: maintaining a connection for IoT/latency-sensitive devices that send data infrequently. Going to IDLE and reconnecting every time wastes energy and time. RRC_INACTIVE keeps the RRC context alive at both the UE and the last serving gNB (the anchor gNB), while the UE behaves like IDLE for power purposes.

When data arrives, the UE can resume the connection in 1–2 round trips instead of the full 4-step RACH + RRC setup. The resume uses an I-RNTI (Inactive-RNTI) as a stored identity.

In RRC_INACTIVE, the UE stores the AS (Access Stratum) context and the network stores the UE context at the last serving gNB. The UE is reachable via a RAN-based paging area (RNA). The UE performs RAN-based notification area updates (RNAU) when it moves outside its configured RNA.
3GPP TS 38.300, Section 9.2.3

RRC_CONNECTED — active data transfer

This is the state our UE just entered after Msg4. In RRC_CONNECTED, the UE has a dedicated C-RNTI, configured bearers, and the network knows exactly which cell it is in. All scheduling is network-controlled.

RRC_CONNECTED — characteristicsTS 38.331 §4.2
AspectDetail
C-RNTI0x3A7F — unique identity for all PDCCH addressing
RRC contextFull context at both UE and gNB (SRB1, bearers, config)
MobilityHandover — network-controlled, transparent to upper layers
SchedulingDCI on PDCCH every slot — gNB grants UL/DL resources
MeasurementsUE reports RSRP/RSRQ of serving and neighbour cells
PowerHigher — but DRX (Discontinuous Reception) saves power
To leaveRRCRelease → IDLE or INACTIVE (network-initiated)

Paging — finding UEs in IDLE/INACTIVE

When a call or data arrives for an IDLE UE, the network doesn't know which cell it is in. It pages the UE across all cells in the Tracking Area (for IDLE) or RAN Notification Area (for INACTIVE).

The UE wakes up at specific Paging Occasions (PO) derived from its IMSI and the SFN. The network sends a paging message on PDCCH using P-RNTI = 0xFFFE.

Paging occasion calculation — our UETS 38.304 §7.1
// Paging frame (PF) and Paging Occasion (PO) derived from IMSI:
// Assume IMSI = 244051234567890
IMSI_mod_1024 = 244051234567890 mod 1024 = 722

// Default paging parameters (from SIB1 if not configured):
T = 128 frames  (default DRX cycle)
N = min(T, nB) where nB = 1T → N = 128

// Paging Frame:
SFN mod T = (T div N) × (IMSI_mod_1024 mod N)
          = (128/128) × (722 mod 128)
          = 1 × 82
PF occurs when: SFN mod 128 = 82

// Paging Occasion (i_s index):
i_s = ⌊IMSI_mod_1024 / N⌋ mod Ns = 0
// → first PO within the paging frame
RRC state summary
Our UE state    → RRC_CONNECTED (just entered in Msg4)
C-RNTI         → 0x3A7F
INACTIVE key   → fast resume — I-RNTI stored, 1-2 RTT reconnect
IDLE paging    → UE wakes at SFN mod 128 = 82
Next step      → RRC setup details — bearers, DRX, measurements