aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-07-13extend test_dyn_ts_favor_half_used_tch_h_as_target.ho_vtyneels/res_indNeels Hofmeyr1-0/+5
Clarify that filling half-used TCH/H first only happens on dynamic timeslots, not static ones. Related: SYS#5313 Change-Id: I5213459fb7fb201361ce0d6198fc0c2c745deee1
2021-07-13add test_dyn_ts_favor_static_ts_as_target.ho_vtyNeels Hofmeyr2-0/+39
In a discussion about the effect of interference levels, I noticed that there is not sufficient clarity about how strongly the preference of static timeslots is ranked. This test helps to show what we have. Related: SYS#5313 Change-Id: I0911cd74613045d9fbe29d04eaef036d32049b92
2021-07-13vty 'interference-meas level-bounds': explain duality in orderingNeels Hofmeyr2-3/+4
Related: SYS#5313 Change-Id: If71e20e95d29e7f03739ee04e1ef429bf8bd51ed
2021-07-13separate 'interference-meas level-bounds' cfg and usedNeels Hofmeyr7-21/+28
The VTY defun already indicates BSC_VTY_ATTR_RESTART_ABIS_OML_LINK correctly, but so far we would immediately start using the new values internally, and wrongly interpret interference levels. Fix that. Have bts->interf_meas_params twice: interf_meas_params_cfg for the VTY configured values, and interf_meas_params_used for the values that the BTS actually knows about, after they were sent via OML. In a running BSC, when changing the interference level boundaries on the telnet VTY, the BTS is not immediately told about the change. That would require a BTS restart. Hence store the cfg values separately in interf_meas_params_cfg. For comparing/printing interference levels in a running BTS, only employ the values that were actually sent via OML and placed in interf_meas_params_used. Related: SYS#5313 Change-Id: Iad8cf4151ff7f86dc0549158ed5d91d788d40b1f
2021-07-13bsc_vty: add vty option to allow call-reestablishmentPhilipp Maier1-0/+23
The rach control parameter value that controls the usage of call-reestablishment is currently hardcoded. Lets add a VTY option for this so that we are able to configure call-reestablishment Change-Id: Ia18c1dde4c001cb4d423f694f8bc146adfd77daf Related: SYS#5130
2021-07-12lchan_fsm: fix potential NULL-pointer dereferenceVadim Yanitskiy1-3/+15
Change-Id: I373855b95f8bde0ce8f9c2ae7bf95c9135d33484 Related: SYS#5526
2021-07-12handover_test: fix ts_str may be uninitializedosmith/build-fixOliver Smith1-2/+2
Fix for: handover_test.c: In function 'res_ind': handover_test.c:1094:30: error: 'ts_str' may be used uninitialized in this function [-Werror=maybe-uninitialized] char subslot_val = ts_str[lchan->nr]; Fixes: f76424 ("RES IND: add test_resource_indication.ho_vty") Change-Id: I398ba24b945bad96896eeb5ddbaff9c48bacf8ab
2021-07-11RES IND: pick lchan with least interferenceNeels Hofmeyr2-29/+57
In lchan_select, do not return on the first available lchan, but iterate through all available lchans. Among those that would match, pick the one with the lowest interference level as indicated by earlier RES IND. Lchans that have no interference ratings are picked last. This feature is off by default, enable per BTS with network bts N channel allocator avoid-interference 1 osmo-bsc still does the same ascending/descending lchan allocation as before this patch with the default setting of: channel allocator avoid-interference 0 Related: SYS#5313 Change-Id: I844494092193811dfd9fa4d52983cbaed0fc9248
2021-07-11RES IND: add test_resource_indication.ho_vtyNeels Hofmeyr3-0/+165
Show that osmo-bsc does not yet take Resource Indication's reported interference levels into account. (An upcoming patch will change that.) This test is not actually doing any handover, but it is using the handover/*.ho_vty scripting that was intended for handover testing. (Like test_dyn_ts_favor_half_used_tch_h_as_target.ho_vty does.) Related: SYS#5313 Change-Id: I56ec61196a1e103f0b4caf18d25d8222bb82cf87
2021-07-11RES IND: add VTY: bts / channel allocator avoid-interference (0|1)Neels Hofmeyr3-0/+63
Store the config option whether the channel allocator should try to avoid lchans with higher interference levels reported in RES IND. The actual implementation of avoiding interference follows in I844494092193811dfd9fa4d52983cbaed0fc9248 Related: SYS#5313 Change-Id: I8b62d0b41ad9e908b27713db9219e3dbc1ebaab7
2021-07-11RES IND: parse msg and store interference levels in lchansNeels Hofmeyr4-3/+106
Also show the current interference levels of unused lchans in the vty. Related: SYS#5313 Change-Id: Iccc1391e8419604bb09e464db8455e053dfbc982
2021-07-11lchan: call reset() upon allocNeels Hofmeyr1-0/+3
call lchan_reset() after allocation, to make sure that lchan->* fields that have a nonzero default value get initialized properly. In particular, a future patch adds interference measurements, and an lchan that never received any Resource Indication info should always indicate that there are no measurements (a nonzero constant). Related: SYS#5313 Change-Id: I700a969f5b11c21dacda9a7cad00c943dce554b3
2021-07-09hodec1: use same automatic FULL/SUBSET choice as in hodec2Neels Hofmeyr1-6/+3
So far handover decision 1 uses the FULL or SUBSET TDMA measurements across all measurement reports, depending on whether the last measurement report indicates that DTX is in use or not. Handover decision 2 since recently uses TDMA_MEAS_SET_AUTO to choose for each individual measurement report whether to use the FULL or the SUBSET value, depending on each single report's DTX use flag. Also switch handover decision 1 to heed every single report's DTX flag, by simply using TDMA_MEAS_SET_AUTO, replacing the current decision. Change-Id: Iebe980254b8c4a53ef9e7d720e417dc67077eff7
2021-07-09hodec2: [2/2] implement automatic choice between FULL and SUBSET measurementsNeels Hofmeyr6-22/+33
Add TDMA_MEAS_SET_AUTO to indicate automatic choice between FULL and SUBSET measurements depending on DTX. So far use only in hodec2. TDMA_MEAS_SET_AUTO looks at each individual measurement report's DTX flag and for each report chooses FULL if DTX is not used, or SUB if DTX is used. The default setting for 'handover2 tdma-measurement' is still 'subset'. To use the automatic choice, users need configure handover2 tdma-measurement auto Change-Id: I67dce55ccf892c8679272ee5dfedc25620f0f725
2021-07-09hodec2: [1/2] implement automatic choice between FULL and SUBSET measurementsNeels Hofmeyr4-26/+82
Cosmetic preparation for enabling automatic choice between FULL and SUBSET measurements depending on DTX in handover decision 2. Change the internal API to pass separate enums for the choices {RXLEV, RXQUAL}, {UL, DL} and {FULL, SUB}. Change-Id: I283e03126a6bc1f5f1b35f9801e841053edd2947
2021-07-09lchan_fsm: Improve timeout logging line in state WAIT_RLL_RTP_ESTABLISHPau Espin Pedrol1-1/+8
This allows quickly finding out whether the timeout is happening due to RLL not established or whether RTP is not ready. In essence, it indicates whether issue may be coming from MGW or from MS/BTS side. If coming from MGW, the timer T3101 is in general not a problem and the issue should be related to some misbehaving. If coming from MS/BTS, T3101 may require tunning (it could be a misbehaving of the MS/BTS too, or simply bad signal). Related: SYS#5526 Change-Id: Ib655f71aec584962c70d84a4405d996505dff53c
2021-07-09doc: bts.adoc: Update dyn ts section to include SDCCH8 supportPau Espin Pedrol1-5/+6
Related: SYS#5309 Change-Id: I40f4b19e7df83351c9c9e65d71880ac6aaa4ee88
2021-07-08lchan_fsm: Allow rx LCHAN_EV_RLL_REL_IND in WAIT_RF_RELEASE_ACKPau Espin Pedrol1-0/+8
As seen in osmo-bsc log during heavy load scenario: <000f> abis_rsl.c:2171 lchan(12-2-6-TCH_H-0)[0x559b880d1f40]{WAIT_RF_RELEASE_ACK}: Event LCHAN_EV_RLL_REL_IND not permitted Related: SYS#5523 Change-Id: Ie307872851490ae4d60c8117a5f4e2d8c2a414d6
2021-07-06Support SDCCH8 in osmo dyn tsPau Espin Pedrol3-0/+12
This feature signals support to configure Osmocom Dynamic Timeslot type as SDCCH8, on top of historically supported TCH/H and TCH/F. The idea is that when unneeded, the TS is configured as PDCH, and as soon as there's need for an SDCCH and there's none available, the TS is dynamically reconfigured to SDCCH8. Once all logical channels in the dynamic TS are released and hence becomes free, the BSC will reconfigure it to PDCH. Related: SYS#5309 Depends: libosmocore.git Change-Id Ifc0ca8916bd3e93e5a60a7dd7391d2588fdb5532 Change-Id: I29ac8b90168dba3ac309daeb0b6cfdbbcb8e9172
2021-07-06Rename osmo dyn ts enums to contain SDCCH8Pau Espin Pedrol18-76/+81
They will gain support to be activated as SDCCH/8 soon too. Related: OS#5309 Depends: libosmocore.git I56dcfe4d17899630b17f80145c3ced72f1e91e68 Change-Id: Id5b89fe589a52ff88486435ac43809edb4b80f98
2021-07-05assignment_fsm: Add assert to guard ptr accessPau Espin Pedrol1-0/+1
Let's make sure the null pointer is caught by the assert if ever code ends up here with conn->lchan being NULL. Change-Id: I404df638da6a93caa535f10fd330ea24a775bfc3
2021-07-05assignment_fsm: Fix null pointer dereference rx ASSIGNMENT_EV_LCHAN_ERRORPau Espin Pedrol1-1/+1
gsm_lchan_name always expects a valid lchan pointer. This patch fixes a crash seen: """ <000f> lchan_fsm.c:99 lchan(12-2-5-TCH_H-1)[0x559b880f2980]{WAIT_RLL_RTP_ESTABLISH}: (type=TCH_H) Signalling Assignment FSM of error (lchan allocation failed in state WAIT_RLL_RTP_ESTABLISH: Timeout) Assert failed lchan ../../include/osmocom/bsc/gsm_data.h:1034 """ Related: SYS#5392 Change-Id: I23a337d411e857954008c6f8ae60be714509d351
2021-07-05power_control: constrain BS power reduction on BCCH carrierVadim Yanitskiy4-0/+65
BS Power Control is not allowed on the BCCH/CCCH carrier, unless the BTS is operating in the BCCH carrier power reduction mode. Allow constrained BS power reduction (up to 6 dB) on active logical channels iff BCCH carrier power reduction mode is enabled. Take into account that the maximum power difference between a timeslot used for BCCH/CCCH and the timeslot preceding it shall not exceed 3 dB. Change-Id: I2cc6a86731984f586ef35b43a8d3de631f7d8a2f Related: SYS#4919, SYS#4918
2021-07-05power_control: implement BCCH carrier power reduction operationVadim Yanitskiy7-1/+235
The BCCH carrier (sometimes called C0) of a BTS shall maintain discontinuous Downlink transmission at full power in order to stay 'visible' to the mobile stations. Because of that, early versions of 3GPP TS 45.008 prohibited BS power reduction on C0. However, starting from version 13.0.0 (2015-11) there is a feature called 'BCCH carrier power reduction operation'. This is a special mode of operation, where the variation of RF level for some timeslots is relaxed for the purpose of energy saving. In BCCH carrier power reduction operation, for timeslots on the C0 carrier, except timeslots carrying BCCH/CCCH, the output power may be lower than the output power used for timeslots carrying BCCH/CCCH. In this case the maximum allowed difference in output power actually transmitted by the BTS is 6 dB. Introduce a VTY command to turn on and off the BCCH carrier power reduction operation. Also introduce a CTRL command. On the A-bis/RSL, abuse the BS POWER CONTROL message by setting the Channel Number IE to 0x80 (RSL_CHAN_BCCH). Currently, only osmo-bts-trx is supported. A value greater than zero makes it reduce the power on *inactive* timeslots of the BCCH carrier. Sending zero disables the BCCH power reduction mode completely. For more details, see 3GPP TS 45.008, section 7.1, and 3GPP TR 45.926. Change-Id: I047fce33d4d3e4c569dd006ba17858467a2f4783 Related: SYS#4919
2021-07-03vty: add vty doc test for 'nri null' commandsNeels Hofmeyr1-0/+19
Change-Id: I2782dc547ce9751e5f1039aab9a2d36cf1be3fde
2021-07-03vty: fix doc: default value for 'nri bitlen'Neels Hofmeyr2-1/+14
The constant is called OSMO_NRI_BITLEN_DEFAULT, NRI_BITLEN_DEFAULT does not exist and got rendered as "NRI_BITLEN_DEFAULT" in the vty doc. Add missing vty test for 'nri bitlen'. Change-Id: I8af840a4589f47eaca6bf10e37e0859f9ae53dfa
2021-06-30power_control: omit BS Power Parameters IE if the maximum is 0 dBVadim Yanitskiy1-0/+6
If BS Power Parameters IE is present in the channel activation message, the BTS shall employ dynamic BS power control for that logical channel and interpret BS Power IE as the maximum value. If the maximum value is 0 dB, then it does not make sense to send BS Power Parameters IE to the BTS, because the power control loop would never exceed the maximum. Change-Id: If8507992dfd90ade1edda99b72bf2420a702ccd5 Related: SYS#4918, SYS#4919
2021-06-30lchan-select: Avoid setting variable for no reasonPau Espin Pedrol1-14/+3
That variable is never used after being set. Furthermore, it is being set to the same value already stored, so there's no use in setting it and it creates confusion. Change-Id: Ib6ee28aa9a449992f5d3dea6df7dd2b7e30e73c9
2021-06-30Support proto IPAC_PROTO_EXT_PCU BSC<->PCUPau Espin Pedrol14-0/+220
Related: SYS#5303 Change-Id: I4b3919f3098b9468e5e024db1e45427af24c1ad4
2021-06-29hodec2: fix low rxqual tch/h<->tch/f oscillationNeels Hofmeyr2-11/+13
Related: SYS#5198 Change-Id: I96cd5a494e661ba3bb0b6d22d25a9968d2a6813c
2021-06-29handover_decision_2.c: add current_rxqual()Neels Hofmeyr1-4/+10
Pre-empt code dup: this will be also used by an upcoming patch, so first put it in a function. Change-Id: I0d5bdaa9605f2bd4241cdd47ccf1ce1c697818a8
2021-06-29hodec2: fix low rxlev tch/h<->tch/f oscillationNeels Hofmeyr2-11/+5
Related: SYS#5365 Change-Id: Ibc3ac7ce6190b4e854fa42d5376a7038ddfbd6e5
2021-06-29handover_decision_2.c: add is_low_rxlev()Neels Hofmeyr1-5/+9
Remove code dup. Also this will be used another time by an upcoming patch. Change-Id: I4aaeb8bc35a142962ac8ca6401a76b0733f7979e
2021-06-29hodec2: add test case showing low rxqual tch/h<->tch/f oscillationNeels Hofmeyr2-0/+30
Related: SYS#5198 Change-Id: I43726c5563c9c31389600ef0ff6855add5af3a03
2021-06-29hodec2: add test case showing low rxlev tch/h<->tch/f oscillationNeels Hofmeyr2-0/+30
Related: SYS#5365 Change-Id: Iee2d4b9eaf902ba7fb546a9bb261324b2f7d1fc7
2021-06-29gsm_data.h: remove declaration of non-existing ts_pchan()Vadim Yanitskiy1-1/+0
Change-Id: I2471d0f2825661e60539d9504632fc80145c603d
2021-06-25vty: allow 5 encryption algo entriesNeels Hofmeyr1-1/+2
follow-up to 0256c891878be531c24aa0c62e7c56ef8d71ab65 Icac06ed554fd61bf7c4bfb1d5c3739a01f2915a4 Previous patch increased the range, but let's also allow one more argument so that the A5 mask can be fully enabled. Change-Id: Ie8cd753e4425d7d51397e4dddc24108fa0392de4
2021-06-25pcuif_proto.h: Add new container messagesPau Espin Pedrol1-0/+10
Related: SYS#5303 Change-Id: Icc50f903a7fe1464549537a24b2bd2befaf6f7e1
2021-06-24control.adoc: add doc for apply-config-filePhilipp Maier1-0/+1
apply-config-file is not documented in the manual. Change-Id: I469e3925c1079e45eea246e599bcd50ba3fc9dd3 Related: SYS#5369
2021-06-24bsc_ctrl_commands: add command to write vty configPhilipp Maier2-0/+28
we recently added control commands to apply vty config files during runtime using the control interface. However, there is no command that allows us to store the config file modifications. Change-Id: If17095bb86f82dd8feb86eb72c4133ea3aa1c3b3 Related: SYS#5369
2021-06-23use osmo_select_shutdown to get rid of SIGTERM sleepNeels Hofmeyr1-3/+5
Change-Id: I9a4a629805c49240b8be412e9def298cdf5bc996
2021-06-23abis_rsl: fix rsl_rx_ccch_load(): properly check the message lengthVadim Yanitskiy1-1/+1
msg->data_len is the total number of bytes available in the buffer, not the actual length of the payload. Use msgb_length(). Change-Id: I35bf0827ff14e84a755c1aa24a6efc06bc7b9f9b
2021-06-22PCUIF protocol: add message definition for interference reportVadim Yanitskiy1-0/+10
Change-Id: I4bd5d4de695a1f9f202870cfd7e43caac9ce6d48 Related: SYS#5313, OS#1569
2021-06-22support A5/4 in inter-BSC HandoverNeels Hofmeyr2-3/+21
inter-BSC into this BSC: from BSSMAP Handover Request, parse and store Kc128. All else is already implemented: depending on the chosen encryption algorithm, Kc128 will end up in the Channel Activation. inter-BSC out of this BSC: nothing is needed to support A5/4, the BSSMAP Handover Required message does not contain any encryption related information. The MSC already knows the chosen algorithm. Related: SYS#5324 Change-Id: I7e9590e8c96aa50086148863ad9a2741b978e614
2021-06-21VTY: fix typo in a command description: s/send/sent/Vadim Yanitskiy1-1/+1
Change-Id: Idb2fda4c2bd8a4e7ee6c4d7c7dc08a7d4f20d00d
2021-06-18implement A5/4 in Ciphering Mode procedureNeels Hofmeyr3-1/+29
Receive and store the Kc128 key from MSC, and use as key sent to BTS if A5/4 is the chosen encryption algorithm. (A5/4 in handover will follow in a separate patch) Related: SYS#5324 Change-Id: I7c458c8a7350f34ff79531b3c891e1b367614469
2021-06-18vty: allow A5/4 encryption in configEric1-1/+1
Add A5/4 to the internal mask of allowed algorithms. (Not actually working yet, A5/4 implementation follows in other patches.) Related: SYS#5324 Change-Id: Icac06ed554fd61bf7c4bfb1d5c3739a01f2915a4
2021-06-18dissolve gsm0808_cipher_mode() into bssmap_handle_cipher_mode()Neels Hofmeyr1-32/+25
An upcoming patch for A5/4 would need to add a kc128 arg and reject cause rc to gsm0808_cipher_mode(). Instead prepare for less cruft by just having a single function. Related: SYS#5324 Change-Id: I7f7c635943990a251ae28ae7a0d69cc3a239a154
2021-06-18rewire build_encr_info() to return errorsNeels Hofmeyr1-4/+35
In build_encr_info(), validate the algorithm and key presence and return negative if errors are encountered. At all callers, handle the error case. An upcoming patch will add handling of Kc128 for A5/4 encryption and also wants to return error codes. This is a preparation for that patch: I7c458c8a7350f34ff79531b3c891e1b367614469 Notice that osmo-bsc does send the key along even if A5/0 is chosen, this patch keeps that behavior unchanged. Related: SYS#5324 Change-Id: I125d8aabceddd5b34cb98978cee9b6d2fc8fd0f2
2021-06-18rsl_lchan_lookup: drop redundant conditionNeels Hofmeyr1-1/+1
'vamos' is only set to true for osmobts types, hence no need to check that condition again. fixup for commit d37dcb9f6854a4d15dd2ba098fcbaa212251684f 'RSL: rx and tx VAMOS Channel Number cbits for VAMOS lchans' I957eff0d2c33ec795eda75a4bff21965b0179f73 Related: CID#236318 Related: SYS#5315 OS#4940 Change-Id: I4d9afc2996d95fdc15ee1a04e31d781b595023e3