aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
AgeCommit message (Collapse)AuthorFilesLines
2022-12-23ipc: remove old autotools workaroundEric1-9/+1
Closes: OS#5845 Change-Id: I3f8a0204b1fda52d1228add8afde620274b164a5
2022-12-23ipc: add missing overrideEric1-1/+1
Change-Id: Ib1493ac10b40d24372075d4cebd67015192675e0
2022-12-23clean up mutex, scopedlock, and signal classesEric9-68/+31
This also uncovers very interesting design decisions like the copying of mutexes and condition vars depending on recursive locks that were previously hidden by shady c function calls.. We have perfectly good c++11 versions for all of that. While we're at it, also use the initialization list for the other (still copy constructable) vectors, which cleans up the radio interfaces. Change-Id: Idc9e3b1144c5b93f5dad2f8e0e30f1058477aa52
2022-12-23ms-trx supportEric18-3/+3507
This is basically a trxcon that includes a transceiver, and can just be used with existing and future apps supporting the trxcon interface, i.e. mobile or ccch_scan. Supports bladerf and uhd. Currently using hardcoded sched/prios aimed at a setup with working, reliable usb and reserved cores, for example a raspi 4 (ONLY 4, not 3, not 2, not any other version) Additionally builds test tools used for development: osmo-trx-syncthing* see https://osmocom.org/projects/baseband/wiki/MS-side_GPRS for the project description and details Change-Id: I36c65a8c725c4da76dc70006cd96b0a2b6878e84
2022-12-17ctrl: take both address and port from vty configMax1-1/+1
Change-Id: Id7d1425e603cc62a62a63d1057291861f02782ba
2022-12-13vita demod by piotr krysik, modifiedEric5-0/+969
Grabbed from gr-gsm 2de47e28ce1fb9a518337bfc0add36c8e3cff5eb Had a few rounds of extensive cleanup (not the va itself). Uses gcc multiversioning for x86 targets. Change-Id: I5466c522cf4de984a4810ec46df43a10b52ed78f
2022-12-06bladerf xa4 supportEric5-0/+908
This is not really finished, there are multiple reasons to not use this: 1) main clock is not a gsm multiple, so it will continously drift 2) small buffer sizes lead to tx gaps that are hard to detect and break everything. Change-Id: I455c34bb9520d5f09eeb1ac76fceb4bdea94d1ac
2022-11-30rename noisevector class -> avgvectorEric3-6/+9
The vectors feature is averaging, and not adding noise. Change-Id: I05def8ab9ea7a2cece8db09c36c303e13ef40927
2022-10-26Transceiver::expectedCorrType(): RACH is always 8-bit on PTCCH/UVadim Yanitskiy1-1/+1
It does not make sense for the MS to use 11-bit Access Bursts on PTCCH/U because the payload does not matter, only the ToA does. Change-Id: I5fb9f1c6810cdcd26a885b183e414d01d422eb28
2021-12-14treewide: remove FSF address2022q12021q4Oliver Smith21-84/+0
Remove the paragraph about writing to the Free Software Foundation's mailing address. The FSF has changed addresses in the past, and may do so again. In 2021 this is not useful, let's rather have a bit less boilerplate at the start of source files. Change-Id: I8ba71ab9ccde4ba25151ecbeb2a323f706b57d43
2021-10-25LMSDevice: LMS_GetDeviceList() may return a negative numberVadim Yanitskiy1-3/+4
Change-Id: I855bd8ea6d9cb0f285f4dbbf3bcd09bff4e71044 Fixes: CID#240718
2021-10-25IPCDevice: check value returned from select()Vadim Yanitskiy1-1/+6
Change-Id: I1c823317659547bb2391c57ac4d7931de1a383e3 Fxies: CID#240744
2021-10-25IPCDevice: use thread safe strerror_r() instead of strerror()Vadim Yanitskiy1-3/+7
Change-Id: Ia51ffa51ec7729572faca0282ae41c1e4968049f
2021-09-21lms,uhd: Allow changing band between poweroff & poweronPau Espin Pedrol4-7/+16
Before this patch, reconnecting to osmo-trx and attempting to configure it for another band is not going to work without restarting the process. The new variable is added in order to still allow POWEROFF followed by a POWERON without need to reconfigure the device. In that case, previous configuration is kept. Change-Id: I43e5e1e4dcb36be605c6bd25dd6a5f3649e244e7
2021-09-21lms,uhd: Skip re-assigning same bandPau Espin Pedrol2-4/+8
There's no need to spend time looking up again the same band description. Change-Id: I6f5631c9e64b9c261d52a856d757d08d2f336947
2021-09-21lms,uhd: Validate band of RxFreq tooPau Espin Pedrol2-0/+34
So far the validation is only done on TxFreq for all TRX. Let's also do it for RxFreq. Change-Id: I30eef2727ee96b1344aa1416edd66e2302b88964
2021-09-21lms: Drop duplicated checkPau Espin Pedrol1-6/+0
Same check is already done by set_band(). Change-Id: I48d14f35e83fa17d1a8f4154479f0a5cee0f816d
2021-09-03computeCI: Document hardcoded multiplierPau Espin Pedrol1-1/+7
Logarithm change of base rule is used. Document it so it's clear where it comes from. Change-Id: Ia588e8dafda4e1abe0721f12491661949339a1ba
2021-09-01cosmetic: Fix typo in commentPau Espin Pedrol1-1/+1
Change-Id: I33f4253cecab8d92eec75af49e1671874b8cc111
2021-09-01detectGeneralBurst(): Increase log level about clipping to INFOPau Espin Pedrol1-1/+1
There's another related logging line also at INFO level in the caller path in Transceiver.cpp, but it only prints if detectBurst() failed. Let's print this one as INFO too, which proved to be a good logging level. This way user also notices gain is too high despite osmo-trx is still able to decode bursts. Change-Id: Ieca4f19ae1099a430e9b838f8b6780b1c61a87a9
2021-09-01computeCI(): Constify read-only variablePau Espin Pedrol1-3/+1
Change-Id: Ia157b970db92eef252c3657b35607307b7ebf988
2021-09-01computeCI(): Rename verbose repeated getter to constantPau Espin Pedrol1-4/+5
Change-Id: I9b426d01a282f572c0b915c5666642dce4c60475
2021-09-01computeCI(): Constify param and pass it as referencePau Espin Pedrol1-1/+1
Change-Id: Icba5fce57c858bd16196ae3012c100c7e4134335
2021-09-01detectBurst(): constify parameterPau Espin Pedrol1-2/+2
Change-Id: I3d8738b492a175f2ef0c570579e335e7b7695694
2021-09-01detectBurst(): Clear downsampling code pathPau Espin Pedrol1-8/+12
downsampleBurst() and the Resampler below it clearly only support or are confgiured for 1<->4 setup currently. Change-Id: Iebaff7a34bd24e56627f148182859918accbfa82
2021-07-11lms: init bandEric1-1/+3
Gain setting without a band was apparently led to a very low output level, thanks to defog for pointing this out. Change-Id: I8b59d38dd7b0781776c9e61226185879541fdc53 Related: OS#3342
2021-05-29uhd: ensure configured clock source is actually usedEric1-0/+14
We wouldn't want to get caught running with unlocked external clock sources, right?! Change-Id: Ie38d85617f46eb5ab7d9527ddf6aaab4d3edf6bf
2021-05-27ctrl_sock_handle_rx(): fix missing space in LOGCHAN() statementVadim Yanitskiy1-1/+1
Change-Id: I3c69d64dfe79dcc815e1d412569ed4e9ed428c52
2021-05-05add hidden fn adjustment commandEric1-1/+1
This is only useful if the rf path delays the signal by at least one frame, and therefore a fairly experimental command that might be removed or reworked in the future and should not be relied upon. Change-Id: I29964acffad5bad4f5bcad7f631e435a72979c46
2021-03-01ipc: Makefile.am: Clean LDADD variablePau Espin Pedrol1-1/+2
Change-Id: I26c942496ab12883a4a1e0d549cb462642570636
2021-02-28mark uhddev_ipc.cpp as BUILT_SOURCESHarald Welte1-2/+3
fixes "make dist-bzip2" on a clean checkout Closes: OS#5052 Change-Id: Ieb4cefb16c8f43e708a96353c13342fe40ffdb54
2021-02-21Add a (hidden) VTY parameter for Rx/Tx freq. shiftingVadim Yanitskiy2-3/+5
Change-Id: I360e8ba91471757210c7f096c04928a6fbb91c61 Related: SYS#4454
2021-02-04sigProcLib: fix C/I computation for 8-PSK modulated burstsSylvain Munaut3-17/+38
Change-Id: I860af60bc0fbd36dfb38316fad65ddd3a5827a8f Related: Ib4ceec553f2e5f77bf3f6777724968456a180f5e Related: OS#4006, OS#4373
2021-01-27Transceiver: use proper factor for amplitude scalingVadim Yanitskiy1-1/+1
In Transceiver::addRadioVector() we scale the I/Q samples by scaling the output voltage of the DAC. A relative factor/divisor/ration in the voltage domain cannot be used 1:1 in the power domain. There exist two similar formulas: a) X_dB = 10 * log10(X_lin / X_ref) b) Y_db = 20 * log10(Y_lin / Y_ref) both of them are correct, and according to [1]: a) If you convert a quantity X that relates to power or energy, => the factor is 10. b) If you convert a quantity Y that relates to amplitude, => the factor is 20. Therefore we should be using 20 instead of 10. This change makes osmo-trx apply per-lchan attenuation values correctly. Otherwise it would double the values indicated in TRXD messages. [1] https://dspillustrations.com/pages/posts/misc/decibel-conversion-factor-10-or-factor-20.html Change-Id: I98bc00bd25df4913d45e55eb008d715aca76fc7c Related: SYS#4918
2021-01-21Transceiver: fix integer division in addRadioVector()Vadim Yanitskiy1-1/+1
By default, C/C++ compiler does assume integer division. The lack of explicit cast to 'double' causes the transceiver to ignore non-decimal attenuation values (x % 10 > 0): txFullScale * 10 ^ ( -3 / 10) == txFullScale * 10 ^ 0 == txFullScale * 1.0 txFullScale * 10 ^ ( -8 / 10) == txFullScale * 10 ^ 0 == txFullScale * 1.0 txFullScale * 10 ^ (-10 / 10) == txFullScale * 10 ^ -1 == txFullScale * 0.1 txFullScale * 10 ^ (-18 / 10) == txFullScale * 10 ^ -1 == txFullScale * 0.1 Change-Id: I85b1063f57f630d90c6da32827bec4a05afc6514 Related: SYS#4918
2021-01-18ChannelizerBase: Fix memory leakPau Espin Pedrol1-0/+1
The memory leak was reported by ASan: Direct leak of 32 byte(s) in 1 object(s) allocated from: #0 0x7f23b488e459 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x558e83e39e3c in ChannelizerBase::initFilters() /osmo-trx/Transceiver52M/ChannelizerBase.cpp:84 #2 0x558e83e3a8a0 in ChannelizerBase::init() /osmo-trx/Transceiver52M/ChannelizerBase.cpp:188 #3 0x558e83e2d263 in RadioInterfaceMulti::init(int) /osmo-trx/Transceiver52M/radioInterfaceMulti.cpp:197 #4 0x558e83de76d2 in makeRadioInterface(trx_ctx*, RadioDevice*, int) /osmo-trx/Transceiver52M/osmo-trx.cpp:115 #5 0x558e83dea663 in trx_start /osmo-trx/Transceiver52M/osmo-trx.cpp:600 #6 0x558e83dead6f in main /osmo-trx/Transceiver52M/osmo-trx.cpp:695 #7 0x7f23b2576151 in __libc_start_main (/usr/lib/libc.so.6+0x28151) Change-Id: Ibc4c7edeb9bba517db08fce152d863e6cc0c7bbb
2021-01-17radioInterfaceMulti: Fix memory leak upon close()Pau Espin Pedrol1-0/+4
The leak was reported by ASan. Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7fd9c9c29f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99 #1 0x55bd63ae2364 in RadioInterfaceMulti::init(int) /git/osmo-trx/Transceiver52M/radioInterfaceMulti.cpp:209 #2 0x55bd63a9c6d2 in makeRadioInterface(trx_ctx*, RadioDevice*, int) /git/osmo-trx/Transceiver52M/osmo-trx.cpp:115 #3 0x55bd63a9f663 in trx_start /git/osmo-trx/Transceiver52M/osmo-trx.cpp:600 #4 0x55bd63a9fd6f in main /git/osmo-trx/Transceiver52M/osmo-trx.cpp:695 #5 0x7fd9c7910151 in __libc_start_main (/usr/lib/libc.so.6+0x28151) Change-Id: Ia4f9d4e47caa86ada98054763573e652d281992c
2020-12-10ipc-driver-test: Allow setting dir prefix for UD socketPau Espin Pedrol2-10/+23
Change-Id: I35282b38a1d560fb3440fe0aa9a27808d9d116cc
2020-12-07ipc: Fix wrong reference to BTS in log linePau Espin Pedrol1-1/+1
Change-Id: Idd272959e335c46ca88e348dd792e15ddb317d61
2020-11-25main: generate coredump and exit upon SIGABRT receivedPau Espin Pedrol1-0/+11
Previous code relied on abort() switching sigaction to SIG_FDL + retriggering SIGABRT in case the signal handler returns, which would then generate the coredump + terminate the process. However, if a SIGABRT is received from somewhere else (kill -SIGABRT), then the process would print the talloc report and continue running, which is not desired. Change-Id: I3a3ff56cb2d740a33731ecfdf76aa32606872883 Fixes: OS#4865
2020-11-11Use osmo_fd_*_{disable,enable}Harald Welte4-17/+17
Change-Id: Ic8c8c418e123fbdff625556a900b19650deefe0b Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
2020-11-04main: use logging API to print SIMD info instead of printf()Vadim Yanitskiy1-29/+33
Otherwise these logging lines end up in the automatically generated XML VTY reference (stdout), so this breaks further XML processing. Change-Id: I8e0fd728d406e2452c9c0ddad5bce5f6b17fab42 Related: SYS#4937, SYS#4910
2020-10-25Transceiver: explicitly init m{Rx,Tx}LowerLoopThreadVadim Yanitskiy1-0/+1
Coverity warns us that a non-static class members: - mRxLowerLoopThread, and - mTxLowerLoopThread, are not initialized in this constructor nor in any functions that it calls. I don't think it's critical, because we do initialize them in Transceiver::start(), but let's make them nullptr. Change-Id: If9e06aa7965f17383ab6599c15945e8ce2703bbf Fixes: CID#214952
2020-10-24Transceiver: use size_t and ARRAY_SIZE() in constructorVadim Yanitskiy1-2/+2
Change-Id: I164d66aad04d77957300b07e83b085f43a3ee8c1
2020-10-24device: drop unreasonable LIBOSMO{CTRL,VTY}_{CFLAGS,LIBS}Vadim Yanitskiy6-9/+7
Neither VTY nor CTRL API is used in device specific code, excluding the 'uhd' where osmo_cpu_sched_vty_apply_localthread() is called. Change-Id: I568b443da4b96c005734d749faa22b9c7440f951
2020-10-24main: add --vty-ref-mode, use vty_dump_xml_ref_mode()Vadim Yanitskiy1-14/+36
Change-Id: Ie54c45fdcc8660f37f8db2367b53404b189b3ffc Depends: Ie2022a7f9e167e5ceacf15350c037dd43768ff40 Related: SYS#4910
2020-10-24device/common/Makefile.am: remove $(LMS_CFLAGS) from AM_CXXFLAGSVadim Yanitskiy1-1/+1
This is device-independent code, so it should not be here. Change-Id: I1ffc3431a9a1a46c74c354b3f8a256684bfcbe73
2020-10-24device/lms: get rid of 'using namespace std'Vadim Yanitskiy1-3/+1
Change-Id: I4329801c502db73efa946f15c103b2c081cee5a7
2020-10-24device/lms: fix missing semicolon in LMSDevice::assign_band_desc()Vadim Yanitskiy1-1/+1
Change-Id: I6aedb72306461ebb944fc13a795b0bf3121ea275
2020-10-24device/lms: fix: 'trx_vty.h' header requires C linkageVadim Yanitskiy1-1/+1
Otherwise, the linker fails to produce osmo-trx-lms binary: LMSDevice.cpp:493: undefined reference to `get_value_string(value_string const*, unsigned int)' LMSDevice.cpp:237: undefined reference to `osmo_panic(char const*, ...)' Change-Id: I2fef166c13136af7b7aaa744d39427d76ad11769 Fixes: OS#4828