aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/trx_vty.c
AgeCommit message (Collapse)AuthorFilesLines
2020-01-20ta_control: move timing advance code from osmo-bts-trx to commonPhilipp Maier1-10/+4
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-12/+5
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-10-05bts-trx: Get rid of messy transceiver_available state handlerPau Espin Pedrol1-6/+0
This variable meaning has been changing its exact meaning over time until finally not being really clear which kind of state it holds. Initially it seemed to be used to identfy whether CLOCK IND were being received. However, over time both osmo-bts and osmo-trx have evolved and were fixed so that clock indications are only sent by osmo-trx after POWERON command is sent. As a result, this state can be checked simply by looking at the "powered" phy_link variable, which is only set to true once the TRX has confirmed the POWERON command, and hence it is sending CLOCK IND. On the other hand, at some point in time "available" started to be set to 1 in bts_model_phy_link_open(), which means available is nowadays almost always 1 from startup until the end (only dropped during bts_shutdown(), when we are already exiting the process anyway). As a result, !available condition in scheduler_trx.c:trx_fn_timer_cb can almost never happen, because available is set to true already. Only possibility would be if an old process of osmo-trx (not set up by this BTS process) is still sending CLOCK INDs, but in that case we for sure don't want to configure the BTS based on that, but ignore them until this BTS process has again configured the TRX. So that whole check can be dropped. We are better checking for "powered" state, which is far more accurate, and we better do that in trx_if.c before calling trx_fn_timer_cb(). Other uses of "transceiver_available" being used can be changed to use plink->state!= PHY_LINK_SHUTDOWN, since available was already being set to 1 at the same time the plink->state was being set to PHY_LINK_CONNECTING. As a result of this state handling re-arrangement, OS#4215 is fixed since trx_if_powered() is used instead of previous state condition to check whether data frames should be sent. Related: OS#4215 Change-Id: I35f4697bd33dbe8a4c76c9500b82c16589c701d4
2019-10-05bts-trx: Rework code handling poweron statePau Espin Pedrol1-2/+2
Use of variables in each code is confusing and mixing configuration with POWERON/POWEROFF state (which is at least per phy inst and not per TRX, since those commands are only expected on the 1st phy inst). * field "poweron" becomes "enabled", and is used as an indicator for actions to take during TRX provisioning (hether to power it on and configure it or to power it off). * poweron/poweroff state becomes "powered", and it is shared by all trx in same phy_link, and is updated only after confirmation by TRX. * poweron_set becomes poweronoff_set (because it's used by both POWERON and POWEROFF), and becomes shared by all trx in same phy_link, since those CMDs are usually sent by first phy instance of the link (the first trx). Related: OS#4215 Change-Id: Icd0b482f1454236432e1952220bbec9d178b8607
2019-10-05bts-trx: vty: Print phy link state in cmd 'show transceiver'Pau Espin Pedrol1-1/+4
Change-Id: I8e49f8edad9f9c68d110dbb7faeea5143aa91022
2019-09-27bts-trx: vty: Use API to get poweron statePau Espin Pedrol1-1/+1
Change-Id: I8b78e1ad34f19d8fe348b9c975742fc0f7112da2
2019-07-23bts-trx: Introduce VTY command osmotrx trxd-max-versionPau Espin Pedrol1-0/+27
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
2019-07-17fix spelling stuff mentioned by lintianThorsten Alteholz1-1/+1
Change-Id: I3d6cb6fc1b182d8520ba60e431ab9b74e71d5e3c
2018-11-19osmo-bts-trx: print TRX socket addresses in 'show transceiver'Max1-1/+4
Change-Id: I081305d730cbdb14b5ce1dbfee18673328225b66
2017-10-18osmo-bts-trx: vty: various fixes of 'write file' and docNeels Hofmeyr1-5/+9
On 'write file': - Write 'osmotrx' before 'maxdly' and 'maxdlynb' (broken since "Introduce new phy_link and phy_instance abstraction" d784e50747b8cf0ce505489e1451f75be5ccbd4b) - Fix indenting of 'write file' output, command 'osmotrx timing-advance-loop', had a stray space in case there is not a 'no' preceding it. Add some missing instances of OSMOTRX_STR doc strings. examples/osmo-bts.cfg: - Drop 'settsc', the command no longer exists. - Fix indenting of 'osmotrx rx-gain' command. osmo-bts does not feature VTY tests, so it is pointless to add example files to test these fixes. We should probably add VTY tests separately. However, I have briefly tested manually (and hence found all of these issues). Change-Id: I018eaef40345bfa26e12eb7d09e83a52596c1000
2017-08-24osmo-bts-trx: remove global variables from loopsMax1-27/+33
* 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-24osmo-bts-trx: fix 'osmotrx legacy-setbsic'Max1-3/+3
It was introduced in fe6c75d24a1751341bcee91cb45c7ac7f5d07da3: * fix typo in config write * add missing vty help string Change-Id: Id42359dfbb8ad02f34dd2540db66f3ed69ad5181
2017-08-09TRX: Remove global variables, move SETBSIC/SETTSC handling into phy_linkHarald Welte1-54/+29
Whether or not we are talking to an OpenBTS (SETBSIC) or OsmoTRX (SETTSC) transceiver is a property of the phy_link, and not a property of the BTS. Also, we *really, really* should never use global variables. I'm very happy this is being cleaned up, finally. Change-Id: I51aeb17661dfd63ff347f7b2c0d7ffa383ec814c
2017-06-28TRX: Use timerfd and CLOCK_MONOTONIC for GSM frame timerHarald Welte1-2/+1
using gettimeofday() is not suitable for the GSM frame timer, as it relies on the normal 'wall clock' system time, which may be adjusted by ntp, gps or other means at runtime. Switching to a different clock source means we cannot use osmo_timer_list anymore, but timerfd integrates just fine with our libosmocore select() loop handling. Change-Id: I51b19adde14ebb7ef3bb863d45e06243c323e22e Closes: #2325
2017-06-06trx: Save osmotrx base-port vty propertiesPau Espin Pedrol1-0/+7
Change-Id: I0898a8c4eb3899fc1c0f6b17da33b8c7851b90d6
2017-06-06trx: Allow BTS and TRX to be on different IPsPau Espin Pedrol1-8/+30
Depends on libosmocore I3c655a4af64fb80497a5aaa811cce8005dba9cd9 Change-Id: I0bd34b7b02c1a9b0c6f6f89f327b486e5620c8d5
2017-02-10osmo-trx-bts: Fix incorrect setting of RXGAIN and POWER parameters on second ↵Ivan Klyuchnikov1-50/+58
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-12-01trx: Add "maxdlynb" VTY command to control max TA for Normal Bursts.Alexander Chemeris1-1/+53
Originally `maxdly` command in osmo-trx was contrlling max TA for Normal Bursts. This was not a proper behaviour, because it was used to "control maximum distance a handset can attach from" which is controlled by Access Bursts max TA. Osmo-trx was corrected to apply `maxdly` to Access Bursts and a new command was introduced to contrl max TA for Normal Bursts - `maxdlynb`. This patch adds support for this configuration command into osmo-bts-trx. If you wonder why would you need that - some test equipment (namely R&S CMD57) has really bad timing sync and can generate signal a few symbols off. That prevents osmo-trx from properly receiving otherwise perfectly good bursts generated by CMD57. This configuration is a solution for this. Change-Id: Ib5d255299668ac1ef9f0ce95e016f55ba3c82277
2016-06-16TRX: Add vty command to power on/off transceiverMax1-0/+19
Add vty command (under "phy X instance Y" hierarchy) to manually send POWERON or POWEROFF command. It's useful for debugging issues related to BTS/TRX initialization. Change-Id: I6dfebaf118cdf5ad144516b2b839b17350a73ce4 Related: OS#1648
2016-02-15Introduce new phy_link and phy_instance abstractionHarald Welte1-148/+233
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-22Add new bts_model_ctrl_cmds_install()Harald Welte1-0/+5
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: Don't use magic numbers when we have #definesHarald Welte1-2/+2
2015-09-22TRX: Add VTY option to allow setting RTS advance in framesAndreas Eversberg1-1/+15
RTS (ready-to-send) must be issued in advance, so BTS core and especially osmo-pcu can provide downlink data frames early enough. In some cases PCU might provide frames too late, so they must be dropped. If PCU provides frames too late, due to high system load, this "RTS advance" setting must be increased.
2015-09-22trx: Add option to set transmit power reduction via OML (BSC)Andreas Eversberg1-2/+26
2015-09-22TRX: Fixed typos tranceiver -> transceiverAndreas Eversberg1-11/+11
2015-09-22TRX: Add VTY options to enable and disable SETTSC and SETBSICAndreas Eversberg1-0/+52
2015-09-22TRX: Implementation of MS power and timing advance loopsAndreas Eversberg1-0/+50
2015-09-22TRX: Introduce osmobts-trx, a layer 1 implementation for OpenBTS tranceiversAndreas Eversberg1-0/+281
The code is quite complete, TCH and PDCH channels are not yet tested.