aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc/bts.h
AgeCommit message (Collapse)AuthorFilesLines
2021-07-07Introduce ANR supportPau Espin Pedrol1-0/+5
See doc/manuals/chapters/anr.adoc introduced in this commit for a full description. Related: SYS#5303 Change-Id: I21beb4e5c101157cd0977fd9a607c2fe5350befe
2021-07-06Rename osmo dyn ts enums to contain SDCCH8Pau Espin Pedrol1-2/+2
They will gain support to be activated as SDCCH/8 soon too. Related: OS#5309 Depends: libosmocore.git I56dcfe4d17899630b17f80145c3ced72f1e91e68 Change-Id: Id5b89fe589a52ff88486435ac43809edb4b80f98
2021-07-05power_control: implement BCCH carrier power reduction operationVadim Yanitskiy1-0/+7
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-06-30Support proto IPAC_PROTO_EXT_PCU BSC<->PCUPau Espin Pedrol1-0/+2
Related: SYS#5303 Change-Id: I4b3919f3098b9468e5e024db1e45427af24c1ad4
2021-06-17Introduce counters to track SRVCC proceduresPau Espin Pedrol1-0/+7
Related: SYS#5337 Change-Id: I5c20da56d465dbcf4366130394f7c42635a24cc7
2021-06-17Introduce VTY command to disable srvcc fast-return on target BTSPau Espin Pedrol1-0/+3
Related: SYS#5337 Change-Id: I2ac91b5dffc9b6de60576aabe21a15f24fea38cb
2021-06-04Make interference measurement parameters configurableVadim Yanitskiy1-0/+3
According to 3GPP TS 45.008, the BSS shall monitor the levels of interference on its IDLE traffic channels. The actual measurements are performed in the BTS and then reported to the BSC over the A-bis/RSL link(s) in RF RESource INDication messages. 3GPP TS 45.008 defines the following measurement parameters: * Intave: Interference Averaging period (see table A.1), * Interference level Boundaries (see table A.1). Both parameters are sent to the BTS over the A-bis/OML, and can now be configured via the VTY interface. Only those BTS models which 'speak' the OML protocol defined in 3GPP TS 52.021 will actually get the configured parameters, others will keep using the hard-coded parameters. Change-Id: I99ebf57aac1f3ca7e0497c3b4f6b0738c6ed7e47 Related: SYS#5313, OS#1866
2021-05-04stats: add BTS uptime counterMichael Iedema1-0/+4
Change-Id: Ib17674bbe95e828cebff12de9e0b30f06447ef6c
2021-04-23Revert "update neighbor ARFCNs on startup and config changes"Pau Espin Pedrol1-1/+0
This patch caused major breakage in my setup, with BSC printing at startup: "(bts=0,trx=0) Failed to generate System Information". And bts-trx printing all the time: "sysinfo.c:162 PH-RTS-IND: Unable to determine actual BS_AG_BLKS_RES value as SI3 is not available yet, fallback to 1" This reverts commit c1a5310a3ed75ff24dc2d6a48c09d8dfc89d944c. Change-Id: I5da365c93aedc6668a77b82ee9b68cbec64967e3
2021-04-22update neighbor ARFCNs on startup and config changesNeels Hofmeyr1-0/+1
The effects of the neighbor configuration depend on the LAC, Cell Identity, ARFCN, BSIC configuration of neighbor cells. Make sure that the neighbor ARFCN list in the System Information is updated. This may seem rather aggressive: updating the SI of all BTS if only one config item changed. But indeed even modifying one config item of one BTS may cause a change in the neighbor relations that many other BTS may have to the changed BTS. For example, if many BTS configure a 'neighbor lac-ci 42 23', and this cell's config changes to LAC 43, all of those other BTS need to update their neighbor ARFCNs. Also update the system information even before the BTS are connected and started up. The main benefit here is that the VTY 'show bts N' command then already lists the correct neighbor ARFCNs. In gsm_bts_trx_set_system_infos(), make sure that the updated SI is only sent to TRXes that are actually usable, otherwise abis_rsl_sendmsg() spams the log with complaints that a message's dst == NULL. Still return an error rc in case a TRX is not connected, so that the CTRL command bts.N.send-new-system-informations accurately returns whether SI were actually sent to all TRXes. The desire to have the ARFCNs listed in the VTY before starting up BTSes came during analysis for Ifb54d9a91e9bca032c721f12c873c6216733e7b1, which fixes a bug that is now much easier to verify being fixed. Change-Id: I2222e029fc225152e124ed1e8887f1ffd4a107ef
2021-04-12Replace all references to 'sysmobts' with 'osmo-bts'Vadim Yanitskiy1-1/+1
sysmoBTS is a BTS model sold by Sysmocom, which runs osmo-bts. The later may also work with some other back-ends, including the genaral purpose SDR hardware. Therefore, it's more logical to call it 'osmo-bts'. Change-Id: I93ab4dbf483e0786c35685b75ee4ea83bd591f7b
2021-04-12stats: Count transitions from BORKEN state due to LCHAN_EV_TS_ERROR signal.Alexander Chemeris1-0/+1
Change-Id: Ice3379020039dc3634aa3887939740729d720dee
2021-04-12[hopping] Rework generation of Cell/Mobile AllocationVadim Yanitskiy1-0/+1
Calculating the Cell Allocation (basically a bit-vector of all the frequencies allocated to a cell) on the OML link establishment has several downsides and potential problems: * Theoretically, more than 64 ARFCNs can be allocated for a cell via the VTY interface. The problem here is that the Mobile Allocation IE cannot contain more than 64 channels. * The BSC's operator will neither be warned by the interactive VTY shell during configuration, nor during the startup. * The BSC will accept such a configuration, but then will be unable to encode the Mobile Allocation IEs at run-time. This change aims to improve the situation by separating part of the logic from generate_cell_chan_list(), and invoking this part directly from the VTY commands. This way it will become impossible to configure more than 64 ARFCNs, neither via the config file, nor interactively from the VTY. Change-Id: I98211fb0684a973239f5760e1de52a24a1f4c33c
2021-04-04Ignore CHANnel ReQuireD with Access Delay IE > 63Keith1-0/+4
It is observed that a CHANnel ReQuireD with access delay greater than 63 can be received from the Ericsson RBS. This results in osmo-bsc sending back a CHANnel ACTIVation with a Timing Advance IE containing the access delay value. The RBS NACKs this, leading to a BORKEN Channel. This patch makes the maximum acceptable access delay vty-configurable and Ignores CHANnel ReQuireD RSL Messages with Access Delay IE greater than that configured. Default value is 63. Related: OS#5096 Change-Id: Ie8987bcc0e43921bc753162b77a0efc68799b3ce
2021-03-24fix/refactor neighbor configNeels Hofmeyr1-4/+7
The neighbor configuration storage is fundamentally broken: it requires all local cells to be configured before being able to list them as neighbors of each other. Upon config write-back, the neighbor config however is placed back inline with the other config, and hence a written-out neighbor config no longer works on program restart. The cause of this problem is that the config is stored as explicit pointers between local cells (struct gsm_bts), which of course requires the pointer to exist before being able to reference it. Instead, store the actual configuration that the user entered as-is, without pointers or references to objects that need to be ready. Resolve the neighbors every time a neighbor is needed. Hence the user may enter any config at any place in the config file, even non-working config (like a BTS number that doesn't exist), and the relation to actual local or remote neighbor cells is made at runtime. Abort program startup if the initial neighbor configuration contains errors. Related: OS#5018 Change-Id: I9ed992f8bfff888b3933733c0576f92d50f2625b
2021-03-24refactor handover penalty timersNeels Hofmeyr1-0/+2
So far the list of penalty timers was stored for an opaque target pointer. That was either a gsm_bts pointer for a local BTS, or a cell identifier list pointer for a remote-BSS cell. Reasons to refactor penalty timers: - The cell identifier list pointer came from the neighbor configuration storage, but the way cell neighbor config is stored will change in a subsequent patch. There will be no more cell identifier lists there. - Storing object pointers is inherently unsafe -- if an object gets removed and another gets allocated, the penalty timer could theoretically remain in force for an unrelated object. Rather store penalty timers for specific Cell IDs. Since remote-BSS neighbors can be requested by a cell identifier *list*, use a gsm0808_cell_id_list2 as key in the list of penalty timers. Fix handover_test.c: have different CI for each local BTS. So far it was the same LAC+CI for all BTSes, which now would make the test fail, because any penalty timer would appear to apply to all local cells. Related: OS#5018 Change-Id: I72dd6226a6d69c3f653a3174c6f55bf4eecc6885
2021-03-13Add vty command for Ericsson RBS2000 syncJavi1-0/+2
This commit adds support for Selection of syncronization source. Options are internal for E1 and external for GPS Change-Id: Ia3d1acd6b3442238b35fc911092e12a6ac989adb
2021-02-17stats: add SIGN/SPEECH assignment subcategoriesMichael Iedema1-0/+12
Change-Id: I73f4dab6edb0951180f2bbcfc352ff34de647679
2021-02-09Introduce VTY cmd to configure Alpha in SI13Pau Espin Pedrol1-0/+3
Related: SYS#5358 Change-Id: I8b97ea11bad5fe05f2f634945b5703ee9abde81d
2021-01-30Allow configuring SI13 CCN_ACTIVE bit from VTY, enable by default on osmo-btsPau Espin Pedrol1-0/+4
This is required in order to tell MS that osmo-pcu now supports Network Assisted Cell Change (NACC). Other BTS are not enabled by default since NACC support is not known to work nor tested there. Depends: libosmocore.git Change-Id I61991266b95d0c13d51b47906cc07846e9cf1390 Related: SYS#4909 Change-Id: If91d85331d402c3ab9c32b70c2c66cd7ba6ceb28
2021-01-30stats: Add granularity to chan:rf_fail stat.Michael Iedema1-0/+2
Add additional counters to track TCH and SDCCH RF failures in separate subcategories. Change-Id: I91fe6659fe9df33763f4070b4f505561b2005d38
2021-01-18stats: Add granularity to SDCCH/TCH/LU activity.Michael Iedema1-0/+15
Change-Id: I4df275e4770c5ff3643c79ba828e736986f8bb47
2021-01-02abis_om2000: keep OM2K FSMs around, don't terminateHarald Welte1-0/+1
The existing code uses short-lived FSMs which are allocated straight before START, and which are free'd after DONE state is reached. While that works, it makes state introspection a bit hard, as one cannot show the FSM states, etc. Let's change to a different model where the per-OM2k-MO FSMs are always around (in state INIT after object creation). While at it, also introduce a RESET event that can reset each FSM instance back to INIT state, i.e. in case of OML link failure. Change-Id: Ia37cffff5c451e1d79a52ccae41ab5718b4661d4
2020-12-29Add a bts_model->bts_init() and trx_init() call-back functionHarald Welte1-0/+8
This allows a given BTS model driver to initialize data structures specific cor this BTS instance (or a TRX for this BTS instance). Change-Id: Icbad9cdc12221c9ad997267d77e5414edcbac538
2020-12-19power_control: add encoding/init API to 'struct gsm_bts_model'Vadim Yanitskiy1-0/+5
This change introduces two optional function pointers: - power_ctrl_enc_rsl_params() - this function will be called by the A-bis/RSL code in order to encode MS/BS Power control parameters for CHANnel ACTIVation and MS/BS POWER CONTROL messages. - power_ctrl_send_def_params() - this function will be called for each transceiver on A-bis/RSL link establishment in order to send default MS/BS Power control parameters. Change-Id: Iba3ad5d8d549a6676050272f85b21c9b4c219d21 Related: SYS#4918
2020-12-19power_control: add new structures and default parametersVadim Yanitskiy1-0/+4
Change-Id: I7fb8ccb997490b40a061d09c241359aaabc37c4a Related: SYS#4918
2020-12-15Use rest_octets functionalities from libosmocorePau Espin Pedrol1-1/+1
libosmocore > 1.4.0 is required (master, not yet released) since some fixes done in osmo-bsc code where not cherry-picked to libosmocore APIs. Depends: libosmocore.git I2bf5635b8536b11d69774d17ac1908019633e3af Change-Id: I7d5e5ddd174463c2a3d957c8245d2911ce013681
2020-12-04oml: Delay configuring NSVC until BTS features are negotiatedPau Espin Pedrol1-0/+5
This is needed in order to to proper feature support verification for IPv6 when configuring the NSVC. Before this patch, there could be a race condition where NSVC FSM checked for BTS feature BTS_FEAT_IPV6_NSVC before it was negotiated through BTS Get Attributes (Ack). Fixes: OS#4870 Change-Id: I7c207eee0e331995ae04acec014fbd13d4d16280
2020-12-03Store GPRS MOs directly under BTS SiteMgr objectPau Espin Pedrol1-26/+8
The only real 1-1 relationship between BTS NM objects is the one between GPRS Cell and BTS (which is actually a BTS cell). In our current osmo-bts implementation we don't care much since we only handle 1-cell BTSses, but let's make the data structure organization more generic. Implementation notes: The gsm_bts_sm is moved to its own file, APIs to allocate are added and the new public object is hooked correctly in the allocation process of osmo-bsc. Change-Id: I06461b7784fa2a78de37383406e35beae85fbad8
2020-12-01bts: add repeated acch mode flags + vty configPhilipp Maier1-0/+4
To be able to control the FACCH/SACCH repetition behavior inside the BTS a one byte flag is sent to the BTS together with the RSL_IE_OSMO_REP_ACCH_CAP IE. This patch adds the necessary VTY commands. The sending of the flag is implemented in a follow-up patch. See also: I39ae439d05562b35b2e47774dc92f8789fea1a57 Related: SYS#5114, OS#4796, OS#4794, OS#4795 Depends: libosmocore I6dda239e9cd7033297bed1deb5eb1d9f87b8433f Change-Id: I083eaa2c30478912426e9c24a506f0b88836e190
2020-10-19bts: move rate counter / stat item definitions from *.h to *.cVadim Yanitskiy1-168/+4
A header file should only contain declarations, not entire definitions. The fact that we have 'static const struct ...' definitions in a header file means that very C file including this header file will get its own private copy of the entire definition. The header file should only include declarations, while the actual non-static definitions should go to a *.c file. Let's fix this. Also, take a chance to improve readability and apply more consistent formatting (similar to 'struct hf_register_info[]' in Wireshark). Change-Id: Ib5949879902acbe1edda577477d9d51a2cc425d1 Closes: OS#4816
2020-10-15OML: Stay compatible with older osmo-bts versionsPau Espin Pedrol1-0/+6
Older osmo-bts versions (before FSMs) tended to mimic broken behavior from nanoBTS. As so, we detect it because SiteMGr becomes Enabled by default as in nanoBTS, and hence we can manage them also by expecting no Offline state and sending Opstart (and hence finally transitting to Enabled) during Dependency state. Change-Id: Iaa036a2936f609b9b9721b2b4ad8d6deaf023f42
2020-10-15Introduce NM BTS Site Manager FSMPau Espin Pedrol1-3/+10
Change-Id: Ic001ce6ebeff6f51470ef58140b0235f4a30265e
2020-09-07abis_rsl: prioritize emergency calls over regular callsPhilipp Maier1-0/+1
when an emergency call arrives while all TCH are busy, the BSC should pick an arbitrary (preferably the longest lasting) call / lchan and release it in favor of the incoming emergancy call. The release of the existing call is a process that can not be done synchronously while the ChanRQD is handled sonce multiple messages are exchanged between BTS and MSC and multiple FSMs need to do their work. To be able to release one lchan while handling a ChanRQD a queue is implemented in which the incomming channel requests are collected. If an emergency call is established while all channels are busy, an arbitrary lchan is picked and freed. When freeing the lchan is done, the queue is checked again and the emergency call is put on the free lchan (TCH/H or TCH/F). Change-Id: If8651265928797dbda9f528b544931dcfa4a0b36 Related: OS#4549
2020-09-03lchan_fsm: make rsl mode-modify working againPhilipp Maier1-0/+4
osmo-nitb supports the modification of an lchan if the lchan is compatible but in the wrong mode. This feature was dropped in the transition to AoIP/bsc-split. However, osmo-bsc still has code to generate and parse the messeages, but the FSMs do not support a mode modify yetm Lets add handling for mode-modify to the lchan_fsm and assignment_fsm in order to support mode modify again Change-Id: I2c5a283b1ee33745cc1fcfcc09a0f9382224e2eb Related: OS#4549
2020-08-31add {BTS,BSC}_CTR_INTER_BSC_HO_OUT_FAILED for RR HO FailureNeels Hofmeyr1-0/+2
So far, during inter-BSC outgoing handover, when receiving an RR Handover Failure from the MS, it would be counted as 'error'. Instead, add the 'failed' counter like for all other HO types. It may make sense to omit the 'failed' counter for inter-BSC *incoming* handover, because then we won't receive an RR Handover Failure message. I probably got those two mixed up during initial development. Related: OS#4736 Change-Id: I9a61d5cc7273a830ba4e66e43e4aac6cdb707471
2020-08-24Count intra-cell and intra-bsc handover separatelyDaniel Willmann1-0/+86
Currently the counters don't distinguish between intra-cell and intra-bsc handover. Add _CTR_INTRA_CELL_HO_ and _CTR_INTRA_BSC_HO_ counters to track intra-cell/bsc handover separately. Change-Id: I3a1195640b99813036c9f1426ee5f07548e26547 Related: SYS#4877
2020-08-24Count handover per BTS as well as per BSCDaniel Willmann1-0/+47
Our current handover counters only count success/failures per BSC. It would be nice to also count which BTS is part of a (successful/failed) handover. This patch duplicates the BSC counters for the BTS and changes the ho_count and related macros to also count per BTS. If a BTS is NULL (when conn->lchan is NULL) counting for the BTS is ignored. Change-Id: I025ef14e2cfd2eea8880212c9406372ce0bf9296 Related: SYS#4877
2020-07-29Introduce support for ACC subset rotationPau Espin Pedrol1-0/+1
See updated documentation section in manuals/chapters/bts.adoc regarding an explanation on how the system works. Related: SYS#4911 Change-Id: I952c9eeae02809c7184078c655574ec817902e06
2020-07-18Move gsm_bts_{trx_}set_system_infos APIs to bts{_trx}.*Pau Espin Pedrol1-0/+2
Change-Id: I2aa83b499d6e5d06a0fa1001fee3111f7e639c94
2020-07-18Move struct gsm_bts_trx: gsm-data.* => bts_trx.*Pau Espin Pedrol1-0/+1
See rant fro similar recent commit moving stuff to bts.*. Change-Id: I11758ca3d255d849d77bd068f24bb68bde1f89a5
2020-07-18bts: Drop duplicated function to get trx by numberPau Espin Pedrol1-1/+1
In the big mess of gsm_data we reached a point where we have multiple functions doing the same thing, most probably because it's hard finding stuff in there. Let's drop one of them (the one which less callers) and move it to bts.*, where it belongs. Change-Id: I9071a0ab250844619280fbe2be63ed99f2c87eb1
2020-07-18Move struct gsm_bts: gsm_data.* => bts.*Pau Espin Pedrol1-0/+634
Place all code related to the object into the related file. Having all the data model in one file made sense in early stage of development to make progress quickly, but nowadays it hurts more than helps, due to constantly growing size and more and more bits being added to the model, gaining in complexity. Currently, having lots of different objects mixed up in gsm_data.h is a hole of despair, where nobody can make any sense were to properly put new stuff in, ending up with functions related to same object in different files or with wrong prefixes, declarations of non-existing functions, etc. because people cannot make up their mind on strict relation to objects in the data model. Splitting them in files really helps finding code operating on a specific object and helping with logically splitting in the future. Change-Id: I00c15f5285b5c1a0109279b7ab192d5467a04ece