lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

March 2026

  • 1 participants
  • 1933 discussions
[M] Change in osmo-ttcn3-hacks[master]: 5gc: Introduce TC_handover_inter_ngran_n2_cancel
by pespin 12 Mar '26

12 Mar '26
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42328?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: 5gc: Introduce TC_handover_inter_ngran_n2_cancel ...................................................................... 5gc: Introduce TC_handover_inter_ngran_n2_cancel Change-Id: I1137c9a82478cca0372678d3c3299e9eebc79bd5 --- M 5gc/C5G_Tests.ttcn M 5gc/ConnHdlr.ttcn M 5gc/expected-results.xml M library/NGAP_Emulation.ttcn M library/NGAP_Functions.ttcn 5 files changed, 88 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/28/42328/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42328?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I1137c9a82478cca0372678d3c3299e9eebc79bd5 Gerrit-Change-Number: 42328 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: 5gc: Introduce TC_handover_inter_ngran_n2_cancel
by pespin 11 Mar '26

11 Mar '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42328?usp=email ) Change subject: 5gc: Introduce TC_handover_inter_ngran_n2_cancel ...................................................................... 5gc: Introduce TC_handover_inter_ngran_n2_cancel Change-Id: I1137c9a82478cca0372678d3c3299e9eebc79bd5 --- M 5gc/C5G_Tests.ttcn M 5gc/ConnHdlr.ttcn M 5gc/expected-results.xml M library/NGAP_Emulation.ttcn M library/NGAP_Functions.ttcn 5 files changed, 88 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/28/42328/1 diff --git a/5gc/C5G_Tests.ttcn b/5gc/C5G_Tests.ttcn index bf3cfd3..fe43ad4 100644 --- a/5gc/C5G_Tests.ttcn +++ b/5gc/C5G_Tests.ttcn @@ -760,6 +760,61 @@ vc_conn[1].done; } +/* 3GPP TS 23.502 4.9.1.4 Inter NG-RAN node N2 based handover, Cancel */ +private function f_TC_handover_inter_ngran_n2_cancel_source() runs on ConnHdlr { + f_register(); + f_pdu_sess_establish(); + f_sleep(1.0); + f_ping4(g_pars.ue_pars.sess_pars.run_prog_pars.ping_hostname); + + /* 3GPP TS 23.502 4.9.1.3.2 step 1: */ + f_n2_handover_required(m_targetID_targetRANNodeID(m_targetRANNodeID(g_pars.ngran_pars[1].global_ngran_id, + ts_ngran_NGAP_TAI(g_pars.ngran_pars[1])) + )); + /* 3GPP TS 23.502 4.9.1.3.3 step 1: */ + f_n2_handover_command(); + /* 3GPP TS 23.502 4.9.1.3.3 step 2: */ + f_n2_handover_cancel(); + + /* Test UE can still use the network after HO cancel: */ + f_ping4(g_pars.ue_pars.sess_pars.run_prog_pars.ping_hostname); + + f_pdu_sess_release(); + f_deregister(); +} +private function f_TC_handover_inter_ngran_n2_cancel_target() runs on ConnHdlr { + + /* Redirect Handover Request from AMF containing new AMF ID to our target ConnHdlr: */ + f_create_ngap_expect_proc(id_HandoverResourceAllocation, self); + + /* 3GPP TS 23.502 4.9.1.3.2 step 9+10: */ + f_n2_handover_request(); + + /* Expect to get a release on the target gNB due to cancelled Handover: */ + as_ngap_handle_UeContextReleaseCmd(exp_cause := mw_cause_radioNetwork(handover_cancelled)); +} +testcase TC_handover_inter_ngran_n2_cancel() runs on MTC_CT { + var ConnHdlr vc_conn[2]; + var integer i; + + f_init(); + f_ngap_setup(0); + f_ngap_setup(1); + + var ConnHdlrPars pars := f_init_pars(ue_idx := 0, c5g_idx := 0); + vc_conn[0] := f_start_handler_create(ngap_idx := 0); + vc_conn[1] := f_start_handler_create(ngap_idx := 1); + connect(vc_conn[0]:COORD, vc_conn[1]:COORD); + + f_start_handler_run(vc_conn[0], refers(f_TC_handover_inter_ngran_n2_cancel_source), pars); + pars.c5g_idx := 1; + pars.ue_pars.sess_pars.ran_gtpu_teid := int2oct(oct2int(pars.ue_pars.sess_pars.ran_gtpu_teid) + 1, 4); + f_start_handler_run(vc_conn[1], refers(f_TC_handover_inter_ngran_n2_cancel_target), pars); + + vc_conn[0].done; + vc_conn[1].done; +} + control { execute( TC_ng_setup() ); execute( TC_ng_setup_unknown_global_gnb_id_plmn() ); @@ -787,6 +842,7 @@ execute( TC_handover_inter_ngran_xn() ); execute( TC_handover_inter_ngran_n2() ); + execute( TC_handover_inter_ngran_n2_cancel() ); } /* TODO: diff --git a/5gc/ConnHdlr.ttcn b/5gc/ConnHdlr.ttcn index b1f76d2..a561949 100644 --- a/5gc/ConnHdlr.ttcn +++ b/5gc/ConnHdlr.ttcn @@ -1078,6 +1078,24 @@ NGAP.send(tx_pdu); } +/* 3GPP TS 23.502 9.2.3.11 HANDOVER CANCEL + * 3GPP TS 23.502 4.9.1.4 */ +function f_n2_handover_cancel() runs on ConnHdlr +{ + var template (value) NGAP_PDU tx_pdu; + var NGAP_PDU rx_pdu; + + tx_pdu := m_ngap_initMsg(m_n2_HandoverCancel( + g_pars.ue_pars.amf_id, + g_pars.ue_pars.ran_id, + m_cause_radioNetwork(unspecified))); + NGAP.send(tx_pdu); + + NGAP.receive(mw_ngap_succMsg(mw_n2_HandoverCancelAcknowledge( + g_pars.ue_pars.amf_id, + g_pars.ue_pars.ran_id))) -> value rx_pdu; +} + /* Handle a PDUSessionResourceSetupRequestTransfer contained inside NGAP InitialContextSetupRequest and return a Result for InitialContextSetupResponse */ private function f_pdu_handle_session_resource_released_item(PDUSessionResourceToReleaseItemRelCmd cmd) runs on ConnHdlr return PDUSessionResourceReleasedItemRelRes { diff --git a/5gc/expected-results.xml b/5gc/expected-results.xml index 03bbd43..e28ce57 100644 --- a/5gc/expected-results.xml +++ b/5gc/expected-results.xml @@ -25,4 +25,5 @@ </testcase> <testcase classname='C5G_Tests' name='TC_handover_inter_ngran_xn' time='MASKED'/> <testcase classname='C5G_Tests' name='TC_handover_inter_ngran_n2' time='MASKED'/> + <testcase classname='C5G_Tests' name='TC_handover_inter_ngran_n2_cancel' time='MASKED'/> </testsuite> diff --git a/library/NGAP_Emulation.ttcn b/library/NGAP_Emulation.ttcn index f493260..ea23a35 100644 --- a/library/NGAP_Emulation.ttcn +++ b/library/NGAP_Emulation.ttcn @@ -317,7 +317,7 @@ } return i; } - setverdict(fail, "NGAP Association Table not found by component ", client); + setverdict(fail, "NGAP Association Table not found by component ", client, " RAN-ID=", ran_id); mtc.stop; } diff --git a/library/NGAP_Functions.ttcn b/library/NGAP_Functions.ttcn index 64e1450..1466678 100644 --- a/library/NGAP_Functions.ttcn +++ b/library/NGAP_Functions.ttcn @@ -46,6 +46,9 @@ case (id_HandoverNotification) { return im.value_.HandoverNotify.protocolIEs[0].value_.aMF_UE_NGAP_ID; } + case (id_HandoverCancel) { + return im.value_.HandoverCancel.protocolIEs[0].value_.aMF_UE_NGAP_ID; + } /* TODO */ } } else if (ischosen(ngap.successfulOutcome)) { @@ -60,6 +63,9 @@ case (id_HandoverPreparation) { return so.value_.HandoverCommand.protocolIEs[0].value_.aMF_UE_NGAP_ID; } + case (id_HandoverCancel) { + return so.value_.HandoverCancelAcknowledge.protocolIEs[0].value_.aMF_UE_NGAP_ID; + } case (?) { return omit; /* TODO */ @@ -112,6 +118,9 @@ case (id_HandoverNotification) { return im.value_.HandoverNotify.protocolIEs[1].value_.RAN_UE_NGAP_ID; } + case (id_HandoverCancel) { + return im.value_.HandoverCancel.protocolIEs[1].value_.RAN_UE_NGAP_ID; + } /* TODO */ } } else if (ischosen(ngap.successfulOutcome)) { @@ -126,6 +135,9 @@ case (id_HandoverPreparation) { return so.value_.HandoverCommand.protocolIEs[1].value_.rAN_UE_NGAP_ID; } + case (id_HandoverCancel) { + return so.value_.HandoverCancelAcknowledge.protocolIEs[1].value_.rAN_UE_NGAP_ID; + } case (?) { return omit; /* TODO */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42328?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I1137c9a82478cca0372678d3c3299e9eebc79bd5 Gerrit-Change-Number: 42328 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-trx[master]: build: add --disable-multi-arfcn configure option
by pespin 11 Mar '26

