aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-07-19driveTxPriorityQueue(): enrich logging messageVadim Yanitskiy1-1/+3
Change-Id: If25c2171f7d1ab98d65f0dbf93d0d8a5a635caf7
2019-07-19driveTxPriorityQueue(): check if message header format is supportedVadim Yanitskiy1-0/+12
Change-Id: I17abf95f5e23236abccc50476cd59931580f5cd3
2019-07-19driveTxPriorityQueue(): use trxd_hdr_common for message parsingVadim Yanitskiy1-6/+10
Change-Id: If6a93e2b7fc9ada55edbdd16352cd4f7040e3d2a
2019-07-19driveTxPriorityQueue(): cosmetic: use proper type for TDMA TNVadim Yanitskiy1-1/+1
Change-Id: I8396004616754f84fb465c972fde9e91b18cc49b
2019-07-19Transceiver: Support TRXD v1Pau Espin Pedrol3-3/+98
Related: OS#4006 Change-Id: I53db2678458a7377c87875b58b58b76a1b900517
2019-07-19Transceiver: Support SETFORMAT commandPau Espin Pedrol1-0/+14
Only old v0 is supported so far. Related: OS#4006 Change-Id: If9fc22f9987238a5ff870df7718de4efc9e04289
2019-07-19Transceiver: Move out TRXD socket send code to prepare for TRXDv1Pau Espin Pedrol5-55/+129
Only old v0 is supported so far. TRXD protocol related data/logic is moved to its own file out of Transceiver class. Code is refactored so it can be re-used later by TRXDv1. Related: OS#4006 Change-Id: I5786dd44b076202c6f1a6e82405670e8605797ed
2019-07-19Logger: global Log mutex is now available from C codePau Espin Pedrol4-7/+79
This way the C++ logging API can still be used while allowing for C files to use the same mutex. Change-Id: I473e57479f8ae98a84ad00b76ff338f79f732236
2019-07-19sigProcLib: Add C/I (Carrier-to-Interference ratio) computationSylvain Munaut2-13/+51
Related: OS#4006 Change-Id: Ib4ceec553f2e5f77bf3f6777724968456a180f5e
2019-07-19sigProcLib: detectAnyBurst(): make TSC used to detect burst available to callerPau Espin Pedrol2-1/+7
This value will be sent in TRXDv1 protocol. Related: OS#4006 Change-Id: I603b7b52f957cf897b036dbaeb22c01a55de08c3
2019-07-19sigProcLib: detectAnyBurst() family: Use struct to gather all out paramsPau Espin Pedrol3-45/+45
Currently we have 2 out parameters, but in forthcoming commits will add a third one. All those functions already have too many parameters, so let's put together all the output params in a struct to pass them easily and make it easier to understand they are the estimated output values. Related: OS#4006 Change-Id: I05cfa0ceaa2e633a5e6e404e2eae497ff4442dea
2019-07-17Fix spelling discovered by lintianRuben Undheim1-1/+1
Change-Id: I5ab9b9c7c47d0d6e674c1f5242e2b3a05006293e
2019-07-10contrib/jenkins.sh: run "make maintainer-clean"Oliver Smith1-0/+1
Related: OS#3047 Change-Id: I6d541b47e68f5a8a61ac139a3ea85a9cb33856c1
2019-07-03Transceiver: Support pulling idle frames in pullRadioVector()Pau Espin Pedrol2-11/+20
This logic will be used once we support TRXDv1, where idle indications are sent through the socket. Related: OS#4006 Change-Id: I46404f6e4055b6d3af3afffb0dfe4a19502917aa
2019-07-03Transceiver: pullRadioVector(): Move initialization of var to start of functionPau Espin Pedrol1-2/+3
This will be needed upon forthcoming refactor to support idle frames, which will add a goto return. Otherwise compiler complains: error: jump to label ret_idle [-fpermissive] note: crosses initialization of unsigned int max_toa Change-Id: Icd2793adc7b73a795184639b95fb5da336909b59
2019-07-03Transceiver: Simplify code on early error return when calling detectAnyBurstPau Espin Pedrol1-8/+4
We get rid of one branch and simplify code logic. Change-Id: I026e35262bfe42c3d23ebdc06d84e4908a8380e2
2019-07-03Transceiver: Avoid noise calculation formula in 2 branches in pullRadioVectorPau Espin Pedrol1-6/+5
Makes code easier to follow and will help in forthcoming refactoring once idle frames are supported. Change-Id: I56c84e9684ca460efd6c983d7e95d8e455bcac69
2019-07-02Transceiver: replace UDPSocket with libosmocore socket APIPau Espin Pedrol9-594/+53
We have a good socket API in libosmocore, let's drop osmo-trx socket API and use libosmocore's one instead of maintaining the two of them. Change-Id: Ib19856a3e0a7607f63436c4a80b1381a3f318764
2019-07-02Transceiver: Get rid of SoftVector in struct trx_ul_burst_indPau Espin Pedrol4-21/+29
Make the interface using trx_ul_burst_ind more implementation agnostic as well as easier to use. For instance, we don't care about SoftVector size one returned from pullRadioVector(); we want to use nbits instead. As a result, we no longer spend time normalizing guard periods. While at it, change vectorSLicer to return void since it always returns true. Change-Id: I726e5a98a43367a22c9a4ca5cbd9eb87e6765c7a
2019-07-02Transceiver: Drop use of GSM::Time from trx_ul_burst_indPau Espin Pedrol2-7/+11
Use of that class is really not needed since we don't need to do any calculation with those values, so we can simply store the final values in the struct. Related: OS#4006 Change-Id: Iadf2683d7f52138a2248598641f3b702252f325d
2019-07-02Transceiver: Move soft bits normalization to pullRadioVector()Pau Espin Pedrol1-3/+3
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: Ibfb48877af4ff5ef0f56390901669c8353beaf48
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-25trx_{vty,rate_ctr}: Set proper license AGPLv3+Pau Espin Pedrol2-13/+19
Take the chance to improve text with author, SPDX tag and fix incorrect copyright dates. Related: OS#3515 Change-Id: Ic745312ed07db205b1cdc0f2fa130000319354c5
2019-06-25Remove AUTHORS filePau Espin Pedrol2-128/+1
License of this file doesn't match the license stated in COPYING and in most source code files (GPLv3 vs AGPLv3). Furthermore, we don't really maintain this file, so let's drop it to avoid non-up-to-date content which may introduce confusion. Related: OS#3515 Change-Id: I536a145cb7696af8e9dbd3065ee5e5f493217ac6
2019-06-17Add option to set stack size in config file, default == 0 == OS defaultEric Wild8-12/+38
Change-Id: Id752f6b5ce9a96a67cd1ff835687ce0e03d3a50d
2019-06-11Add VTY commands to set error ctr thresholdsPau Espin Pedrol6-11/+391
osmo-trx will validate over time that those thresholds are not reached. If they are reached, osmo-trx will die. As a result, osmo-bts-trx will notice and will end up notifying the BSC about it (for instance because it will also restart its process). For instance: """ ctr-error-threshold rx_drop_events 2 minute ctr-error-threshold rx_underruns 10 second """ In those cases above, osmo-trx will die if rate_ctr rx_drop_events went to a value higher than 2 per minute, or it will die to if rx_underruns went higher than 10 per second. Change-Id: I4bcf44dbf064e2e86dfc3b8a2ad18fea76fbd51a
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-05doc: vty: Update trx_vty_reference.xmlPau Espin Pedrol1-43/+138
Change-Id: I2587cd47ee48e979de447f7a0f4d79bb5fac0592
2019-06-05Rename and move STOP signal from Transceiver to mainPau Espin Pedrol4-24/+9
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 Pedrol8-37/+262
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-29debian: create -doc subpackage with pdf manualsOliver Smith5-18/+37
I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I34858a18a34fc467f274ac164697a242f4cf0df8
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 Pedrol10-8/+20
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 Pedrol3-36/+39
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