feat: add NR NTN access detection#684
Conversation
7c00259 to
807d151
Compare
Add the NGAP protocol IE/extension identifier 287 assigned to NRNTN-TAI-Information per 3GPP TS 38.413. This IE-extension is optionally carried inside UserLocationInformationNR.IEExtensions and indicates that the UE is being served over NR Non-Terrestrial Network access. The full Rel-17 IE type (NRNTNTAIInformation SEQUENCE) is not yet defined here; this commit only adds the bare ID so that callers checking presence of the extension can reference a canonical constant rather than hard-coding 287. The type definition and the remaining Rel-16/17/18 IE IDs are expected to land as part of the broader NGAP release uplift. Used by omec-project/amf#684 (NTN access detection). Signed-off-by: Vinod Patmanathan <vinod.patmanathan@forsway.com>
Add a small NGAP-aware helper that reports whether a given UserLocationInformationNR carries a protocol extension with the specified ProtocolIE-ID inside its IEExtensions container. Generic over the extension ID, so callers can compose it with any existing or future ProtocolIEID* constant (NRNTN-TAI-Information being the immediate use case from omec-project/amf#684). Keeping NGAP-aware inspection helpers in this repo makes the eventual N2 release uplift easier to scope: all NGAP-touching code lives here. Signed-off-by: Vinod Patmanathan <vinod.patmanathan@forsway.com>
Add a small NGAP-aware helper that reports whether a given UserLocationInformationNR carries a protocol extension with the specified ProtocolIE-ID inside its IEExtensions container. Generic over the extension ID, so callers can compose it with any existing or future ProtocolIEID* constant (NRNTN-TAI-Information being the immediate use case from omec-project/amf#684). Keeping NGAP-aware inspection helpers in this repo makes the eventual N2 release uplift easier to scope: all NGAP-touching code lives here. Signed-off-by: Vinod Patmanathan <vinod.patmanathan@forsway.com>
* feat: add NRNTN-TAI-Information protocol IE/extension ID Add the NGAP protocol IE/extension identifier 287 assigned to NRNTN-TAI-Information per 3GPP TS 38.413. This IE-extension is optionally carried inside UserLocationInformationNR.IEExtensions and indicates that the UE is being served over NR Non-Terrestrial Network access. The full Rel-17 IE type (NRNTNTAIInformation SEQUENCE) is not yet defined here; this commit only adds the bare ID so that callers checking presence of the extension can reference a canonical constant rather than hard-coding 287. The type definition and the remaining Rel-16/17/18 IE IDs are expected to land as part of the broader NGAP release uplift. Used by omec-project/amf#684 (NTN access detection). Signed-off-by: Vinod Patmanathan <vinod.patmanathan@forsway.com> * feat: add HasUserLocationInformationNRExtension helper Add a small NGAP-aware helper that reports whether a given UserLocationInformationNR carries a protocol extension with the specified ProtocolIE-ID inside its IEExtensions container. Generic over the extension ID, so callers can compose it with any existing or future ProtocolIEID* constant (NRNTN-TAI-Information being the immediate use case from omec-project/amf#684). Keeping NGAP-aware inspection helpers in this repo makes the eventual N2 release uplift easier to scope: all NGAP-touching code lives here. Signed-off-by: Vinod Patmanathan <vinod.patmanathan@forsway.com> * Create patch release Signed-off-by: Vinod Patmanathan <vinod.patmanathan@forsway.com> --------- Signed-off-by: Vinod Patmanathan <vinod.patmanathan@forsway.com> Co-authored-by: Vinod Patmanathan <vinod.patmanathan@forsway.com>
807d151 to
ec87ad6
Compare
|
ngap#87 merged and v1.9.1 tagged. Force-pushed: bumped go.mod to ngap v1.9.1, dropped the local constant and helper, now using ngap.HasUserLocationInformationNRExtension(loc, ngapType.ProtocolIEIDNRNTNTAIInformation) directly. |
I think you need to rebase your PR and address any conflict because the |
ec87ad6 to
3988068
Compare
|
Good catch, rebased now. Diff are just the context/ changes. |
There was a problem hiding this comment.
Pull request overview
Adds groundwork in the AMF UE/RAN UE context layer to detect NR Non-Terrestrial Network (NTN) access from NGAP UserLocationInformationNR by checking for the NRNTN-TAI-Information extension, and stores the result on UE context objects for future use.
Changes:
- Introduces
context.NtnAccessInfoandAmfUe.IsNtn()helper. - Tracks NTN detection on
RanUeduring NRUpdateLocationand propagates it toAmfUe. - Extends
AmfUewith anNtnAccessfield to persist/access the detection result.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| context/ran_ue.go | Detects NR NTN by presence of the NRNTN-TAI-Information extension during NR location updates and propagates NTN state to AmfUe. |
| context/ntn.go | Adds NtnAccessInfo and AmfUe.IsNtn() helper to represent/query NTN access. |
| context/amf_ue.go | Stores NTN access state on AmfUe via a new NtnAccess field. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@donivtech, please check Copilot's comments (make sure the comments are valid) and address them if applicable |
3988068 to
5a860b8
Compare
c84e3dc to
6fe40ea
Compare
|
|
I initially had this sticky, switched to per-message after Copilot suggested it, but reverted because absence of the optional IE shouldn't be treated as evidence of no NTN access. It would cause false negatives during a session. |
I am currently trying to finalize the migration of the SBI to 3GPP release 18. As soon as those changes are merged, I will come back to this PR. I hope it does not take too long. Sorry for the delay. |
|
No worries. Thanks for the heads up. |
Detect Non-Terrestrial Network access by checking for the NRNTN-TAI-Information protocol extension (ID 287 per 3GPP TS 38.413) in UserLocationInformationNR received via NGAP, and track the result in a new NtnAccessInfo struct on AmfUe and RanUe. This is detection-only groundwork. No protocol behavior changes: nothing reads the flag yet. Future patches can extend NtnAccessInfo with satellite backhaul category, GEO satellite ID, and NTN TAI list as those fields become available in omec-project/openapi and omec-project/ngap. Signed-off-by: Vinod Patmanathan <vinod.patmanathan@forsway.com>
6fe40ea to
95109cf
Compare
|
@donivtech, are the changes from PR still needed when we migrate the NGAP to release 18? |
| EventSubscriptionsInfo map[string]*AmfUeEventSubscription `json:"eventSubscriptionInfo,omitempty"` | ||
| /* User Location*/ | ||
| RatType models.RatType `json:"ratType,omitempty"` | ||
| NtnAccess *NtnAccessInfo `json:"ntnAccess,omitempty"` |
There was a problem hiding this comment.
Based on the latest SBI changes (openapi models), I think these changes are not applicable. Instead of creating NtnAccessInfo (Detected: true or false), should not you rely on the models.RatType such as the ones below to make the "Detected" decision? What do you think? Also, do you need NGAP rel-18 as part of these changes?
...
RATTYPE_NR_LEO RatType = "NR_LEO"
RATTYPE_NR_MEO RatType = "NR_MEO"
RATTYPE_NR_GEO RatType = "NR_GEO"
RATTYPE_NR_OTHER_SAT RatType = "NR_OTHER_SAT"
...|
Using RatType is agreed in principle. But it's worth noting the current asymmetry. openapi/v2 brought the Rel-18 RatType values (NR_LEO/MEO/GEO/OTHER_SAT), but ngap/v2 is module path bump, so the ASN.1 schema is unchanged from Rel-15. AMF doesn't yet have NGAP to distinguish between LEO/MEO/GEO. The only NTN signal we get is the presence of of the bare NRNTN-TAI-Information extension (ID 287). Contents are not decoded. What could be done today is to set ue.RatType = RATTYPE_NR_OTHER_SAT whenever the extension is detected (coarse classification). Orbit specific can come once N2 release-18 work lands the proper IE decode. I can refactor to drop NtnAccessInfo, set RatType to NR_OTHER_SAT from UpdateLocation when the extension is observed. Want me to do that here? No NGAP Rel-18 dependency, just the presence-check helper we already have in ngap/v2. |
So, upgrading the NGAP to release 18 would resolve this limitation, correct? If so, let me see if I can complete the N2 upgrade in the coming days |
|
Yes, that would resolve it cleanly. Prefer waiting for the N2 upgrade so the orbit specific RatType lands in one shot. |
@donivtech, |
Closes #683.
Detects NR Non-Terrestrial Network access by checking for the
NRNTN-TAI-Informationprotocol extension (ID 287 per 3GPP TS 38.413) insideUserLocationInformationNR.IEExtensionsreceived over NGAP, and tracks the result on the UE context.Changes
context.NtnAccessInfostruct (carriesDetected booltoday; shaped to hold futuresatelliteBackhaulCat/geoSatelliteId/ NTN TAI list without reshapingAmfUe/RanUe).AmfUe.NtnAccess,RanUe.NtnAccess,AmfUe.IsNtn()helper.RanUe.UpdateLocation(NR branch), running after the NR TAI/CGI parsing succeeds so a malformed message cannot leave NTN state out of sync with the stored location.ngap.HasUserLocationInformationNRExtensionfrom omec-project/ngap@v1.9.1 (added in omec-project/ngap#87).context/ran_ue_test.gocovering the NTN-state semantics onRanUe.updateNtnAccess.Detection semantics — sticky
Detectedis set true the first time theNRNTN-TAI-Informationextension is observed for a UE during the current UE context. It is not cleared while the UE context lives. The extension isPRESENCE optionalper 3GPP TS 38.413 and gNBs include it at their discretion — typically on context-establishing events (initial UE message, handover) but often not on routine uplink/location reports. Treating an absent extension as evidence of "not NTN" would causeIsNtn()to flap on routine NGAP traffic for a UE that genuinely is on NTN; sticky-on avoids that.Scope
Detection-only groundwork. No protocol behavior changes, no SBI payloads change, nothing reads the flag yet. Follow-up patches will extend
NtnAccessInfoand wire NTN into the SBI path oncesatelliteBackhaulCat/geoSatelliteIdare available inomec-project/openapi.Test plan
go build ./...cleango vet ./...cleango test ./...all pass (6 new sticky-semantics cases incontext/ran_ue_test.go)make lint(golangci-lint via Docker) — 0 issues