aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/l1_if.h
AgeCommit message (Collapse)AuthorFilesLines
2018-02-27trx/scheduler: Use integer math for TOA (Timing of Arrival)Harald Welte1-1/+1
There's no need to express TOA as a float: * We receive it as signed 16bit integer in units 1/256 symbol periods * We pass it to L1SAP as signed integer in 1/4 symbol periods So turn it into an int16_t with 1/256 symbol period accuracy throughout the code to avoid both float arithmetic as well as loosing any precision. Change-Id: Idce4178e0b1f7e940ebc22b3e2f340fcd544d4ec
2018-02-19trx: make l1if_fill_meas_res() staticHarald Welte1-2/+0
it's not used anywhere outside of l1_if.c, so make it a static function Change-Id: If988a7679f3a9253fab1a4d177a276d8ecaf794f
2018-01-19bts-trx: Detect duplicated responses for retransmitted commandsPau Espin Pedrol1-0/+3
It was detected that under some conditions, osmo-trx (with limesdr) may take a long time to answer to CMDs, which means trx_ctrl_timer will trigger re-transmitting the last sent but yet unacked CMD. Due to the high latency in osmo-trx, the original AND the rentrasnmited CMD are handled after a while and RSP messages are sent for both. When osmo-bts-trx receives the first RSP, it was marking the CMD as acked and carried on with next one. Then, when the RSP from the retransmited CMD arrives, it already lost state and doesn't know where does that come from. As a result, osmo-bts-trx shutdowns. The issue can be seen in the following truncated log from osmo-bts-trx with TRX category enabled: 20180117135228175 Enqueuing TRX control command 'CMD RXTUNE 1782000' 20180117135228175 Enqueuing TRX control command 'CMD TXTUNE 1877000' 20180117135228175 Enqueuing TRX control command 'CMD SETTSC 7' 20180117135228175 Enqueuing TRX control command 'CMD POWERON' 20180117135228175 Enqueuing TRX control command 'CMD SETRXGAIN 1' 20180117135228175 Enqueuing TRX control command 'CMD SETPOWER 20' 20180117135228175 Enqueuing TRX control command 'CMD SETSLOT 0 5' ... 20180117135249829 Response message: 'RSP POWEROFF 0' 20180117135249855 Response message: 'RSP RXTUNE 0 1782000' 20180117135249876 Response message: 'RSP TXTUNE 0 1877000' 20180117135249876 Response message: 'RSP SETTSC 0 7' 20180117135250648 Response message: 'RSP POWERON 0' 20180117135251150 Response message: 'RSP SETRXGAIN 0 0' 20180117135253151 No response from transceiver for phy0.0 (CMD SETPOWER 20) 20180117135253777 Response message: 'RSP SETPOWER 0 20' 20180117135254535 Clock indication: fn=2018878 20180117135255777 No response from transceiver for phy0.0 (CMD SETSLOT 0 5) ... 20180117135256858 Response message: 'RSP SETPOWER 0 20' 20180117135256858 Discarding duplicated RSP from old CMD 'RSP SETPOWER 0 20' 20180117135256858 Response message: 'RSP SETSLOT 0 0 5' 20180117135256858 Response message: 'RSP SETSLOT 0 0 5' 20180117135256858 Discarding duplicated RSP from old CMD 'RSP SETSLOT 0 0 5' Change-Id: I3633cba212edde878f83ed36aef922aaca6f503a
2017-07-01TRX: merge/simplify l1_if and trx_if codeHarald Welte1-3/+0
Related code / function structure still dates back to the pre-phy_link days. Let's clean this up to make things less convoluted and reduce the number of non-static symbols needed between code split over two files. Change-Id: I1f30ae1f547a5c01c516d4a05032193294c25f2d
2017-06-29osmo-bts-trx: fix missing frame number in MEAS INDPhilipp Maier1-1/+1
The layer 1 interface (l1_if.c) for osmo-bts-trx does not include the frame number into the measurement indications it forwards to higher layers. The frame number is required to properly detect the end of a measurement period. Change-Id: Ife3c791ff50e8a866a97b9783ac7ef3ef2402a70
2017-02-10osmo-trx-bts: Fix incorrect setting of RXGAIN and POWER parameters on second ↵Ivan Klyuchnikov1-0/+9
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-0/+4
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-02-15Introduce new phy_link and phy_instance abstractionHarald Welte1-12/+6
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-02-15TRX: factor out the scheduler from remaining codeHarald Welte1-112/+9
The L1 scheduler is a generally useful component that is unfortunately tied quite a bit into the OsmoTRX support. Let's try to separate it out by having separate per-trx/per-ts/per-chan data structures pre-fixed with l1sched_ Using this patch it should be one step easier to use the scheduler for other BTS models, such as the intended upcoming virtual BTS.
2016-01-16TRX: Don't use magic numbers when we have #definesHarald Welte1-12/+12
2016-01-16TRX: mark scheduler data structures as 'const'Harald Welte1-1/+1
Those are read-only tables which should end up in the text segment and not in writable data.
2015-09-22trx: Implement BER calculations.Alexander Chemeris1-2/+4
A known issue with this code is that BER is not updated for lost TCH frames, because osmo-trx doesn't send any indication for them and we don't have a callback to handle this. Otherwise the code seem to work fine.
2015-09-22trx: Add option to set transmit power reduction via OML (BSC)Andreas Eversberg1-0/+1
2015-09-22TRX: Handover access burst supportAndreas Eversberg1-0/+4
2015-09-22TRX: Report measurementsAndreas Eversberg1-1/+5
2015-09-22TRX: Fixed typos tranceiver -> transceiverAndreas Eversberg1-4/+4
2015-09-22TRX: Support for TCH/H and GSM half rate transcodingAndreas Eversberg1-0/+4
2015-09-22TRX: Support for AMR full speechAndreas Eversberg1-0/+11
2015-09-22Get RSSI from received uplink data and send to PCUAndreas Eversberg1-0/+4
2015-09-22TRX: Code cleanup, prepare for other codecs than GSM full rateAndreas Eversberg1-2/+10
2015-09-22TRX: Implementation of MS power and timing advance loopsAndreas Eversberg1-0/+9
2015-09-22TRX: CipheringAndreas Eversberg1-0/+6
2015-09-22TRX: Detect missing received bursts and fill them with zero-sbitsAndreas Eversberg1-0/+1
2015-09-22TRX: Lost TCH frame detection of omitted bursts from tranceiverAndreas Eversberg1-1/+1
2015-09-22TRX: Completed TCH/F full rate supportAndreas Eversberg1-0/+1
Full rate is now tested and working.
2015-09-22TRX: Use received TRX clocks to determine availablility of tranceiverAndreas Eversberg1-0/+1
Only if transceiver becomes available, control commands are sent. If tranceiver is gone, reset scheduler. The current availability state is sent to BSC via OML state change commands.
2015-09-22TRX: Fixes and improvements of schedulerAndreas Eversberg1-0/+2
2015-09-22TRX: Introduce osmobts-trx, a layer 1 implementation for OpenBTS tranceiversAndreas Eversberg1-0/+121
The code is quite complete, TCH and PDCH channels are not yet tested.