aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
AgeCommit message (Collapse)AuthorFilesLines
2019-07-02Transceiver: Move calculation of normalized values (rssiOffset) to ↵Pau Espin Pedrol2-13/+11
pullRadioVector() That's where all the filling logic happens, while in driveReceiveFIFO we mostly want to take the burst, generate a message and sent it over the socket. In pullRadioVector this way we always provide normalized values based on user configuration (VTY rssi-offset). Related: OS#4006 Change-Id: I1ee28daf21dc287bec564d45d58086d63655c0f6
2019-07-02Transceiver: Move nbits burst size calculation to pullRadioVector()Pau Espin Pedrol2-11/+11
That's where all the filling logic happens, while in driveReceiveFIFO we mostly want to take the burst, generate a message and sent it over the socket. Related: OS#4006 Change-Id: Ib1df10c40d737954904290f57d58b1c77d65f82e
2019-07-02Transceiver: Drop unused rssi_valid struct fieldPau Espin Pedrol2-5/+0
That field is actually never used. Furthermore, if pullRadioVector() returns false, then the caller should consider the 'trx_ul_burst_ind' structure as uninitialized. Moreover, RSSI is mandatory - we cannot send burst indications without it. Related: OS#4006 Change-Id: Ia109298aebe8ba4750a39338ba7962555903cd82
2019-07-01Transceiver: refactor: gather uplink burst parameters in structPau Espin Pedrol2-53/+48
A new struct trx_ul_burst_ind is introduced, which will handle information filled by lower layers upon decoding of uplink bursts. Methods pullRadioVector() and logRxBurst() are adapted to use that struct. This way it's easier to understand in/out parameters and it's also easier to add further parameters to be filled in in the future. Related: OS#4006 Change-Id: I7e590fb1c0901de627e782f183251c20f4f68d48
2019-07-01Introduce structs to encode TRXD packetsPau Espin Pedrol3-11/+46
This will ease adding new protocol versions in the future. Related: OS#4006 Change-Id: I67ffede171eddde436f9057191ed76015a8ea6eb
2019-06-17Add option to set stack size in config file, default == 0 == OS defaultEric Wild3-9/+10
Change-Id: Id752f6b5ce9a96a67cd1ff835687ce0e03d3a50d
2019-06-09lms: Fix stream_stats checks with overrun/underrunPau Espin Pedrol1-4/+4
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 928177125654c1e596ec3450a68882c031ebb929 Related: https://github.com/myriadrf/LimeSuite/issues/265 Change-Id: I677232a7b12ee83d26aa34d92f76a91d4b5a63a6
2019-06-06lms: Drop unusued variable masterClockRatePau Espin Pedrol2-5/+0
Change-Id: I19192925d008046f474615a0476b52ddee9a9d78
2019-06-05Rename and move STOP signal from Transceiver to mainPau Espin Pedrol3-20/+5
The callback actually belongs there, since it's the code/thread in main the one actually in charge of stopping everything. It simplifies current code, and more important, allows for new clients of this signal to use it. This callback will also be used in forthcoming commits by code controlling rate_ctr thresholds to stop the process if the VTY configured threshold is used. Change-Id: Id4159e64225c6606fef34a74b24f37c3a071aceb
2019-06-05Add rate_ctr support to store/retrieve SDR errors through VTYPau Espin Pedrol4-37/+57
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
2019-05-24lms: Fix stream_stats checks with droppedPacketsPau Espin Pedrol1-3/+5
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
2019-05-06lms: Use smpl_buf to recover from timestamp jumpsPau Espin Pedrol3-13/+67
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
2019-05-06smpl_buf: Move it to device/common and create libdevice_common.laPau Espin Pedrol9-8/+19
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
2019-05-06Introduce LOGCHAN macro to standarize logging channel infoPau Espin Pedrol2-36/+36
Change-Id: I67d869499aa16af58c863ca7b74c356bcd979936
2019-05-04smpl_buf: Remove dbg log line with duplicated infoPau Espin Pedrol1-4/+4
Change-Id: Ia2423707210a364fa6827b92cca087ced99b088b
2019-05-04smpl_buf: Remove unused clk_rt variable (fixup)Pau Espin Pedrol1-2/+0
Last commit removed use of the clkr_rt variable but forgot to remove the variable itself. Fixes: 580c48b7d5ae931b5ceb7ffa2a1ae39f89b31080 Fixes: Coverity CID 198370 Change-Id: Ida1fc5b7b338fbeb2a7c6258f36b02da93ff2186
2019-05-03smpl_buf: Remove unused clk_rt variablePau Espin Pedrol3-8/+7
During 87b7d098e517470fec53ac13a28d1d0fa7b16bb4 we dropped support for UHD specific functionalitites, and so clk_rt is not needed anymore. Change-Id: I37403e085ed6a541bbdecf64f1f9a821ff2753a4
2019-05-03device: Drop unused numberRead/numberWritten APIsPau Espin Pedrol7-33/+1
It's really not used, so let's drop unused code and simplify work for new to come device drivers implementation. Change-Id: I0d18f9c2584771e2f7b3d5c6b016e764e02855ff
2019-05-03Move smpl_buf out of uhd dir to re-use it in other devicesPau Espin Pedrol4-3/+3
Change-Id: I39ac8435072cff8d4dac786b31ff4af9b61a77fe
2019-05-03uhd: Avoid reallocation of buffers every readPau Espin Pedrol2-15/+10
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
2019-05-03cosmetic: uhd: Use loglevel ERROR instead of ERRPau Espin Pedrol1-11/+11
ERR is osmo-trx legacy level, which actually converts to osmocom's ERROR, so let's use that one directly. Change-Id: I82f6f89a725bea7f7acfa455c20cf922cc3f8a00
2019-05-03uhd: smpl_buf: Use TIMESTAMP type in str_statusPau Espin Pedrol2-3/+3
Other related functions use "TIMESTAMP timestamp" so let's use same stuff in that function. Change-Id: I016b1a7f8db379caebc1409ca11e5ae8b759d2d4
2019-05-03uhd: smpl_buf: Drop UHD specifics out back to UHDDevicePau Espin Pedrol3-25/+4
This way smpl_buf can be re-used later by other non-UHD drivers. Change-Id: I94061328d46a550d4147121d85baffa29c700c45
2019-05-03cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class ↵Pau Espin Pedrol5-362/+455
definition to .h * 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
2019-04-25lms: Catch and log dropped packets by HW during recvPau Espin Pedrol2-0/+9
Change-Id: I23554d95b0aff585024610fc12920c9da4f3ba9e
2019-04-25lms: Remove unused var m_last_tx_overrunsPau Espin Pedrol2-2/+0
Change-Id: I2104205b2af7cd6c86075d5cc4f0f36bde5e5311
2019-04-25lms: Remove references to ALERT loglevelPau Espin Pedrol1-21/+21
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
2019-04-25lms: Log underrun/overrun eventsPau Espin Pedrol1-2/+10
Change-Id: I8c6b1d3e8515153e5d4079cc6620901ef8ce2449
2019-04-25Move duplicated thread_enable_cancel to CommonLibsPau Espin Pedrol2-12/+0
Change-Id: I1a479b59bdda01233273dfa919bd678edbe34708
2019-04-25lms: Improve log during flush recv errorPau Espin Pedrol1-1/+1
Change-Id: Id45d42599738efd6a5d89787c75779838a979330
2019-04-25lms: flush_recv: alloc buf on stack instead of heapPau Espin Pedrol1-3/+1
No need to use the heap here since buffer is only used as a temporary trash. Using the stack is quicker. Change-Id: Iede8dc0903ee3865a52c8e2fd811bcde444fee33
2019-04-17lms: properly call close if set_antennas() fails, add some commentsJoachim Steiger1-1/+4
Change-Id: I9ebe986ee3a15842a15853424ee98e9a2fa6a5df
2019-04-17lms: add device type detection and device specific gainsJoachim Steiger2-44/+40
add device dependant max gain setup - limesdr mini and limenet micro need slightly reduced maximum gains to get a PASS on phase error measurements rework clock reference setup - external clock needs to be selected before calling LMS_Init(), internal can only be set after. remove now unused compat_LMS_VCTCXO* functions - we do not set the VCTXCO directly anymore Change-Id: I3cf905b0a84bc1ec200891762a6646141ee37181
2019-04-17lms: move LMS_GetLPFBWRange and LMS_Calibrate calls from open to startJoachim Steiger2-27/+50
bandwidth, freqency, gain stages need to be set before calibration can be successful Change-Id: I1090effdf0f43e5183a402e4c1a1ffe5abdefd37
2019-04-17lms: move LMS_EnableChannel from Start/Stop to Open/Close deviceJoachim Steiger1-8/+14
move enable: it is important that channels are actually enabled before applying any configuration (besides external clock) move disable: move to close, so channels are not disabled and not enabled again while osmotrx is active. Change-Id: I82878913254ce15a85db8d006e13d5eb639793e9
2019-04-17lms: Remove wrong unused code copied from -uhdJoachim Steiger1-5/+2
Change-Id: I2bc7fcfa429d1f82c2d8e95d31dfed367f2b3f9d
2019-04-16use BSC_FD_READ and not OSMO_FD_READHarald Welte1-1/+1
We haven't even released any tagged version of libosmocore yet which includes support for the renamed OSMO_FD_READ constant. Let's avoid any breakage and use the new constants only with considerable delay, at the very least only when released libosmocore versions provide it. Change-Id: Idb57077b2a4b2a71dd5d75a24ded8bb5887da188
2019-04-11multi-ARFCN: fix maximum number of carriers limitationTom Tsou1-1/+1
Maximum number of carriers is fixed to 3 channels on a single physical RF channel in multi-ARFCN mode. For some reason, it was limited to 5. Let's fix this, and also follow this limitation in the following VTY command handlers: - cfg_multi_arfcn_cmd, - cfg_chan_cmd. Change-Id: I66a1462f368458afd313ee6f0bc0abc496dde817
2019-04-02osmo-trx: Check return code of osmo_fd_registerPau Espin Pedrol1-1/+4
Fixes Coverity CID 197513. Change-Id: I93fbcb062439a547379aaecba283d107fdc9cb59
2019-03-29osmo-trx: Use signalfd to serialize signals in main thread ctxPau Espin Pedrol1-5/+46
This should avoid prolematic scenarios where different signal handlers are running on different thread in parallel. Furthermore, we make sure those signals are always run by main loop thread. Change-Id: I9b9d9793be9af11dbe433e0ce09b7ac57a3bdfb5
2019-03-29osmo-trx: Avoid handling signals after shutdown triggeredPau Espin Pedrol1-0/+6
Recently a blocked osmo-trx process was found after ending SIGTERM to it. Apparently one thread was handling SIGTERM and calling fprintf() (grabbing libc lock) while another thread was handling another signal and also grabbing similar lock. Both thread looked deadlocked there. Probably this change doesn't fix the block on its own, but at least simplifies scenarios inside signal ctx which can go wrong. Change-Id: If91621913b8b03d8a0f4c863be0b0d479f97e8a1
2019-01-24VTY: add extended (11-bit) RACH detection toggleVadim Yanitskiy3-10/+17
Since I838c21db29c54f1924dd478c2b34b46b70aab2cd we have both TS1 and TS2 synch. sequences, in addition to "default" TS0. Let's finally introduce the VTY configuration parameter, that can be used to toggle optional detection of both TS1 and TS2. Note: we keep this optional because of potentially bad impact on performance. There's no point in paying the performance penalty unless upper levels (BTS, PCU) actually make use of it. Change-Id: I1aee998d83b06692d76a83f79748f9129a2547e8 Related: OS#3054
2019-01-21convolve: Remove support for step, offset parametersSylvain Munaut10-154/+120
- Those are not used any where - Those are not supported by the sse/neon accelerated versions - And I see very little use cases for those. Change-Id: Ic850269a0ed5d98c0ea68980afd31016ed555b48 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-01-21arm/convolve: Fix the vfp4 real convolution for h_len=12Sylvain Munaut1-2/+2
Change-Id: Ic73f0746edd3f1f22bb1d79d4c64aa740691dd48 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-01-11cosmetic: Don't call the SDR "USRP" in error messageHarald Welte1-1/+1
Transceiver.cpp is used for all SDR hardware we support, not just USRP. Change-Id: I9b7ddb0d679f111407704048ef3ddd964db49441
2019-01-11usrp1: Fix formatting of log message (missing space)Harald Welte1-2/+2
Change-Id: I378a8081a224acda3ee2af9b6aa0d680de884695
2019-01-11usrp1: Remove uninitialized skipRx logicHarald Welte2-9/+3
There appears to have been some logic to operate a USRP1 in transmit-only GSM mode. This is achieved using the skipRx member of the transceiver object. However, there's nobody that ever initializes it properly, and hence the feature is not possible to use anyway. I don't think this has any valid use case, so let's remove it. Change-Id: I616193f1e9aaefbf4ceb26761657811093f28b6f
2018-12-14lms: Fix build against LimeSuite > 18.10Pau Espin Pedrol1-2/+20
LimeSuite dc124e4e2ed9b549b142410af172f0592f9f0c23 > 18.10 broke API compatibility. OS#3729 Change-Id: Idf500a5b39a857233f728c6a4316c00a99374556
2018-12-13LMSDevice: make use of dev-args in osmo-trx.cfgOliver Smith1-2/+40
Allow selecting a specific LimeSDR device by setting dev-args in the config file. Split up the given dev-args address by comma and select the device where all substrings can be found. I could not test this with real hardware, but I have added a test case to make sure this works as expected. Related: OS#3654 Change-Id: Ib9aaa066a01bf9de3f78234d7ada884d6f28c852
2018-12-12osmo-trx.cpp: move comma_delimited_to_vector() to Utils.cppOliver Smith1-15/+1
Make the "opt" argument const. This function will also be used by LMSDevice.cpp in a follow-up commit. Related: OS#3654 Change-Id: If3f0f682ca453c2b0a06175ec9626567932cfce6