11 Mar '26
pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/osmo-trx/+/42243?usp=email ) Change subject: build: add --disable-multi-arfcn configure option ...................................................................... Patch Set 9: (5 comments) Patchset: PS1: > For Web applications, we need tighter integration between osmo-bts-trx and osmo-trx for the followin […] Done Patchset: PS8: > Thanks — I've addressed both points. Done File CommonLibs/Makefile.am: https://gerrit.osmocom.org/c/osmo-trx/+/42243/comment/0596ae70_ae2541b9?usp… : PS3, Line 56: lib_LTLIBRARIES = libcommon.la > As another option, I could introduce a device driver called `osmo-trx-web`, but implement it as a li […] Done File GSM/Makefile.am: https://gerrit.osmocom.org/c/osmo-trx/+/42243/comment/f13f3830_7a9ba4a4?usp… : PS3, Line 29: gsm_headers = \ > Understood. […] Done File configure.ac: https://gerrit.osmocom.org/c/osmo-trx/+/42243/comment/37a8bc89_4aeadbaf?usp… : PS6, Line 308: AC_DEFINE([ENABLE_MULTI_ARFCN],[1],[Building with enabled Multi ARFCN]) > Thanks, fixed the indentation. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42243?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I2495c5b5c79f2fe74bef83902058e1d2207c1f3c Gerrit-Change-Number: 42243 Gerrit-PatchSet: 9 Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Mar 2026 18:38:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: Timur Davydov <dtv.comp(a)gmail.com>
1 0
0 0
[M] Change in osmo-trx[master]: build: add --disable-multi-arfcn configure option
by pespin 11 Mar '26

