aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
AgeCommit message (Collapse)AuthorFilesLines
2019-08-26device: Use LOGCHAN in set_antennas()Pau Espin Pedrol1-4/+4
Change-Id: I3099498e3a3f26b53d55a96a36cc056f7b25b27a
2019-08-26lms: Log available antennas if requested antenna failsPau Espin Pedrol2-2/+23
Related: OS#3343 Change-Id: Icd328e85b0a75ef67f371a7ed72638053b1854f9
2019-08-26Transceiver: Enable EDGE detection only on PDCH timeslotsPau Espin Pedrol1-6/+2
Related: OS#3664 Change-Id: Id16248a1c03f9bc9f323c707857cdf3bf34c4e3e
2019-08-26Transceiver: exit process when BTS drops connectionPau Espin Pedrol2-30/+53
We don't want to keep osmo-trx running in a started state once the BTS controlling it becomes unavailable. If a socket towards the BTS fails, it means the BTS is gone and the best thing to do is to stop the process (alternatively we could go back to stopped state instead, and wait for BTS to re-connect, fur so far this action is good enough). Related: OS#4170 Change-Id: I2ccbe3c17b39fb792ea7810f840235c348054d66
2019-08-26Transceiver: Fix idle ul burst indications being droppedPau Espin Pedrol1-1/+2
pullRadioVector() should return true on idle frames because those indications may be handled by upper layers (TRXDv1). Clarify return code in function documentation. Change-Id: If592ed1c04cf7e995f656b313f60edd4d40d1bfd
2019-08-26Transceiver: Clean up receival of downlink burstsPau Espin Pedrol2-25/+31
Use a packed structure to clearly indicate what is contained in the received buffer. Change-Id: I4d8c0e3c0c717699889f79e50c778d14b6058f2d
2019-08-26Transceiver: Check return value when binding IP addr for clock socketPau Espin Pedrol1-0/+2
No need to continue further since anyway we'll end up exiting. Change-Id: Id8b38b40df5744beb705d560defb06532cf0fd44
2019-08-26Transceiver: fix segfault during init if IP addr binding failsPau Espin Pedrol1-3/+5
If osmo-trx is started and IP addr binding fails (ie because the IP address is not assigned in the system), it will try to access a heap-allocated Thread instance which was not initialized (because init() function returned earlier). Fixes: OS#4147 Change-Id: I19f9745cd026c0ff6581895a66bf91b40113b07d
2019-08-21Drop old setPriority related codePau Espin Pedrol8-32/+0
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
2019-08-14osmo-trx: log to stderr on signal receivedPau Espin Pedrol1-2/+2
Since osmo-trx it's a big multithreaded process and shutdown sequence can be complex, better use stderr to log signal received events to make sure log is outputted straigh away and not buffered. In general stdout is usually line-buffered, but buffering strategy can be more conservative if output is for instance redirected to a file. Change-Id: I70ba86919d1f7df41ef3db4916317d27697a025c
2019-08-07Transceiver: Add missing include netinet/in.hPau Espin Pedrol1-0/+1
Previous commit started using IPPROTO_UDP without including required include. Newer versions of libosmocore's osmocom/core/socket.h include that header so the define is present, but older versions of libosmocore (such as 0.12.0) don't, so let's include it explicitly (the correct thing to do). Fixes: b9d2515704ac83cacd88d0a73ecba30323df0b2d Change-Id: I67ddf550f3a7fc6a650e1e1d9bde0bbb28785104
2019-08-01Move std_inband.rbf under device/usrp1/ dirPau Espin Pedrol3-6/+6
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
2019-08-01Move README.DFEsymbolspaced to utils/matlabPau Espin Pedrol1-14/+0
Change-Id: Icccc18688ee54e669cf3452b08747b3509042fa2
2019-08-01Move Transceiver52/README to UserManualPau Espin Pedrol2-37/+0
Change-Id: Ib5a56cfe0c27d027bc0c60abda89e646a80849de
2019-08-01Move matlab files under utils/matlabPau Espin Pedrol2-98/+0
Change-Id: I15b687fbf436d662b264cb00f72b367ccd64b962
2019-08-01Move inband-signaling-usb documentation to UserManualPau Espin Pedrol1-314/+0
Change-Id: I4d6ef1f54f3d6c5a73ce00dc4640bd698f96842b
2019-08-01lms: Drop rx_underruns rate ctr, add tx_drop_* rate ctrPau Espin Pedrol2-28/+61
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] https://github.com/osmocom/osmo-trx/commit/bde55afd29fc9aae10eb11f6515821afa39b772d Change-Id: Iff1535c219a4695a511d383d7c4b06ef6eff959d
2019-07-29usrp1: don't check for non-null underrun pointerPau Espin Pedrol1-2/+2
The pointer can't never be null, so avoid checking it. Change-Id: I12e14641713a6494bc89570f02cecfc6f8fd4b5e
2019-07-29radioInterface: Clarify how underruns are handled driving a radioDevicePau Espin Pedrol1-1/+3
The underrun parameter in radioDevice's readSamples() is not a "Rx Underrun" event, but rather it's used to retrieve a "Tx Underrun" which on some SDRs (like USRP1) seems to be (so far) available only at readSamples() times. Thus, underrun parameter for both readSamples() and writeSamples() is actually flagging the same event, and should be ORed in pushBuffer() as it's already done in pullBuffer(). Otherwise if implementation is setting the underrun pointer to false, it could erase the flag being marked by the counterpart function before isUnderrun() is called (which is the one responsible to clear the flag). Change-Id: Id549489fc1485e0d762818c8e682aaddd5041f1c
2019-07-23Transceiver: Clean up code passing parameters to threadsPau Espin Pedrol2-45/+37
TransceiverChannel naming was misleading there. It's simply a data type used to pass 2 parameters through the void* of the thread entry function, so let's clearly specify is a storage for thread params. Furthermore, we don't need a full C++ class for that, let's simply use a struct. Change-Id: I6e3898a8a66520cc5b2a7df9b9ae01b0b272387f
2019-07-23Transceiver: Store TRXD version per channelPau Espin Pedrol2-8/+9
The setting is negotiatied by osmo-bts-trx on each channel, so let's keep and use state per channel instead of overwriting the state from different channels. Take the chance to change related log lines to also print the channel number. Change-Id: If9cf95e89d38d0155ab48b8c0977ca5f381c2aad
2019-07-22Bind CTRL port to IP addr specified in VTY configPau Espin Pedrol1-1/+1
Before this commit, osmo-trx was always setting its CTRL socket to listen on 127.0.0.1. Change-Id: I61a06c1b9c20a906e7030f824a93370d041be7b9
2019-07-22Add SPDX annotationPau Espin Pedrol36-2/+76
Related: OS#3515 Change-Id: I3719bd8dc015569ecd81928fc079e27593cdca09
2019-07-22cosmetic: Fix trailing whitespace in several filesPau Espin Pedrol9-34/+33
Change-Id: Ifafb68353960fc5046661854ccfb8d783b0efb14
2019-07-21radioInterface.cpp: Fix missing member initialization of RadioInterface()Harald Welte1-1/+2
Change-Id: I7264ef35dbe6d3522858eae5b47d150aa1ffe334 Closes: CID#169594
2019-07-21CorrelationSequence: fix initialization of class membersHarald Welte1-1/+1
Change-Id: Ia72395f8805e9e2cd700ad1e559a8aa62124aaec Closes: CID#149371
2019-07-21ChannelizerBase: fix initialization of class membersHarald Welte1-1/+2
Change-Id: I8c047c8f98e928a62dca1d7b8c003502727c086e Closes: CID#149374
2019-07-20trxd_fill_common(): fix TRXD header version codingVadim Yanitskiy1-1/+1
The header version field is 4 bit long, so the mask 0x07 == 0b111 is wrong, it should actually be 0x0f == 0b1111. Change-Id: I290931559ce01cf6e43470b18855c46808d6c2a5
2019-07-20proto_trxd.c: Use bit-wise AND, not boolean ANDHarald Welte1-1/+1
Change-Id: I974c91be7cc119b44c2fb0c53d08009c87de7bf1 Related: CID#202038
2019-07-19Transceiver: Initialize mExtRACH in constructorPau Espin Pedrol1-1/+2
Doing so should make Coverity happy: >>> CID 200212: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "mExtRACH" is not initialized in this constructor nor in any functions that it calls. The current status is actually harmless since the field will be set during init() time, and the variable is never used before init() is called. Fixes: Coverity CID#200212 Change-Id: I17286570a9a6db695a75147e5cbb18c9da7d0fe6
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 Pedrol1-0/+4
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-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 Pedrol2-18/+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