The out "RSSI" parameter is only filled by USRPDevice, and not used at
all by any user of the API (radioInterface*.cpp).
RSSI seems to be computed nowadays in the common path in
Transceiver::pullRadioVector().
Change-Id: I06c2ea5a9891d170bc468f952bbf2a7e64d95784
With current state multi-arfcn can be used (eg. I can place a call
between 2 phones using TRX1 and sustain for as long as wanted), but from
time to time (around every 20seconds), a burst of Tx packed dropped
events from LimeSuite appears.
LimeNet-micro coefficients have yet not been tested.
Related: OS#4362
Change-Id: I7e67d90a8126546eeeeba376f816ec5d158d4712
Right now the values are the same for all devices, but they will differ
in forthcoming commits once multi-arfcn support is added.
Change-Id: I262d3a71848fc3070473e29e42820848e7591d02
Add an enum containing each supported device type (LimeSDR-USB,
LimeSDR-Mini and LimeNet-Micro) plus "unknown", to leave some room for
yet-to-come devices to run with some generic parameters without
rebuilding osmo-trx.
Each device type is assigned a dev_desc structure, and all of them are
put in HashMap, similar to what's already done in UHDDevice.cpp.
Device type is infered from string provided by LMS_GetDeviceInfo(), as
it was already done before in several places. From now on, we only need
to parse the string once since we store the device type after first
during open time.
Later on, more fields will be moved to device-type specific structure,
such as Tx timing offset, clock rate, etc.
Change-Id: I7658615787c5bc41c365bab9c11733b701ac2ae5
Release is done in destructor, so let's move allocation to constructor
since there's really no need to have them in open() which is already
quite complex and large.
Change-Id: I8a4fd973590c4c165abd8f2837b2da8fc14a2066
channel number mangling based on multi-arfcn feature being enabled was
moved to generic radioDevice() to reuse code. Hence, the generic parent
constructor sets this->chans to 1 if multi-arfcn feature is requested.
However, LMSDevice constructor argument had same name as the class
instance attribute, taking preference. As a result, if multi-arfcn is
enabled in LMSDevice, the generic constructor first sets this->chans=1
but afterwards LMSDEvice constructor keeps calling .resize() with the
argument value "chans" instead of using this->chans.
Let's rename the argument in all radioDevice child class constructors to
avoid potential future bugs in all of them.
Change-Id: Id6c837e9133f22783dd92a81dfcc493e51bf2d21
Make sure old configs using "logging level lms <level>" are still accepted.
Initialization order of VTY componenets need to be resorted since newly
introduced command requires logging VTY node to be already setup
beforehand.
Change-Id: Ia195a74a62a8a3dd6267fb1359acaa5628208d8e
This way switch is applied correctly to parent structures and features
can be used later by other children classes (other devices).
Change-Id: I24d6c66bb3195ba2513b4a67daa14cdfbacdce6d
After previous changes, radioInterfaceMulti is expected to handle channel
conversion correctly, so it will always use chan 0 for all these
functions. This simplifies code in radioDevice avoiding need to add
checks to all devices supporting multi-arfcn in the future.
Change-Id: Ib2cd50a6ceaeedc6aaf3e1bb51d33b52911b6eba
This code is not needed anymore since we are setting SCHED_RR scheduler
with a real time priority in main thread during startup, so all threads
will inherit same rt priority, which should be enough to keep the
process working reliably even on high system loads (from non rt
processes).
osmo-trx was tested to be reliable during test with stress-ng as
explained in related ticket below.
Related: OS#2344
Change-Id: I3a88946dd71e9aeeaac9d19d396e2236c302b608
This file is only used by USRP1, so let's move it there and avoid
processing it in Makefiles if build for USRP1 is not requested at
configure time.
Change-Id: Ibb40ba487581e76d2ae3e8a420d631670f876cf0
After discussion in [1] and further look at the code, it became obvios
rx_underrun events are not happening in general for any SDR (don't
exist), so let's drop that counter. Instead, add Tx Dropped Packet counters,
which were not accounted prior to this commit.
[1] bde55afd29
Change-Id: Iff1535c219a4695a511d383d7c4b06ef6eff959d
It was initially thought that underruns/overrun fields were
increasing-over-time values.
However, after reading LimeSuite code, it seems overrun and
underrun fields are actually reset upon every call to
LMS_GetStreamStatus().
Related: osmo-trx.git 9281771256
Related: https://github.com/myriadrf/LimeSuite/issues/265
Change-Id: I677232a7b12ee83d26aa34d92f76a91d4b5a63a6
Introduce a unified implementation-agnostic interface for radioDevice to
signal SDR error counters to upper layers and manage them.
This patch only implements counters for osmo-trx-lms (other devices will
show all counters unchanged during time).
Sample use through VTY:
"""
OsmoTRX> show rate-counters
osmo-trx statistics 0:
device:rx_underruns: 0 (0/s 0/m 0/h 0/d) Number of Rx underruns
device:rx_overruns: 0 (0/s 0/m 0/h 0/d) Number of Rx overruns
device:tx_underruns: 0 (0/s 0/m 0/h 0/d) Number of Tx underruns
device:rx_drop_events: 4 (0/s 2/m 3/h 0/d) Number of times Rx samples were dropped by HW
device:rx_drop_samples: 513 (0/s 196/m 425/h 0/d) Number of Rx samples dropped by HW
"""
Change-Id: I78b158141697e5714d04db8b9ccc96f31f34f439
Existing code had a typo (value was assigned from wrong variable).
Furthermore, it was experimentally found that:
while underrun/overrun are documented as "FIFO overrun
count" in LimeSuite.h, it seems droppedPackets ("Number of dropped
packets by HW") is not actually an incrementing counter like the others,
but simply a value set every time LMS_RecvStream() is called. Since we
are actually interested in keeping the count over time, adjust code to
achieve that.
Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf
Also take the chance to make sure we handle properly short reads (keep
reading again).
Both scenarios can be tested by running osmo-trx-lms and then using
on a terminal:
sudo kill -STOP `pidof osmo-trx-lms`; sleep 0.5; sudo kill -CONT `pidof osmo-trx-lms`
Fixes: OS#3339
Change-Id: Idfc4e69acc30afb11440b6b9cbdcfa09ff920265
Since in next commit osmo-trx-lms starts using smpl_buf.cpp, it seems
some automake step doesn't like including a cpp file twice from a
different directory, since race conditions can occur building it.
Instead we define the dependency by first building a static lib and then
using it on each libdevice.la (one per device type).
We already do the similar under arch/ subdir, where we have a common/
subdir and then one subdir and lib per architecture.
Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35
Last commit removed use of the clkr_rt variable but forgot to remove the
variable itself.
Fixes: 580c48b7d5
Fixes: Coverity CID 198370
Change-Id: Ida1fc5b7b338fbeb2a7c6258f36b02da93ff2186
During 87b7d098e5 we dropped support for
UHD specific functionalitites, and so clk_rt is not needed anymore.
Change-Id: I37403e085ed6a541bbdecf64f1f9a821ff2753a4
It's really not used, so let's drop unused code and simplify work for
new to come device drivers implementation.
Change-Id: I0d18f9c2584771e2f7b3d5c6b016e764e02855ff
Buffer size is based on num of chans and rxBuffer size is based on num
of chans and rx_spp, and both are available and set during open(), so no
need to waste time allocating and freeing them everytime we read from
the device.
Change-Id: I8c881c9c303c80f323825d85a924d74b76d2ce47
ERR is osmo-trx legacy level, which actually converts to osmocom's
ERROR, so let's use that one directly.
Change-Id: I82f6f89a725bea7f7acfa455c20cf922cc3f8a00
* move class definition to .h file, like we do for other devices.
* move smpl_buf class to a different file inside uhd/.
* Preparation work to have smpl_buf being used in a generic way for
devices other than UHD (LMS).
Change-Id: Ib4594320da9bb7f6e9f52e7d70d11ecd11106aae
ALERT log level is not Osmocom standard level, it's just a define in
osmo-trx to keep compatibility with old code.
Same goes for one reference to "ERR" intead of "ERROR".
Change-Id: I0e171a8ac8a8bfa804ac97fba3d73efcfa6424b4