11 Mar '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/42243?usp=email ) Change subject: build: add --disable-multi-arfcn configure option ...................................................................... build: add --disable-multi-arfcn configure option - add configure flag to disable Multi ARFCN support - compile Channelizer, Synthesis, RadioInterfaceMulti and fft.c only when enabled - guard Multi ARFCN-specific code with ENABLE_MULTI_ARFCN - avoid requiring fftw3f when Multi ARFCN support is disabled Change-Id: I2495c5b5c79f2fe74bef83902058e1d2207c1f3c --- M CommonLibs/trx_vty.c M Transceiver52M/Makefile.am M Transceiver52M/arch/common/Makefile.am M Transceiver52M/osmo-trx.cpp M Transceiver52M/radioBuffer.h M Transceiver52M/radioInterface.h M Transceiver52M/radioInterfaceMulti.cpp A Transceiver52M/radioInterfaceMulti.h M configure.ac M doc/manuals/chapters/configuration.adoc 10 files changed, 108 insertions(+), 45 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c index 9647722..b70b3fa 100644 --- a/CommonLibs/trx_vty.c +++ b/CommonLibs/trx_vty.c @@ -222,6 +222,12 @@ return CMD_SUCCESS; } +#ifndef ENABLE_MULTI_ARFCN + vty_out(vty, "%% osmo-trx was built without multi-ARFCN support%s", + VTY_NEWLINE); + return CMD_WARNING; +#endif + if (trx->cfg.num_chans > TRX_MCHAN_MAX) { vty_out(vty, "Up to %i channels are supported for multi-TRX mode%s", TRX_MCHAN_MAX, VTY_NEWLINE); diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am index 0b63b16..74152b3 100644 --- a/Transceiver52M/Makefile.am +++ b/Transceiver52M/Makefile.am @@ -37,18 +37,26 @@ sigProcLib.cpp \ signalVector.cpp \ Transceiver.cpp \ - ChannelizerBase.cpp \ - Channelizer.cpp \ - Synthesis.cpp \ proto_trxd.c \ grgsm_vitac/grgsm_vitac.cpp \ grgsm_vitac/viterbi_detector.cc +if ENABLE_MULTI_ARFCN +COMMON_SOURCES += \ + ChannelizerBase.cpp \ + Channelizer.cpp \ + Synthesis.cpp +endif + libtransceiver_common_la_SOURCES = \ $(COMMON_SOURCES) \ Resampler.cpp \ radioInterfaceResamp.cpp \ - radioInterfaceMulti.cpp + $(NULL) + +if ENABLE_MULTI_ARFCN +libtransceiver_common_la_SOURCES += radioInterfaceMulti.cpp +endif noinst_HEADERS = \ Complex.h \ @@ -60,10 +68,15 @@ signalVector.h \ Transceiver.h \ Resampler.h \ + proto_trxd.h + +if ENABLE_MULTI_ARFCN +noinst_HEADERS += \ + radioInterfaceMulti.h \ ChannelizerBase.h \ Channelizer.h \ - Synthesis.h \ - proto_trxd.h + Synthesis.h +endif COMMON_LDADD = \ libtransceiver_common.la \ diff --git a/Transceiver52M/arch/common/Makefile.am b/Transceiver52M/arch/common/Makefile.am index 6b37906..a27174d 100644 --- a/Transceiver52M/arch/common/Makefile.am +++ b/Transceiver52M/arch/common/Makefile.am @@ -7,9 +7,17 @@ convert.h \ scale.h \ mult.h \ - fft.h + $(NULL) + +if ENABLE_MULTI_ARFCN +noinst_HEADERS += fft.h +endif libarch_common_la_SOURCES = \ convolve_base.c \ convert_base.c \ - fft.c + $(NULL) + +if ENABLE_MULTI_ARFCN +libarch_common_la_SOURCES += fft.c +endif diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp index 342c9eb..fbc1492 100644 --- a/Transceiver52M/osmo-trx.cpp +++ b/Transceiver52M/osmo-trx.cpp @@ -22,6 +22,10 @@ #include "radioDevice.h" #include "Utils.h" +#ifdef ENABLE_MULTI_ARFCN +#include "radioInterfaceMulti.h" +#endif /* ENABLE_MULTI_ARFCN */ + #include <time.h> #include <signal.h> #include <stdlib.h> @@ -117,10 +121,12 @@ radio = new rif_va_wrapper<RadioInterfaceResamp>(trx->cfg.use_va, usrp, trx->cfg.tx_sps, trx->cfg.rx_sps); break; +#ifdef ENABLE_MULTI_ARFCN case RadioDevice::MULTI_ARFCN: radio = new rif_va_wrapper<RadioInterfaceMulti>(trx->cfg.use_va, usrp, trx->cfg.tx_sps, trx->cfg.rx_sps, trx->cfg.num_chans); break; +#endif /* ENABLE_MULTI_ARFCN */ default: LOG(ALERT) << "Unsupported radio interface configuration"; return NULL; diff --git a/Transceiver52M/radioBuffer.h b/Transceiver52M/radioBuffer.h index e5aa315..e2f455a 100644 --- a/Transceiver52M/radioBuffer.h +++ b/Transceiver52M/radioBuffer.h @@ -1,3 +1,6 @@ +#ifndef RADIO_BUFFER_H +#define RADIO_BUFFER_H + #include <stdlib.h> #include <stddef.h> #include <vector> @@ -43,3 +46,5 @@ std::vector<float *> segments; bool outDirection; }; + +#endif /* RADIO_BUFFER_H */ diff --git a/Transceiver52M/radioInterface.h b/Transceiver52M/radioInterface.h index b05af78..cdcfd07 100644 --- a/Transceiver52M/radioInterface.h +++ b/Transceiver52M/radioInterface.h @@ -12,7 +12,8 @@ */ - +#ifndef RADIO_INTERFACE_H +#define RADIO_INTERFACE_H #include "sigProcLib.h" #include "GSMCommon.h" @@ -22,8 +23,6 @@ #include "radioClock.h" #include "radioBuffer.h" #include "Resampler.h" -#include "Channelizer.h" -#include "Synthesis.h" static const unsigned gSlotLen = 148; ///< number of symbols per slot, not counting guard periods @@ -162,35 +161,4 @@ double freq_hz; }; -class RadioInterfaceMulti : public RadioInterface { -private: - bool pushBuffer(); - int pullBuffer(); - bool verify_arfcn_consistency(double freq, size_t chan, bool tx); - virtual int setPowerAttenuation(int atten, size_t chan = 0); - - signalVector *outerSendBuffer; - signalVector *outerRecvBuffer; - std::vector<signalVector *> history; - std::vector<bool> active; - std::vector<struct freq_cfg_state> rx_freq_state; - std::vector<struct freq_cfg_state> tx_freq_state; - - Resampler *dnsampler; - Resampler *upsampler; - Channelizer *channelizer; - Synthesis *synthesis; - -public: - RadioInterfaceMulti(RadioDevice* radio, size_t tx_sps, - size_t rx_sps, size_t chans = 1); - virtual ~RadioInterfaceMulti(); - - bool init(int type); - void close(); - - bool tuneTx(double freq, size_t chan); - bool tuneRx(double freq, size_t chan); - virtual double setRxGain(double dB, size_t chan); - virtual double rssiOffset(size_t chan = 0); -}; +#endif /* RADIO_INTERFACE_H */ diff --git a/Transceiver52M/radioInterfaceMulti.cpp b/Transceiver52M/radioInterfaceMulti.cpp index a7195b4..5450ec5 100644 --- a/Transceiver52M/radioInterfaceMulti.cpp +++ b/Transceiver52M/radioInterfaceMulti.cpp @@ -22,7 +22,7 @@ * See the COPYING file in the main directory for details. */ -#include <radioInterface.h> +#include <radioInterfaceMulti.h> #include <Logger.h> #include "Resampler.h" diff --git a/Transceiver52M/radioInterfaceMulti.h b/Transceiver52M/radioInterfaceMulti.h new file mode 100644 index 0000000..f4d97ea --- /dev/null +++ b/Transceiver52M/radioInterfaceMulti.h @@ -0,0 +1,41 @@ +#ifndef RADIO_INTERFACE_MULTI_H +#define RADIO_INTERFACE_MULTI_H + +#include "radioInterface.h" +#include "Channelizer.h" +#include "Synthesis.h" + +class RadioInterfaceMulti : public RadioInterface { +public: + RadioInterfaceMulti(RadioDevice* radio, size_t tx_sps, + size_t rx_sps, size_t chans = 1); + virtual ~RadioInterfaceMulti(); + + bool init(int type); + void close(); + + bool tuneTx(double freq, size_t chan); + bool tuneRx(double freq, size_t chan); + virtual double setRxGain(double dB, size_t chan); + virtual double rssiOffset(size_t chan = 0); + +private: + bool pushBuffer(); + int pullBuffer(); + bool verify_arfcn_consistency(double freq, size_t chan, bool tx); + virtual int setPowerAttenuation(int atten, size_t chan = 0); + + signalVector *outerSendBuffer; + signalVector *outerRecvBuffer; + std::vector<signalVector *> history; + std::vector<bool> active; + std::vector<struct freq_cfg_state> rx_freq_state; + std::vector<struct freq_cfg_state> tx_freq_state; + + Resampler *dnsampler; + Resampler *upsampler; + Channelizer *channelizer; + Synthesis *synthesis; +}; + +#endif /* RADIO_INTERFACE_MULTI_H */ diff --git a/configure.ac b/configure.ac index c4f707b..01b2f34 100644 --- a/configure.ac +++ b/configure.ac @@ -286,7 +286,19 @@ AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"]) AM_CONDITIONAL(ENABLE_MS_TRX, [test "x$with_mstrx" = "xyes"]) -PKG_CHECK_MODULES(FFTWF, fftw3f) +# Disable Multi ARFCN support +AC_ARG_ENABLE(multi-arfcn, + [AS_HELP_STRING( + [--disable-multi-arfcn], + [Disable Multi ARFCN support [default=enabled]], + )], + [enable_multi_arfcn=$enableval], [enable_multi_arfcn="yes"]) +AM_CONDITIONAL(ENABLE_MULTI_ARFCN, [test "x$enable_multi_arfcn" = "xyes"]) + +if test "x$enable_multi_arfcn" = "xyes"; then + AC_DEFINE([ENABLE_MULTI_ARFCN],[1],[Building with enabled Multi ARFCN]) + PKG_CHECK_MODULES(FFTWF, fftw3f) +fi # Generate manuals AC_ARG_ENABLE(manuals, diff --git a/doc/manuals/chapters/configuration.adoc b/doc/manuals/chapters/configuration.adoc index e1323ef..2f1b040 100644 --- a/doc/manuals/chapters/configuration.adoc +++ b/doc/manuals/chapters/configuration.adoc @@ -45,6 +45,10 @@ Multi-ARFCN support is available since osmo-trx release `0.2.0`, and it was added specifically in commit `76764278169d252980853251daeb9f1ba0c246e1`. +osmo-trx must also be built with Multi-ARFCN support enabled, which is the +default build configuration. Builds configured with `--disable-multi-arfcn` do +not provide this feature. + This feature is useful for instance if you want to run more than 1 TRX with an Ettus B200 device, or more than 2 TRXs with an Ettus B210 device, since they support only 1 and 2 physical RF channels respectively. No device from other -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42243?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I2495c5b5c79f2fe74bef83902058e1d2207c1f3c Gerrit-Change-Number: 42243 Gerrit-PatchSet: 9 Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-trx[master]: build: add --disable-multi-arfcn configure option
by fixeria 11 Mar '26

