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

May 2023

  • 1 participants
  • 2583 discussions
[M] Change in osmocom-bb[master]: layer23: subscriber: Implement LOCIGPRS read/write for testcard backend
by pespin 19 May '23

19 May '23
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/32800 to look at the new patch set (#3). Change subject: layer23: subscriber: Implement LOCIGPRS read/write for testcard backend ...................................................................... layer23: subscriber: Implement LOCIGPRS read/write for testcard backend Change-Id: Ibcaaf430587a3a270398e9a9eeab6ee98514c3c8 --- M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/include/osmocom/bb/common/sim.h M src/host/layer23/include/osmocom/bb/common/subscriber.h M src/host/layer23/src/common/subscriber.c M src/host/layer23/src/common/vty.c 5 files changed, 216 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/00/32800/3 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibcaaf430587a3a270398e9a9eeab6ee98514c3c8 Gerrit-Change-Number: 32800 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmocom-bb[master]: layer23: modem: pass SIM-stored PTMSI (signature) & RAI to GMM
by pespin 19 May '23

19 May '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32804 ) Change subject: layer23: modem: pass SIM-stored PTMSI (signature) & RAI to GMM ...................................................................... layer23: modem: pass SIM-stored PTMSI (signature) & RAI to GMM Depends: libosmo-gprs.git Change-Id Ia69b6f885d612c42ab015822031e4c7262f4714e Change-Id: If0eef0a60b310539f2e668238314481ad5b7a5fa --- M src/host/layer23/src/modem/gmm.c M src/host/layer23/src/modem/sm.c 2 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/04/32804/1 diff --git a/src/host/layer23/src/modem/gmm.c b/src/host/layer23/src/modem/gmm.c index d3851e0..5445672 100644 --- a/src/host/layer23/src/modem/gmm.c +++ b/src/host/layer23/src/modem/gmm.c @@ -193,10 +193,12 @@ gmm_prim = osmo_gprs_gmm_prim_alloc_gmmreg_attach_req(); gmm_prim->gmmreg.attach_req.attach_type = OSMO_GPRS_GMM_ATTACH_TYPE_GPRS; gmm_prim->gmmreg.attach_req.ptmsi = subscr->gprs.ptmsi; + gmm_prim->gmmreg.attach_req.ptmsi_sig = subscr->gprs.ptmsi_sig; gmm_prim->gmmreg.attach_req.attach_with_imsi = (subscr->gprs.ptmsi == GSM_RESERVED_TMSI); memcpy(gmm_prim->gmmreg.attach_req.imsi, subscr->imsi, ARRAY_SIZE(subscr->imsi)); memcpy(gmm_prim->gmmreg.attach_req.imei, ms->settings.imei, ARRAY_SIZE(ms->settings.imei)); memcpy(gmm_prim->gmmreg.attach_req.imeisv, ms->settings.imeisv, ARRAY_SIZE(ms->settings.imeisv)); + memcpy(&gmm_prim->gmmreg.attach_req.old_rai, &subscr->gprs.rai, sizeof(subscr->gprs.rai)); rc = osmo_gprs_gmm_prim_upper_down(gmm_prim); if (rc < 0) LOGP(DMM, LOGL_ERROR, "Failed submitting GMMREG-ATTACH.req\n"); diff --git a/src/host/layer23/src/modem/sm.c b/src/host/layer23/src/modem/sm.c index e6591a9..9b3a35b 100644 --- a/src/host/layer23/src/modem/sm.c +++ b/src/host/layer23/src/modem/sm.c @@ -258,9 +258,11 @@ sm_prim->smreg.pdp_act_req.pco_len = apn->pdp.pco_len; OSMO_STRLCPY_ARRAY(sm_prim->smreg.pdp_act_req.apn, apn->cfg.name); sm_prim->smreg.pdp_act_req.gmm.ptmsi = subscr->gprs.ptmsi; + sm_prim->smreg.pdp_act_req.gmm.ptmsi_sig = subscr->gprs.ptmsi; OSMO_STRLCPY_ARRAY(sm_prim->smreg.pdp_act_req.gmm.imsi, subscr->imsi); OSMO_STRLCPY_ARRAY(sm_prim->smreg.pdp_act_req.gmm.imei, ms->settings.imei); OSMO_STRLCPY_ARRAY(sm_prim->smreg.pdp_act_req.gmm.imeisv, ms->settings.imeisv); + memcpy(&sm_prim->smreg.pdp_act_req.gmm.old_rai, &subscr->gprs.rai, sizeof(subscr->gprs.rai)); rc = osmo_gprs_sm_prim_upper_down(sm_prim); if (rc < 0) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32804 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: If0eef0a60b310539f2e668238314481ad5b7a5fa Gerrit-Change-Number: 32804 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-gprs[master]: sm: Forward forth and back the P-TMSI signature
by pespin 19 May '23

19 May '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32803 ) Change subject: sm: Forward forth and back the P-TMSI signature ...................................................................... sm: Forward forth and back the P-TMSI signature Change-Id: Ia69b6f885d612c42ab015822031e4c7262f4714e --- M include/osmocom/gprs/sm/sm_prim.h M include/osmocom/gprs/sm/sm_private.h M src/sm/sm.c M src/sm/sm_prim.c 4 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/03/32803/1 diff --git a/include/osmocom/gprs/sm/sm_prim.h b/include/osmocom/gprs/sm/sm_prim.h index d9be348..d4e17a4 100644 --- a/include/osmocom/gprs/sm/sm_prim.h +++ b/include/osmocom/gprs/sm/sm_prim.h @@ -65,6 +65,7 @@ uint8_t pco_len; struct { uint32_t ptmsi; + uint32_t ptmsi_sig; bool attach_with_imsi; char imsi[OSMO_IMSI_BUF_SIZE]; char imei[GSM23003_IMEI_NUM_DIGITS + 1]; @@ -89,6 +90,7 @@ uint8_t qos_len; struct { uint32_t allocated_ptmsi; + uint32_t allocated_ptmsi_sig; uint32_t allocated_tlli; struct gprs_ra_id rai; } gmm; diff --git a/include/osmocom/gprs/sm/sm_private.h b/include/osmocom/gprs/sm/sm_private.h index 6bf456f..98eaf79 100644 --- a/include/osmocom/gprs/sm/sm_private.h +++ b/include/osmocom/gprs/sm/sm_private.h @@ -127,6 +127,7 @@ struct { uint32_t ptmsi; + uint32_t ptmsi_sig; uint32_t tlli; char imsi[OSMO_IMSI_BUF_SIZE]; char imei[GSM23003_IMEI_NUM_DIGITS + 1]; diff --git a/src/sm/sm.c b/src/sm/sm.c index c5520bf..79fbc7d 100644 --- a/src/sm/sm.c +++ b/src/sm/sm.c @@ -193,6 +193,7 @@ gmm_prim_tx->gmmsm.establish_req.attach_type = OSMO_GPRS_GMM_ATTACH_TYPE_GPRS; gmm_prim_tx->gmmsm.establish_req.attach_with_imsi = (ms->gmm.ptmsi == GSM_RESERVED_TMSI); gmm_prim_tx->gmmsm.establish_req.ptmsi = ms->gmm.ptmsi; + gmm_prim_tx->gmmsm.establish_req.ptmsi_sig = ms->gmm.ptmsi_sig; OSMO_STRLCPY_ARRAY(gmm_prim_tx->gmmsm.establish_req.imsi, ms->gmm.imsi); OSMO_STRLCPY_ARRAY(gmm_prim_tx->gmmsm.establish_req.imei, ms->gmm.imei); OSMO_STRLCPY_ARRAY(gmm_prim_tx->gmmsm.establish_req.imeisv, ms->gmm.imeisv); @@ -224,6 +225,7 @@ if (sme->qos_len) memcpy(sm_prim_tx->smreg.pdp_act_cnf.acc.qos, &sme->qos, sme->qos_len); sm_prim_tx->smreg.pdp_act_cnf.acc.gmm.allocated_ptmsi = sme->ms->gmm.ptmsi; + sm_prim_tx->smreg.pdp_act_cnf.acc.gmm.allocated_ptmsi_sig = sme->ms->gmm.ptmsi_sig; sm_prim_tx->smreg.pdp_act_cnf.acc.gmm.allocated_tlli = sme->ms->gmm.tlli; memcpy(&sm_prim_tx->smreg.pdp_act_cnf.acc.gmm.rai, &sme->ms->gmm.ra, sizeof(sme->ms->gmm.ra)); } else { diff --git a/src/sm/sm_prim.c b/src/sm/sm_prim.c index ea84d3e..158959e 100644 --- a/src/sm/sm_prim.c +++ b/src/sm/sm_prim.c @@ -270,6 +270,7 @@ /* Info required to establish GMM: */ ms->gmm.ptmsi = sm_prim->smreg.pdp_act_req.gmm.ptmsi; + ms->gmm.ptmsi_sig = sm_prim->smreg.pdp_act_req.gmm.ptmsi_sig; if (sm_prim->smreg.pdp_act_req.gmm.imsi[0] != '\0') OSMO_STRLCPY_ARRAY(ms->gmm.imsi, sm_prim->smreg.pdp_act_req.gmm.imsi); if (sm_prim->smreg.pdp_act_req.gmm.imei[0] != '\0') @@ -479,6 +480,7 @@ /* Update allocated PTMSI: */ if (gmm_prim->gmmsm.establish_cnf.acc.allocated_ptmsi != GSM_RESERVED_TMSI) sme->ms->gmm.ptmsi = gmm_prim->gmmsm.establish_cnf.acc.allocated_ptmsi; + sme->ms->gmm.ptmsi_sig = gmm_prim->gmmsm.establish_cnf.acc.allocated_ptmsi_sig; /* Set allocated TLLI: */ sme->ms->gmm.tlli = gmm_prim->gmmsm.establish_cnf.acc.allocated_tlli; /* Set the current RAI: */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32803 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ia69b6f885d612c42ab015822031e4c7262f4714e Gerrit-Change-Number: 32803 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-gprs[master]: gmm: Forward forth and back the P-TMSI signature
by pespin 19 May '23

19 May '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32802 ) Change subject: gmm: Forward forth and back the P-TMSI signature ...................................................................... gmm: Forward forth and back the P-TMSI signature Change-Id: Ibf12589e7d3029f80b4ced99992155deb9dba036 --- M include/osmocom/gprs/gmm/gmm_prim.h M include/osmocom/gprs/gmm/gmm_private.h M src/gmm/gmm.c M src/gmm/gmm_pdu.c M src/gmm/gmm_prim.c M tests/gmm/gmm_prim_test.c M tests/gmm/gmm_prim_test.ok 7 files changed, 42 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/02/32802/1 diff --git a/include/osmocom/gprs/gmm/gmm_prim.h b/include/osmocom/gprs/gmm/gmm_prim.h index e5eada0..3b2ee70 100644 --- a/include/osmocom/gprs/gmm/gmm_prim.h +++ b/include/osmocom/gprs/gmm/gmm_prim.h @@ -105,6 +105,7 @@ struct { enum osmo_gprs_gmm_attach_type attach_type; uint32_t ptmsi; + uint32_t ptmsi_sig; bool attach_with_imsi; char imsi[OSMO_IMSI_BUF_SIZE]; char imei[GSM23003_IMEI_NUM_DIGITS + 1]; @@ -119,6 +120,7 @@ struct { /* PLMNs MT-caps, attach-type. */ uint32_t allocated_ptmsi; + uint32_t allocated_ptmsi_sig; uint32_t allocated_tlli; struct gprs_ra_id rai; } acc; @@ -211,6 +213,7 @@ struct { enum osmo_gprs_gmm_attach_type attach_type; uint32_t ptmsi; + uint32_t ptmsi_sig; bool attach_with_imsi; char imsi[OSMO_IMSI_BUF_SIZE]; char imei[GSM23003_IMEI_NUM_DIGITS + 1]; @@ -225,6 +228,7 @@ struct { /* PLMNs MT-caps, attach-type. */ uint32_t allocated_ptmsi; + uint32_t allocated_ptmsi_sig; uint32_t allocated_tlli; struct gprs_ra_id rai; } acc; diff --git a/include/osmocom/gprs/gmm/gmm_private.h b/include/osmocom/gprs/gmm/gmm_private.h index 57658e9..e715723 100644 --- a/include/osmocom/gprs/gmm/gmm_private.h +++ b/include/osmocom/gprs/gmm/gmm_private.h @@ -56,6 +56,7 @@ struct gprs_gmm_ms_fsm_ctx ms_fsm; uint32_t sess_id; /* Used to identify the GMME in GMMSM SAP */ + uint32_t ptmsi_sig; /* 3 bytes */ uint32_t ptmsi; uint32_t old_ptmsi; uint32_t tlli; diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index 385da4f..aef3571 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -150,6 +150,7 @@ } gmme->sess_id = GPRS_GMM_SESS_ID_UNASSIGNED; + gmme->ptmsi_sig = GSM_RESERVED_TMSI; gmme->ptmsi = ptmsi; gmme->old_ptmsi = GSM_RESERVED_TMSI; gmme->old_tlli = GPRS_GMM_TLLI_UNASSIGNED; @@ -288,6 +289,7 @@ gmm_prim_tx->gmmreg.attach_cnf.accepted = accepted; if (accepted) { gmm_prim_tx->gmmreg.attach_cnf.acc.allocated_ptmsi = gmme->ptmsi; + gmm_prim_tx->gmmreg.attach_cnf.acc.allocated_ptmsi_sig = gmme->ptmsi_sig; gmm_prim_tx->gmmreg.attach_cnf.acc.allocated_tlli = gmme->tlli; memcpy(&gmm_prim_tx->gmmreg.attach_cnf.acc.rai, &gmme->ra, sizeof(gmme->ra)); } else { @@ -333,6 +335,7 @@ gmm_prim_tx = gprs_gmm_prim_alloc_gmmsm_establish_cnf(gmme->sess_id, cause); if (accepted) { gmm_prim_tx->gmmsm.establish_cnf.acc.allocated_ptmsi = gmme->ptmsi; + gmm_prim_tx->gmmsm.establish_cnf.acc.allocated_ptmsi_sig = gmme->ptmsi_sig; gmm_prim_tx->gmmsm.establish_cnf.acc.allocated_tlli = gmme->tlli; memcpy(&gmm_prim_tx->gmmsm.establish_cnf.acc.rai, &gmme->ra, sizeof(gmme->ra)); } @@ -562,6 +565,13 @@ goto rejected; } + if (TLVP_PRESENT(&tp, GSM48_IE_GMM_PTMSI_SIG)) { + const uint8_t *ptmsi_sig = TLVP_VAL(&tp, GSM48_IE_GMM_PTMSI_SIG); + gmme->ptmsi_sig = (ptmsi_sig[0] << 8) | (ptmsi_sig[1] << 4) | ptmsi_sig[2]; + } else { + gmme->ptmsi_sig = GSM_RESERVED_TMSI; + } + if (TLVP_PRESENT(&tp, GSM48_IE_GMM_ALLOC_PTMSI)) { struct osmo_mobile_identity mi; if (osmo_mobile_identity_decode(&mi, TLVP_VAL(&tp, GSM48_IE_GMM_ALLOC_PTMSI), diff --git a/src/gmm/gmm_pdu.c b/src/gmm/gmm_pdu.c index 1182482..28fd30f 100644 --- a/src/gmm/gmm_pdu.c +++ b/src/gmm/gmm_pdu.c @@ -230,6 +230,12 @@ /* TODO: optional fields */ + /* 10.5.5.8 Old P-TMSI signature: */ + if (!attach_with_imsi && gmme->ptmsi != GSM_RESERVED_TMSI) { + uint8_t ptmsi_sig[3] = { gmme->ptmsi_sig >> 16, gmme->ptmsi_sig >> 8, gmme->ptmsi_sig }; + msgb_tv_fixed_put(msg, GSM48_IE_GMM_PTMSI_SIG, sizeof(ptmsi_sig), ptmsi_sig); + } + /* 9.4.1.13 P-TMSI type: The MS shall include this IE if the * type of identity in the Mobile identity IE is set to * "TMSI/P-TMSI/M-TMSI". */ diff --git a/src/gmm/gmm_prim.c b/src/gmm/gmm_prim.c index 4951651..b2f1fdc 100644 --- a/src/gmm/gmm_prim.c +++ b/src/gmm/gmm_prim.c @@ -386,6 +386,7 @@ if (gmm_prim->gmmreg.attach_req.imeisv[0] != '\0') OSMO_STRLCPY_ARRAY(gmme->imeisv, gmm_prim->gmmreg.attach_req.imeisv); memcpy(&gmme->ra, &gmm_prim->gmmreg.attach_req.old_rai, sizeof(gmme->ra)); + gmme->ptmsi_sig = gmm_prim->gmmreg.attach_req.ptmsi_sig; rc = gprs_gmm_ms_fsm_ctx_request_attach(&gmme->ms_fsm, gmm_prim->gmmreg.attach_req.attach_type, @@ -488,6 +489,7 @@ OSMO_ASSERT(gmme); /* Identify this GMME with this sess_id in GMMSM SAP from now on: */ gmme->sess_id = gmm_prim->gmmsm.sess_id; + gmme->ptmsi_sig = gmm_prim->gmmsm.establish_req.ptmsi_sig; if (gmme->ms_fsm.fi->state == GPRS_GMM_MS_ST_REGISTERED) { rc = gprs_gmm_submit_gmmsm_establish_cnf(gmme, true, 0); diff --git a/tests/gmm/gmm_prim_test.c b/tests/gmm/gmm_prim_test.c index 1b14b38..b403829 100644 --- a/tests/gmm/gmm_prim_test.c +++ b/tests/gmm/gmm_prim_test.c @@ -157,9 +157,10 @@ switch (OSMO_PRIM_HDR(&gmm_prim->oph)) { case OSMO_PRIM(OSMO_GPRS_GMM_GMMREG_ATTACH, PRIM_OP_CONFIRM): if (gmm_prim->gmmreg.attach_cnf.accepted) { - printf("%s(): Rx %s accepted=%u allocated_ptmsi=0x%08x\n", __func__, pdu_name, + printf("%s(): Rx %s accepted=%u allocated_ptmsi=0x%08x allocated_ptmsi_sig=0x%06x\n", __func__, pdu_name, gmm_prim->gmmreg.attach_cnf.accepted, - gmm_prim->gmmreg.attach_cnf.acc.allocated_ptmsi); + gmm_prim->gmmreg.attach_cnf.acc.allocated_ptmsi, + gmm_prim->gmmreg.attach_cnf.acc.allocated_ptmsi_sig); } else { printf("%s(): Rx %s accepted=%u rej_cause=%u\n", __func__, pdu_name, gmm_prim->gmmreg.attach_cnf.accepted, @@ -283,6 +284,7 @@ struct osmo_gprs_llc_prim *llc_prim; int rc; uint32_t ptmsi = 0x00001234; + uint32_t ptmsi_sig = 0x556677; uint32_t rand_tlli = 0x80001234; char *imsi = "1234567890"; char *imei = "42342342342342"; @@ -303,6 +305,7 @@ OSMO_ASSERT(gmm_prim); gmm_prim->gmmreg.attach_req.attach_type = OSMO_GPRS_GMM_ATTACH_TYPE_GPRS; gmm_prim->gmmreg.attach_req.ptmsi = ptmsi; + gmm_prim->gmmreg.attach_req.ptmsi_sig = ptmsi_sig; OSMO_STRLCPY_ARRAY(gmm_prim->gmmreg.attach_req.imsi, imsi); OSMO_STRLCPY_ARRAY(gmm_prim->gmmreg.attach_req.imei, imei); OSMO_STRLCPY_ARRAY(gmm_prim->gmmreg.attach_req.imeisv, imeisv); @@ -366,6 +369,7 @@ struct osmo_gprs_llc_prim *llc_prim; int rc; uint32_t ptmsi = 0x00001234; + uint32_t ptmsi_sig = 0x556677; uint32_t rand_tlli = 0x80001234; char *imsi = "1234567890"; char *imei = "42342342342342"; @@ -388,6 +392,7 @@ OSMO_ASSERT(gmm_prim); gmm_prim->gmmsm.establish_req.attach_type = OSMO_GPRS_GMM_ATTACH_TYPE_GPRS; gmm_prim->gmmsm.establish_req.ptmsi = ptmsi; + gmm_prim->gmmsm.establish_req.ptmsi_sig = ptmsi_sig; OSMO_STRLCPY_ARRAY(gmm_prim->gmmsm.establish_req.imsi, imsi); OSMO_STRLCPY_ARRAY(gmm_prim->gmmsm.establish_req.imei, imei); OSMO_STRLCPY_ARRAY(gmm_prim->gmmsm.establish_req.imeisv, imeisv); diff --git a/tests/gmm/gmm_prim_test.ok b/tests/gmm/gmm_prim_test.ok index 80d9a2d..cfebbfa 100644 --- a/tests/gmm/gmm_prim_test.ok +++ b/tests/gmm/gmm_prim_test.ok @@ -1,5 +1,5 @@ ==== test_gmm_prim_ms_gmmreg() [start] ==== -test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0x80001234 SAPI=GMM l3=[08 01 04 97 07 00 00 01 0a 00 05 f4 00 00 12 34 00 f0 00 00 00 00 00 e1 ] +test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0x80001234 SAPI=GMM l3=[08 01 04 97 07 00 00 01 0a 00 05 f4 00 00 12 34 00 f0 00 00 00 00 00 19 55 66 77 e1 ] test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0x80001234 SAPI=GMM l3=[08 16 08 42 32 24 43 32 24 43 f2 ] test_gmm_prim_up_cb(): Rx GMMREG-SIM_AUTH.indication ac_ref_nr=2 key_seq=0 rand=e2 a6 f3 f8 bb 9e a7 01 e0 ce 4f 33 64 a9 91 75 test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0xffffffff new_TLLI=0x80001234 @@ -7,13 +7,13 @@ test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0x80001234 new_TLLI=0xea711b41 test_gmm_prim_down_cb(): Rx GMRR-ASSIGN.request old_tlli=0x80001234 new_tlli=0xea711b41 test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[08 03 ] -test_gmm_prim_up_cb(): Rx GMMREG-ATTACH.confirm accepted=1 allocated_ptmsi=0xea711b41 +test_gmm_prim_up_cb(): Rx GMMREG-ATTACH.confirm accepted=1 allocated_ptmsi=0xea711b41 allocated_ptmsi_sig=0xffffffff test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[08 05 20 0a 00 05 f4 ea 71 1b 41 ] test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0xea711b41 new_TLLI=0xffffffff test_gmm_prim_up_cb(): Rx GMMREG-DETACH.confirm detach_type='GPRS detach' ==== test_gmm_prim_ms_gmmreg() [end] ==== ==== test_gmm_prim_ms_gmmsm() [start] ==== -test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0x80001234 SAPI=GMM l3=[08 01 04 97 07 00 00 01 0a 00 05 f4 00 00 12 34 00 f0 00 00 00 00 00 e1 ] +test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0x80001234 SAPI=GMM l3=[08 01 04 97 07 00 00 01 0a 00 05 f4 00 00 12 34 00 f0 00 00 00 00 00 19 55 66 77 e1 ] test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0x80001234 SAPI=GMM l3=[08 16 08 42 32 24 43 32 24 43 f2 ] test_gmm_prim_up_cb(): Rx GMMREG-SIM_AUTH.indication ac_ref_nr=2 key_seq=0 rand=e2 a6 f3 f8 bb 9e a7 01 e0 ce 4f 33 64 a9 91 75 test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0xffffffff new_TLLI=0x80001234 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32802 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ibf12589e7d3029f80b4ced99992155deb9dba036 Gerrit-Change-Number: 32802 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: BTS_Tests: f_TC_speech_rtp(): log channel mode being tested
by fixeria 19 May '23

19 May '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32792 ) Change subject: BTS_Tests: f_TC_speech_rtp(): log channel mode being tested ...................................................................... BTS_Tests: f_TC_speech_rtp(): log channel mode being tested Change-Id: I3781720633af54d19c4a71d64498fb7e4aa4159f Related: OS#6039 --- M bts/BTS_Tests.ttcn 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 34afaca..909a331 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -8217,6 +8217,8 @@ var octetstring pl; timer Td, Tu; + log("Testing channel mode ", g_pars.chan_mode); + f_l1_tune(L1CTL); f_est_dchan(); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32792 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3781720633af54d19c4a71d64498fb7e4aa4159f Gerrit-Change-Number: 32792 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: BTS_Tests: f_rtpem_activate(): pad TCH/FS frames with 'FF'O
by fixeria 19 May '23

19 May '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32793 ) Change subject: BTS_Tests: f_rtpem_activate(): pad TCH/FS frames with 'FF'O ...................................................................... BTS_Tests: f_rtpem_activate(): pad TCH/FS frames with 'FF'O Since recently [1], osmo-bts started to preen incoming FR and EFR RTP frames for SID errors. In other words, if an incoming frame is a SID frame, osmo-bts may modify some bits causing a mismatch on our side. Use 'FF'O as padding pattern for TCH/FS to prevent pseudo-random frames being treated as SID and modified by osmo-bts. Keep using '00'O for other modes, because only TCH/FS specific SID frames must have specific bit positions set to '0'B; for TCH/EFS and TCH/HS it's '1'B. Change-Id: Ib42b783574caf5cbaf64b2eb5dd1d2b2a6637c2f Related: [1] osmo-bts.git I89df2f12c49dd5378667cf149d19bde654f80134 Related: OS#6039 --- M bts/BTS_Tests.ttcn 1 file changed, 23 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve falconia: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 909a331..8fc0fa9 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -2609,10 +2609,11 @@ /* Step 1: configure the RTP parameters */ var integer payload_len := 0; var octetstring hdr := ''O; + var OCT1 pad := '00'O; select (g_pars.chan_mode) { case (tr_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM1)) /* TCH/FS */ - { payload_len := 33; hdr := 'D0'O; } + { payload_len := 33; hdr := 'D0'O; pad := 'FF'O; } case (tr_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM1)) /* TCH/HS */ { payload_len := 15; hdr := '00'O; } case (tr_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM2)) /* TCH/EFS */ @@ -2636,7 +2637,7 @@ } /* Pad the payload to conform the expected length */ - payload := f_pad_oct(hdr & payload, payload_len, '00'O); + payload := f_pad_oct(hdr & payload, payload_len, pad); cfg.tx_payloads[0].fixed_payload := payload; f_rtpem_configure(RTPEM_CTRL, cfg); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32793 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib42b783574caf5cbaf64b2eb5dd1d2b2a6637c2f Gerrit-Change-Number: 32793 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: BTS_Tests: f_TC_speech_rtp(): log channel mode being tested
by fixeria 19 May '23

19 May '23
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32792 ) Change subject: BTS_Tests: f_TC_speech_rtp(): log channel mode being tested ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32792 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3781720633af54d19c4a71d64498fb7e4aa4159f Gerrit-Change-Number: 32792 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 May 2023 16:29:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-gprs[master]: rlcmac: Fix TFI not assigned during UL TBF CCCH ImmAss
by pespin 19 May '23

