aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-omldummy
AgeCommit message (Collapse)AuthorFilesLines
2024-02-17Fix license headers.Harald Welte1-1/+1
We have licensed the code under GNU Afffero Public License, and state that in the first paragraph as well as in the link to the license. However, a paragraph in the middle stated "see the GNU General Public License", which is somewhat misleading. Let's fix that. Change-Id: I37e503b195fe43e1da42c080900504ca8e682e76
2023-07-21omldummy: Claim to support VBS + VGCS towards BSCHarald Welte1-0/+2
This tells our TTCN3 BSC tests to perform VBS/VGCS related procedures on RSL. Change-Id: I9ed1b20985d2ce3be31942d3e9df5cad513a0bfd Related: OS#5778, OS#5779
2023-05-08RTP input, FR & EFR: preen incoming payloads for SID errorsMychaela N. Falconia1-0/+1
Those network elements which receive a stream of codec frames that may come from the uplink of GSM call A and which are responsible for preparing the frame stream for the downlink of GSM call B (such as OsmoBTS receiving RTP and feeding DL to its PHY) must be prepared for the possibility that their incoming frame stream may contain corrupted SID frames, presumably from bit errors on radio link A. Per the rules of section 6.1.1 of GSM 06.31 for FR and GSM 06.81 for EFR, SID frames with just one errored bit are still to be accepted as valid, whereas frames with more corrupted bits which are still recognizable as SID are classified as invalid SID. In the case of a TrFO call, the entity switching from leg A UL to leg B DL is responsible for *not* transmitting invalid SID frames on the destination leg (they should be treated like BFIs), and any deemed-valid SID frames that are forwarded should be preened, correcting that one bit error they may exhibit. Implement this functionality in OsmoBTS. Change-Id: I89df2f12c49dd5378667cf149d19bde654f80134
2023-04-11Merge gsm_network into gsm_bts_sm and place gsm_bts under itPau Espin Pedrol1-1/+7
This way the data model in TS 12.21 (Figure 1) is followed, where there's a BTS Site Manager containing one or more BTS. In our case we only support 1 BTS (cell) so far. Change-Id: Ideb0d458ec631008223f861cf8b46d09524a1a21 Related: OS#5994
2023-04-11Introduce NM FSM for GPRS NSVC objectPau Espin Pedrol1-4/+1
Change-Id: I684482064136a461d01cace3cd37afc8b68458cc Related: OS#5994
2023-04-06Introduce NM FSM for GPRS Cell objectPau Espin Pedrol1-1/+1
Change-Id: I5fd1d17da09a5f0eee3d69fcb4788c106a240e21 Related: OS#5994
2023-04-06Introduce NM FSM for GPRS NSE objectPau Espin Pedrol1-1/+1
Related: OS#5994 Change-Id: I01eadc63214a2eb5e1bce455c7e5b62bd41905ea
2023-04-06Simplify implementation of bts_model_opstart() in all bts typesPau Espin Pedrol1-16/+2
Use mo->fi directly to avoid repeating code paths for each obj_class. Change-Id: I54632201afe87eb3e02bc75cbade163917239ab6
2023-04-06bts_model_apply_oml(): Improve definition of parameterPau Espin Pedrol1-1/+2
The param is usually called obj_class, but here it is called kind. In any case, change the param to pass the related struct gsm_abis_mo (which still contains mo->obj_class), similar to what's done in other bts_model functions such as bts_model_opstart(). Change-Id: Ife2e98a791455d5f7e7052356d559af2f1d4d185
2023-04-06oml: Get rid of unused tlv_parsed param in bts_model_apply_oml()Pau Espin Pedrol1-2/+1
This way we simplify the common lower level interface. It can be added in the future again if it is really required at any point to pass/use specific TLV values in the device-specific code. Change-Id: I64c6c6834e277b1d75a97d6f408e7e1b7ca85832
2023-04-06nm: Drop NM_EV_SETATTR_{ACK/NACK}Pau Espin Pedrol1-12/+7
Simply return error codes from lower layer implementations, and do the OML handling in the common NM TS 12.21 FSMs. As a result, we simplify the logic in the lower layers. Change-Id: I281c07bb5ad88ee03542f092141cebe036d10aee
2023-04-05nm: Apply BTS/TRX/TS OML Attributes through NM FSMsPau Espin Pedrol1-2/+1
This way we have further control on how to handle the SetAttr meessages received. For instance, NACK them if the NM object FSMs are not at the expected correct state. The originating msgs are now kept owned and freed by the OML layer (oml.c), and the NM FSMs only uses them and create new OML msgb when answering with ACK/NACK. Related: OS#5992 Change-Id: Id68868e25bbf96227ab6459fcd3c9181852ed28e
2023-04-04bts_model_apply_oml(): Drop unneded codePau Espin Pedrol1-8/+0
Calls to bts_model_apply_oml() are done only for BTS, RCARRIER and RCHANNEL NM Objects in their respective Rx code paths (and they will be moved to respective FSMs in follow up patches). This function is never called with any of the GPRS NM objects. These NM Objectes have the NM_MT_IPACC_SET_ATTR msg ACKED/NACKED in its own path: oml_ipa_set_attr() rc = oml_ipa_mo_set_attr() return oml_fom_ack_nack(msg, rc); Change-Id: I1a0d38a122f50ffe749ebc4f1cc11235ca516586
2022-09-06Depend on libosmo-netifPau Espin Pedrol1-0/+2
This library will be used soon when adding Osmux support to osmo-bts. Furthermore, it nice to have it available to make use of other general interfaces to create connections, primitives, RTP and AMR related functionalities, etc. Related: SYS#5987 Change-Id: I49db4de715065c083e1249cbeae6298d6868e229
2022-08-11Clean up osmo-bts-*/Makefile.amPau Espin Pedrol1-2/+21
Make them more easy to read and edit by splitting to one element per line when several elements are present. Change-Id: I24ecfa1167b806dcb3a5a0c00343299df842a78b
2022-04-25model_init: order features alphabetically, part 2Oliver Smith1-1/+2
Order the ones I've overlooked as well. Related: SYS#5922, OS#5538 Change-Id: I0aa344de9ea4849de0fcd7b44bfaa70274af594b
2021-09-22nm_*fsm: Make FSMs aware of object being properly configured or notPau Espin Pedrol1-5/+23
This will allow in the future advertising children objects that the parent object has been configured. It is useful for instance to let TRX know that the BTS is configured. Change-Id: Ie319465fd0e991bab8451ea34ec72ff3702533d2
2021-09-20Allow setting administrative state through oml_mo_state_chg()Pau Espin Pedrol1-1/+1
This way it can be changed together with operative/availability state, and changes announced to the BSC if present. This commit presents no real change in osmo-bts behavior, since the only place where adm_state is passed different than -1 is in st_op_disabled_notinstalled_on_enter(), which is actually never called (yet) since it's the initial state and no other states transition later to it. However, this will change in the future once we support re-connecting to a (possibly different) BSC, which means objects will need to be moved to that state to restart the whole OML install procedure on the new BSC. Change-Id: Ifdc6a1dfb673c0ab915ddf2a9d372928f4f86b4c
2021-07-19allow to configure multiple oml remote-ip addressesPhilipp Maier1-4/+8
At the moment we can only configure a single BSC in the BTS configuration. This also means that if this single BSC fails for some reason the BTS has no alternate BSC to connect to. Lets extend the remote-ip parameter so that it can be used multiple times so that an operater can configure any number of BSCs that are tried one after another during BTS startup. Change-Id: I205f68a3a7f35fee4c38a7cfba2b014237df2727 Related: SYS#4971
2021-06-30osmo-bts-omldummy: indicate BTS_FEAT_BCCH_POWER_RED as supportedVadim Yanitskiy1-0/+1
This is required for ttcn3-bsc-test, see change [1]. Change-Id: I765d5e38cb0746e0458773abf3717ee9bf1cb7d1 Related: [1] I084f7736cd7d09b68ed49f8ba52a14de928d4c01 Related: SYS#4919
2021-06-05[VAMOS] osmo-bts-omldummy: allocate shadow timeslotsNeels Hofmeyr1-0/+6
Change-Id: I4aa9a8bb35bd828d6f25d5690297e727dace5974 Related: SYS#4895, OS#4941, SYS#5316, OS#4940
2021-04-27omldummy: add cmdline arg --featuresNeels Hofmeyr1-2/+37
The current usage is to make osmo-bts-omldummy indicate BTS_FEAT_VAMOS on OML, so that we can test osmo-bsc's behavior when VAMOS is enabled. Related: SYS#4895 Depends: I699cd27512887d64d824be680303e70fff3677c1 (libosmocore) Change-Id: Ib50990109f07884ef999ba5a4566f5d1d457b0ae
2021-04-22omldummy: introduce using getopt_longNeels Hofmeyr1-12/+68
Prepare for adding the --features cmdline arg following in a subsequent patch. Related: SYS#4895 Change-Id: I72ccf65ba894e87ee7b0f6bed879f94728f34ccc
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