11 Mar '26
Attention is currently required from: Hoernchen, Timur Davydov, laforge, osmith. fixeria has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/osmo-trx/+/42243?usp=email ) Change subject: build: add --disable-multi-arfcn configure option ...................................................................... Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42243?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I2495c5b5c79f2fe74bef83902058e1d2207c1f3c Gerrit-Change-Number: 42243 Gerrit-PatchSet: 9 Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com> Gerrit-Comment-Date: Wed, 11 Mar 2026 18:14:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-asf4-dfu[master]: dfu: download: align download data buffer
by lynxis lazus 11 Mar '26

11 Mar '26
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/42327?usp=email ) Change subject: dfu: download: align download data buffer ...................................................................... dfu: download: align download data buffer The download data buffer is given to the usb stack. Ensure the data buffer is dma capable to prevent an additional memcpy() by the usb hal. Change-Id: I01191a125aa62c2198e38d5e5fcd27d4e421c62e --- M usb/class/dfu/device/dfudf.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-asf4-dfu refs/changes/27/42327/1 diff --git a/usb/class/dfu/device/dfudf.c b/usb/class/dfu/device/dfudf.c index 7388060..4b010bd 100644 --- a/usb/class/dfu/device/dfudf.c +++ b/usb/class/dfu/device/dfudf.c @@ -42,7 +42,7 @@ volatile enum usb_dfu_state dfu_state = USB_DFU_STATE_DFU_IDLE; volatile enum usb_dfu_status dfu_status = USB_DFU_STATUS_OK; -uint8_t dfu_download_data[512]; +uint8_t __attribute__((aligned(4))) dfu_download_data[512]; volatile uint16_t dfu_download_length = 0; volatile size_t dfu_download_offset = 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/42327?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: I01191a125aa62c2198e38d5e5fcd27d4e421c62e Gerrit-Change-Number: 42327 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[S] Change in osmo-ccid-firmware[master]: firmware: enable watchdog timer
by lynxis lazus 11 Mar '26

11 Mar '26
Attention is currently required from: Hoernchen. lynxis lazus has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42307?usp=email ) Change subject: firmware: enable watchdog timer ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File sysmoOCTSIM/main.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42307/comment/c70a56a4_47… : PS1, Line 688: /* Configure and enable WDT with ~2s timeout (2048 cycles @ 1.024 kHz) */ Could you ensure the WDT is disable before configuring it? It would allow setting a WDT from the bootloader in a later revision if needed. Could you move it into a function? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42307?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I1ef1fc70d33492efe0171a7879c1a23f16957195 Gerrit-Change-Number: 42307 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Mar 2026 14:55:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-ccid-firmware[master]: main: rework panic handler
by lynxis lazus 11 Mar '26

11 Mar '26
Attention is currently required from: Hoernchen. lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42163?usp=email ) Change subject: main: rework panic handler ...................................................................... Patch Set 6: (1 comment) Patchset: PS6: > don't reset in the handler, either let it get stuck as before + let the WDT reset it or manually for […] The WDT reset reason would require to set up the WDT before, right? Or does a write to WDT->CLEAR.reg always trigger a reset, even when WDT is disabled? Even it is does, is this a bug or feature? Maybe we can move to a WDT reason after the watchdog has been introduced into the ccid firmware? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42163?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I91c732001e848ec5509bf81af8aac1a2a80eb718 Gerrit-Change-Number: 42163 Gerrit-PatchSet: 6 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: mschramm <mschramm(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Mar 2026 14:52:36 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: 5gc: Introduce TC_handover_inter_ngran_n2
by pespin 11 Mar '26

