aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-omldummy
AgeCommit message (Collapse)AuthorFilesLines
2020-10-20Introduce NM Channel FSMPau Espin Pedrol1-5/+5
Change-Id: I288cbfb4730b25a334ef1c3d6b9679d6f1d4cfc5
2020-10-20Introduce NM Radio Carrier and Baseband Transceiver FSMsPau Espin Pedrol1-15/+8
All the Operative State logic to manage a RadioCarrier//BBTransc NM objects is centralized in these FSM, where other parts of the code simply send events to it. This allows keeping state consistent and offloading logic from each bts backend, since they are only required to submit events now. The idea in the long run is to also replace other NM objects with similar FSMs. This improved logic fixes bug where PHY + RSL link became available before OPSTART and hence op state changed to Enabled before receiving any OPSTART message. Change-Id: Ifb249a821c4270918699b6375a72b3a618e8cfbe
2020-10-20Introduce NM BTS FSMPau Espin Pedrol1-1/+3
Change-Id: Iae631bcc7acdf955296b124707e42d5e565af186
2020-10-20Introduce NM BTS Site Manager FSMPau Espin Pedrol1-1/+4
This fixes old behavior mimicing broken behavior in nanoBTS (according to TS 12.21) where BTS Site Mgr NM object was announced as Enabled despite no OPSTART was sent by the BSC. With this new FSM, BTS SiteManager will be announced as Disabled Offline during OML startup conversation, instead of Enabled. The new osmo-bsc OML management FSMs use this change in behavior to find out whether it should use the old broken management states (without Offline state, as per nanoBTS) or use the new state transitions (which allow fixing several race conditions). Change-Id: Iab2d17c45c9642860cd2d5d523c1baae24502243
2020-10-20Change NM Channel availability Dependency->Offline when RadioCarrier becomes ↵Pau Espin Pedrol1-0/+13
enabled This fix allows osmo-bts to play fine with newer osmo-bsc NM OML FSMs, which expectes for non-nanoBTS types to follow TS 12.21 guidelines. Until now, BSC simply waited to received State Event Change Dependency for each TS and then sent all required commands (Set Chan Attr, Adm Unlock and Opstart). In newer osmo-bsc FSMs, Opstart is only sent when in Offline state, so we need to transit to that state. For the above mentioned reason, since we pass through the Dependency state anyway after this patch, older osmo-bscs will work correctly too. Change-Id: Id9e61f8d773e6e6170c68b5b836d276c747d8d69
2020-10-03osmo-bts-omldummy: suppress 'Unimplemented bts_model_trx_deact_rf'Vadim Yanitskiy1-1/+0
There is no PHY in case of osmo-bts-omldummy, so nothing to deactivate. Change-Id: I4bae1c7ec677e22175aa5be67b41a357ba3c3cc1
2020-10-03osmo-bts-omldummy: fix: do not crash on OML connection drop/failureVadim Yanitskiy1-3/+0
This regression was introduced in 2ff4592ffc78649bb5c14a213a74569b43da255b. There is simply no PHY in case of osmo-bts-omldummy. Change-Id: I864ac3f15e06462d6ce808b3f2188c5c39a5aad2 Fixes: Ic00df9e7278d42bc10c1e1a1c0edde7e13199299
2020-09-15Fix RadioCarrier OML Operative State Change report not sent on some scenariosPau Espin Pedrol1-1/+2
Operative state is mainly maintained based on 2 requirements: * phy_link being in CONNECTED state * RSL connection being up and ready However, state change report triggered over OMl towards BSC was only done upon the first event of the two. That means that if for whatever reason the RSL connection was established AFTER the phy_link became CONNECTED (ie receiving RSP POWERON in osmo-bts-trx), then the status towards the BSC would not be updated and hence the BSC would still see the Radio Carrier object as DISABLED. The trx_set_available() function is renamed to trx_operability_update() to keep the logic conditions in one place, and different events triggering a change in state simply call the function and let it handle the new state. Related: SYS#5063 Change-Id: Ic00df9e7278d42bc10c1e1a1c0edde7e13199299
2020-09-02osmo-bts-omldummy: enable BTS_FEAT_{CBCH,HOPPING} supportVadim Yanitskiy1-0/+2
Otherwise osmo-bts-omldummy would reject OML Set Channel Attributes containing the hopping parameters. This change is needed for the new BSC_Tests.TC_fh_params_* test cases. Change-Id: I38692252baa7a9fc23078121db0a17557950e4d4 Related: SYS#4868, OS#4545
2020-08-03Constify the 'trx' argument of trx_get_hlayer1() everywhereVadim Yanitskiy1-1/+1
Change-Id: I44523d26f2f564932ea95c17b1041d0ca9cc2828
2020-06-25bts-omldummy: Speed up shutdown (instantaneous ramp)Pau Espin Pedrol1-0/+3
Change-Id: I4d4e7a5bfb899787605b3b25dcdc9e9470c438d9
2020-06-25bts-omldummy: Implement bts_model_trx_closePau Espin Pedrol1-1/+2
Change-Id: I13221e5dffe3290fc791f8866f25141fcc0821ff
2020-06-25Fix shutdown in osmo-bts-{omldummy,virtual}Pau Espin Pedrol1-1/+1
Change-Id: Idadb62ec25181b140d9061dc7470da00d47d8336
2020-06-23bts_model: Convert bts_model_trx_close() to return asynchronouslyPau Espin Pedrol1-2/+2
Some backends like osmo-bts-trx require exchanging messages like POWEROFF to close the TRX, and hence need some time. Switch the function to expect result asynchronously by calling a callback. This will be used later to wait until all TRX are really powered off before exiting the process. Change-Id: I7d76b600fc06e1114b35bf0c2d08eff5bbd1b69a
2020-06-18Fix missing bts_model implementations in stubs.c and bts_model.cPau Espin Pedrol1-0/+5
These will be required by compiler/linker after next changes. Change-Id: Icd20d64cf973f4cf4425b46d4102747db53d8990
2020-06-02osmo-bts-omldummy: make number of transceivers configurableVadim Yanitskiy1-2/+3
Change-Id: I712988a289c446c76dc4d9de0189fe448ae08e4d Related: OS#4570
2020-06-02osmo-bts-omldummy: print a brief usage statement if argc < 3Vadim Yanitskiy1-0/+5
Change-Id: Iff2e3c47ed12f02f75589e7bd0cccb5dab32d040
2018-11-26bts_model: Allow TS connect to be processed asynchronouslyPau Espin Pedrol1-2/+2
This commit doesn't change internal logic of any model, only the API to be able to return result of connect TS asyncrhonously since some models (like osmo-bts-trx) require some time to process the result. This way PDCH ACT/DEACT (N)ACK can be sent once the result of this long process is known. For instance, nowadays in osmo-bts-trx we PDCH (DE)ACT ACK before getting the result from SETSLOT on the TRX iface. With this new API, bts_model_ts_connect doesn't return any value synchronously. Instead, it is expected to always end up calling cb_ts_connected with the return code from the TS activation process. 0 is considered a successs, while any other value is considered an error. Change-Id: Ie073a4397dd2f1a691968d12b15b8b42f1e1b0cf
2018-11-18bts: Allocate TRX for BTS dynamically, deprecate -tPau Espin Pedrol1-0/+5
No need to pass -t num_trx anymore to specify number of TRX to use. It is calculated based on dynamic allocation from VTY config. Using parameter -t is flagged as deprecated and is transformed into a NOOP por backward compatibility. As a result, TRX now are allocated after the BTS is allocated and initial config (pre-VTY) is applied. A new function bts_trx_init() is added, to set default config on each TRX during allocation and before setting VTY config on it. A new per BTS model function bts_model_trx_init() is added, to allow per model specific default configuration of each TRX. Change-Id: Iab1a754ab12a626759f9f90aa66f87bdce65ac9c
2018-07-02Remove unneeded direct libortp dependencyPau Espin Pedrol1-2/+2
All code in osmo-bts goes through APIs in libosmotrau (osmo_ortp.h), hence direct dependency is not needed. Fixes OBS warnings: dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-bts-trx/usr/bin/osmo-bts-trx was not linked against libortp.so.9 (it uses none of the library's symbols) dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-bts-virtual/usr/bin/osmo-bts-omldummy debian/osmo-bts-virtual/usr/bin/osmo-bts-virtual were not linked against libortp.so.9 (they use none of the library's symbols) Change-Id: I96a9b5f0678331dcf66c007928866a124d8700de
2018-04-17Include missing headers for osmo_init_logging2Pau Espin Pedrol1-0/+1
Fixes implicit declaration warning messages at compile time. Change-Id: I753ed49cdcbd1301ba7ea38dcea9113d99fecb06
2018-04-04use osmo_init_logging2() with proper talloc ctxNeels Hofmeyr1-1/+1
Completely drop bts_log_init(), call osmo_init_logging2() directly instead: all callers of bts_log_init() passed NULL as category string, so all it ever did was call osmo_init_logging(). The bts_log_info is already declared in the .h. Here and there also define a proper talloc root context instead of using NULL. Change-Id: Ic049f77bef74123b95350bcae182a468e0086b9c
2018-03-23cosmetic: remove unused variable in osmo-bts-omldummy/main.cPhilipp Maier1-1/+1
Change-Id: I85d8c77589eae511f47b8b9b7439a2c47fe350d8
2018-03-17Add 'osmo-bts-omldummy' to bring up only OML without RSLHarald Welte4-0/+283
This is used only in integration testing, where in the TTCN-3 testsuite we currently have no A-bis OML implementation, but only a RSL one. Change-Id: Id8e5f34091e6e32621d8c8673de7ea848dfd252f