This patch fixes MS failing to even see the network, and only RACHs of 1
zeroed byte being seen in GSMTAP.
The issue seems to only appear on some specific machines; others have
been running fine for weeks without this memset being an issue.
Fixes: 7a52e42ee0
Change-Id: I98ad885a5d71e7775973a4d881c0f1cd665ea711
In the multi-ARFCN mode, if the Tx/Rx antenna names are explicitly
set in 'chan N' sections of the configuration file:
trx
...
multi-arfcn disable
chan 0
tx-path TX/RX
rx-path RX2
chan 1
tx-path TX/RX
rx-path RX2
chan 2
tx-path TX/RX
rx-path RX2
osmo-trx would crash, because radioDevice::set_antennas() would
attempt to configure antenna names for all N physical channels,
while USRP devices usually have 2 or even 1 available.
The easiest approach is to remove both 'tx-path'/'rx-path' from
all 'chan N' sections excluding 'chan 0', so it would work fine.
This makes sense, because in the multi-ARFCN mode we actually
use only one physical channel.
However, let's still make sure that explicit configuration of the
Tx/Rx antenna names would not crash osmo-trx and skip N > 0 in
radioDevice::set_antennas().
Change-Id: I09f316f181cbbc2214e8913b73f7c1fcea4e8c05
Related: OS#4636
We cannot use C99 or higher features in C code!
Last lines of build log:
[ 265s] for (unsigned int i = 0; i < decoded_region->num_chans; i++)
[ 265s] ^
[ 265s] ipc-driver-test.c:473:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile
your code
[ 265s] Makefile:580: recipe for target 'ipc_driver_test-ipc-driver-test.o' failed
[ 265s] make[5]: *** [ipc_driver_test-ipc-driver-test.o] Error 1
Change-Id: I80c9cbd77f1cdf323ad2b492de7e9a177840c383
Recent commit adding osmo-trx-ipc didn't update the patch, which fails
to apply now due to files having changed its contents.
Change-Id: I6fa50e82320330f83c9753352418755e8b414edf
There is no point in checking basic stuff ten thousand times per second
since the sizes never change, so it's enough to enable the
checks/assertions for unoptimized (debug) builds.
This significantly decreases branch mispredictions.
Change-Id: Iebd9e91b3c7f37f2dc646d3017c45139977e4d15
This adds a IPC backend that uses shared memory interface
to communicate with (proprietary) devices.
Requires config file option
dev-args ipc_msock=/path/to/socket
to specify the master socket the ipc backend should connect to.
If UHD is avaialble the ipc-driver-test tool can be used to test the
backend with a uhd device, this was so far only tested with a b2xx.
Change-Id: Ice63d3499026293ade8aad675ff7a883bcdd5756
Using the new libosmovty features allow for:
* Setting different cpu-affinity masks for each thread in the process,
both at startup through .cfg file as well as changing it at runtime.
* Unified VTY interface to change the scheduling policy of the process
inherited by all osmocom processes enabling the feature.
Depends: libosmocore.git Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a
Depends: osmo-gsm-masnuals.git Change-Id Icd75769ef630c3fa985fc5e2154d5521689cdd3c
Related: SYS#4986
Change-Id: I3798603779b88ea37da03033cf7737a6e4751d6e
Since there's now a rate counter, we can drop log level for those events
which can be bursty and hence print lots of output in short periods of
time, which may affect performance. This way setting them to INFO it's
enough to avoid getting them in stderr unless explicitly configured by
the user (for instance to debug stuff), while still allowing a good
enough level to be enabled for other targets such as gsmtap.
Related: OS#4679
Change-Id: I000f7112e35ac68d3d922444f78468b1ea74cbba
They are left as INFO instead of DEBUG since they show possible
timing/performance issues in the setup.
Change-Id: I8aab10054ac89c29b871259fdbe59636723ddfb6
This way i most usual rate_ctr related internal logging is disabled by default
(notice), and it can b eeasily enabled by switching the category to info
or debug.
Change-Id: Id6c36432da7e7ce673c585bcae6772a695028ec5
In pushRadioVector, like we did for driveTxPriorityQueue already, gaps
are possible in any channel for TRX!=0, since TRX0 is the only one
expected to be always transmitting.
Since we always need to transmit there, it makes no sense to check for
channel being not NONE.
Change-Id: I3b4b85b9100f69dfa113c54a4357120bd11ec86f
The queue was being accessed sequentially obtaining and releasing the
mutual exclusion zone twice. First in getStaleBurst() dropping all
FN<currTime, then in getCurrentBurst() trying to obtain FN=currTime.
However, since in between the mutex is released, it could happen that
for instance upper layer would introduce currTime-1 in the queue, which
would make then getCurrentBurst() detect that one instead of potential
currTime in the queue and return NULL.
By holding the mutex during the call to both functions we make sure the
state is kept during the whole transaction.
Related: OS#4487 (comment #7)
Change-Id: If1fd8d7fc5f21ee2894192ef1ac2a3cdda6bbb98
This ones together with rate counters already available in lower layers
allows to understand better the source of the problem with stalled tx
bursts.
Change-Id: Ia34f7e7d780ad1e12f24638a07f05fe91f2afea5
Per-ARFCN CTRL threads managing CTRL socket loops were dropped a while
ago, but it was forgotten to udpate the documentation.
Change-Id: I34d117325e60b04b075c205d21bb0b827a5e8c52
Coverity dixit:
"Non-static class member field "ctrs.tx_stale_bursts" is not initialized
in this constructor nor in any functions that it calls."
Fixes: CID#211258
Change-Id: I4643a0500e9cad09938c05fab2f358167f72ffa9
This allows checking if there's timing issues on the downlink side
between osmo-bts-trx and osmo-trx. This counter is useful to find
information about osmo-bts-trx 'fn-advance' setting, since this counter
basically counts if burstrs from it arrived too late to osmo-trx.
Change-Id: Id6df00da81f6d6884f4dddc5a2c4b354dca3af97
RadioInterface ones will be added in next commit, so let's differentiate
the structs required for each one.
Change-Id: Ib0e142a1dd4bedefdb4c5f15c34132da872c0975
For instance, use in VTY:
"ctr-error-threshold tx_underruns 5 per-second"
If the condition becomes true (eg 5 underruns happened in one sec), the
statement inside OSMO_MAX would become -1, but it was being handled as
an unsigned when doing the OSMO_MAX internal comparison. As a result,
OSMO_MAX((unsigned)-1, 1) was returning -1 (unsigned) stored in
threshold_timer_sched_secs which then became and int -1, which was
handled by osmo_timer_schedule as a 0, hence having an immediate
trigerring all the time.
While at it, make threshold_timer_sched_secs unsigned since it doesn't
make sense to have it as signed anyway.
Change-Id: I6ea3d64dff189a5bc924e72d846e02d50536a8ea
Currently configuring 3 channels in multi-ARFCN mode makes the
process crash during the Rx/Tx antenna configuration due to
uncaught UHD specific LookupError/IndexError exceptions:
terminate called after throwing an instance of 'uhd::index_error'
what(): LookupError: IndexError: multi_usrp:
TX channel 2 out of range for configured TX frontends
Let's catch them and terminate gracefully.
Change-Id: If66305f2787c6292375e4bfbd60c1d3d764cffd4
Related: OS#4636
All radioDevice subclasses except USRPDevice have already been reworked
to use the new SetPowerAttenuation() methods, hence we can drop the
compatibility layer that was added to transition from the old API to the
new one, and move those functions to USRPDevice.
This way we simplify the parent abstract class with methods not needed
by most devices and not used anymore by external users of those classes.
Change-Id: Ice005cd0a07c49b6e212c06f1228ef93c24db727
Right now, according to a few measurements taken on LimeMicro devices, we
expect the Tx Gain at UHD level to relate 1:1 with the slope in Tx output
power given a specific band.
If more fine-grained results are wanted or some device doesn't follow a
1:1 slope relationship, functions TxGain2TxPower and TxPower2TxGain need
to be adapted/improved.
This patch is basically doing the same thing as was done previously for
UHDDevice in 992c9bd1ce.
Related: OS#4583
Change-Id: If154fe4d4cd118aa30ea43c22ee7119117b77da6
From UBSan:
proto_trxd.c:65:18: runtime error: 128 is outside the range of representable values of type 'char'.
Fixes: OS#4507
Change-Id: I71f815fe794a00934ee0e876848af56f30a21bfe
The automatic dependency will only depend on the UHD library
package. The user will then fail to start osmo-trx-uhd due to
missing firmware. So let's include an explicit 'Requires' to the
uhd-firmware package to solve this.
Change-Id: I0ebfe669c21d3957a48d57bd7248244e3e924236
Right now, according to a few measurements taken on B210, we expect the
Tx Gain at UHD level to relate 1:1 with the slope in Tx output power
given a specific band.
If more fine-grained results are wanted or some device doesn't follow a
1:1 slope relationship, functions TxGain2TxPower and TxPower2TxGain need
to be adapted/improved.
Change-Id: I6f432465dce5c6ec1f1bc4653f6149efb18c3f43
All the Tx gain related APIs are left out of reach from radioInterface,
and in there we simply interact with radioDevice passing the attenuation
received from TRXC.
Prior gain logic is moved in base radiodevice class, with the idea that
the setTxGain() and related functions will be dropped over time in each
sublcass in favour of an specific implementation of the
SetPowerAttenuation API.
Change-Id: I4f8a1bcbed74aa9310306b97b0b1bfb02f7855e6
The table with nominal UHD Tx Gains and real transmit power is filled
with values measured experimentally. More information can be found in
OS#4583.
Related: OS#4583
Change-Id: If7ef5bf95ffe4afe5864c0f051853aa38b9639eb
It allows the BTS to retrieve the nominal transmit output power value of
each TRX in order to compute attenuation later on and apply it through
SETPOWER or ADJPOWER TRXC commands.
Change-Id: I1d7efe56e008d8d60e23f9a85aa40809f7f84d9c
When the logging category TRXCLK is set to info osmo-trx prints a
logline that informs about the sending of clock indications. In practice
this those log lines are often used to identify that osmo-trx and
osmo-bts are running properly, so it would be helpful, even in
productive use, if there would be an information in the log that the
sending of clock indications has begun. However, the regular printing of
the clock indication log line would soon flood the log. So, lets have an
addional log line that logs only once when the transceiver starts and
quickly informs at loglevel NOTICE that clock indications are now sent.
Change-Id: I6aa88943b76c9a2bf7aed60d6a3d325c1f27820a
Related: OS#2577