11 Mar '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42326?usp=email ) Change subject: 5gc: Introduce TC_handover_inter_ngran_n2 ...................................................................... 5gc: Introduce TC_handover_inter_ngran_n2 Change-Id: I90c7cc6c92864732a36556163aed692b2a1531b0 --- M 5gc/C5G_Tests.ttcn M 5gc/ConnHdlr.ttcn M 5gc/expected-results.xml M library/NGAP_Emulation.ttcn M library/NGAP_Functions.ttcn M library/ngap/NGAP_EncDec.cc M library/ngap/NGAP_Types.ttcn 7 files changed, 372 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/26/42326/1 diff --git a/5gc/C5G_Tests.ttcn b/5gc/C5G_Tests.ttcn index 028178d..bf3cfd3 100644 --- a/5gc/C5G_Tests.ttcn +++ b/5gc/C5G_Tests.ttcn @@ -676,6 +676,90 @@ vc_conn[1].done; } +/* 3GPP TS 23.502 4.9.1.3 Inter NG-RAN node N2 based handover */ +private function f_TC_handover_inter_ngran_n2_source() runs on ConnHdlr { + f_register(); + f_pdu_sess_establish(); + f_sleep(1.0); + f_ping4(g_pars.ue_pars.sess_pars.run_prog_pars.ping_hostname); + + var NG_NAS_UE_State nus := f_ngap_obtain_nus(g_pars.ue_pars.ran_id); + + COORD.send(Handover_n2_Pars:{ + guti := g_pars.ue_pars.guti, + pti := g_pars.ue_pars.pti, + sess_pars := g_pars.ue_pars.sess_pars, + kset_id := g_pars.kset_id, + nus := nus + }); + + /* 3GPP TS 23.502 4.9.1.3.2 step 1: */ + f_n2_handover_required(m_targetID_targetRANNodeID(m_targetRANNodeID(g_pars.ngran_pars[1].global_ngran_id, + ts_ngran_NGAP_TAI(g_pars.ngran_pars[1])) + )); + /* 3GPP TS 23.502 4.9.1.3.3 step 1: */ + f_n2_handover_command(); + /* 3GPP TS 23.502 4.9.1.3.3 step 2: */ + COORD.send("HANDOVER_COMMAND_CONFIRM"); + + /* 3GPP TS 23.502 4.9.1.3.3 step 14a + 14b: */ + as_ngap_handle_UeContextReleaseCmd(exp_cause := mw_cause_radioNetwork(successful_handover)); +} +private function f_TC_handover_inter_ngran_n2_target() runs on ConnHdlr { + var Handover_n2_Pars ho_n2_pars; + + /* Redirect Handover Request from AMF containing new AMF ID to our target ConnHdlr: */ + f_create_ngap_expect_proc(id_HandoverResourceAllocation, self); + + COORD.receive(Handover_n2_Pars:?) -> value ho_n2_pars; + g_pars.ue_pars.guti := ho_n2_pars.guti; + g_pars.ue_pars.pti := ho_n2_pars.pti; + g_pars.ue_pars.sess_pars.id := ho_n2_pars.sess_pars.id; + g_pars.ue_pars.sess_pars.qos_rules := ho_n2_pars.sess_pars.qos_rules; + g_pars.ue_pars.sess_pars.ue_ip := ho_n2_pars.sess_pars.ue_ip; + g_pars.kset_id := ho_n2_pars.kset_id; + + + /* 3GPP TS 23.502 4.9.1.3.2 step 9+10: */ + f_n2_handover_request(); + + /* 3GPP TS 23.502 4.9.1.3.3 step 4 */ + COORD.receive("HANDOVER_COMMAND_CONFIRM"); + f_ngap_set_nus(g_pars.ue_pars.ran_id, ho_n2_pars.nus); + + /* 3GPP TS 23.502 4.9.1.3.3 step 5: */ + f_n2_handover_notify(); + + f_sleep(1.0); + + f_pdu_sess_create_tun(); + f_ping4(g_pars.ue_pars.sess_pars.run_prog_pars.ping_hostname); + + f_pdu_sess_release(); + f_deregister(); +} +testcase TC_handover_inter_ngran_n2() runs on MTC_CT { + var ConnHdlr vc_conn[2]; + var integer i; + + f_init(); + f_ngap_setup(0); + f_ngap_setup(1); + + var ConnHdlrPars pars := f_init_pars(ue_idx := 0, c5g_idx := 0); + vc_conn[0] := f_start_handler_create(ngap_idx := 0); + vc_conn[1] := f_start_handler_create(ngap_idx := 1); + connect(vc_conn[0]:COORD, vc_conn[1]:COORD); + + f_start_handler_run(vc_conn[0], refers(f_TC_handover_inter_ngran_n2_source), pars); + pars.c5g_idx := 1; + pars.ue_pars.sess_pars.ran_gtpu_teid := int2oct(oct2int(pars.ue_pars.sess_pars.ran_gtpu_teid) + 1, 4); + f_start_handler_run(vc_conn[1], refers(f_TC_handover_inter_ngran_n2_target), pars); + + vc_conn[0].done; + vc_conn[1].done; +} + control { execute( TC_ng_setup() ); execute( TC_ng_setup_unknown_global_gnb_id_plmn() ); @@ -702,7 +786,7 @@ execute( TC_connection_suspend() ); execute( TC_handover_inter_ngran_xn() ); - + execute( TC_handover_inter_ngran_n2() ); } /* TODO: diff --git a/5gc/ConnHdlr.ttcn b/5gc/ConnHdlr.ttcn index da0d3d9..b1f76d2 100644 --- a/5gc/ConnHdlr.ttcn +++ b/5gc/ConnHdlr.ttcn @@ -123,9 +123,18 @@ NG_NAS_UE_State nus /* 3GPP TS 38.423 9.2.1.13 UE Context Information */ }; +/* Pass needed UE context state between ConnHdlr */ +type record Handover_n2_Pars { + octetstring guti, + ProcedureTransactionIdentifier pti, + PDUSessionParams sess_pars, + NAS_KeySetIdentifier kset_id, + NG_NAS_UE_State nus /* 3GPP TS 38.423 9.2.1.13 UE Context Information */ +}; + type port ConnHdlr_Coord_PT message { - inout charstring, Handover_Xn_Pars; + inout charstring, Handover_Xn_Pars, Handover_n2_Pars; } with { extension "internal" }; type component ConnHdlr extends NGAP_ConnHdlr, GTP1U_ConnHdlr { @@ -140,7 +149,7 @@ type function void_fn() runs on ConnHdlr; -private template (value) NGAP_IEs.TAI ts_ngran_NGAP_TAI(NGRANParams ngran_pars) := { +template (value) NGAP_IEs.TAI ts_ngran_NGAP_TAI(NGRANParams ngran_pars) := { pLMNIdentity := ngran_pars.global_ngran_id.globalGNB_ID.pLMNIdentity, tAC := ngran_pars.supported_ta_list[0].tAC, iE_Extensions := omit @@ -182,6 +191,15 @@ return valueof(p_ueLocInf); } +private function f_UPTLI() runs on ConnHdlr return UPTransportLayerInformation { + var template (value) UPTransportLayerInformation uptli; + + uptli := m_uPTransportLayerInformation_gTPTunnel( + m_gTPTunnel(p_tla := oct2bit(f_inet_addr(g_pars.ue_pars.sess_pars.ran_gtpu_ip)), + p_gtp_teid := g_pars.ue_pars.sess_pars.ran_gtpu_teid)); + return valueof(uptli); +} + private function f_tr_ConnHdlr_kset_id() runs on ConnHdlr return template (present) NAS_KeySetIdentifier { /* KSI not yet set, expect whatever assignment from network: */ if (g_pars.kset_id.nasKeySetId == tsc_NasKsi_NoKey) { @@ -350,12 +368,19 @@ var template (value) UPTransportLayerInformation utla; var template (value) QosFlowPerTNLInformation qos; var NGAP_IEs.PDUSessionResourceSetupResponseTransfer setup_resp_transf; + var integer qos_id := 0; for (var integer i := 0; i < lengthof(setup_req_transf.protocolIEs); i := i + 1) { - if (setup_req_transf.protocolIEs[i].id == id_UL_NGU_UP_TNLInformation) { + select (setup_req_transf.protocolIEs[i].id) { + case (id_UL_NGU_UP_TNLInformation) { var UPTransportLayerInformation utli := setup_req_transf.protocolIEs[i].value_.uPTransportLayerInformation; g_pars.ue_pars.sess_pars.cn_gtpu_ip := f_inet_ntoa(bit2oct(utli.gTPTunnel.transportLayerAddress)); g_pars.ue_pars.sess_pars.cn_gtpu_teid := utli.gTPTunnel.gTP_TEID; + } + case (id_QosFlowSetupRequestList) { + var QosFlowSetupRequestList qos_req_li := setup_req_transf.protocolIEs[i].value_.QosFlowSetupRequestList; + qos_id := qos_req_li[0].qosFlowIdentifier; + } } } @@ -363,7 +388,7 @@ utla := m_uPTransportLayerInformation_gTPTunnel( m_gTPTunnel(p_tla := oct2bit(f_inet_addr(g_pars.ue_pars.sess_pars.ran_gtpu_ip)), p_gtp_teid := g_pars.ue_pars.sess_pars.ran_gtpu_teid)); - qos := m_qosFlowPerTNLInformation(utla, { m_associatedQosFlowItem(1) }); + qos := m_qosFlowPerTNLInformation(utla, { m_associatedQosFlowItem(qos_id) }); setup_resp_transf := valueof(m_pDUSessionResourceSetupResponseTransfer(qos)); return setup_resp_transf; @@ -815,7 +840,7 @@ } /* 3GPP TS 38.413 8.3.3 UE Context Release (AMF initiated) */ -private altstep as_ngap_handle_UeContextReleaseCmd(template (present) Cause exp_cause := ?) runs on ConnHdlr { +altstep as_ngap_handle_UeContextReleaseCmd(template (present) Cause exp_cause := ?) runs on ConnHdlr { var NGAP_PDU rx_ngap; var template (present) NGAP_PDU exp_ngap := mw_ngap_initMsg(mw_n2_UEContextReleaseCommand( @@ -914,17 +939,13 @@ * 3GPP TS 23.502 4.9.1.2.2 Xn based inter NG-RAN handover without User Plane function re-allocation */ function f_n2_path_switch(AMF_UE_NGAP_ID source_amf_id) runs on ConnHdlr { - var template (value) UPTransportLayerInformation utla; var template (value) PathSwitchRequestTransfer transfer; var octetstring transfer_enc; var template (value) PDUSessionResourceToBeSwitchedDLItem it; var template (value) NGAP_PDU tx_pdu; var NGAP_PDU rx_pdu; - utla := m_uPTransportLayerInformation_gTPTunnel( - m_gTPTunnel(p_tla := oct2bit(f_inet_addr(g_pars.ue_pars.sess_pars.ran_gtpu_ip)), - p_gtp_teid := g_pars.ue_pars.sess_pars.ran_gtpu_teid)); - transfer := m_pathSwitchRequestTransfer(p_dL_NGU_UP_TNLInformation := utla, + transfer := m_pathSwitchRequestTransfer(p_dL_NGU_UP_TNLInformation := f_UPTLI(), p_qosFlowAcceptedList := { m_qosFlowAcceptedItem(1) }, p_dL_NGU_TNLInformationReused := omit, p_userPlaneSecurityInformation := omit); @@ -946,6 +967,117 @@ g_pars.ue_pars.amf_id := path_switch_ack.protocolIEs[0].value_.aMF_UE_NGAP_ID; } +/* 3GPP TS 38.413 8.4.1 Handover Preparation + * 3GPP TS 38.413 9.2.3.1 HANDOVER REQUIRED + * 3GPP TS 38.413 9.3.4.14 Handover Required Transfer */ +function f_n2_handover_required(template (value) TargetID target_id) runs on ConnHdlr +{ + var template (value) HandoverRequiredTransfer transfer; + var octetstring transfer_enc; + var template (value) PDUSessionResourceItemHORqd it; + var template (value) NGAP_PDU tx_pdu; + var NGAP_PDU rx_pdu; + + transfer := m_handoverRequiredTransfer(omit); + transfer_enc := enc_NGAP_HandoverRequiredTransfer(valueof(transfer)); + it := m_pDUSessionResourceItemHORqd(g_pars.ue_pars.sess_pars.id, + transfer_enc); + + tx_pdu := m_ngap_initMsg( + m_n2_HandoverRequired( + g_pars.ue_pars.amf_id, + g_pars.ue_pars.ran_id, + intra5gs, + m_cause_radioNetwork(resource_optimisation_handover), + target_id, + { it }, + '1234'O /* random string, transparent to the AMF */)); + NGAP.send(tx_pdu); +} + +/* 3GPP TS 38.413 9.2.3.4 HANDOVER REQUEST + * 3GPP TS 23.502 4.9.1.3.2 step 9+10 */ +function f_n2_handover_request() runs on ConnHdlr +{ + var template (value) QosFlowItemWithDataForwarding qos; + var template (value) HandoverRequestAcknowledgeTransfer transfer; + var octetstring transfer_enc; + var template (value) PDUSessionResourceAdmittedItem it; + var template (value) NGAP_PDU tx_pdu; + var NGAP_PDU rx_pdu; + var HandoverRequest ho_req; + var QosFlowIdentifier qos_id := 0; + + NGAP.receive(mw_ngap_initMsg( + mw_n2_HandoverRequest(? /* AMF ID not known yet here*/, + intra5gs))) -> value rx_pdu; + ho_req := rx_pdu.initiatingMessage.value_.handoverRequest; + + for (var integer i := 0; i < lengthof(ho_req.protocolIEs); i := i + 1) { + select(ho_req.protocolIEs[i].id) { + case (id_AMF_UE_NGAP_ID) { + /* Update amf_id: */ + g_pars.ue_pars.amf_id := ho_req.protocolIEs[i].value_.aMF_UE_NGAP_ID; + } + case (id_PDUSessionResourceSetupListHOReq) { + var PDUSessionResourceSetupListHOReq res_li := ho_req.protocolIEs[i].value_.PDUSessionResourceSetupListHOReq; + var PDUSessionResourceSetupItemHOReq res_it := res_li[0]; + var NGAP_IEs.PDUSessionResourceSetupRequestTransfer setup_req_transf; + var NGAP_IEs.PDUSessionResourceSetupResponseTransfer setup_resp_transf; + setup_req_transf := dec_NGAP_PDUSessionResourceSetupRequestTransfer(res_it.handoverRequestTransfer); + setup_resp_transf := f_pdu_handle_PDUSessionResourceSetupRequestTransfer(setup_req_transf); + qos_id := setup_resp_transf.dLQosFlowPerTNLInformation.associatedQosFlowList[0].qosFlowIdentifier; + } + } + } + + qos := m_qosFlowItemWithDataForwarding(qos_id); + transfer := m_handoverRequestAcknowledgeTransfer(f_UPTLI(), {qos}); + transfer_enc := enc_NGAP_HandoverRequestAcknowledgeTransfer(valueof(transfer)); + it := m_pDUSessionResourceAdmittedItem(g_pars.ue_pars.sess_pars.id, transfer_enc); + tx_pdu := mw_ngap_succMsg(m_n2_HandoverRequestAcknowledge( + g_pars.ue_pars.amf_id, + g_pars.ue_pars.ran_id, + { it }, + '1234'O)); + NGAP.send(tx_pdu); +} + +/* 3GPP TS 38.413 9.2.3.2 HANDOVER COMMAND + * 3GPP TS 23.502 4.9.1.3.3 step 1 */ +function f_n2_handover_command() runs on ConnHdlr +{ + var NGAP_PDU rx_pdu; + + NGAP.receive(mw_ngap_succMsg(mw_n2_HandoverCommand( + g_pars.ue_pars.amf_id, + g_pars.ue_pars.ran_id, + intra5gs, + ?))) -> value rx_pdu; +} + +/* 3GPP TS 23.502 9.2.3.7 HANDOVER NOTIFY + * 3GPP TS 23.502 4.9.1.3.3 step 5 */ +function f_n2_handover_notify() runs on ConnHdlr +{ + var template (value) HandoverRequiredTransfer transfer; + var octetstring transfer_enc; + var template (value) PDUSessionResourceItemHORqd it; + var template (value) NGAP_PDU tx_pdu; + var NGAP_PDU rx_pdu; + + transfer := m_handoverRequiredTransfer(omit); + transfer_enc := enc_NGAP_HandoverRequiredTransfer(valueof(transfer)); + it := m_pDUSessionResourceItemHORqd(g_pars.ue_pars.sess_pars.id, + transfer_enc); + + tx_pdu := m_ngap_initMsg(m_n2_HandoverNotify( + g_pars.ue_pars.amf_id, + g_pars.ue_pars.ran_id, + f_ULI())); + NGAP.send(tx_pdu); +} + /* Handle a PDUSessionResourceSetupRequestTransfer contained inside NGAP InitialContextSetupRequest and return a Result for InitialContextSetupResponse */ private function f_pdu_handle_session_resource_released_item(PDUSessionResourceToReleaseItemRelCmd cmd) runs on ConnHdlr return PDUSessionResourceReleasedItemRelRes { diff --git a/5gc/expected-results.xml b/5gc/expected-results.xml index 2333f8d..03bbd43 100644 --- a/5gc/expected-results.xml +++ b/5gc/expected-results.xml @@ -24,4 +24,5 @@ </failure> </testcase> <testcase classname='C5G_Tests' name='TC_handover_inter_ngran_xn' time='MASKED'/> + <testcase classname='C5G_Tests' name='TC_handover_inter_ngran_n2' time='MASKED'/> </testsuite> diff --git a/library/NGAP_Emulation.ttcn b/library/NGAP_Emulation.ttcn index d050d2f..f493260 100644 --- a/library/NGAP_Emulation.ttcn +++ b/library/NGAP_Emulation.ttcn @@ -154,6 +154,13 @@ return ret; } } + + /* Try by message type. This is useful for Handover Request, where network sends a new AMF Id. */ + ret := NGapExpectTableProc_get_conn(msg); + if (ret != null) { + return ret; + } + setverdict(fail, "Couldn't find Expect for ", msg); mtc.stop; } @@ -273,17 +280,22 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Unexpected call f_assoc_id_by_ngap_ids(omit, omit)"); } for (var integer i := 0; i < sizeof(NGapAssociationTable); i := i+1) { - if (not isvalue(NGapAssociationTable[i].ran_ue_ngap_id)) { - continue; - } - if (not istemplatekind(ran_id, "omit") and - not match(NGapAssociationTable[i].ran_ue_ngap_id, ran_id)) { - continue; + if (not istemplatekind(ran_id, "omit")) { + if (not ispresent(NGapAssociationTable[i].ran_ue_ngap_id)) { + continue; + } + if (not match(NGapAssociationTable[i].ran_ue_ngap_id, ran_id)) { + continue; + } } /* ran_id matched, check amf_id now: */ - if (not istemplatekind(amf_id, "omit") and - not match(NGapAssociationTable[i].amf_ue_ngap_id, amf_id)) { - continue; + if (not istemplatekind(amf_id, "omit")) { + if (not ispresent(NGapAssociationTable[i].amf_ue_ngap_id)) { + continue; + } + if (not match(NGapAssociationTable[i].amf_ue_ngap_id, amf_id)) { + continue; + } } return i; } @@ -317,12 +329,18 @@ private function f_ngap_id_table_add(NGAP_ConnHdlr comp_ref, template (omit) AMF_UE_NGAP_ID amf_id, - RAN_UE_NGAP_ID ran_id) + template (omit) RAN_UE_NGAP_ID ran_id) runs on NGAP_Emulation_CT return integer { var integer i; for (i := 0; i < sizeof(NGapAssociationTable); i := i+1) { - if (not isvalue(NGapAssociationTable[i].ran_ue_ngap_id)) { - NGapAssociationTable[i].ran_ue_ngap_id := ran_id; + if (not isvalue(NGapAssociationTable[i].ran_ue_ngap_id) and + not isvalue(NGapAssociationTable[i].amf_ue_ngap_id)) { + if (istemplatekind(ran_id, "omit")) { + NGapAssociationTable[i].ran_ue_ngap_id := omit; + } else { + NGapAssociationTable[i].ran_ue_ngap_id := valueof(ran_id); + } + if (istemplatekind(amf_id, "omit")) { NGapAssociationTable[i].amf_ue_ngap_id := omit; } else { @@ -407,9 +425,9 @@ } } -private function SendToNGapExpectTableProc(NGAP_PDU msg) runs on NGAP_Emulation_CT { - var integer procedureCode; - var NGAP_ConnHdlr vc_conn; +private function ngap_pdu_get_procedure_code(NGAP_PDU msg) return integer +{ + var integer procedureCode := 0; if (ispresent(msg.initiatingMessage.procedureCode)) { procedureCode := msg.initiatingMessage.procedureCode; @@ -417,10 +435,32 @@ procedureCode := msg.unsuccessfulOutcome.procedureCode; } else if (ispresent(msg.successfulOutcome.procedureCode)) { procedureCode := msg.successfulOutcome.procedureCode; - } else { - return; } + return procedureCode; +} + +private function NGapExpectTableProc_get_conn(NGAP_PDU msg) +runs on NGAP_Emulation_CT return NGAP_ConnHdlr { + var NGAP_ConnHdlr vc_conn; + var integer procedureCode := ngap_pdu_get_procedure_code(msg); + + for (var integer i := 0; i < sizeof(NGapExpectTableProc); i := i+1) { + if (NGapExpectTableProc[i].procedureCode == procedureCode) { + vc_conn := NGapExpectTableProc[i].vc_conn; + if (vc_conn != null) { + return vc_conn; + } + } + } + + return null; +} + +private function SendToNGapExpectTableProc(NGAP_PDU msg) runs on NGAP_Emulation_CT { + var NGAP_ConnHdlr vc_conn; + var integer procedureCode := ngap_pdu_get_procedure_code(msg); + for (var integer i := 0; i < sizeof(NGapExpectTableProc); i := i+1) { if (NGapExpectTableProc[i].procedureCode == procedureCode) { vc_conn := NGapExpectTableProc[i].vc_conn; @@ -537,6 +577,23 @@ /* Pass message through */ NGAP.send(t_NGAP_Send(g_ngap_conn_id, msg)); } + /* NGAP from client: HandoverRequestAcknowledge */ + [] NGAP_CLIENT.receive(mw_ngap_succMsg(mw_n2_HandoverRequestAcknowledge)) -> value msg sender vc_conn { + /* Update table entry with ran_id; oly amf_id was known through HandoverReq so far: */ + ai := f_assoc_id_by_ngap_ids(valueof(f_NGAP_get_AMF_UE_NGAP_ID(msg)), omit); + NGapAssociationTable[ai].ran_ue_ngap_id := valueof(f_NGAP_get_RAN_UE_NGAP_ID(msg)); + /* Pass message through */ + NGAP.send(t_NGAP_Send(g_ngap_conn_id, msg)); + } + /* NGAP from client: HandoverNotify */ + [] NGAP_CLIENT.receive(mw_ngap_initMsg(mw_n2_HandoverNotify)) -> value msg sender vc_conn { + /* create a table entry about this connection */ + ai := f_assoc_id_by_ngap_ids(valueof(f_NGAP_get_AMF_UE_NGAP_ID(msg)), valueof(f_NGAP_get_RAN_UE_NGAP_ID(msg))); + /* Store ULI so we can use it for generating UlNasTransport from NAS */ + NGapAssociationTable[ai].uli := msg.initiatingMessage.value_.HandoverNotify.protocolIEs[2].value_.userLocationInformation; + /* Pass message through */ + NGAP.send(t_NGAP_Send(g_ngap_conn_id, msg)); + } /* NAS from client: Wrap in NGAP Uplink NAS Transport */ [] NGAP_CLIENT.receive(NG_NAS_UL_Message_Type:?) -> value ul_nas_msg sender vc_conn { var integer assoc_id := f_assoc_id_by_comp(vc_conn); @@ -608,7 +665,7 @@ } else { /* if not, call create_cb so it can create new ConnHdlr */ vc_conn := ops.create_cb.apply(mrf.msg, amf_ue_id, ran_ue_id, id); - f_ngap_id_table_add(vc_conn, amf_ue_id, valueof(ran_ue_id)); + f_ngap_id_table_add(vc_conn, amf_ue_id, ran_ue_id); NGAP_CLIENT.send(mrf.msg) to vc_conn; } if (match(mrf.msg, mw_ngap_initMsg(mw_n2_UEContextReleaseCommand))) { @@ -714,7 +771,7 @@ /* client/conn_hdlr side function to use procedure port to create expect (PDU) in emulation */ function f_create_ngap_expect_proc(integer procedureCode, NGAP_ConnHdlr hdlr) runs on NGAP_ConnHdlr { - NGAP_PROC.call(NGAPEM_register_proc:{procedureCode, self}) { + NGAP_PROC.call(NGAPEM_register_proc:{procedureCode, hdlr}) { [] NGAP_PROC.getreply(NGAPEM_register_proc:{?,?}) {}; } diff --git a/library/NGAP_Functions.ttcn b/library/NGAP_Functions.ttcn index 5d45c43..64e1450 100644 --- a/library/NGAP_Functions.ttcn +++ b/library/NGAP_Functions.ttcn @@ -40,6 +40,12 @@ case (id_PDUSessionResourceRelease) { return im.value_.pDUSessionResourceReleaseCommand.protocolIEs[0].value_.aMF_UE_NGAP_ID; } + case (id_HandoverResourceAllocation) { + return im.value_.handoverRequest.protocolIEs[0].value_.aMF_UE_NGAP_ID; + } + case (id_HandoverNotification) { + return im.value_.HandoverNotify.protocolIEs[0].value_.aMF_UE_NGAP_ID; + } /* TODO */ } } else if (ischosen(ngap.successfulOutcome)) { @@ -48,10 +54,15 @@ case (id_PathSwitchRequest) { return so.value_.PathSwitchRequestAcknowledge.protocolIEs[0].value_.aMF_UE_NGAP_ID; } + case (id_HandoverResourceAllocation) { + return so.value_.HandoverRequestAcknowledge.protocolIEs[0].value_.aMF_UE_NGAP_ID; + } + case (id_HandoverPreparation) { + return so.value_.HandoverCommand.protocolIEs[0].value_.aMF_UE_NGAP_ID; + } case (?) { return omit; /* TODO */ - /* return im.value_.SuccessfulOutcome.protocolIEs[0].value_.AMF_UE_NGAP_ID; */ } /* TODO */ } @@ -98,6 +109,9 @@ case (id_PathSwitchRequest) { return im.value_.PathSwitchRequest.protocolIEs[0].value_.RAN_UE_NGAP_ID; } + case (id_HandoverNotification) { + return im.value_.HandoverNotify.protocolIEs[1].value_.RAN_UE_NGAP_ID; + } /* TODO */ } } else if (ischosen(ngap.successfulOutcome)) { @@ -106,6 +120,12 @@ case (id_PathSwitchRequest) { return so.value_.PathSwitchRequestAcknowledge.protocolIEs[1].value_.rAN_UE_NGAP_ID; } + case (id_HandoverResourceAllocation) { + return so.value_.HandoverRequestAcknowledge.protocolIEs[1].value_.rAN_UE_NGAP_ID; + } + case (id_HandoverPreparation) { + return so.value_.HandoverCommand.protocolIEs[1].value_.rAN_UE_NGAP_ID; + } case (?) { return omit; /* TODO */ diff --git a/library/ngap/NGAP_EncDec.cc b/library/ngap/NGAP_EncDec.cc index 9e3ccd2..b024c32 100644 --- a/library/ngap/NGAP_EncDec.cc +++ b/library/ngap/NGAP_EncDec.cc @@ -149,4 +149,44 @@ return ret; } +OCTETSTRING enc__NGAP__HandoverRequiredTransfer(const NGAP__IEs::HandoverRequiredTransfer &p) +{ + TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); + p.encode(NGAP__IEs::HandoverRequiredTransfer_descr_, TTCN_buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return OCTETSTRING(TTCN_buf.get_len(), TTCN_buf.get_data()); +} + +NGAP__IEs::HandoverRequiredTransfer dec__NGAP__HandoverRequiredTransfer(const OCTETSTRING &stream) +{ + NGAP__IEs::HandoverRequiredTransfer ret; + TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); + TTCN_buf.put_os(stream); + ret.decode(NGAP__IEs::HandoverRequiredTransfer_descr_, TTCN_buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return ret; +} + +OCTETSTRING enc__NGAP__HandoverRequestAcknowledgeTransfer(const NGAP__IEs::HandoverRequestAcknowledgeTransfer &p) +{ + TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); + p.encode(NGAP__IEs::HandoverRequestAcknowledgeTransfer_descr_, TTCN_buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return OCTETSTRING(TTCN_buf.get_len(), TTCN_buf.get_data()); +} + +NGAP__IEs::HandoverRequestAcknowledgeTransfer dec__NGAP__HandoverRequestAcknowledgeTransfer(const OCTETSTRING &stream) +{ + NGAP__IEs::HandoverRequestAcknowledgeTransfer ret; + TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); + TTCN_buf.put_os(stream); + ret.decode(NGAP__IEs::HandoverRequestAcknowledgeTransfer_descr_, TTCN_buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return ret; +} + } diff --git a/library/ngap/NGAP_Types.ttcn b/library/ngap/NGAP_Types.ttcn index 394cb24..e4a9f4e 100644 --- a/library/ngap/NGAP_Types.ttcn +++ b/library/ngap/NGAP_Types.ttcn @@ -23,4 +23,11 @@ external function enc_NGAP_PathSwitchRequestTransfer(NGAP_IEs.PathSwitchRequestTransfer p) return octetstring; external function dec_NGAP_PathSwitchRequestTransfer(in octetstring pdu) return NGAP_IEs.PathSwitchRequestTransfer; + + external function enc_NGAP_HandoverRequiredTransfer(NGAP_IEs.HandoverRequiredTransfer p) return octetstring; + external function dec_NGAP_HandoverRequiredTransfer(in octetstring pdu) return NGAP_IEs.HandoverRequiredTransfer; + + external function enc_NGAP_HandoverRequestAcknowledgeTransfer(NGAP_IEs.HandoverRequestAcknowledgeTransfer p) return octetstring; + external function dec_NGAP_HandoverRequestAcknowledgeTransfer(in octetstring pdu) return NGAP_IEs.HandoverRequestAcknowledgeTransfer; + } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42326?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I90c7cc6c92864732a36556163aed692b2a1531b0 Gerrit-Change-Number: 42326 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-trx[master]: build: add --disable-multi-arfcn configure option
by pespin 11 Mar '26

11 Mar '26
Attention is currently required from: Hoernchen, Timur Davydov, fixeria, laforge, osmith. pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/osmo-trx/+/42243?usp=email ) Change subject: build: add --disable-multi-arfcn configure option ...................................................................... Patch Set 9: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42243?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I2495c5b5c79f2fe74bef83902058e1d2207c1f3c Gerrit-Change-Number: 42243 Gerrit-PatchSet: 9 Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com> Gerrit-Comment-Date: Wed, 11 Mar 2026 14:31:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • ...
  • 194
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.