19 May '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32801 ) Change subject: rlcmac: Fix TFI not assigned during UL TBF CCCH ImmAss ...................................................................... rlcmac: Fix TFI not assigned during UL TBF CCCH ImmAss Change-Id: Ieda67c27e2cfd75922efa9613cafce7adb639e5c --- M src/rlcmac/tbf_ul_ass_fsm.c M tests/rlcmac/rlcmac_prim_test.err 2 files changed, 26 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/01/32801/1 diff --git a/src/rlcmac/tbf_ul_ass_fsm.c b/src/rlcmac/tbf_ul_ass_fsm.c index f9ccfcb..103af97 100644 --- a/src/rlcmac/tbf_ul_ass_fsm.c +++ b/src/rlcmac/tbf_ul_ass_fsm.c @@ -145,12 +145,14 @@ LOGPFSML(ctx->fi, LOGL_ERROR, "ImmAss SingleBlock (2phase access) not yet supported!\n"); return -ENOTSUP; case 1: /* d->iaro->u.hh.u.UplinkDownlinkAssignment.ul_dl.Packet_Uplink_ImmAssignment.Access.DynamicOrFixedAllocation.* (GPRS_DynamicOrFixedAllocation_t) */ + ctx->phase1_alloc.ul_tfi = d->iaro->u.hh.u.UplinkDownlinkAssignment.ul_dl.Packet_Uplink_ImmAssignment.Access.DynamicOrFixedAllocation.TFI_ASSIGNMENT; ctx->ul_tbf->tx_cs = d->iaro->u.hh.u.UplinkDownlinkAssignment.ul_dl.Packet_Uplink_ImmAssignment.Access.DynamicOrFixedAllocation.CHANNEL_CODING_COMMAND + 1; ctx->tbf_starting_time_exists = d->iaro->u.hh.u.UplinkDownlinkAssignment.ul_dl.Packet_Uplink_ImmAssignment.Access.DynamicOrFixedAllocation.Exist_TBF_STARTING_TIME; if (ctx->tbf_starting_time_exists) ctx->tbf_starting_time = TBF_StartingTime_to_fn(&d->iaro->u.hh.u.UplinkDownlinkAssignment.ul_dl.Packet_Uplink_ImmAssignment.Access.DynamicOrFixedAllocation.TBF_STARTING_TIME, d->fn); - LOGPFSML(ctx->fi, LOGL_INFO, "ImmAss initial CS=%s\n", gprs_rlcmac_mcs_name(ctx->ul_tbf->tx_cs)); + LOGPFSML(ctx->fi, LOGL_INFO, "ImmAss TFI=%u initCS=%s startTimeFN=%u\n", + ctx->phase1_alloc.ul_tfi, gprs_rlcmac_mcs_name(ctx->ul_tbf->tx_cs), ctx->tbf_starting_time); switch (d->iaro->u.hh.u.UplinkDownlinkAssignment.ul_dl.Packet_Uplink_ImmAssignment.Access.DynamicOrFixedAllocation.UnionType) { case 0: /* d->iaro->u.hh.u.UplinkDownlinkAssignment.ul_dl.Packet_Uplink_ImmAssignment.Access.DynamicOrFixedAllocation.Allocation.DynamicAllocation (DynamicAllocation_t) */ /* TODO: 2phase access support: Schedule transmit of PKT_RES_REQ on FN=(GPRS_SingleBlockAllocation_t).TBF_STARTING_TIME */ diff --git a/tests/rlcmac/rlcmac_prim_test.err b/tests/rlcmac/rlcmac_prim_test.err index bf0506d..d55626f 100644 --- a/tests/rlcmac/rlcmac_prim_test.err +++ b/tests/rlcmac/rlcmac_prim_test.err @@ -11,7 +11,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -81,7 +81,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -102,7 +102,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -123,7 +123,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -144,7 +144,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -173,7 +173,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -208,7 +208,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -240,7 +240,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -272,7 +272,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -314,7 +314,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -428,7 +428,7 @@ DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_DATA.request DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -454,7 +454,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -517,7 +517,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL @@ -624,7 +624,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS -DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss TFI=0 initCS=CS-2 startTimeFN=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32801 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ieda67c27e2cfd75922efa9613cafce7adb639e5c Gerrit-Change-Number: 32801 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmocom-bb[master]: layer23: subscriber: Implement LOCIGPRS read/write for testcard backend
by pespin 19 May '23

