aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/main.c
AgeCommit message (Collapse)AuthorFilesLines
2020-01-20l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCHPhilipp Maier1-0/+1
The MPH INFO MEAS IND indication, which contains the uplink measurement data is sent in parallel to the PH DATA and TCH indications as a separate indications. This makes the overall uplink measurement data processing unnecessarly complex. So lets put the data that is relevant for measurement into the PH DATA and TCH indications directly. This change only affects osmo-bts-trx at the moment. In order to keep the upper layers (l1sap.c) compatible we add an autodection to switch between separate measurement indications and included measurement data. Related: OS#2977 Depends: libosmocore I2c34b02d329f9df190c5035c396403ca0a4f9c42 Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84
2020-01-20ta_control: move timing advance code from osmo-bts-trx to commonPhilipp Maier1-1/+0
The timing advance controller that is implemented in loops.c of osmo-bts-trx only works for osmo-bts-trx and not for any of the phy based bts. Lets move the timing advance controller into the common part and make it available for every bts. Also lets add a unit-test. Change-Id: If7ddf74db3abc9b9872abe620a0aeebe3327e70a Related: SYS#4567
2019-11-30bts-trx: Drop low layer MS Power Control Loop algoPau Espin Pedrol1-3/+0
Let's drop it instead of having code duplication from common code in a lower layer, and maintain only the one in l1sap for all BTS models. As a result, osmo-bts-trx loses feature BTS_FEAT_MS_PWR_CTRL_DSP and will only be able to use "ms-power-control osmo" in VTY, which will be enabled by default (meaning: change of behavior, now MS Power Control is enabled by default in osmo-bts-trx and can only by disabled by BSC). Old bts-trx specific VTY command "(no) osmotrx ms-power-loop" is marked as deprecated but still working for more usual case (1 TRX configured) to avoid breaking backward compatibility. TA low level loop is still kept in loops.c and will be moved to l1sap at some point too. Related: OS#1851 Change-Id: I0d8b0c981d9ead91d93999df6e45fb06e426aeb9
2019-11-14Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSPPau Espin Pedrol1-0/+1
It indicates whether BTS model supports managing an MS Power Control Loop over HW/DSP instead of using the software based osmocom algorithm present in osmo-bts. osmo-bts-trx own loop implementation is considered to be a "DSP/HW" one since it acts on lower layers and interferes with osmocom algorithm since it controls the same end variable "lchan->ms_power_ctrl.current", this way we make sure both aren't enabled at the same time. Old behavior in kept: if common upper-layer algo is not enabled explicitly in VTY (ms-power-control osmo) and bts-trx specific lower layer algo is neither enabled (osmotrx ms-power-loop <xyz>), then no power control is done at all. Related: OS#1851 Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5
2019-10-05bts-trx: Allocate struct osmo_trx_clock_state as part of bts-trx private dataPau Espin Pedrol1-0/+4
Related: OS#4215 Change-Id: I9b7ffb51423ada74b8be347c57eade08f307f88f
2019-07-23bts-trx: Introduce VTY command osmotrx trxd-max-versionPau Espin Pedrol1-0/+2
This command allows setting a maximum TRXD format version to negotiate with TRX. osmo-bts-trx will hence end up using that version if supported by TRX, or a lower one otherwise (or fail if TRX doesn't support any of them). Since now the maximum version can be 0, avoid going through SETFORMAT negotiation in that case, since 0 is the default version. This way we keep backward compatibility with TRX implementations that exit upon receival of unknown commands (such as SC5 current one). The VTY command is located in the "phy" node instead of the "phy instance" node because instances of same phy are expected to use same host with same implementation, so TRXD version to use should be the same for both. Related: OS#4006 Change-Id: I5eb1fdc002f9d7f4acf475356d8fc998dc8f6326
2018-11-20bts-trx: setup timer once at creation timePau Espin Pedrol1-2/+1
The setup is only needed once, so no need to set it every time we want to schedule it. Furthermore, it will ease new code introduced in follow-up patches, which will schedule this timer under some circumstances without need to send a message at the same time (because re-try of a cmd after a delay is wanted). This commit adds an alloc function and an init function to keep different parts of the code decoupled and avoid exposing more implementation details between them (like exposing the trx_if timer). Change-Id: I3b6461d0130d25284e673c5efce0b3832c48bbb5
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-09-09CBCH: Implement CBCH support for osmo-bts-{trx,virtual}Harald Welte1-0/+1
This patch adds scheduler support for the channel combinations that substitute SDCCH index 2 for a CBCH in either a SDCCH/8 or SDCCH/4. Change-Id: Icc15603079a1709ec094f400a9bcf0008211890f Closes: OS#1617
2018-05-09osmo-bts-trx: Enable A5/3 cipher supportHarald Welte1-1/+1
This actually should have been working since 2015, when the following patch was merged to libosmcore: commit f8699ca51eeb4f3d34336501abcaf071b4a95a47 Author: Max <max.suraev@fairwaves.co> Date: Wed Mar 25 17:20:31 2015 +0100 gsm: Add A5/3-4 cipher support however, it seems nobody so far bothered to actually enable A5/3 for osmo-bts-trx! Change-Id: I8192d6d07cdb87783bce997456ead673c600f7c0 Closes: OS#3253
2018-03-17Get rid of 'struct gsm_bts_role_bts'Harald Welte1-3/+1
gsm_bts_role_bts was introduced at a time when we still shared gsm_data_shared.[ch] between BSC and BTS, and where we then subsequently needed a BTS-private structure. Since that sharing was abandoned quite some time ago, we can merge gsm_bts_role_bts into gsm_bts and do away with the bts/btsb dualism in a lot of the code. Change-Id: I4fdd601ea873d9697f89a748cc77bcf7c978fa3e
2018-02-22bts: use feature list instead of speech codec tablePhilipp Maier1-12/+0
osmo-bts has a table of pchan/channel mode combinations for every bts. This table models the codec capabilitys of the BTS hardware. However, having the speech codec apabilities modeled inside the BTS feature list would be much more comfortable and since the feature list is communicated back to the BSC we would get the codec capabilities inside the BSC domain as well. - remove the pchan/channel mode tables - set speech codec variants for each BTS type - fix bts_supports_cm so that it queries the feature list Change-Id: I977dc729ba856631245aedf76afd48eac92166f7
2018-02-22octphy: ensure all BTS models set featuresPhilipp Maier1-0/+5
Most of the BTS models do not or do register not all of thier features to the the feature list. - Update/extend the feature lists for all BTS-Models Change-Id: I26765a64153368016921c2ac115b1c4aec9bc5e4
2018-02-19rsl: do not allow MODE MODIFY request with unsupp. codec/ratePhilipp Maier1-0/+12
When the BSC sends a MODE MODIFY request with an unsupported codec, the BTS must respond with a negative acknowledge. Currently the codec parameter is not checked at all, which may lead into malfunction or crash of the BTS. - Introduce a mechanism to check the codec/rate against a table that is set up in the phy specific code. - Add tables with supported codec/rate combinations for octphy, sysmobts, and trx. Change-Id: Id9b222b7ab19ece90591718bc562b3a8c5e02023 Related: SYS#3212
2017-08-24osmo-bts-trx: remove global variables from loopsMax1-0/+3
* move TA related globals into phy_link * move power loop related globals into phy_link * prefix corresponding vty vars with osmotrx Change-Id: I01d7c1abad67e51b886a4ecf2de072929d67da27 Related: OS#1848
2017-08-15osmo-bts-trx: Enable osmotrx tx-attenuation oml by defaultPau Espin Pedrol1-0/+2
There are currently two ways to specify power reductions to be sent to osmo-trx from osmo-bts-trx: * osmotrx tx-attenuation oml * osmotrx tx-attenuation <0-50> None of them is enabled by default, which means if none of them is specified in the config file of osmo-bts-trx, SETPOWER cmd won't be sent to osmo-trx, which in turn won't turn on the transciever. Let's enable osmo tx-attenuation oml by default and leave it up to the bsc to decide which power reduction to use. If the user wants to configure a specific tx-attentuation, it can still do so in exactly the same way he used to do it. Change-Id: Ia8640751630ee37e5f5d1f470bad892a08e80654
2017-06-15Set and report BTS featuresMax1-0/+3
Set (possibly incomplete) list of BTS model-specific features and report them in response to attribute request via OML. Change-Id: I5f8a6681c3562ec261441e84dde6e085b516d92f Related: OS#1614
2017-06-06trx: Allow BTS and TRX to be on different IPsPau Espin Pedrol1-1/+2
Depends on libosmocore I3c655a4af64fb80497a5aaa811cce8005dba9cd9 Change-Id: I0bd34b7b02c1a9b0c6f6f89f327b486e5620c8d5
2017-05-10Set BTS variant while initializing BTS modelMax1-0/+1
This will allow proper BTS attribute reporting via OML in follow-up patches. Change-Id: I1c49d6c39fb4dac7a46ee25ceacf4c6ef0f0b736 Related: OS#1614
2017-02-10osmo-trx-bts: Fix osmo-bts-trx crash on startup during reading phy instance ↵Ivan Klyuchnikov1-0/+4
parameters from config file pinst->u.osmotrx.hdl should be allocated before reading phy_instance parameters from config file and applying them. So allocation of pinst->u.osmotrx.hdl should be moved from l1if_open function to bts_model_phy_instance_set_defaults function, which is proper place for this allocation according to start-up procedure of osmo-bts. Change-Id: I6e23f92644400acb268818c9373a8fb10c003da1
2017-02-10osmo-trx-bts: Fix incorrect setting of RXGAIN and POWER parameters on second ↵Ivan Klyuchnikov1-1/+0
channel (TRX1) of osmo-trx Move rxgain and tx-attenuation (power) parameters from phy_link layer to phy_inst layer. Rxgain and tx-attenuation parameters should be set for each phy_inst and send for each osmo-trx channel accordingly via control commands. Change-Id: I4861a59d10d1ef91954e0c6ea265e66dec08844f
2016-02-15Introduce new phy_link and phy_instance abstractionHarald Welte1-47/+31
This way we can model a flexible mapping between any number of PHYs, each having multiple instances, and then map BTSs with TRXx on top of those PHYs.
2016-02-15TRX: Move scheduler to src/commonHarald Welte1-1/+1
This is the final step to make the L1 scheduler generally available to other BTS models than OsmoTRX.
2016-01-22merge bts-specific main function into common/main.c:bts_main()Harald Welte1-246/+21
This removes a lot of copy+paste duplication between different BTS models.
2016-01-22Add new bts_model_ctrl_cmds_install()Harald Welte1-0/+2
This is one step in making the main() functions of different BTS models more similar, so we can share one code rather than multiple copies of it.
2016-01-16TRX: remove obsolete get_mac() functionHarald Welte1-37/+0
2015-09-22TRX: Add missing call to abis_init()Harald Welte1-0/+2
This somehow got lost during the latest rebase.
2015-09-22Allow TRX 0..254 at VTY, even if less TRX are availableAndreas Eversberg1-1/+1
Instead of limiting the number of TRX at VTY to the actual number of supported TRX, VTY allows to configure any possible number of TRX. If a TRX is configured, which is not supported by BTS model, an error message is returned, which states that the given TRX is not supported.
2015-09-22TRX: Close TRX (shutdown all active channels) on ABIS link failureAndreas Eversberg1-3/+0
2015-09-22TRX: Process real time scheduling option is now similar to sysmobtsAndreas Eversberg1-10/+10
2015-09-22TRX: Fixed typos tranceiver -> transceiverAndreas Eversberg1-4/+4
2015-09-22Allow one or more TRX to configure via VTYAndreas Eversberg1-1/+1
2015-09-22TRX: Add VTY options to enable and disable SETTSC and SETBSICAndreas Eversberg1-0/+2
2015-09-22TRX: CipheringAndreas Eversberg1-1/+1
2015-09-22ABIS: Introduce bts_model_abis_close to indicate ABIS link failure.Andreas Eversberg1-0/+3
sysmocom-bts model shuts down on link loss, but other models may not want this, so shutdown is moved tor bts_model_abis_close of osmo-bts-sysmo.
2015-09-22TRX: Introduce osmobts-trx, a layer 1 implementation for OpenBTS tranceiversAndreas Eversberg1-0/+402
The code is quite complete, TCH and PDCH channels are not yet tested.