Commit Graph

32919 Commits

Author SHA1 Message Date
Sakthivel Velumani
7032477784 log: fix typo in printing mac stats
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-23 13:54:46 +00:00
Robert Schmidt
31eb466a7d Merge remote-tracking branch 'origin/integration_2026_w25' into develop
Integration: `2026.w25`

- #150 fronthaul library fixes
- #176 Change ambigous language in Aerial_FAPI_Split_Tutorial.md
- #144 Fix vrtsim antenna configs
- #178 XNAP: Add encode/decode+unit tests for Xn HO Cancel, HO Success, RAN Paging
- #154 Fix UE PUCCH resource multiplexing
- #189 Add nr_dlbench: standalone DL scheduler + PHY TX benchmark
- #151 Complete NR L2/L3 Paging path from F1AP to NAS (gNB and UE)
- #201 [FHI72] Improve the fronthaul doc
- #139 Improvements in UCI on PUSCH implementation at UE
- #206 RAN and UE Roadmap
- #188 CI: Add UE timing phytest

Closes: #74
Closes: #90
Closes: #125
Closes: #130
Closes: #181
2026.w25
2026-06-19 16:45:41 +02:00
Robert Schmidt
bbd8b295cf Fix: don't abort if TUN attach fails
Remove an assert on successful dup() of a socket. At least when running
in phy-test mode without noS1, the socket does not exist, and the call
to dup() fails. In that case, we should carry on instead of simply
failing, similarly how the process does not abort when TUN setup fails.

