AgeCommit message (Collapse)AuthorFilesLines
2018-12-12WIP: move comma_delimited_to_vector to Utils.cpposmith/select-limesdr-by-serialOliver Smith4-15/+63
Change-Id: If3f0f682ca453c2b0a06175ec9626567932cfce6
2018-12-12LMSDevice: make use of dev-args in osmo-trx.cfgOliver Smith6-2/+101
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-07lms: Do {under,over}run checks even if LMS_RecvStream failsPau Espin Pedrol1-1/+1
Under failure, it could still be that stream status is updated, so let's father that in all cases. Change-Id: I4e2b8be06d2993db1bab233948a8ee774b8ac4ee
2018-12-07lms: Move {under,over}run checks into separate methodPau Espin Pedrol2-11/+16
Change-Id: I7f450aa79f6285d14826c40ecfdd9490d00509ef
2018-12-07transceiver: Log TRXCTRL iface responses towards osmo-bts-trxPau Espin Pedrol1-1/+2
Change-Id: I8128c42e63ab1fcd2a58812f3b7cf94435b5bbd8
2018-12-07Add TRXCTRL log categoryPau Espin Pedrol3-7/+14
This log category is applied to messages related to TRX CTRL socket interface, and it's printed in yellow, same color used in osmo-bts-trx for TRX category (so same messages are printed with same color in both sides). Change-Id: I98ec5e416272783ad3fbadf70478a4e48ae64983
2018-12-06contrib: fix makedistcheck with disabled systemdOliver Smith1-1/+5
EXTRA_DIST files need to be distributed, no matter if the systemd option is configured or not. Change-Id: I2e417f4c453987df1ac04f0ff41bf000da4b5c49
2018-12-05transceiver: log chan on CTRL command receivedPau Espin Pedrol1-1/+1
Change-Id: Ia3b2a35e03a8aaddd6efebc8db2ccca872f51f20
2018-12-05lms: Improve Set{Rx,Tx}{Gain,Freq} loggingPau Espin Pedrol1-6/+10
Change-Id: I6713a27c5f74beb7fcfdd712fcf695afccbc3d76
2018-12-05lms: Allow setting Tx/RxFreq for lchan!=0Pau Espin Pedrol1-11/+0
Related: OS#3346 Change-Id: I9dd0bb41d1863111d28947fc0d7c7e7ecfaf5fa8
2018-12-05lms: Allow setting Tx/RxGain for chan!=0Pau Espin Pedrol1-10/+0
Related: OS#3346 Change-Id: I5fae92a7ed5e2d92be12b9dfd33fc56195030c0b
2018-12-05SigProcLib: Improve Vector buffer allocation messPau Espin Pedrol6-47/+52
Original issue: In order to use SSE instructions, 16-byte aligned memory chunks are needed, and C++ version < C++11 doesn't provide for a native new/delete store. For that reason, memalign() must be used in the implementation of convolve_h_alloc() for some buffers. On the other side, The C++ code relies on C++ "new T[]" operator to allocate a chunk of memory containing an array of class instances. As classes are complex types, they cannot be allocated through C structures (calling malloc). Experimentally can be seen too that it's unreliable and the process will crash during startup if malloc() is used and then a Complex<> deferred from it. Previous implementation allowed for use of convolve_h_alloc or new[] based on how the (signal)Vector is called, because then the buffer is not going to be managed internally. But that's unreliable since resize() calling resize() on it could use "delete" operator on a malloc'ed buffer, and end up having a new new[] allocated buffer. It was also found that some of the callers were actually leaking memory through ASan (because the buffer is not managed by the Vector instance). IMHO best option would be to rewrite all this code using C structures and malloc/free exclusively, since it would make all this cod eeasier to maintain. But for now, let's extend the Vector class to allow specifying an external alloc/free function and let the Vector instance take care of the ownership of the buffer in all scenarios. Change-Id: Ie484a4762a7f77fe1b105188ea03a6f025730b82
2018-12-05jenkins.sh: run "make distcheck"Oliver Smith1-3/+6
Run distcheck in CI to be consistent with other Osmocom projects. Change-Id: I7d3fa0fe12e13ca13d3330158425718e5c34d00d
2018-12-05contrib/jenkins.sh: build and publish manualsOliver Smith1-1/+21
Add new environment variables WITH_MANUALS and PUBLISH to control if the manuals should be built and uploaded. Describe all environment vars on top of the file. When WITH_MANUALS is set, install osmo-gsm-manuals like any other dependency and add --enable-manuals to the configure flags (for "make" and "make distcheck"). Add the bin subdir of the installed files to PATH, so osmo-gsm-manuals-check-depends can be used by ./configure. Related: OS#3385 Change-Id: I54fdd18e405b2c84762ea06d91359867ceec8184
2018-12-04lms: Close device on LMS_Init failurePau Espin Pedrol1-1/+1
Change-Id: I0b307452a9e122a0ea39a46f096423c9a5293d30
2018-12-04osmo-trx: Change some lines to use libosmocore logging instead of coutPau Espin Pedrol1-5/+5
Change-Id: I66e3c37014ba12cd002e5b678bc0a6026f5dfc7e
2018-12-04lms: Make sure LMS_Close is called when Device is torn downPau Espin Pedrol2-0/+11
This change fixes lots of memory leaks inside libLimeSuite as announced by ASan after exiting the osmo-trx process (throgh CTRL+C for instance). This way also we make sure libLimeSuite can communicate with the HW and close whatever subsystems were enabled during LMS_Open time. Change-Id: I56ffb87079e34aa2d0322fd2ca6429742f9f7640
2018-12-04Fix DISTCHECK_CONFIGURE_FLAGS overrideOliver Smith1-1/+1
Set AM_DISTCHECK_CONFIGURE_FLAGS in Makefile.am instead of DISTCHECK_CONFIGURE_FLAGS. This is the recommended way from the automake manual, as otherwise the flag can't be changed by the user anymore. Related: OS#3718 Change-Id: I725026cd2dda333085a263c503058aac4305197d
2018-12-03PointerFIFO: Fix memleak of ListNodePau Espin Pedrol2-0/+20
Found by ASan. when PointerFIFO::release() is called, alloicated node being released is actually stored into an internal list for later-reuse without having to access memory allocator. However, nodes from this list are never freed. Change-Id: I40e5e28603cde67005d9d92772967b05465ea2b8
2018-12-03radioInterface: Fix memleak during close()Pau Espin Pedrol1-0/+8
destructors of pointers created through "new" must be destroyed manually through "delete". Change-Id: I10d37579f16bec89cc762f200a8951218305c708
2018-12-03lms: Destroy streams on device stopPau Espin Pedrol1-0/+4
They are recreated during start(). Actually, if they are not stopped here, during start() after stop(), LMS_SetupStream() will fail because it will detect the streams are already opened. Change-Id: I70d47c287aabdabc5dc1304a942d130aeb10bdc5
2018-12-03lms: Fix start after stop of devicePau Espin Pedrol1-0/+6
Change-Id: I56358a1d1601853bc6dd2e6bb5f80798d0ba84b2
2018-12-02UHDDevice: log exception information on device open failured0gtail1-2/+2
Change-Id: Ia84ddcf50cc83f9326b22bfdfb4f259b4e0bc5f1
2018-11-29lms: Set Rx gain to midpoint, as comment suggests.Harald Welte1-1/+1
So far, the Rx gain was set to 34 dB, wile the comment stated it would be set to half-point, which is 73/2=36dB. Let's adjust the code to match the comment. Change-Id: Idc646def53b83faf4e6c011fb595fa436e223b32
2018-11-29lms: User correct scale factor for transmit samplesHarald Welte1-1/+8
Due to (I believe) a copy+paste mistake from the USRP1 code, we were using only a scale range of up to 9830 when transmitting samples, rather than the full 16 bit signed integer range up to 32767. As a result, we were loosing almost two bits (MSBs) of resolution as well as a lot of transmit power. This changes the scale factor to 0.707 (1/sqrt(2)). Please note that the much higher DAC output level means that the analog gain should be reduced. The theoretic range of up to 73dB should not be used, but Lime Microsystems suggest a value of 61..67 dB. This can be achieved by using a "osmotrx tx-attenuation" value of 6..12 inside the osmo-bts-trx configuration file. Related: OS#3341 Related: OS#3342 Change-Id: I71702feaa11f53e7614a6938a984dd748405474a
2018-11-27build manuals moved here from osmo-gsm-manuals.gitOliver Smith7-30/+91
Moved to doc/manuals/, with full commit history, in preceding merge commit. Now incorporate in the build system. Build with: $ autoreconf -fi $ ./configure --enable-manuals $ make Shared files from osmo-gsm-manuals.git are found automatically if - the repository is checked out in ../osmo-gsm-manuals; or - if it osmo-gsm-manuals was installed with "make install"; or - OSMO_GSM_MANUALS_DIR is set. Related: OS#3385 Change-Id: I2762171af0bf719a34ba12a0c2e4dcc206098beb
2018-11-27Merge history from osmo-gsm-manuals.gitNeels Hofmeyr16-0/+1820
2018-11-27osmotrx: Introduce code architecture chapterPau Espin Pedrol2-0/+143
Change-Id: I21084e6315d79a1adcb305e12343da218837dc31
2018-11-27osmotrx: Create a common chapter for section documenting backendsPau Espin Pedrol1-3/+6
Change-Id: I6bea1ccca4ce72b92641a36f9f5894ac9a6cae72
2018-11-27osmotrx: configuration: Add section to document multi-arfcn featurePau Espin Pedrol1-0/+49
Change-Id: Id04c7f7c36d8a8be8145ef8009ece26ef1a7cdff
2018-11-27osmotrx: Write initial documentation for several supported devicesPau Espin Pedrol2-1/+68
Change-Id: I902b01ca661416eb9705afac8a34ec8d2fb13789
2018-11-27osmotrx: Split Device specific section from backend onePau Espin Pedrol3-26/+27
Device specific sections will be added to this new chapter. Change-Id: Id96cbf857e2ef92d9ad2cb58fd18132f981447d7
2018-11-27trx: Add Hardware device support sectionPau Espin Pedrol2-0/+69
Change-Id: I87fc54cf1751f31a3e92d6503625e984f9a6130f
2018-11-27trx: Add Hardware architecture support sectionPau Espin Pedrol2-0/+36
Change-Id: I38388bcb2ea7c0481052d3bca589cb34965ea7fa
2018-11-27trx: Add reference to project wiki page in overfiew sectionPau Espin Pedrol1-0/+3
Change-Id: I83cbd67909c42f4ed4857834e23c07ad4e2e22aa
2018-11-27vty-ref: Update URI of docbook 5.0 schemaHarald Welte1-2/+2
... to match the /etc/xml/catalog file on debian (no "www" in hostname) Change-Id: Id9f3579c7f2bc3af13fe30b5268f249b6f59ed0d
2018-11-27Introduce chapter trx_if.adoc and add it to OsmoTRX and OsmoBTSPau Espin Pedrol1-0/+2
This chapter defines the protocol used between osmo-trx and osmo-bts-trx. Most of the text comes originally from osmo-trx.git/README, as it's the only known documentation of the protocol other than the code itself. Change-Id: I56c418eef0f826ae1aadbed5b151fbed241c7885
2018-11-27Introduce OsmoTRX manualPau Espin Pedrol12-0/+1447
Change-Id: I19ee9d6cda02fb7200c96c0ac129e69825b096cd
2018-11-27Importing history from osmo-gsm-manuals.gitNeels Hofmeyr0-0/+0
2018-11-23lms: Apply LMS->OSMO log level conversionPau Espin Pedrol1-1/+1
Change-Id: I3a8fbcc7cacebc7038c60175a8ae43b21f713cbb
2018-11-23lms: Use LimeSuite.h log level defines instead of hardcoded valuesPau Espin Pedrol1-4/+4
Change-Id: Iee693da1a0fa1db23deafa8d3845c04171e24799
2018-11-19UHDDevice: setRxGain on chan 0 when using multi-arfcnPau Espin Pedrol1-0/+3
When using multi-arfcn feature, several logical channels (arfcn) are multiplxed into one physical transceiver, as can be seen in uhd_device::set_channels. As a result, when multi-arfcn is enabled some properties are actually shared for those logical channels, and internally mapped to the first (only existing) channel, and per-channel internal array variables are allocated accordingly (size() == 1). When setting RxGain, we need to set the correct existing physical channel. Same check is done in getRxGain, and then we apply the RxGain correctly and we avoid outputing an error "Requested non-existent channel" immediatelly after. Change-Id: I5b02bb1ef6450dc48be7b8058d96a5691847d3cc
2018-11-01ChannelizerBase: Fix ASan alloc-dealloc-mismatchPau Espin Pedrol1-1/+1
Fixes following Adress Sanitizer warning: ================================================================= ==27120==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x60c00003d900 #0 0x7f2f216de421 in operator delete(void*, unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:151 #1 0x561641ce18b7 in ChannelizerBase::~ChannelizerBase() (/build/new/out/bin/osmo-trx-uhd+0x4a8b7) #2 0x561641ce1cad in Channelizer::~Channelizer() (/build/new/out/bin/osmo-trx-uhd+0x4acad) #3 0x561641cd5160 in RadioInterfaceMulti::close() (/build/new/out/bin/osmo-trx-uhd+0x3e160) #4 0x561641cd5047 in RadioInterfaceMulti::~RadioInterfaceMulti() (/build/new/out/bin/osmo-trx-uhd+0x3e047) #5 0x561641cd5093 in RadioInterfaceMulti::~RadioInterfaceMulti() (/build/new/out/bin/osmo-trx-uhd+0x3e093) #6 0x561641ca3fdd in trx_stop() (/build/new/out/bin/osmo-trx-uhd+0xcfdd) #7 0x561641ca4b32 in main (/build/new/out/bin/osmo-trx-uhd+0xdb32) #8 0x7f2f1f555222 in __libc_start_main (/usr/lib/libc.so.6+0x24222) #9 0x561641ca195d in _start (/build/new/out/bin/osmo-trx-uhd+0xa95d) 0x60c00003d900 is located 0 bytes inside of 128-byte region [0x60c00003d900,0x60c00003d980) allocated by thread T0 here: #0 0x7f2f216dcf19 in operator new[](unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:93 #1 0x561641ce142d in ChannelizerBase::init() (/build/new/out/bin/osmo-trx-uhd+0x4a42d) #2 0x561641cd5865 in RadioInterfaceMulti::init(int) (/build/new/out/bin/osmo-trx-uhd+0x3e865) #3 0x561641ca1cb7 in makeRadioInterface(trx_ctx*, RadioDevice*, int) (/build/new/out/bin/osmo-trx-uhd+0xacb7) #4 0x561641ca44c6 in trx_start(trx_ctx*) (/build/new/out/bin/osmo-trx-uhd+0xd4c6) #5 0x561641ca4b05 in main (/build/new/out/bin/osmo-trx-uhd+0xdb05) #6 0x7f2f1f555222 in __libc_start_main (/usr/lib/libc.so.6+0x24222) SUMMARY: AddressSanitizer: alloc-dealloc-mismatch /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:151 in operator delete(void*, unsigned long) ==27120==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0 ==27120==ABORTING Change-Id: Ib7c98ae478f319573dd86a0d2cb264f676bb3859
2018-10-24sigProcLib: add a CorrType for extended (11-bit) RACHVadim Yanitskiy2-6/+12
This is a preparatory change that enables a possibility to choose the amount of synch. sequences to be used for Access Burst (RACH) detection. The VTY flag will be introduced in further changes. There are two correlation types now: - RACH (default) - TS0 only; - EXT_RACH - all TS0, TS1, and TS2 together. Change-Id: Ia4f20524350bb8c380d7e10360758eddae8b03e9 Related: OS#3054
2018-10-24sigProcLib: introduce both TS1 and TS2 RACH synch. sequencesVadim Yanitskiy4-19/+31
According to 3GPP TS 05.02, section 5.2.7, there are three synch. sequences for Access Bursts: - TS0: GSM, GMSK (default), - TS1: EGPRS, 8-PSK, - TS2: EGPRS, GMSK. Let's prepare everythyng to be able to detect all TS0-3 synch. sequences, but keep detection of both TS1 and TS2 disabled until the corresponding VTY option is introduced. Change-Id: I838c21db29c54f1924dd478c2b34b46b70aab2cd Related: OS#3054
2018-10-23Add long parameters (--help, --version, ...)Oliver Smith1-5/+13
Makes osmo-trx-* more consistent with other Osmocom programs, and allows an unified test for not having "UNKNOWN" in --version. Related: OS#3578 Change-Id: I90cf01d972aa10b48c59b67a1e7f82a4255ef526
2018-10-21trx_validate_config(): Fix validation of rx_spsHarald Welte1-1/+1
Change-Id: I7e932cff59335add09c76caba6f9ac1e7cf69022 Fixes: Coverity CID#188871
2018-10-21SocketsTest.testReaderIP(): Zero terminate received bufferHarald Welte1-1/+2
Change-Id: Icd144e672ab15cfb0955897dd6eb529c56908eba
2018-10-09jenkins.sh: Enable build of osmo-trx-lmsPau Espin Pedrol1-1/+1
Change-Id: Idfa7ce566ad69b181bcadeee7ff023c77ecd4d6b
2018-10-05examples: Use logging level 'set-all' instead of 'all'Pau Espin Pedrol4-4/+4
Change-Id: Ic52ce0defc774acb8e24947ed22cf2a56b8b0bb0