19 May '23
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmocom-bb/+/32800 ) Change subject: layer23: subscriber: Implement LOCIGPRS read/write for testcard backend ...................................................................... layer23: subscriber: Implement LOCIGPRS read/write for testcard backend Change-Id: Ibcaaf430587a3a270398e9a9eeab6ee98514c3c8 --- M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/include/osmocom/bb/common/sim.h M src/host/layer23/include/osmocom/bb/common/subscriber.h M src/host/layer23/src/common/subscriber.c M src/host/layer23/src/common/vty.c 5 files changed, 215 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/00/32800/2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibcaaf430587a3a270398e9a9eeab6ee98514c3c8 Gerrit-Change-Number: 32800 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmocom-bb[master]: layer23: subscriber: Implement LOCIGPRS read/write for testcard backend
by pespin 19 May '23

19 May '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32800 ) Change subject: layer23: subscriber: Implement LOCIGPRS read/write for testcard backend ...................................................................... layer23: subscriber: Implement LOCIGPRS read/write for testcard backend Change-Id: Ibcaaf430587a3a270398e9a9eeab6ee98514c3c8 --- M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/include/osmocom/bb/common/sim.h M src/host/layer23/include/osmocom/bb/common/subscriber.h M src/host/layer23/src/common/subscriber.c M src/host/layer23/src/common/vty.c 5 files changed, 214 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/00/32800/1 diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h index f24b006..56475e3 100644 --- a/src/host/layer23/include/osmocom/bb/common/settings.h +++ b/src/host/layer23/include/osmocom/bb/common/settings.h @@ -5,6 +5,9 @@ #include <osmocom/core/linuxlist.h> #include <osmocom/gsm/protocol/gsm_23_003.h> #include <osmocom/gsm/gsm23003.h> +#include <osmocom/gsm/gsm48.h> + +#include <osmocom/bb/common/sim.h> struct osmocom_ms; struct osmobb_apn; @@ -69,6 +72,14 @@ uint16_t lac; bool imsi_attached; bool always_search_hplmn; + struct { + bool valid; + uint32_t ptmsi; /* invalid tmsi: GSM_RESERVED_TMSI */ + uint32_t ptmsi_sig; /* P-TMSI signature, 3 bytes */ + struct gprs_ra_id rai; + enum gsm1111_ef_locigprs_rau_status gu_state; /* GU, TS 24.008 */ + bool imsi_attached; + } locigprs; }; struct gsm_settings { diff --git a/src/host/layer23/include/osmocom/bb/common/sim.h b/src/host/layer23/include/osmocom/bb/common/sim.h index 8d934d6..8aae1fc 100644 --- a/src/host/layer23/include/osmocom/bb/common/sim.h +++ b/src/host/layer23/include/osmocom/bb/common/sim.h @@ -20,6 +20,8 @@ #include <osmocom/gsm/protocol/gsm_04_08.h> #include <osmocom/core/endian.h> +struct osmocom_ms; + /* 9.2 commands */ #define GSM1111_CLASS_GSM 0xa0 #define GSM1111_INST_SELECT 0xa4 diff --git a/src/host/layer23/include/osmocom/bb/common/subscriber.h b/src/host/layer23/include/osmocom/bb/common/subscriber.h index 232018d..d36b4c6 100644 --- a/src/host/layer23/include/osmocom/bb/common/subscriber.h +++ b/src/host/layer23/include/osmocom/bb/common/subscriber.h @@ -112,6 +112,7 @@ struct { uint8_t gu_state; /* GU, TS 24.008 */ + bool rai_valid; struct gprs_ra_id rai; uint32_t ptmsi; /* invalid tmsi: GSM_RESERVED_TMSI */ uint32_t ptmsi_sig; /* P-TMSI signature, 3 bytes */ diff --git a/src/host/layer23/src/common/subscriber.c b/src/host/layer23/src/common/subscriber.c index 6922998..3545d9c 100644 --- a/src/host/layer23/src/common/subscriber.c +++ b/src/host/layer23/src/common/subscriber.c @@ -67,6 +67,7 @@ static int gsm_subscr_write_loci_simcard(struct osmocom_ms *ms); static int gsm_subscr_write_locigprs_simcard(struct osmocom_ms *ms); +static int gsm_subscr_write_locigprs_testcard(struct osmocom_ms *ms); static int gsm_subscr_sim_pin_simcard(struct osmocom_ms *ms, const char *pin1, const char *pin2, int8_t mode); @@ -331,8 +332,7 @@ case GSM_SIM_TYPE_SAP: return gsm_subscr_write_locigprs_simcard(ms); case GSM_SIM_TYPE_TEST: - LOGP(DMM, LOGL_NOTICE, "Updating LOCIGPRS on test SIM: not implemented!\n"); - return 0; /* TODO */ + return gsm_subscr_write_locigprs_testcard(ms); default: OSMO_ASSERT(0); } @@ -582,7 +582,6 @@ memcpy(&subscr->lai.plmn, &set->test_sim.rplmn, sizeof(struct osmo_plmn_id)); subscr->lai.lac = set->test_sim.lac; subscr->tmsi = set->test_sim.tmsi; - subscr->gprs.ptmsi = GSM_RESERVED_TMSI; subscr->always_search_hplmn = set->test_sim.always_search_hplmn; subscr->t6m_hplmn = 1; /* try to find home network every 6 min */ OSMO_STRLCPY_ARRAY(subscr->imsi, set->test_sim.imsi); @@ -592,13 +591,24 @@ else subscr->ustate = GSM_SIM_U2_NOT_UPDATED; - LOGP(DMM, LOGL_INFO, "(ms %s) Inserting test card (IMSI=%s %s, %s)\n", + /* GPRS related: */ + subscr->gprs.ptmsi = GSM_RESERVED_TMSI; + subscr->gprs.imsi_attached = set->test_sim.locigprs.imsi_attached; + subscr->gprs.rai_valid = set->test_sim.locigprs.valid; + memcpy(&subscr->gprs.rai, &set->test_sim.locigprs.rai, sizeof(subscr->gprs.rai)); + + if (subscr->gprs.imsi_attached && subscr->gprs.rai_valid) + subscr->ustate = GSM_SIM_U1_UPDATED; + else + subscr->ustate = GSM_SIM_U2_NOT_UPDATED; + + LOGP(DMM, LOGL_INFO, "(ms %s) Inserting test card (IMSI=%s, %s, %s)\n", ms->name, subscr->imsi, gsm_imsi_mcc(subscr->imsi), gsm_imsi_mnc(subscr->imsi)); if (subscr->plmn_valid) LOGP(DMM, LOGL_INFO, "-> Test card registered to %s" - "(%s, %s)\n", osmo_lai_name(&subscr->lai), + " (%s, %s)\n", osmo_lai_name(&subscr->lai), gsm_get_mcc(subscr->lai.plmn.mcc), gsm_get_mnc(&subscr->lai.plmn)); else @@ -606,6 +616,16 @@ if (subscr->imsi_attached) LOGP(DMM, LOGL_INFO, "-> Test card attached\n"); + + /* GPRS:*/ + if (subscr->gprs.rai_valid) + LOGP(DMM, LOGL_INFO, "-> Test card GPRS registered to %s\n", + osmo_rai_name(&subscr->gprs.rai)); + else + LOGP(DMM, LOGL_INFO, "-> Test card not GPRS registered\n"); + if (subscr->gprs.imsi_attached) + LOGP(DMM, LOGL_INFO, "-> Test card GPRS attached\n"); + /* insert card */ osmo_signal_dispatch(SS_L23_SUBSCR, S_L23_SUBSCR_SIM_ATTACHED, ms); return 0; @@ -642,6 +662,56 @@ return 0; } +/* update LOCIGPRS on test SIM */ +int gsm_subscr_write_locigprs_testcard(struct osmocom_ms *ms) +{ + struct gsm_subscriber *subscr = &ms->subscr; + struct msgb *nmsg; + struct sim_hdr *nsh; + struct gsm1111_ef_locigprs *locigprs; + + /* skip, if no real valid SIM */ + if (!GSM_SIM_IS_READER(subscr->sim_type) || !subscr->sim_valid) + return 0; + + LOGP(DMM, LOGL_INFO, "Updating LOCI on SIM\n"); + + /* write to SIM */ + nmsg = gsm_sim_msgb_alloc(subscr->sim_handle_update, + SIM_JOB_UPDATE_BINARY); + if (!nmsg) + return -ENOMEM; + nsh = (struct sim_hdr *) nmsg->data; + nsh->path[0] = 0x7f20; + nsh->path[1] = 0; + nsh->file = 0x6f53; + locigprs = (struct gsm1111_ef_locigprs *)msgb_put(nmsg, sizeof(*locigprs)); + + /* P-TMSI, P-TMSI signature */ + locigprs->ptmsi = htonl(subscr->gprs.ptmsi); + locigprs->ptmsi_sig_hi = htonl(subscr->gprs.ptmsi) >> 8; + locigprs->ptmsi_sig_lo = htonl(subscr->gprs.ptmsi) & 0xff; + + /* RAI */ + gsm48_encode_ra(&locigprs->rai, &subscr->gprs.rai); + + /* location update status */ + switch (subscr->gprs.gu_state) { + case GSM_SIM_GU1_UPDATED: + locigprs->rau_status = GSM1111_EF_LOCIGPRS_RAU_ST_UPDATED; + break; + case GSM_SIM_GU3_ROAMING_NA: + locigprs->rau_status = GSM1111_EF_LOCIGPRS_RAU_ST_RA_NOT_ALLOWED; + break; + default: + locigprs->rau_status = GSM1111_EF_LOCIGPRS_RAU_ST_NOT_UPDATED; + } + + sim_job(ms, nmsg); + + return 0; +} + /******************** * simcard backend ********************/ diff --git a/src/host/layer23/src/common/vty.c b/src/host/layer23/src/common/vty.c index 44fc053..526db6f 100644 --- a/src/host/layer23/src/common/vty.c +++ b/src/host/layer23/src/common/vty.c @@ -1127,6 +1127,95 @@ return CMD_SUCCESS; } +static int _testsim_locigprs_cmd(struct vty *vty, int argc, const char *argv[], bool attached) +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + struct osmo_plmn_id plmn; + + if (osmo_mcc_from_str(argv[0], &plmn.mcc) < 0) { + vty_out(vty, "Given MCC invalid%s", VTY_NEWLINE); + return CMD_WARNING; + } + if (osmo_mnc_from_str(argv[1], &plmn.mnc, &plmn.mnc_3_digits) < 0) { + vty_out(vty, "Given MNC invalid%s", VTY_NEWLINE); + return CMD_WARNING; + } + set->test_sim.locigprs.valid = true; + set->test_sim.locigprs.rai.mcc = plmn.mcc; + set->test_sim.locigprs.rai.mnc = plmn.mnc; + set->test_sim.locigprs.rai.mnc_3_digits = plmn.mnc_3_digits; + + if (argc >= 3) + set->test_sim.locigprs.rai.lac = strtoul(argv[2], NULL, 16); + else + set->test_sim.locigprs.rai.lac = 0xfffe; + + if (argc >= 4) + set->test_sim.locigprs.rai.rac = strtoul(argv[3], NULL, 16); + else + set->test_sim.locigprs.rai.rac = 0xff; + + if (argc >= 5) + set->test_sim.locigprs.ptmsi = strtoul(argv[4], NULL, 16); + else + set->test_sim.locigprs.ptmsi = GSM_RESERVED_TMSI; + + if (argc >= 6) + set->test_sim.locigprs.ptmsi_sig = strtoul(argv[5], NULL, 16); + else + set->test_sim.locigprs.ptmsi_sig = GSM_RESERVED_TMSI; + + set->test_sim.locigprs.imsi_attached = attached; + + l23_vty_restart_required_warn(vty, ms); + + return CMD_SUCCESS; +} + +DEFUN(cfg_testsim_no_locigprs, cfg_testsim_no_locigprs_cmd, "no locigprs", + NO_STR "Unset EF LOCIgprs\n") +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + + set->test_sim.locigprs.valid = false; + set->test_sim.locigprs.ptmsi = GSM_RESERVED_TMSI; + set->test_sim.locigprs.ptmsi_sig = GSM_RESERVED_TMSI; + set->test_sim.locigprs.rai.mcc = 1; + set->test_sim.locigprs.rai.mnc = 1; + set->test_sim.locigprs.rai.mnc_3_digits = false; + set->test_sim.locigprs.rai.lac = 0x0000; + set->test_sim.locigprs.rai.rac = 0x0000; + + l23_vty_restart_required_warn(vty, ms); + + return CMD_SUCCESS; +} + +DEFUN(cfg_testsim_locigprs, cfg_testsim_locigprs_cmd, + "locigprs MCC MNC [LAC] [RAC] [PTMSI] [PTMSISIG]", + "Set EF LOCIgprs\nMobile Country Code\nMobile Network Code\n" + "Optionally set location area code\n" + "Optionally set routing area code\n" + "Optionally set current assigned P-TMSI\n" + "Optionally set current assigned P-TMSI signature\n") +{ + return _testsim_locigprs_cmd(vty, argc, argv, false); +} + +DEFUN(cfg_testsim_locigprs_att, cfg_testsim_locigprs_att_cmd, + "locigprs MCC MNC LAC RAC PTMSI PTMSISIG attached", + "Set EF LOCIgprs\nMobile Country Code\nMobile Network Code\n" + "Set location area code\n" + "Set routing area code\n" + "Set current assigned P-TMSI\n" + "Set current assigned P-TMSI signature\n" + "Indicate to MM that card is already attached\n") +{ + return _testsim_locigprs_cmd(vty, argc, argv, true); +} + static int l23_vty_config_write_gsmtap_node(struct vty *vty) { const char *chan_buf; @@ -1213,10 +1302,34 @@ } else if (!l23_vty_hide_default) vty_out(vty, "%s no rplmn%s", prefix, VTY_NEWLINE); + if (!l23_vty_hide_default || set->test_sim.always_search_hplmn) vty_out(vty, "%s hplmn-search %s%s", prefix, set->test_sim.always_search_hplmn ? "everywhere" : "foreign-country", VTY_NEWLINE); + + if (set->test_sim.locigprs.valid) { + vty_out(vty, "%s locigprs %s %s", prefix, + osmo_mcc_name(set->test_sim.locigprs.rai.mcc), + osmo_mnc_name(set->test_sim.locigprs.rai.mnc, + set->test_sim.locigprs.rai.mnc_3_digits)); + if (set->test_sim.locigprs.rai.lac > 0x0000 && set->test_sim.locigprs.rai.lac < 0xfffe) { + vty_out(vty, " 0x%04x", set->test_sim.locigprs.rai.lac); + if (set->test_sim.locigprs.rai.rac < 0xff) { + vty_out(vty, " 0x%02x", set->test_sim.locigprs.rai.rac); + if (set->test_sim.locigprs.ptmsi != GSM_RESERVED_TMSI) { + vty_out(vty, " 0x%08x 0x%06x", + set->test_sim.locigprs.ptmsi, + set->test_sim.locigprs.ptmsi_sig); + if (set->test_sim.locigprs.imsi_attached) + vty_out(vty, " attached"); + } + } + } + vty_out(vty, "%s", VTY_NEWLINE); + } else + if (!l23_vty_hide_default) + vty_out(vty, "%s no locigprs%s", prefix, VTY_NEWLINE); return CMD_SUCCESS; } @@ -1368,6 +1481,9 @@ install_element(TESTSIM_NODE, &cfg_testsim_rplmn_cmd); install_element(TESTSIM_NODE, &cfg_testsim_rplmn_att_cmd); install_element(TESTSIM_NODE, &cfg_testsim_hplmn_cmd); + install_element(TESTSIM_NODE, &cfg_testsim_no_locigprs_cmd); + install_element(TESTSIM_NODE, &cfg_testsim_locigprs_cmd); + install_element(TESTSIM_NODE, &cfg_testsim_locigprs_att_cmd); install_element(MS_NODE, &cfg_ms_shutdown_cmd); install_element(MS_NODE, &cfg_ms_shutdown_force_cmd); install_element(MS_NODE, &cfg_ms_no_shutdown_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibcaaf430587a3a270398e9a9eeab6ee98514c3c8 Gerrit-Change-Number: 32800 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • ...
  • 259
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.