Fixes: 8d2895463b ("Paging UE (SDAP): reattach TUN after idle reset")
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-19 15:46:22 +02:00
Robert Schmidt
2d57ec1987 Merge remote-tracking branch 'origin/ci-ue-timing-stats' into integration_2026_w25
CI: Add UE timing phytest (#188)

Add a new XML file to also measure UE timings, similarly how we do with
gNB.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-19 14:05:03 +02:00
Robert Schmidt
26553423ac Merge remote-tracking branch 'arora-sagar/roadmap' into integration_2026_w25
RAN and UE Roadmap (#206)

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-19 14:04:01 +02:00
Jaroslava Fiedlerova
a211c0ef5a CI: add configs for vrtsim timing phytest
Check timing thresholds on both UE and gNB side. If this commit works as
expected, it can replace xml_files/gnb_phytest_usrp_run.xml.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-19 08:59:59 +02:00
Jaroslava Fiedlerova
9fd43efaf2 CI: support configurable stats files in AnalyzeRTStats_Object
Allow XML test cases to specify one or more files with timing stats that
define which container log paths to collect and analyze. AnalyzeRTStatsObject
loops over the provided list, falling back to the default gNB files
(nrL1_stats.log, nrMAC_stats.log) when none are specified.

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-19 08:59:58 +02:00
Robert Schmidt
037c5dae31 Merge remote-tracking branch 'origin/improv_uci_on_pusch' into integration_2026_w25
Improvements in UCI on PUSCH implementation at UE (#139)

This MR improves the implementation of UCI on PUSCH at UE side and fixes
some issues found while testing and fixing the revised version.

Tested in ULSIM with MATLAB vectors provided by @sakthivelvelumani in
the following scenarios (bits)

- 2 ACK no CSI
- 7 CSI part1 no ACK no CSI part2
- 1 ACK 7 CSI part1 7 CSI part2
- 3 ACK 4 CSI part1 4 CSI part2

using the command line

    ./nr_ulsim -m 27 -u 1 -R 51 -r 51 -s 30 -o(path to the file containing the vector)

Closes: #181
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-18 17:45:56 +02:00
Robert Schmidt
47e9ad9cbd Merge remote-tracking branch 'origin/fhi72-k-version' into integration_2026_w25
[FHI72] Improve the fronthaul doc (#201)

- explicitly set the K_VERSION variable in the fronthaul doc, and update
  PTP configuration
- fix IQ decompression for ARM architecture

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-18 17:44:18 +02:00
Sagar Arora
d776779509 RAN and UE Roadmap
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-06-18 16:38:51 +02:00
Jaroslava Fiedlerova
3516ed3b5e Merge remote-tracking branch 'GuidoCasati/nr-paging' into integration_2026_w25
Complete NR L2/L3 Paging path from F1AP to NAS (gNB and UE) (#151)

This MR wires a 5G‑NR paging flow across the stack, from F1AP Paging on
the DU down to PCCH scheduling in MAC/RLC, RRC/ASN encode/decode, and
UE‑side NAS Service Request triggering, including the NR UE changes in
L1/L2.

It centralises paging PF/PO computation and PCCH scheduling in MAC,
using shared SSB/Type0‑PDCCH and common PDSCH helpers that are also
reused by SIB1. On the UE, it enables decoding of NR PCCH messages,
matching ng‑5G‑S‑TMSI/fullI‑RNTI, and conditionally initiating a
network‑triggered Service Request when 5GMM state allows it. The change
set includes focused refactors and ASN.1 tests to validate the new
paging encode/decode path.

Changes:
- MAC gNB common helpers: Move SSB/Type0‑PDCCH utilities from the
  BCH scheduler into shared MAC primitives and introduce a reusable 
Type0‑occasion helper and common PDSCH RB/MCS/TBS sizing
- MAC paging PF/PO responsibility: Add a dedicated PCCH scheduler module
  that implements TS 38.304 §7 PF/PO computation (defaultPagingCycle,
nAndPagingFrameOffset, Ns, SFN‑based PF formula and PO slot mapping)
and owns the “is this (frame,slot) a paging occasion for UE_ID?”
decision.
- F1AP -> MAC -> RLC PCCH path (gNB/DU): Have the DU decode F1AP Paging
  with CN UE identity, build an NR RRC Paging message (PCCH) in MAC, and
hand it to RLC as a dedicated PCCH SDU together with UE_ID (5G‑S‑TMSI
mod 1024), using per‑module PCCH storage. RAN UE paging identity
is explicitly rejected.
- Direct CU to DU paging path: Implement direct F1 Paging handling
  in the NR RRC DL direct interface for RLC PCCH storage for later 
scheduling.
- PCCH scheduling and NFAPI integration (gNB MAC): Integrate 
  schedule_nr_pcch() into the DL scheduler so that when a stored PCCH
SDU exists and the current (frame,slot) is a paging occasion, MAC 
resolves the paging search space and CORESET, selects a beam (from SSB),
allocates CCEs and PDSCH resources, builds NFAPI DL_TTI PDUs 
(PDCCH + PDSCH with P‑RNTI, DCI 1_0), and populates the matching
TX_DATA PDU, then clears the cached PCCH.
- DCI handling for P‑RNTI paging: Adjust DCI payload preparation
  to treat P‑RNTI specially, returning after setting DMRS and antenna 
ports and skipping HARQ and UE scheduling state that do not exist for
paging, so paging DCIs no longer touch UE HARQ data structures.
- PHY UE RX Chain: DCI handling for P‑RNTI on UE, monitor DCI on Paging
  Occasions, process DCI 1_0 with CRC scrambled by P‑RNTI on the paging 
search space, trigger PDSCH decoding for PCCH based on that DCI, deliver
decoded PCCH to upper layers from the PHY/MAC side
- RRC/ASN paging encode API: Replace the legacy buffer‑based do_NR_Paging 
with a nr_paging_params_t‑based API returning a byte_array_t,
supporting both ng‑5G‑S‑TMSI and fullI‑RNTI identities, and optional IEs
(e.g. accessType non‑3GPP and pagingCause v17), and encoding via 
uper_encode_to_new_buffer, with ownership and failure semantics clearly 
defined for callers.
- UE‑side PCCH reception and matching: Add UE MAC to RRC logic
  to deliver PCCH SDUs to RRC, decode NR PCCH via a new nr_pcch_decode() 
helper into an array of nr_paging_params_t, iterate PagingRecordList on 
the UE, compare M‑TMSI/fullI‑RNTI against local identity, and log whether 
a paging match was found.
- NAS integration for network‑triggered Service Request: On a UE paging
  match, send a NAS_PAGING_IND from RRC to NAS and, when the UE has a
GUTI, is 5GMM‑REGISTERED and in 5GMM‑IDLE, generate and send a Service
Request uplink NAS message
- Tests and validation helpers: Extend nr_asn1 paging tests
  to encode Paging via do_NR_Paging, decode it via nr_pcch_decode,
and verify round‑trips for multiple ng‑5G‑S‑TMSI values, accessType,
and fullI‑RNTI bit patterns, using a shared encode/decode helper that 
exercises the same decoder path used by the UE.

Notes:
Paging handling currently supports CN UE paging
identity (5G‑S‑TMSI) only. RAN UE paging identity is logged and ignored.
A paging match triggers a Service Request only when the UE has a GUTI,
is 5GMM‑REGISTERED, and in 5GMM‑IDLE. T3346 and suspend‑indication
handling are documented as future work and not implemented here.

Testing:
Tested with Open5gs. How to trigger Paging in Open5GS lab setup:

- Use gNB telnet to request NGAP UE Context Release: `rrc ctx_rel_req
  <RRC_UE_ID>`
- Wait until AMF reports CM-IDLE (for example gNB-UEs is now 0).
- Generate downlink data from the Linux host to the UE IP: `ping
  <UE_IP>`
- Host-originated downlink data will trigger paging.

Closes #74

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Francesco Mani <email@francescomani.it>
2026-06-18 15:43:27 +02:00
Francesco Mani
4e92eabc18 fix starting symbol for CSI on PUSCH (Closes #181)
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
c0f6e70259 for placeholder bit Y (1 HARQ bit) we need to use the scrambled bit, not the original one
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
3205c9a367 advance CSI2 index when puncturing with ACK/NACK
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
90c85e8b9c fix to avoid advancing ULSCH bit counter when ACK punctures CSIp2
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
a3b077a30f fix for CSIp1 UCI on PUSCH mapping
we need to remove the reserved elements from the pool of the avalable ones to compute position of the CSIp1 elements

Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
b04fa5f7ae fix for actual coded ACK bits in case of A < 2
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
8542b813e1 rework the UCI on PUSCH template flags for better understanding of the procedure
Signed-off-by: Francesco Mani <email@francescomani.it>
Assisted-by: Claude:claude-sonnet-4-6
2026-06-18 14:49:33 +02:00
Francesco Mani
89d578e7bb make function apply_template_to_codeword use bit-packed vectors to make the output uniform as the case without uci on pusch
Signed-off-by: Francesco Mani <email@francescomani.it>
Assisted-by: Claude:claude-sonnet-4-6
2026-06-18 14:49:33 +02:00
francescomani
78b92485ee improvement for UCI on PUSCH code
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
84bbe66c07 rework UCI encoding for UCI on PUSCH to always have bit-packed output
Signed-off-by: Francesco Mani <email@francescomani.it>
Assisted-by: Claude:claude-sonnet-4-6
2026-06-18 14:49:33 +02:00
Jaroslava Fiedlerova
d8744c52f2 Merge remote-tracking branch 'melkael/dlbench-develop' into integration_2026_w25
Add nr_dlbench: standalone DL scheduler + PHY TX benchmark (#189)

This PR updates the MR from here:
https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/4028
Besides, it adds separate modes to test AM and UM, as I have another PR
which accelerates the scheduler through refactoring how MAC accesses RLC
indications that needs AM for testing

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-18 09:49:18 +02:00
Guido Casati
5d309b93d1 doc: update FEATURE_SET.md, 5Gnas.md, rrc-dev.md
- added Paging documentation
- updated to latest NGAP, F1AP, E1AP, NAS status
- fixed spelling errors

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Guido Casati
294599d327 Add useful log lines
- Add a LOG_I to 'nr_sdap_add_entity' to inform the user
  a SDAP entity is being created
- Add LOG_W to `nr_sdap_get_entity` to warn about
  empty SDAP entity list

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Guido Casati
ddccd57e5c telnet: add UE context release request command
Add an RRC telnet command that sends a RAN-initiated NGAP UE Context Release
Request with a user-inactivity cause.

Register ctx_rel_req in the RRC telnet command table.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Guido Casati
6cb51988b1 Paging UE (NAS): clear Service Request pending state when SR ends
After the UE answers a network page with a NAS Service Request, it waits
in 5GMM-SERVICE-REQUEST-INITIATED until the AMF replies or the radio
connection drops.
While that wait is active, duplicate pages must be ignored. When SR ends,
NAS must return to 5GMM-REGISTERED so a later page can start a new SR
(TS 24.501).

Changes:
- handle_service_accept(): set FGS_REGISTERED on SERVICE ACCEPT (TS 24.501 §5.6.1.4)
- handle_service_reject(): if SR was pending, set FGS_REGISTERED (§5.6.1.5)
- NR_NAS_CONN_RELEASE_IND: if SR was pending, set FGS_REGISTERED (§5.3.1.3 and §5.6.1.7 l)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Guido Casati
8d2895463b Paging UE (SDAP): reattach TUN after idle reset
UE paging can recreate the AS-side SDAP entity while NAS still keeps the
PDU session established. Per TS 38.304 clause 7.1 and TS 24.501 clauses
5.6.2.2.1,5.6.1.2 paging/service request restores user-plane resources
for an established PDU session, it does not imply deleting the UE IP/TUN
interface.

Deleting the UE TUN with SDAP entity teardown breaks user-plane continuity
after re-attach. We need SDAP entity lifetime and UE TUN lifetime to be
decoupled. This commit keeps a UE/PDU-session TUN registry outside the
SDAP entity lifetime. When a UE SDAP entity is recreated, reattach it
to the preserved TUN socket and restart the reader thread. On first PDU
session setup, NAS registers the TUN before attaching the reader.

The sequence is the following: (1) NAS register the iface
(2) sdap entity attaches to the iface (3) UE goes IDLE, SDAP
entity is destroyed, iface is deatched and brought down (4)
UE Service Request, SDAP entity is created (5) iface reattaches
to the SDAP entity and is brought up

UE reattach assumes the PDU session TUN interface was registered
before the SDAP entity is recreated.

DL/UL data is intentionally dropped when SDAP is not yet attached
or QFI is unavailable, rather than queued in this layer.

Changes:
- `nr_sdap.c`: keep a UE/PDU-session TUN registry, duplicate the stored
  socket into each SDAP entity, and add attach/detach/destroy helpers.
- `nr_sdap_entity.c`: detach SDAP entities from their TUN reader on
  deletion, preserve UE TUN interfaces across idle cleanup, and destroy
  gNB TUN interfaces when the gNB entity is removed. Drop downlink SDUs
  if the UE SDAP entity is not attached to a TUN socket yet.
- `openair3/NAS/NR_UE/nr_nas_msg.c`: set QFI before UE TUN creation so
  first attach can pick up cached QFI.
- `common/utils/tuntap_if.c`: add `tuntap_set_up`/`tuntap_set_down` helpers
  for UE interface state reflection and initialize `flags` in `tuntap_destroy`
  to avoid maybe-uninitialized build failures.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Robert Schmidt
f51e47b1c2 Merge remote-tracking branch 'temp-remote/issue-90' into integration_2026_w25
Fix UE PUCCH resource multiplexing (#154)

TS 38.213 9.5.2 specifies that if the UE wants to send HARQ-ACK and CSI
report on format 2/3/4, then the resource is selected by the PUCCH
resource indicator for sending HARQ-ACK.

In this case the resource set must be >= 1 because O_UCI has HARQ-ACK
and CSI report and is > 2.

So far we use the PUCCH resource of CSI report if HARQ-ACK format is < 2
and CSI report is >= 2. This PR fixes it.

Closes: #90
Reviewed-by: Francesco Mani <email@francescomani.it>
2026-06-17 15:36:01 +02:00
Robert Schmidt
7b93b83fd4 Merge remote-tracking branch 'temp-remote/xnap-class-2-procedures' into integration_2026_w25
XNAP: Add encode/decode+unit tests for Xn HO Cancel, HO Success, RAN Paging (#178)

Extends the XNAP encode/decode library with three class 2 procedures
from 3GPP TS 38.423 v16.2.0, each with full encode/decode/eq/free
support and an APER round-trip unit test.

Handover Cancel (§9.1.1.6): Sent by the source node to abort an
in-progress handover before the UE has accessed the target cell.

- Source NG-RAN node UE XnAP ID (M)
- Cause (M)

Handover Success (§9.1.1.12): Sent by the target node to confirm the UE
has successfully accessed the target cell.

- Source NG-RAN node UE XnAP ID (M)
- Target NG-RAN node UE XnAP ID (M)
- Requested Target Cell Global ID (M)

RAN Paging (§9.1.1.7): Requests a neighbouring NG-RAN node to page a UE
in RRC_INACTIVE state.

- UE Identity Index Value (M) — 10-bit BIT STRING
- UE RAN Paging Identity (M) — 40-bit I-RNTI BIT STRING
- Paging DRX (M)
- RAN Paging Area (M) — cell-list variant, one PLMN + NR cell IDs

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-By: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 15:33:07 +02:00
Maxime Elkael
0d118c9821 Add nr_dlbench: standalone DL scheduler + PHY TX benchmark
Assisted-by: Claude-Code:Opus-4.8
Signed-off-by: Maxime Elkael <m.elkael@northeastern.edu>
2026-06-17 07:36:56 -04:00
Mohammed Safwan
b31846c62f XNAP: add encode/decode and unit test for Xn RAN Paging
- Add RAN Paging message type definitions, including paging DRX
  enumeration (§9.2.3.66) and RAN paging area cell-list
  structure (§9.2.3.38)
- Implement encoder and decoder for RAN Paging
    RAN Paging (3GPP TS 38.423v16.2.0 §9.1.1.7)
    - UE Identity Index Value (M)
    - UE RAN Paging Identity (M)
    - Paging DRX (M)
    - RAN Paging Area (M)
- Add equality check and memory management helpers
- Add required ASN.1 header includes for RAN Paging IEs
- Extend XNAP library unit tests to cover RAN Paging

Reviewed-by: Venkatareddy Akumalla <venkatareddy.akumalla@openairinterface.org>
Signed-off-by: Mohammed Safwan <mohammed.safwan@openairinterface.org>
2026-06-17 16:51:34 +05:30
Mohammed Safwan
e7f12fdd61 XNAP: add encode/decode and unit test for Xn Handover Success
- Add Handover Success message type definitions
- Implement encoder and decoder for Handover Success
    Handover Success (3GPP TS 38.423v16.2.0 §9.1.1.12)
    - Source NG-RAN node UE XnAP ID (M)
    - Target NG-RAN node UE XnAP ID (M)
    - Requested Target Cell Global ID (M)
- Add equality check and memory management helpers
- Extend XNAP library unit tests to cover Handover Success

Reviewed-by: Venkatareddy Akumalla <venkatareddy.akumalla@openairinterface.org>
Signed-off-by: Mohammed Safwan <mohammed.safwan@openairinterface.org>
2026-06-17 16:41:55 +05:30
Mohammed Safwan
7cf0e252b3 XNAP: add encode/decode and unit test for Xn Handover Cancel
- Add Handover Cancel message type definitions
- Implement encoder and decoder for Handover Cancel
    Handover Cancel (3GPP TS 38.423v16.2.0 §9.1.1.6)
    - Source NG-RAN node UE XnAP ID (M)
    - Cause (M)
- Add equality check and memory management helpers
- Extend XNAP library unit tests to cover Handover Cancel

Reviewed-by: Venkatareddy Akumalla <venkatareddy.akumalla@openairinterface.org>
Signed-off-by: Mohammed Safwan <mohammed.safwan@openairinterface.org>
2026-06-17 16:41:55 +05:30
Teodora Vladić
10ff25e530 Decompress IQ properly for ARM architecture
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Fixes: f65b8f564f ("Correctly extract the PUSCH PRBs from an internet frame (one fragment)")
2026-06-17 11:39:18 +02:00
Sagar Arora
a52883c051 [doc FHI72]: update ptp configuration for verion 4.4
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-06-17 11:31:50 +02:00
Teodora Vladić
4b767c3ab1 [FHI72] Set the K_VERSION explicitely in the doc
Shall be always up to date according to the cmake variable.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-06-17 11:31:50 +02:00
Jaroslava Fiedlerova
8cd7dc4f04 Merge remote-tracking branch 'bpodrygajlo/fix-vrtsim-antenna-configs' into integration_2026_w25
Fix vrtsim antenna configs (#144)

This PR fixes three issues: #130 #125, and an unreported issue related
to flaky vrtsim tests. With the new unix domain socket initialization
the unit test framework should be much more robust and not fail
randomly.

Reviewed-By: Merkebu Girmay <merkebu.girmay@openairinterface.org>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-17 10:38:31 +02:00
Jaroslava Fiedlerova
2241af180f Merge remote-tracking branch 'rubensoaressilva/Issue_1103_Ambiguous_language' into integration_2026_w25
Change ambigous language in Aerial_FAPI_Split_Tutorial.md (#176)

This PR addresses Issue 1103
(https://gitlab.eurecom.fr/oai/openairinterface5g/-/work_items/1103),
changing one note in Aerial_FAPI_Split_Tutorial.md regarding CN core
allocation when running on the same server.  The original wording could
be interpreted as allocating a separate core to each of the core network
functions, when that's not the intended interpretation.

Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-17 10:34:29 +02:00
RĂşben Soares da Silva
37cef0e2cb Change ambigous language in Aerial_FAPI_Split_Tutorial.md note on CN core allocation.
Signed-off-by: RĂşben Soares Silva <rsilva@allbesmart.pt>
2026-06-17 09:19:21 +01:00
Jaroslava Fiedlerova
ff2e6f8425 Merge remote-tracking branch 'bpodrygajlo/fix-gps-offset' into integration_2026_w25
fronthaul library fixes (#150)

three fixes:
- add missing spdx license identifier for some files
- fix utc-to-gps offset
- make fh_timer robust in case of PTP Sync

Reviewed-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Reviewed-By: Merkebu Girmay <merkebu.girmay@openairinterface.org>
2026-06-16 19:33:56 +02:00
Sakthivel Velumani
d8c1f68da4 ue-sched: fix harq csi report pucch multiplexing
As per 38.213 9.5.2 when multiplexing pucch resources of harq ack and csi
report, the resource is selected from the set id >= 1.

Closes: 90

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-16 16:21:08 +00:00
Sakthivel Velumani
9651a571d9 ue-sched: refactor pucch resource multiplexing
Refactored the function merge_resources() to minimize code repetition.
The function logic is unchanged.

Assisted-by: Claude Sonnet 4.6

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-16 16:20:48 +00:00
Bartosz Podrygajlo
4ed41739c0 fix(vrtsim): Fixes for vrtsim
- Fix vrtsim uneven antenna configurations
- Fix shm_td_iq_channel client-server SHM race
- Set shm size to 2G in unit test docker run to prevent out-of-memory errors

Closes: #130
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-16 15:11:34 +02:00
Bartosz Podrygajlo
659d184265 fix(vrtsim): Change initial IPC from file to UDS
Move the initial IPC from file-based to Unix Domain Socket. The server
keeps a lightweights UDS accept / write thread while the clients attempt
to connect / read from the socket. This makes the communication more robust
because if the server process exits, it will always result in a failure to
connect from the client. With file-based IPC this was not always the case.

Assisted-by: Gemini-3.5:Flash
Closes: #125
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-16 10:08:19 +02:00
Bartosz Podrygajlo
d3688ce345 fix(format): Fix formatting in vrtsim
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-16 10:03:07 +02:00
Guido Casati
74f661f3d6 Paging UE (MAC): monitor P-RNTI DCI only on PFs/POs in camped idle
Prior commits stored PCCH parameters and can decode P-RNTI,
this commit schedules PDCCH monitoring at the right TTIs.

In camped idle the UE must listen for network paging on P-RNTI only on
the correct paging frame (PF) and paging occasion (PO), only if the
paging common search space is set.

On monitor_paging_dci() success it adds P-RNTI to the downlink DCI
config for the existing PHY/MAC paging decode path.

Changes:
- Add monitor_paging_dci():
  - resolve paging_SS_id, call config_dci_pdu(TYPE_P_RNTI_) only
    when monitor_paging_dci() is true.
  - require is_ss_monitor_occasion on the paging search space
  - validate T/N/Ns from mac->paging_cfg
  - apply TS 38.304 §7.1 PF and i_s
  - PF via nr_pcch_sfn_is_pf
  - PO index i_s via nr_pcch_po_index
  - non-zero type-2 PO window via nr_pcch_type2_po_mo_in_range

Refs:
- 3GPP TS 38.304 §7.1 (PF/PO)
- 3GPP TS 38.213 §10.1 (PDCCH monitoring for paging)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:46 +02:00
Guido Casati
5e37598e02 Paging UE (RRC/MAC): preserve camped idle context
Keep normal no-redirection RRCRelease on the acquired
camped-cell context while preserving the existing full
GO_TO_IDLE cell-selection path for other idle transitions.

Changes:
- Add UE_IDLE and GO_TO_IDLE_KEEP_CAMPED to represent camped
  idle without starting RA.
- Map no-redirection RRCRelease to GO_TO_IDLE_KEEP_CAMPED and
  keep SIB1 validity for that path.
- Release connected-mode MAC/BWP0 dedicated config while
  preserving common BWP0 and paging PDCCH context.
- Keep the existing full GO_TO_IDLE cleanup for idle transitions
  that must perform cell selection.

Refs:
- TS 38.331 §5.3.11
- TS 38.304 §5.2.5, §5.2.6, §7.1
- TS 38.321 §5.12

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:46 +02:00
Guido Casati
e5c95a2d7e Paging UE (RRC/NAS): initial NAS UL transfer without SRB for paging
Route paging-triggered Service Request through NAS_INITIAL_UL_TRANSFER_REQ so
RRC can buffer the PDU for RRCSetupComplete (dedicatedNAS-Message, TS 38.331)
when no UL-DCCH SRB exists, start MAC RA from RRC_IDLE, or drop the ITTI PDU
with LOG_W if SRB1/SRB2 is already established (NAS paging path is 5GMM-IDLE
only).

Changes:
- Define ITTI NAS_INITIAL_UL_TRANSFER_REQ and
  NAS_INITIAL_UL_TRANSFER_REQ() (rrc_messages_def.h,
  rrc_messages_types.h).
- Extend NR_UE_RRC_INST_t with pending_initial_nas for setup-complete
  transport (rrc_defs.h).
- Refactor ULInformationTransfer+PDCP send into
  nr_rrc_ue_send_ul_information_transfer_nas(): on NAS_UPLINK_DATA_REQ,
  refuse PDCP when neither SRB1 nor SRB2 is established (free PDU).
- On NAS_INITIAL_UL_TRANSFER_REQ: store NAS in pending_initial_nas when
  no SRB, in RRC_STATE_IDLE_NR set ra_trigger to RRC_CONNECTION_SETUP,
  call nr_rrc_ue_prepare_RRCSetupRequest(), and nr_rrc_send_msg_to_mac()
  with NR_MAC_RRC_START_RA, otherwise replace pending and send on SRB.
- Use forwarded initial NAS messafe in rrc_ue_generate_RRCSetupComplete():
  if pending_initial_nas is set, move it into the NAS payload and refresh
  security keys when integrity context exists, else generateRegistrationRequest().
- In nr_nas_msg.c, add send_nas_initial_ul_transfer_req() and use it for
  paging Service Request instead of send_nas_uplink_data_req()

Refs: TS 24.501, TS 38.331 §5.3.3.4, TS 33.501 §6.8.1.2

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:46 +02:00
Guido Casati
c9e82d6a12 Refactor UE (RRC/MAC): typed NR_MAC_RRC_START_RA for T300 and re-estab
RRC starts random access via NR_MAC_RRC_START_RA with an explicit
cause. RA trigger is no longer piggybacked on NR_MAC_RRC_CONFIG_RESET.
T300 expiry and RRC re-establishment are the call sites switched in this
commit. MAC handles setup/T300 and re-establishment paths in
nr_mac_start_ra().

Changes:
- Add nr_mac_rrc_types.h (nr_mac_ra_start_cause_t)
- Add nr_mac_rrc_start_ra_t in rrc_messages_types.h
- In rrc_UE.c, add nr_rrc_trigger_mac_ra(), call it from
  handle_t300_expiry and nr_rrc_initiate_rrcReestablishment
- In config_ue.c:
  - add nr_mac_start_ra() entry point with causes switch
  - add nr_rrc_mac_start_ra() handler
  - remove T300_EXPIRY, RE_ESTABLISHMENT reset handling
    in nr_rrc_mac_config_req_reset, now delegated to
    nr_mac_start_ra
- mac_defs.h: drop T300_EXPIRY from NR_UE_MAC_reset_cause_t

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:46 +02:00
Guido Casati
bae10b8831 Paging UE (RRC/NAS): trigger Service Request from UE paging
Transfer UE-side paging matches from RRC to NAS so a registered idle UE
can generate and send a Service Request after `NAS_PAGING_IND`. Guard
the path with explicit cause, identity, state, and mode checks so
unsupported cases are logged and ignored.

Changes:
- in `rrc_UE.c`, send `NAS_PAGING_IND` to TASK_NAS_NRUE with cause
  `AS_CONNECTION_ESTABLISH` from `rrc_nrue()` when a paging match is found
- in `nr_nas_msg.c`, implement `NAS_PAGING_IND` handling in `nas_nrue()`
- accept only paging indications with cause
  `AS_CONNECTION_ESTABLISH`, then require `nas->guti`,
  `FGS_REGISTERED`, and `FGS_IDLE` before proceeding
- generate the Service Request with `generateServiceRequest()` and send
  it through `send_nas_uplink_data_req()`

Refs:
- TS 23.502 §4.2.3.3 (Network Triggered Service Request)
- TS 24.501 §5.6.2.2.1 (Paging for 5GS services)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:46 +02:00