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

July 2023

  • 1 participants
  • 3051 discussions
[S] Change in osmo-ttcn3-hacks[master]: BSC_Tests: Fix test case TC_err_84_unknown
by jolly 25 Jul '23

25 Jul '23
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33925 ) Change subject: BSC_Tests: Fix test case TC_err_84_unknown ...................................................................... BSC_Tests: Fix test case TC_err_84_unknown The test cases used UPLINK RELEASE message as test for an unspported message. This message is supported and does not trigger the expected RR STATUS message. The fix uses the unsupported DTM ASSIGNMENT FAILURE message. Change-Id: I35877574cf4459332229e3b941918bc0a23b939f --- M bsc/BSC_Tests.ttcn 1 file changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/25/33925/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index a9cfa03..75f0ca2 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -5656,10 +5656,12 @@ f_shutdown_helper(); } - /* 24.008 8.4 Unknown message must trigger RR STATUS */ private function f_tc_err_84_unknown_msg(charstring id) runs on MSC_ConnHdlr { - f_est_single_l3(ts_RRM_UL_REL('00'O)); + var template PDU_ML3_MS_NW msg := ts_RRM_UL_REL('00'O); + msg.msgs.rrm.dTM_AssignmentFailure.messageType := '01001000'B; + msg.msgs.rrm.dTM_AssignmentFailure.rR_Cause.valuePart := '00'O; + f_est_single_l3(msg); timer T := 3.0 alt { [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch tr_RRM_RR_STATUS)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33925 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: I35877574cf4459332229e3b941918bc0a23b939f Gerrit-Change-Number: 33925 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-pcu[master]: gprs_rlc_ul_window: Mark received BSNs falling out of the V(N)/RBB wh...
by pespin 25 Jul '23

25 Jul '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33924 ) Change subject: gprs_rlc_ul_window: Mark received BSNs falling out of the V(N)/RBB when V(R) is raised ...................................................................... gprs_rlc_ul_window: Mark received BSNs falling out of the V(N)/RBB when V(R) is raised This is a port of libosmo-gprs.git commit 49535bec37caddcea5718ed4e526c477c71f1b3a applied to osmo-pcu. Problem this patch is fixing: The current RLCMAC code is never invalidating the BSNs which have been received after they are not needed. This is somehow workaround by the following check when eg BSN wraps around 127->0 and the BSN=0 is received: """" rcv_data_block_acknowledged() m_window.m_v_n.is_received(rdbi->bsn) /* Offset to the end of the received window */ offset_v_r = (m_v_r - 1 - bsn) & mod_sns(); return m_v_n.is_received(bsn) && offset_v_r < ws(); """ The first m_v_n_is_received() would return true because the BSN has never been invalidated, which is wrong, but fortunately the extra check "offset_v_r < ws()" returns > ws() since: v_r=0, bsn=0: "(0 - 1 - 0) & 127" ----> 0xffff & 0x007f ---> 0x007f > 64 So thanks to the above the BSN is considered not received, but looking at the V(N) array would say the opposite. Hence, this commit aims at fixing the V(N) array to contain proper values (marked "invalid") for BSNs becoming out of the window when it rolls forward. Explanation of the solution: The V(N) array contains the status of the previous WS (64 in GPRS) data blocks. This array is used to construct the RRB signaled to the peer during PKT UL ACK/NACK messages together with the SSN (start sequence number), which in our case is mainly V(R), aka one block higher than the highest received block in the rx window. Hence, whenever PKT UL ACK/NACK is transmitted, it contains an RRB ranging [V(R)-1,...V(R)-WS)] mod SNS (SNS=128 in GPRS). The receive window is basically [V(Q) <= BSN < V(R)] mod SNS, as is of size 64. The V(R) is increased whenever a highest new block arrives which is in the receive window (guaranteeing it will be increased to at most V(Q)+64. Since we are only announcing state of blocks from V(R)..V(R)-WS, and blocks received which are before that BSN are dropped since don't fall inside the rx window, we can securely mark as invalid those blocks falling behind V(R)-WS whenever we increase V(R). Related: OS#6102 Change-Id: I5ef4dcb0c5eac07a892114897f9e4f565b1dcc2c --- M src/rlc.cpp M src/rlc.h M src/tbf_ul.cpp 3 files changed, 69 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/24/33924/1 diff --git a/src/rlc.cpp b/src/rlc.cpp index a082597..57d5caf 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -268,8 +268,14 @@ /* Positive offset, so raise. */ if (offset_v_r < (sns() >> 1)) { while (offset_v_r--) { - if (offset_v_r) /* all except the received block */ - m_v_n.mark_missing(v_r()); + const uint16_t _v_r = v_r(); + const uint16_t bsn_no_longer_in_ws = mod_sns(_v_r - ws()); + LOGP(DRLCMACUL, LOGL_DEBUG, "- Mark BSN %u as INVALID\n", bsn_no_longer_in_ws); + m_v_n.mark_invalid(bsn_no_longer_in_ws); + if (offset_v_r) {/* all except the received block */ + LOGP(DRLCMACUL, LOGL_DEBUG, "- Mark BSN %u as MISSING\n", _v_r); + m_v_n.mark_missing(_v_r); + } raise_v_r_to(1); } LOGP(DRLCMACUL, LOGL_DEBUG, "- Raising V(R) to %d\n", v_r()); diff --git a/src/rlc.h b/src/rlc.h index d4a7a5e..0a29733 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -329,6 +329,7 @@ void mark_received(int bsn); void mark_missing(int bsn); + void mark_invalid(int bsn); bool is_received(int bsn) const; @@ -649,6 +650,11 @@ return mark(bsn, GPRS_RLC_UL_BSN_MISSING); } +inline void gprs_rlc_v_n::mark_invalid(int bsn) +{ + return mark(bsn, GPRS_RLC_UL_BSN_INVALID); +} + inline bool gprs_rlc_v_n::is_received(int bsn) const { return is_state(bsn, GPRS_RLC_UL_BSN_RECEIVED); diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 5ae0d49..3746130 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -303,7 +303,7 @@ rdbi->bsn, m_window.v_q(), m_window.mod_sns(m_window.v_q() + ws - 1)); continue; - } else if (m_window.is_received(rdbi->bsn)) { + } else if (m_window.m_v_n.is_received(rdbi->bsn)) { LOGPTBFUL(this, LOGL_DEBUG, "BSN %d already received\n", rdbi->bsn); continue; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5ef4dcb0c5eac07a892114897f9e4f565b1dcc2c Gerrit-Change-Number: 33924 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: pcu: Introduce test TC_ul_tbf_bsn_wraparound_gprs
by pespin 25 Jul '23

25 Jul '23
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33923 ) Change subject: pcu: Introduce test TC_ul_tbf_bsn_wraparound_gprs ...................................................................... pcu: Introduce test TC_ul_tbf_bsn_wraparound_gprs Related: OS#6102 Change-Id: I253e3607b75dd1a850c53f284fadf753dd49c247 --- M pcu/PCU_Tests.ttcn M pcu/expected-results.xml 2 files changed, 165 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/23/33923/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33923 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: I253e3607b75dd1a850c53f284fadf753dd49c247 Gerrit-Change-Number: 33923 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: pcu: Introduce test TC_ul_tbf_bsn_wraparound_gprs
by pespin 25 Jul '23

25 Jul '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33923 ) Change subject: pcu: Introduce test TC_ul_tbf_bsn_wraparound_gprs ...................................................................... pcu: Introduce test TC_ul_tbf_bsn_wraparound_gprs Related: OS#6102 Change-Id: I253e3607b75dd1a850c53f284fadf753dd49c247 --- M pcu/PCU_Tests.ttcn 1 file changed, 164 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/23/33923/1 diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 2598e7b..c360e97 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -3596,6 +3596,159 @@ f_TC_ul_tbf_reestablish_with_pkt_dl_ack_nack(true); } +/* Test UL data blocks BSN 0..127 and then continue again at BSN 0... up to 300 + * BSNs in total to test several wrap arounds. */ +testcase TC_ul_tbf_bsn_wraparound_gprs() runs on RAW_PCU_Test_CT +{ + var PCUIF_info_ind info_ind; + var RlcmacDlBlock dl_block; + var octetstring payload; + var template (value) RlcmacUlBlock ul_data; + var template (value) LlcBlockHdr blk_hdr; + var template (value) LlcBlocks blocks; + var uint32_t sched_fn; + var uint32_t dl_fn; + var template (value) TsTrxBtsNum nr; + var BTS_PDTCH_Block data_msg; + var template RlcmacDlBlock acknack_tmpl; + var GprsMS ms; + var integer blocks_sent := 0; + var integer blocks_received := 0; + const integer target_bsn_set := 300; + + /* Initialize NS/BSSGP side */ + f_init_bssgp(); + /* Initialize GPRS MS side */ + f_init_gprs_ms(); + ms := g_ms[0]; /* We only use first MS in this test */ + + /* Initialize the PCU interface abstraction */ + info_ind := valueof(ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS)); + f_init_raw(testcasename(), info_ind); + + /* Establish BSSGP connection to the PCU */ + f_bssgp_establish(); + f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli); + + /* Establish an Uplink TBF */ + f_ms_establish_ul_tbf(ms); + + /* Wait until PCU starts requesting for UL block on this TBF: */ + dl_fn := f_ms_wait_usf(ms); + sched_fn := f_next_pdch_block(dl_fn); + + /* Send one UL block (with TLLI since we are in One-Phase Access + contention resolution) and make sure it is ACKED fine. */ + payload := f_rnd_octstring(16); /* 16 bytes fills the llc block (because TLLI takes 4 bytes) */ + blk_hdr := t_RLCMAC_LLCBLOCK_HDR(length_ind := lengthof(payload), + more := false, e := true); + blocks := { t_RLCMAC_LLCBLOCK(payload, blk_hdr) }; + /* Set CV = 15 to signal there's still more than BS_CV_MAX blocks to be sent */ + ul_data := t_RLCMAC_UL_DATA_TLLI(cs := ms.ul_tbf.tx_cs_mcs, + tfi := ms.ul_tbf.tfi, + cv := 15, + bsn := ms.ul_tbf.bsn, + blocks := blocks, + tlli := ms.tlli); + f_ultbf_inc_bsn(ms.ul_tbf); + f_ms_tx_ul_block(ms, ul_data, f_next_pdch_block(sched_fn)); + blocks_sent := blocks_sent + 1; + + /* UL block should be received in SGSN */ + BSSGP[0].receive(tr_BSSGP_UL_UD(ms.tlli, mp_gb_cfg.bvc[0].cell_id)); + + acknack_tmpl := tr_RLCMAC_UL_ACK_NACK_GPRS(ms.ul_tbf.tfi, + tr_UlAckNackGprs(ms.tlli, + tr_AckNackDescription(final_ack := '0'B))) + f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn, acknack_tmpl); + + ul_data := t_RLCMAC_UL_DATA(cs := ms.ul_tbf.tx_cs_mcs, + tfi := ms.ul_tbf.tfi, + cv := 15, + bsn := ms.ul_tbf.bsn, + blocks := blocks); + + nr := f_ms_tx_TsTrxBtsNum(ms); + BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr, + sapi := PCU_IF_SAPI_PDTCH, fn := 0, + arfcn := f_trxnr2arfcn(valueof(nr.trx_nr)), + block_nr := nr.blk_nr)); + alt { + [] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr, + tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH), + tr_RLCMAC_UL_ACK_NACK_GPRS)) -> value data_msg { + + if (f_dl_block_rrbp_valid(data_msg.dl_block)) { + var uint32_t ack_fn := f_dl_block_ack_fn(data_msg.dl_block, data_msg.raw.fn) + log("ACKING FN ", data_msg.raw.fn, " on FN ", ack_fn); + f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), ack_fn); + } + ul_data.data.mac_hdr.bsn := ms.ul_tbf.bsn; + f_ms_tx_ul_block(ms, ul_data, 0); + f_ultbf_inc_bsn(ms.ul_tbf); + blocks_sent := blocks_sent + 1; + + if (blocks_sent == target_bsn_set) { + break; + } + + nr := f_ms_tx_TsTrxBtsNum(ms); + BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr, + sapi := PCU_IF_SAPI_PDTCH, fn := 0, + arfcn := f_trxnr2arfcn(valueof(nr.trx_nr)), + block_nr := nr.blk_nr)); + repeat; + } + [] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr, + tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH), + tr_RLCMAC_DL_DUMMY_CTRL)) -> value data_msg { + + ul_data.data.mac_hdr.bsn := ms.ul_tbf.bsn; + f_ms_tx_ul_block(ms, ul_data, 0); + f_ultbf_inc_bsn(ms.ul_tbf); + blocks_sent := blocks_sent + 1; + + if (blocks_sent == target_bsn_set) { + break; + } + + nr := f_ms_tx_TsTrxBtsNum(ms); + BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr, + sapi := PCU_IF_SAPI_PDTCH, fn := 0, + arfcn := f_trxnr2arfcn(valueof(nr.trx_nr)), + block_nr := nr.blk_nr)); + repeat; + } + [] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr, + tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH), + omit)) -> value data_msg { + nr := f_ms_tx_TsTrxBtsNum(ms); + BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr, + sapi := PCU_IF_SAPI_PDTCH, fn := 0, + arfcn := f_trxnr2arfcn(valueof(nr.trx_nr)), + block_nr := nr.blk_nr)); + repeat; + } + [] BTS.receive { + setverdict(fail, "Unexpected BTS message"); + f_shutdown(__BFILE__, __LINE__); + } + [] BSSGP[0].receive(tr_BSSGP_UL_UD(ms.tlli, mp_gb_cfg.bvc[0].cell_id)) { + blocks_received := blocks_received + 1; + repeat; + } + } + + /* Validate most part of them were accepted and forwarded: */ + if (blocks_received < target_bsn_set * 95 / 100) { + setverdict(fail, "Forwarded ", blocks_received, " out of ", target_bsn_set, " transmitted"); + f_shutdown(__BFILE__, __LINE__); + } + log("Forwarded ", blocks_received, " out of ", target_bsn_set, " transmitted"); + + f_shutdown(__BFILE__, __LINE__, final := true); +} + /* Test CS paging over the BTS<->PCU socket. * When a (class B or C, not A) MS has an active TBF (or is on the PDCH), the MS can not react on CS paging over CCCH. * Paging should be send on the PACCH. @@ -7258,6 +7411,7 @@ execute( TC_ul_flow_multiple_llc_blocks() ); execute( TC_dl_no_ack_retrans_imm_ass() ); execute( TC_dl_llc_sapi_priority() ); + execute( TC_ul_tbf_bsn_wraparound_gprs()); execute( TC_paging_cs_from_bts() ); execute( TC_paging_cs_from_sgsn_sign_ptmsi() ); execute( TC_paging_cs_from_sgsn_sign() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33923 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: I253e3607b75dd1a850c53f284fadf753dd49c247 Gerrit-Change-Number: 33923 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bts[master]: ASCI: Enable UPLINK ACCESS on various BTS models
by pespin 25 Jul '23

25 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33833 ) Change subject: ASCI: Enable UPLINK ACCESS on various BTS models ...................................................................... ASCI: Enable UPLINK ACCESS on various BTS models UPLINK ACCESS (RACH on TCH) was enabled for osmo-bts-sysmo only. Now it is also enabled for: * osmo-bts-lc15 * osmo-bts-oc2g * osmo-bts-trx * osmo-bts-virtual Change-Id: Iae0db6bfcf6629c114436a79648e832c82835abe --- M src/osmo-bts-lc15/oml.c M src/osmo-bts-oc2g/oml.c M src/osmo-bts-trx/l1_if.c M src/osmo-bts-virtual/l1_if.c 4 files changed, 24 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo-bts-lc15/oml.c b/src/osmo-bts-lc15/oml.c index f6abc1b..892afd5 100644 --- a/src/osmo-bts-lc15/oml.c +++ b/src/osmo-bts-lc15/oml.c @@ -1164,7 +1164,7 @@ /* For handover, always start the main channel immediately. lchan->want_dl_sacch_active indicates whether dl * SACCH should be activated. Also, for HO, start the RACH SAPI. */ - if (lchan->ho.active == HANDOVER_ENABLED) + if (lchan->ho.active == HANDOVER_ENABLED || rsl_chan_rt_is_asci(lchan->rsl_chan_rt)) enqueue_sapi_act_cmd(lchan, GsmL1_Sapi_Rach, GsmL1_Dir_RxUplink); for (i = 0; i < s4l->num_sapis; i++) { diff --git a/src/osmo-bts-oc2g/oml.c b/src/osmo-bts-oc2g/oml.c index efa41aa..7117dfe 100644 --- a/src/osmo-bts-oc2g/oml.c +++ b/src/osmo-bts-oc2g/oml.c @@ -1179,7 +1179,7 @@ /* For handover, always start the main channel immediately. lchan->want_dl_sacch_active indicates whether dl * SACCH should be activated. Also, for HO, start the RACH SAPI. */ - if (lchan->ho.active == HANDOVER_ENABLED) + if (lchan->ho.active == HANDOVER_ENABLED || rsl_chan_rt_is_asci(lchan->rsl_chan_rt)) enqueue_sapi_act_cmd(lchan, GsmL1_Sapi_Rach, GsmL1_Dir_RxUplink); for (i = 0; i < s4l->num_sapis; i++) { diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index 60f9232..a1329a8 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -45,6 +45,7 @@ #include <osmo-bts/scheduler.h> #include <osmo-bts/pcu_if.h> #include <osmo-bts/nm_common_fsm.h> +#include <osmo-bts/handover.h> #include "l1_if.h" #include "trx_if.h" @@ -452,7 +453,8 @@ lchan->tch.amr_mr.mode[2].mode, lchan->tch.amr_mr.mode[3].mode, amr_get_initial_mode(lchan), - (lchan->ho.active == 1)); + (lchan->ho.active == HANDOVER_ENABLED) || + rsl_chan_rt_is_asci(lchan->rsl_chan_rt)); /* set lchan active */ lchan_set_state(lchan, LCHAN_S_ACTIVE); /* set initial ciphering */ diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c index 6410d9d..2408557 100644 --- a/src/osmo-bts-virtual/l1_if.c +++ b/src/osmo-bts-virtual/l1_if.c @@ -42,6 +42,7 @@ #include <osmo-bts/amr.h> #include <osmo-bts/abis.h> #include <osmo-bts/scheduler.h> +#include <osmo-bts/handover.h> #include "virtual_um.h" extern int vbts_sched_start(struct gsm_bts *bts); @@ -383,7 +384,8 @@ lchan->tch.amr_mr.mode[2].mode, lchan->tch.amr_mr.mode[3].mode, amr_get_initial_mode(lchan), - (lchan->ho.active == 1)); + (lchan->ho.active == HANDOVER_ENABLED || + rsl_chan_rt_is_asci(lchan->rsl_chan_rt))); /* set lchan active */ lchan_set_state(lchan, LCHAN_S_ACTIVE); /* set initial ciphering */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iae0db6bfcf6629c114436a79648e832c82835abe Gerrit-Change-Number: 33833 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bts[master]: ASCI: Repeat UPLINK FREE message until uplink becomes busy
by pespin 25 Jul '23

25 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33449 ) ( 7 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: ASCI: Repeat UPLINK FREE message until uplink becomes busy ...................................................................... ASCI: Repeat UPLINK FREE message until uplink becomes busy According to TS 44.018 the UPLINK FREE message must be repeated when the uplink is marked as free. The BSC sends the UPLINK FREE message once and the BTS repeats it until UPLINK BUSY (uplink blocked by BSC) or VGCS UPLINK GRANT (talker accesses the uplink) is sent. It is important to stop sending UPLINK FREE message when a talker accesses the uplink and before the VGCS UPLINK GRANT message is sent, so that stopping must be controlled by the BTS. Related: OS#5781 Change-Id: Ia23c59f5e9a73bbc384fbc317a2cfcf707e3c28f --- M include/osmo-bts/asci.h M include/osmo-bts/lchan.h M src/common/l1sap.c M src/common/lchan.c 4 files changed, 56 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/asci.h b/include/osmo-bts/asci.h index fae9dde..59b48b2 100644 --- a/include/osmo-bts/asci.h +++ b/include/osmo-bts/asci.h @@ -18,3 +18,24 @@ void vgcs_talker_reset(struct gsm_lchan *lchan); void vgcs_listener_reset(struct gsm_lchan *lchan); + +static inline bool vgcs_is_uplink_free(struct gsm_lchan *lchan) +{ + return lchan->asci.uplink_free; +} + +static inline void vgcs_uplink_free_get(struct gsm_lchan *lchan, uint8_t *msg) +{ + memcpy(msg, lchan->asci.uplink_free_msg, GSM_MACBLOCK_LEN); +} + +static inline void vgcs_uplink_free_set(struct gsm_lchan *lchan, uint8_t *msg) +{ + memcpy(lchan->asci.uplink_free_msg, msg, GSM_MACBLOCK_LEN); + lchan->asci.uplink_free = true; +} + +static inline void vgcs_uplink_free_reset(struct gsm_lchan *lchan) +{ + lchan->asci.uplink_free = false; +} diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h index f4da04d..a0e99bf 100644 --- a/include/osmo-bts/lchan.h +++ b/include/osmo-bts/lchan.h @@ -312,6 +312,9 @@ struct osmo_timer_list t3115; /* counts up to Ny2 */ unsigned int vgcs_ul_grant_count; + /* uplink free message */ + bool uplink_free; + uint8_t uplink_free_msg[GSM_MACBLOCK_LEN]; } asci; /* S counter for link loss */ int s; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 268486e..61fb3ee 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1170,6 +1170,10 @@ memcpy(p + 2, si, GSM_MACBLOCK_LEN - 2); } else memcpy(p + 2, fill_frame, GSM_MACBLOCK_LEN - 2); + } else if (vgcs_is_uplink_free(lchan)) { + /* If UPLINK FREE message is stored, send it with every DCCH frame. */ + p = msgb_put(msg, GSM_MACBLOCK_LEN); + vgcs_uplink_free_get(lchan, p); } else if (L1SAP_IS_CHAN_SDCCH4(chan_nr) || L1SAP_IS_CHAN_SDCCH8(chan_nr) || (lchan->rsl_cmode == RSL_CMOD_SPD_SIGN && !lchan->ts->trx->bts->dtxd)) { /* @@ -1194,6 +1198,14 @@ check_for_ciph_cmd(pp_msg, lchan, chan_nr); if (dtxd_facch) dtx_dispatch(lchan, E_FACCH); + if (rsl_chan_rt_is_vgcs(lchan->rsl_chan_rt)) { + /* Check for UPLINK FREE message and store. */ + if (pp_msg->data[0] == GSM48_MT_RR_SH_UL_FREE << 2) + vgcs_uplink_free_set(lchan, pp_msg->data); + /* Keep UPLINK FREE message when sending short header messages. */ + else if ((pp_msg->data[0] & 0x03) != 0x00) + vgcs_uplink_free_reset(lchan); + } } msgb_free(pp_msg); } diff --git a/src/common/lchan.c b/src/common/lchan.c index 971f0a5..bd50349 100644 --- a/src/common/lchan.c +++ b/src/common/lchan.c @@ -221,6 +221,7 @@ handover_reset(lchan); vgcs_talker_reset(lchan); vgcs_listener_reset(lchan); + vgcs_uplink_free_reset(lchan); lchan->rel_act_kind = rel_kind; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33449 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia23c59f5e9a73bbc384fbc317a2cfcf707e3c28f Gerrit-Change-Number: 33449 Gerrit-PatchSet: 11 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> 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-MessageType: merged
1 0
0 0
[L] Change in osmo-bts[master]: Add test cases for rest octets of Paging Requests
by pespin 25 Jul '23

25 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33450 ) ( 7 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Add test cases for rest octets of Paging Requests ...................................................................... Add test cases for rest octets of Paging Requests The abstract representation of the rest octets are moved to the header file, so that the test case can include it. append_p*_rest_octets() function become externally available for test. Change-Id: Ifa5be8998b671160e38af1be707e040b00d407b8 Related: OS#5781 --- M include/osmo-bts/paging.h M src/common/paging.c M tests/paging/paging_test.c 3 files changed, 238 insertions(+), 52 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve dexter: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmo-bts/paging.h b/include/osmo-bts/paging.h index d604536..93e7b38 100644 --- a/include/osmo-bts/paging.h +++ b/include/osmo-bts/paging.h @@ -7,6 +7,55 @@ struct paging_state; struct gsm_bts; +struct asci_notification; + +/* abstract representation of P1 rest octets; we only implement those parts we need for now */ +struct p1_rest_octets { + struct { + bool present; + uint8_t nln; + uint8_t nln_status; + } nln_pch; + bool packet_page_ind[2]; + bool r8_present; + struct { + bool prio_ul_access; + bool etws_present; + struct { + bool is_first; + uint8_t page_nr; + const uint8_t *page; + size_t page_bytes; + } etws; + } r8; +}; + +/* abstract representation of P2 rest octets; we only implement those parts we need for now */ +struct p2_rest_octets { + struct { + bool present; + uint8_t cn3; + } cneed; + struct { + bool present; + uint8_t nln; + uint8_t nln_status; + } nln_pch; +}; + +/* abstract representation of P3 rest octets; we only implement those parts we need for now */ +struct p3_rest_octets { + struct { + bool present; + uint8_t cn3; + uint8_t cn4; + } cneed; + struct { + bool present; + uint8_t nln; + uint8_t nln_status; + } nln_pch; +}; /* initialize paging code */ struct paging_state *paging_init(struct gsm_bts *bts, @@ -39,6 +88,12 @@ * PAGING COMMAND (from the PCU) */ int paging_add_macblock(struct paging_state *ps, uint32_t tlli, const char *imsi, bool confirm, const uint8_t *macblock); +/* Paging rest octests */ +void append_p1_rest_octets(struct bitvec *bv, const struct p1_rest_octets *p1ro, + const struct asci_notification *notif); +void append_p2_rest_octets(struct bitvec *bv, const struct p2_rest_octets *p2ro); +void append_p3_rest_octets(struct bitvec *bv, const struct p3_rest_octets *p3ro); + /* generate paging message for given gsm time */ int paging_gen_msg(struct paging_state *ps, uint8_t *out_buf, struct gsm_time *gt, int *is_empty); diff --git a/src/common/paging.c b/src/common/paging.c index d4a3aed..914a4b5 100644 --- a/src/common/paging.c +++ b/src/common/paging.c @@ -332,54 +332,6 @@ #define L2_PLEN(len) (((len - 1) << 2) | 0x01) -/* abstract representation of P1 rest octets; we only implement those parts we need for now */ -struct p1_rest_octets { - struct { - bool present; - uint8_t nln; - uint8_t nln_status; - } nln_pch; - bool packet_page_ind[2]; - bool r8_present; - struct { - bool prio_ul_access; - bool etws_present; - struct { - bool is_first; - uint8_t page_nr; - const uint8_t *page; - size_t page_bytes; - } etws; - } r8; -}; - -/* abstract representation of P2 rest octets; we only implement those parts we need for now */ -struct p2_rest_octets { - struct { - bool present; - uint8_t cn3; - } cneed; - struct { - bool present; - uint8_t nln; - uint8_t nln_status; - } nln_pch; -}; - -/* abstract representation of P3 rest octets; we only implement those parts we need for now */ -struct p3_rest_octets { - struct { - bool present; - uint8_t cn3; - uint8_t cn4; - } cneed; - struct { - bool present; - uint8_t nln; - uint8_t nln_status; - } nln_pch; -}; - /* 3GPP TS 44.018 10.5.2.23 append a segment/page of an ETWS primary notification to given bitvec */ static void append_etws_prim_notif(struct bitvec *bv, bool is_first, uint8_t page_nr, const uint8_t *etws, ssize_t etws_len) @@ -406,8 +358,8 @@ } /* 3GPP TS 44.018 10.5.2.23 append P1 Rest Octets to given bit-vector */ -static void append_p1_rest_octets(struct bitvec *bv, const struct p1_rest_octets *p1ro, - const struct asci_notification *notif) +void append_p1_rest_octets(struct bitvec *bv, const struct p1_rest_octets *p1ro, + const struct asci_notification *notif) { /* Paging 1 RO (at least 10 bits before ETWS struct) */ if (p1ro->nln_pch.present) { @@ -452,7 +404,7 @@ } /* 3GPP TS 44.018 10.5.2.24 append P2 Rest Octets to given bit-vector */ -static void append_p2_rest_octets(struct bitvec *bv, const struct p2_rest_octets *p2ro) +void append_p2_rest_octets(struct bitvec *bv, const struct p2_rest_octets *p2ro) { /* {L | H <CN3: bit (2)>} */ if (p2ro->cneed.present) { @@ -473,7 +425,7 @@ } /* 3GPP TS 44.018 10.5.2.25 append P3 Rest Octets to given bit-vector */ -static void append_p3_rest_octets(struct bitvec *bv, const struct p3_rest_octets *p3ro) +void append_p3_rest_octets(struct bitvec *bv, const struct p3_rest_octets *p3ro) { /* {L | H <CN3: bit (2)> <CN3: bit (2)>} */ if (p3ro->cneed.present) { diff --git a/tests/paging/paging_test.c b/tests/paging/paging_test.c index d48932b..1bccc85 100644 --- a/tests/paging/paging_test.c +++ b/tests/paging/paging_test.c @@ -27,6 +27,7 @@ #include <osmo-bts/paging.h> #include <osmo-bts/gsm_data.h> #include <osmo-bts/l1sap.h> +#include <osmo-bts/notification.h> #include <unistd.h> @@ -179,6 +180,167 @@ } } +static void test_paging_rest_octets1(void) +{ + uint8_t out_buf[17]; + struct p1_rest_octets p1ro = {}; + struct asci_notification notif = {}; + + struct bitvec bv = { + .data_len = sizeof(out_buf), + .data = out_buf, + }; + + /* no rest */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + append_p1_rest_octets(&bv, &p1ro, NULL); + ASSERT_TRUE(out_buf[0] == 0x2b); + + /* add NLN */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + p1ro.nln_pch.present = true; + p1ro.nln_pch.nln = 3; + p1ro.nln_pch.nln_status = 1; + append_p1_rest_octets(&bv, &p1ro, NULL); + ASSERT_TRUE(out_buf[0] == 0xfb); /* H 1 11 1 */ + p1ro.nln_pch.present = 0; + + /* add group callref */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + notif.group_call_ref[0] = 0x12; + notif.group_call_ref[1] = 0x34; + notif.group_call_ref[2] = 0x56; + notif.group_call_ref[3] = 0x78; + notif.group_call_ref[4] = 0x90; + notif.chan_desc.present = true; + notif.chan_desc.len = 3; + notif.chan_desc.value[0] = 0x20; + notif.chan_desc.value[1] = 0x40; + notif.chan_desc.value[2] = 0x80; + append_p1_rest_octets(&bv, &p1ro, &notif); + ASSERT_TRUE(out_buf[0] == 0x31); /* L L L H 0x123456789 */ + ASSERT_TRUE(out_buf[1] == 0x23); + ASSERT_TRUE(out_buf[2] == 0x45); + ASSERT_TRUE(out_buf[3] == 0x67); + ASSERT_TRUE(out_buf[4] == 0x89); + ASSERT_TRUE(out_buf[5] == 0x90); /* H 0x204080 0 */ + ASSERT_TRUE(out_buf[6] == 0x20); + ASSERT_TRUE(out_buf[7] == 0x40); + ASSERT_TRUE(out_buf[8] == 0x2b); + + /* add Packet Page Indication 1 */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + p1ro.packet_page_ind[0] = true; + append_p1_rest_octets(&bv, &p1ro, NULL); + ASSERT_TRUE(out_buf[0] == 0x23); /* L L L L H L L L */ + p1ro.packet_page_ind[0] = false; + + /* add Packet Page Indication 2 */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + p1ro.packet_page_ind[1] = true; + append_p1_rest_octets(&bv, &p1ro, NULL); + ASSERT_TRUE(out_buf[0] == 0x2f); /* L L L L L H L L */ + p1ro.packet_page_ind[1] = false; + + /* add ETWS */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + p1ro.r8_present = true; + p1ro.r8.prio_ul_access = true; + p1ro.r8.etws_present = true; + p1ro.r8.etws.is_first = true; + p1ro.r8.etws.page_nr = 0x5; + uint8_t page[] = { 0x22, 0x44, 0x66 }; + p1ro.r8.etws.page_bytes = sizeof(page); + p1ro.r8.etws.page = page; + append_p1_rest_octets(&bv, &p1ro, NULL); + ASSERT_TRUE(out_buf[0] == 0x2b); /* L L L L L L L L */ + ASSERT_TRUE(out_buf[1] == 0xe5); /* H 1 1 0 0x5 */ + ASSERT_TRUE(out_buf[2] == 0x18); /* 0 len=24=0x18 */ + ASSERT_TRUE(out_buf[3] == 0x22); /* 0x224488 */ + ASSERT_TRUE(out_buf[4] == 0x44); + ASSERT_TRUE(out_buf[5] == 0x66); + p1ro.r8_present = false; +} + +static void test_paging_rest_octets2(void) +{ + uint8_t out_buf[11]; + struct p2_rest_octets p2ro = {}; + + struct bitvec bv = { + .data_len = sizeof(out_buf), + .data = out_buf, + }; + + /* nothing added */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + append_p2_rest_octets(&bv, &p2ro); + ASSERT_TRUE(out_buf[0] == 0x2b); /* L L */ + + /* add cneed */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + p2ro.cneed.present = true; + p2ro.cneed.cn3 = 3; + append_p2_rest_octets(&bv, &p2ro); + ASSERT_TRUE(out_buf[0] == 0xeb); /* H 1 1 L */ + p2ro.cneed.present = false; + + /* add NLN */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + p2ro.nln_pch.present = true; + p2ro.nln_pch.nln = 3; + p2ro.nln_pch.nln_status = 1; + append_p2_rest_octets(&bv, &p2ro); + ASSERT_TRUE(out_buf[0] == 0x7b); /* L H 1 11 1 */ + p2ro.nln_pch.present = 0; +} + +static void test_paging_rest_octets3(void) +{ + uint8_t out_buf[3]; + struct p3_rest_octets p3ro = {}; + + struct bitvec bv = { + .data_len = sizeof(out_buf), + .data = out_buf, + }; + + /* nothing added */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + append_p3_rest_octets(&bv, &p3ro); + ASSERT_TRUE(out_buf[0] == 0x2b); /* L L */ + + /* add cneed */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + p3ro.cneed.present = true; + p3ro.cneed.cn3 = 3; + p3ro.cneed.cn4 = 3; + append_p3_rest_octets(&bv, &p3ro); + ASSERT_TRUE(out_buf[0] == 0xfb); /* H 1 1 1 1 L */ + p3ro.cneed.present = false; + + /* add NLN */ + memset(out_buf, GSM_MACBLOCK_PADDING, sizeof(out_buf)); + bv.cur_bit = 0; + p3ro.nln_pch.present = true; + p3ro.nln_pch.nln = 3; + p3ro.nln_pch.nln_status = 1; + append_p3_rest_octets(&bv, &p3ro); + ASSERT_TRUE(out_buf[0] == 0x7b); /* L H 1 11 1 */ + p3ro.nln_pch.present = 0; +} + int main(int argc, char **argv) { tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); @@ -200,6 +362,9 @@ test_paging_smoke(); test_paging_sleep(); test_is_ccch_for_agch(); + test_paging_rest_octets1(); + test_paging_rest_octets2(); + test_paging_rest_octets3(); printf("Success\n"); return 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33450 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ifa5be8998b671160e38af1be707e040b00d407b8 Gerrit-Change-Number: 33450 Gerrit-PatchSet: 11 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> 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-MessageType: merged
1 0
0 0
[M] Change in osmo-bts[master]: ASCI: Add Notification/FACCH support
by pespin 25 Jul '23

25 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33448 ) Change subject: ASCI: Add Notification/FACCH support ...................................................................... ASCI: Add Notification/FACCH support When a VGCS/VBS call is established in a cell, NCH is used to notify about ongoing calls to idle subscribers. Additionally Notification/FACCH is used to notify subscribers in dedicated mode. This is performed by broadcasting this messages to all active dedicated channels. The mobile station can then indicate the call, so the user can join the call. More importaint is the notification of the calling subscriber's MS, which initiated the call. This is done on the early assigned channel. The MS must know on which channel the call is placed. After leaving the uplink, it must know where to access the uplink the next time. Change-Id: I3ed14fa54a907891e492a7ada8e745a2c56cd46d Related: OS#4851, OS#5781 --- M include/osmo-bts/notification.h M src/common/notification.c M src/common/rsl.c 3 files changed, 102 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmo-bts/notification.h b/include/osmo-bts/notification.h index f8a7b48..e53d718 100644 --- a/include/osmo-bts/notification.h +++ b/include/osmo-bts/notification.h @@ -57,3 +57,5 @@ void append_group_call_information(struct bitvec *bv, const uint8_t *gcr, const uint8_t *ch_desc, uint8_t ch_desc_len); int bts_asci_notify_nch_gen_msg(struct gsm_bts *bts, uint8_t *out_buf); +int bts_asci_notify_facch_gen_msg(struct gsm_bts *bts, uint8_t *out_buf, const uint8_t *group_call_ref, + const uint8_t *chan_desc, uint8_t chan_desc_len); diff --git a/src/common/notification.c b/src/common/notification.c index 35dc65f..9351ec0 100644 --- a/src/common/notification.c +++ b/src/common/notification.c @@ -223,3 +223,34 @@ return GSM_MACBLOCK_LEN; } + +int bts_asci_notify_facch_gen_msg(struct gsm_bts *bts, uint8_t *out_buf, const uint8_t *group_call_ref, + const uint8_t *chan_desc, uint8_t chan_desc_len) +{ + struct gsm48_hdr_sh *sh = (struct gsm48_hdr_sh *) out_buf; + unsigned int ro_len; + + *sh = (struct gsm48_hdr_sh) { + .rr_short_pd = GSM48_PDISC_SH_RR, + .msg_type = GSM48_MT_RR_SH_FACCH, + .l2_header = 0, + }; + + /* Pad remaining octets with constant '2B'O */ + ro_len = GSM_MACBLOCK_LEN - (sh->data - out_buf); + memset(sh->data, GSM_MACBLOCK_PADDING, ro_len); + + struct bitvec bv = { + .data_len = ro_len, + .data = sh->data, + }; + + /* 0 < Group Call information > */ + bitvec_set_bit(&bv, 0); + append_group_call_information(&bv, group_call_ref, chan_desc, chan_desc_len); + + /* TODO: Additions in Release 6 */ + /* TODO: Additions in Release 7 */ + + return GSM_MACBLOCK_LEN; +} diff --git a/src/common/rsl.c b/src/common/rsl.c index c7450c5..d47ba99 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -811,6 +811,51 @@ return 0; } +/* Broadcast notification about new VGCS/VBS call on every dedicated channel. + * This is required for MSs that are currently in dedicated mode that there is an ongoing call and on which channel + * the call is active. Most MSs in dedicated mode may not be able to receive the NCH otherwise. + * MSs that do not support ASCI will ignore it, as it is an unsupported message for them. + */ +static int asci_broadcast_facch(struct gsm_bts *bts, const uint8_t *group_call_ref, const uint8_t *chan_desc, + uint8_t chan_desc_len, unsigned int count) +{ + uint8_t notif[23]; + struct msgb *msg, *cmsg; + struct gsm_bts_trx *trx; + struct gsm_lchan *lchan; + unsigned int tn, ln, n; + int rc; + + rc = bts_asci_notify_facch_gen_msg(bts, notif, group_call_ref, chan_desc, chan_desc_len); + if (rc < 0) + return rc; + + llist_for_each_entry(trx, &bts->trx_list, list) { + for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) { + for (ln = 0; ln < ARRAY_SIZE(trx->ts[tn].lchan); ln++) { + lchan = &trx->ts[tn].lchan[ln]; + if (!lchan_is_dcch(lchan)) + continue; + if (lchan->state != LCHAN_S_ACTIVE) + continue; + msg = rsl_rll_simple(RSL_MT_UNIT_DATA_REQ, gsm_lchan2chan_nr(lchan), 0x00, 0); + msg->l3h = msg->tail; /* emulate rsl_rx_rll() behaviour */ + msgb_tl16v_put(msg, RSL_IE_L3_INFO, sizeof(notif), (uint8_t *) &notif); + for (n = 1; n < count; n++) { + cmsg = msgb_copy(msg, "FACCH copy"); + lapdm_rslms_recvmsg(cmsg, &lchan->lapdm_ch); + } + lapdm_rslms_recvmsg(msg, &lchan->lapdm_ch); + } + } + } + + return 0; +} + +/* Number of times to broadcast ASCI call on every dedicated channel. */ +#define ASCI_BROADCAST_NUM 3 + /* 8.5.10 NOTIFICATION COMMAND */ static int rsl_rx_notification_cmd(struct gsm_bts_trx *trx, struct msgb *msg) { @@ -841,6 +886,9 @@ rc = bts_asci_notification_add(trx->bts, TLVP_VAL(&tp, RSL_IE_GROUP_CALL_REF), TLVP_VAL(&tp, RSL_IE_CHAN_DESC), TLVP_LEN(&tp, RSL_IE_CHAN_DESC), (struct rsl_ie_nch_drx_info *) TLVP_VAL(&tp, RSL_IE_NCH_DRX_INFO)); + /* Broadcast to FACCH */ + asci_broadcast_facch(trx->bts, TLVP_VAL(&tp, RSL_IE_GROUP_CALL_REF), TLVP_VAL(&tp, RSL_IE_CHAN_DESC), + TLVP_LEN(&tp, RSL_IE_CHAN_DESC), ASCI_BROADCAST_NUM); break; case RSL_CMD_INDICATOR_STOP: if (!TLVP_PRES_LEN(&tp, RSL_IE_GROUP_CALL_REF, 5)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33448 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3ed14fa54a907891e492a7ada8e745a2c56cd46d Gerrit-Change-Number: 33448 Gerrit-PatchSet: 9 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> 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-MessageType: merged
1 0
0 0
[S] Change in osmo-bts[master]: ASCI: Enable UPLINK ACCESS on various BTS models
by pespin 25 Jul '23

25 Jul '23
Attention is currently required from: jolly. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33833 ) Change subject: ASCI: Enable UPLINK ACCESS on various BTS models ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iae0db6bfcf6629c114436a79648e832c82835abe Gerrit-Change-Number: 33833 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Tue, 25 Jul 2023 16:17:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: ASCI: Add Notification/FACCH support
by pespin 25 Jul '23

25 Jul '23
Attention is currently required from: jolly, fixeria, dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33448 ) Change subject: ASCI: Add Notification/FACCH support ...................................................................... Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33448 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3ed14fa54a907891e492a7ada8e745a2c56cd46d Gerrit-Change-Number: 33448 Gerrit-PatchSet: 9 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> 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: jolly <andreas(a)eversberg.eu> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 25 Jul 2023 16:16:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • ...
  • 306
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.