path: root/include
AgeCommit message (Collapse)AuthorFilesLines
13 daysstats: add BTS uptime counterMichael Iedema2-0/+7
Change-Id: Ib17674bbe95e828cebff12de9e0b30f06447ef6c
2021-04-28gsm_lchan_name_compute with ctxNeels Hofmeyr1-1/+1
Use a talloc ctx directly without an intermediate static buffer. A subsequent patch will add a name tweak for VAMOS secondary lchans, so it felt appropriate to first clean this. Change-Id: Idb922605c15242a2cdc7c34668c845a179a15660
2021-04-27Lb: stop RESET FSM when sccp_user is unboundNeels Hofmeyr1-0/+1
A crash was reported in bssmap_le_tx_reset() sending a RESET with sccp_user == NULL. Looking at the issue I noticed that when the sccp_user is torn down, the RESET FSM should also be terminated. Add bssmap_reset_term_and_free() to the generic RESET FSM implementation and call from lb_stop() before sccp_user is set to NULL. Related: OS#5134 Change-Id: If412ef990fcdde8ff88098a5169e86f05cd1c7f0
2021-04-24SRVCC: Parse Last Used E-UTRAN PLMN Id in Handover RequestPau Espin Pedrol1-0/+2
Whenever SRVCC EUTRAN->GERAN is performed by the CN, it will set the Last Used E-UTRAN PLMN Id in order for the BSS to inform the MS about EUTRAN neighbors once the call is over. The last part (sending EUTRAN neighs) is already implemented, since same thing is done as per CSFB. However, we lacked the first part, where the EUTRAN PLMN Id is recorded for later use. Actually, in both cases, we end up building the list of neighbors without taking into accound the PLMN value (hence no filtering of configured neighs), but it only sends such a list if any PLMN was stored there, which means this patch is still necessary for a quick fallback to 4G after the call is over. Related: SYS#5337 Depends: libosmocore.git Change-Id I0e55e947b6fef6dad0cf1a6c16b781bef4cc76c5 Change-Id: Ia5008f11a4c36ef8085a2037d4abddd131086e6e
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-19Send EUTRAN neighs based on whether Common Id msg contained Last used ↵Pau Espin Pedrol3-9/+15
E-UTRAN PLMN ID From 3GPP TS 48.008 sec 3.1.30 "Common ID": """ If the SCCP connection is established due to CSFB from E-UTRAN and the MSC supports return to the last used PLMN after CS fallback, then it should send the COMMON ID message to the BSS including the Last used E-UTRAN PLMN ID information element if available at the MSC immediately following the successful SCCP connection setup. """ Furthermore, 3GPP TS 48.008 version 16.0.0 Release 16 " CLEAR COMMAND", for field CSFB Indication, states: """ NOTE: This information element doesn't serve any useful purpose. MSCs should not send the information element unless it is required by the recipients (due to the need to interwork with older versions of the protocol). It is expected that in future versions of the present document, this information element will be deleted from this message. """ Hence, build up the EUTRAN neighbor list based on whether we received the Last E-UTRAN PLMN ID IE during Common Id. In the future, we should probably filter the list while populating it based on the received IE. This change will also allow reusing same mechanism for SRVCC EUTRAN->GERAN support, where te Last E-UTRAN PLMN ID IE can be found inside "Old BSS to New BSS information" IE in msg HANDOVER REQUEST. Related: SYS#5337 Change-Id: I5d290ac55eca5adde1c33396422f4c10b83c03d5
2021-04-14drop unused gsm_bts_trx->descriptionNeels Hofmeyr1-2/+0
Change-Id: I3c0778322b8c630b0eb9d9cd3ac3cc71386c9c12
2021-04-14drop unused func decl rsl_lchan_mark_broken()Neels Hofmeyr1-2/+0
Change-Id: Ib08e69720e2b9a6ea5f5b5d13baa9920c415f078
2021-04-12Replace all references to 'sysmobts' with 'osmo-bts'Vadim Yanitskiy2-2/+2
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 Yanitskiy2-0/+2
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 Hofmeyr4-49/+72
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 Hofmeyr3-33/+22
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-15Add command to enable RX diversity to RBS2000Javi2-0/+9
Allow selection of RX diversity from VTY Options are a,ab,b Default is 'a' so there is no change from previous behavior Change-Id: I430762b8cfa51060841d90ba4446de73bd557c6c
2021-03-13Add vty command for Ericsson RBS2000 syncJavi2-0/+7
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-13Move bts_ident_key to neighbor_ident.cPau Espin Pedrol2-2/+2
The function is not really handover specific, and will be used in other places in subsequent patches. Change-Id: Icae8b9045e497f850f22cb3b6f93acbf61b84746
2021-02-09Introduce VTY cmd to configure Alpha in SI13Pau Espin Pedrol1-0/+3
Related: SYS#5358 Change-Id: I8b97ea11bad5fe05f2f634945b5703ee9abde81d
2021-02-07power_control: make P_CON_INTERVAL parameter configurableVadim Yanitskiy1-0/+3
Change-Id: I6e0fae81cc60f708e49d5eb8dfc0bbcad926b18f Related: SYS#4918
2021-02-05lchan activation: indicate whether TA is knownNeels Hofmeyr1-0/+2
On lchan activation, we already know the Timing Advance in most situations: from the Channel Request RACH, or from a previous lchan in the same cell. Place this information in lchan->activate.info.ta. So far, the lchan->last_ta (until recently called rqd_ta) was used to store the initial TA for channel activation -- move the initial TA to lchan->activate.info.ta, for proper scoping. Only an inter-cell handover does not yet know a Timing Advance (until the Handover Detection RACH is received), so indicate activate.info.ta_known = false for that case. If ta_known is false, do not include an Access Delay IE in the Channel Activation message, ensuring that the BTS does not use an arbitrary TA that is likely inaccurate. The effect for OsmoBTS is that we will *not* start the downlink SACCH on channel activation for inter-cell handover, but will wait for a HO RACH first, and then use the correct TA when enabling downlink SACCH. Related: OS#4008 SYS#5192 Change-Id: I986bf93e8acd6aef7eaf63ac962480b680aa894f
2021-02-05rename lchan->rqd_ta to last_taNeels Hofmeyr1-1/+3
Originally, the lchan stored only the Timing Advance from the initial channel request, hence it was called rqd_ta. Since quite a while now, rqd_ta also stores the most recent Timing Advance from each received Measurement Report. So rename to last_ta. This is cosmetic preparation for an upcoming patch that clarifies whether the Timing Advance is already known for Channel Activation. Change-Id: I1049526a173819baeb4978db5bf018ba3f1006a0
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-19lchan_avail(): omit logging for handover decision 2Neels Hofmeyr1-1/+1
Add bool log argument to lchan_avail_by_type() and omit logging when passed as false. From handover_decision_2.c, pass 'log' as false, from all other callers pass true, i.e. for unchanged behavior. Rationale: Usually, we use lchan_avail_by_type() to select a new lchan to initiate actual service. For that, it is interesting to see how osmo-bsc decides which lchan will be used. For handover decision 2, we since recently call lchan_avail_by_type() for each and every handover candidate, to determine whether it will occupy a dynamic timeslot or not (to know whether we would congest the other TCH kind). So this happens for each permutation of source lchan and target cell. That produces a lot of logging, out of proportion of being useful to the maintainer. Change-Id: Ia403f8fc853ca9ea9e81f7a7395df6b23845ebed
2021-01-18stats: Add granularity to SDCCH/TCH/LU activity.Michael Iedema1-0/+15
Change-Id: I4df275e4770c5ff3643c79ba828e736986f8bb47
2021-01-13Introduce Neighbor Resolution ServicePau Espin Pedrol2-1/+18
This new CTRL interface allows users of this BSC (such as attached PCU) to gather neighbor information. This interface is needed for PCU to translate ARFCN+BSIC keys provided by MS in the Um side into CGI + RAC keys used to identify target cells in RIM procedures against SGSNs on the Gb interface. This patch extends the already existing neighbor information storage in the VTY by allowing storage of CGI + RAC (RAC couldn't be stored beforehand). Related: SYS#4909 Depends: libosmocore.git Change-Id If48f412c32e8e5a3e604a78d12b74787a4786374 Change-Id: Ib07c9d23026332a207d4b7a0f7b4e76c0094e379
2021-01-02abis_om2000: keep OM2K FSMs around, don't terminateHarald Welte3-1/+20
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-29abis_om2000: make om2k_mo_name() an exported functionHarald Welte1-0/+2
Change-Id: Idb05bcad8059ab2b2be6c7057495d0279a4b62c7
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-22power_control: add VTY command to set static / maximum BS PowerVadim Yanitskiy1-0/+4
Change-Id: I11ca856aba46aaf84d94cbbdf4c39a01ee8289b9 Related: SYS#4918
2020-12-22power_control: add VTY commands for per-BTS configurationVadim Yanitskiy1-0/+1
Change-Id: Ifd6ea29c3b9dbaccf92856131d5fb2e352b84eb2 Related: SYS#4918
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 Yanitskiy2-0/+74
Change-Id: I7fb8ccb997490b40a061d09c241359aaabc37c4a Related: SYS#4918
2020-12-19abis_rsl: turn rsl_msgb_alloc() a macro and move it to headerVadim Yanitskiy1-0/+7
Also, take a chance to make talloc chunk names more informative. Change-Id: Id25c4bf1e06f697328d10777d6449c83006e8466
2020-12-15Use rest_octets functionalities from libosmocorePau Espin Pedrol4-124/+2
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-15vty: add new attribute for vendor-specific commandsVadim Yanitskiy1-0/+1
Change-Id: I2254cdf8c4be85c89819d0f831102ee71349b188 Related: SYS#4918
2020-12-10gsm_lchan_name: assert on NULL lchanPau Espin Pedrol1-0/+1
Steve Langasek <steve.langasek@ubuntu.com> submitted some patches against downstream osmo-bsc 1.3.0 because some possible null derefences were detected by the compiler on Ubuntu s390x. Code has eveolved since then and patch doesn't apply directly anymore, since related code changed (we now use osmo_count in bsc_subscr_get). The compiled allegedly claimed some null dereference in gsm_lchan_name. In general code using that function seems to be doing checks for existing lchan before calling it, or assuming the lchan pointer is not null, so I couldn't find any major issue. However, let's add a OSMO_ASSERT to make sure we can easily identify the issue if an issue ever happens there, since the gsm_lchan_name should clearly only be called on non null pointers. Change-Id: If4d12cb1d95ee2a89244bb8f27df839871667387
2020-12-04oml: Delay configuring NSVC until BTS features are negotiatedPau Espin Pedrol2-0/+6
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-04Fix typo in function nanobts_attr_nsvc_getPau Espin Pedrol1-1/+1
Change-Id: I50235ba7b045ab7fba2112e61191d2756a67dfdc
2020-12-04Handle BTS/BBTRANSC Get Attributes (Ack) in NM FSMsPau Espin Pedrol2-0/+3
Before this patch, Get Attributes was sent quicklyafter the OML link became up, even if the BTS/BB_TRANSC objects were still powered off, which is wrong since attributes should only be available after the objects transition out of the Power off state. Furthermore, information about get attr response already received will be required in future patches to delay NSVC setting. Related: OS#4870 Change-Id: I8ec39c7e1f956ffce9aecd58a5590c43200ba086
2020-12-04Introduce NM GPRS NSVC FSMAlexander Couzens2-0/+16
Related: OS#4870 Change-Id: I381472532c2622a8dba7c81ae00ea873c2e58ae1
2020-12-03Introduce NM GPRS CELL FSMPau Espin Pedrol1-0/+9
Related: OS#4870 Change-Id: I074f4496aa153b5f84e6ce85f413754efe64d831
2020-12-03Introduce NM GPRS NSE FSMPau Espin Pedrol3-1/+15
Related: OS#4870 Change-Id: I91a5f40324d5373eac885032295690cec97214a6
2020-12-03Store GPRS MOs directly under BTS SiteMgr objectPau Espin Pedrol4-37/+81
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-01abis_rsl: parse cm3 and indicate ACCH repetition cap to BTSPhilipp Maier1-0/+3
In order to activate FACCH/SACCH repetition on the BTS, the classmark 3 IE in the CLASSMARK CHANGE message must be parsed and depending on the Repeated ACCH Capability bit the RSL_IE_OSMO_REP_ACCH_CAP is added to the RSL CHAN ACT und RSL CHAN MODE MODIFY. Since RSL_IE_OSMO_REP_ACCH_CAP is a propritary IE, it may only be added for BTS type osmo-bts. Change-Id: I39ae439d05562b35b2e47774dc92f8789fea1a57 Related: OS#4796 SYS#5114
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-11-17fix TCH/H allocation: use half occupied dyn TS instead of switching more dyn TSNeels Hofmeyr1-1/+1
Change-Id: I5a8d943f31774af00664d037550be14e767d312a
2020-11-17handover vty doc: explain rxqual valuesNeels Hofmeyr1-2/+5
Change-Id: I4f9d6b59c4f4a0550fb6a386342be55dcd777de8