Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test with limesdr and other sdrs supported by soapysdr #86

Closed
cooperq opened this issue Jul 20, 2020 · 69 comments
Closed

test with limesdr and other sdrs supported by soapysdr #86

cooperq opened this issue Jul 20, 2020 · 69 comments
Labels

Comments

@cooperq
Copy link
Collaborator

cooperq commented Jul 20, 2020

Test to see if crocodile hunter can run on a cheaper SDR:

  • Lime SDR
  • HackRF
  • RTL-SDR
@phantomdennis
Copy link

How do I sign up to test with a HackRF?

@alphafox02
Copy link

Not necessarily cheaper but the usrp b205mini-I works with uhd. Confirmed, at least in my case, that it works. Is there a way to pass a soapy argument to srsue via the crocodile py file?

@aphid
Copy link

aphid commented Aug 9, 2020

I have a lime SDR but would need some guidance to test

@pdelteil
Copy link

I have the three devices. I will give it a try. Where should I report the results ?

@jofrep
Copy link

jofrep commented Aug 14, 2020

I have a lime SDR but would need some guidance to test

me too. I have lime SDR and would like to test but would need some guidance

@cooperq
Copy link
Collaborator Author

cooperq commented Aug 14, 2020

You will have to start by enabling the SOAPY SDR drivers in https://github.com/EFForg/srsLTE/blob/master/CMakeLists.txt and then get your device working with SOAPY SDR. Compile SRSLTE by hand then test it with one of the test scripts. If it all works please let me know here!

@cooperq cooperq mentioned this issue Aug 14, 2020
@alphafox02
Copy link

alphafox02 commented Aug 15, 2020

https://youtu.be/AbtmqkFkmIg

Made this for someone else trying to use soapy and srslte. I don’t really have an issue using soapy so long as there’s only one device plugged in and/or being recognized by soapy as I don’t know yet how to pick individual devices when using soapy with srslte. It just picks the first device in the list so make sure you have only one thing being recognized by SoapySDRUtil, otherwise if you know the arguments to select specific devices please share.

Also, while soapy works when using some things with srslte directly, not sure how to pass this along when starting it with the crocodile file.

@phantomdennis
Copy link

phantomdennis commented Aug 17, 2020

So I have SoapySDR running with the HackRF. It looks like it is found without issue.

ubuntu@ubunu2004:~/srsLTE$ SoapySDRUtil --find
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Found device 0
  device = HackRF One
  driver = hackrf
  label = HackRF One #0 XXXXXXXXXXXXXXX
  part_id = a000cb3c0055434e
  serial = 0000000000000000XXXXXXXXXXXXXXX
  version = 2018.01.1

I made sure that the SoapySDR was enabled in the CMakeLists.txt file for srsLTE.

option(ENABLE_GUI      "Enable GUI (using srsGUI)"                OFF)
option(ENABLE_UHD      "Enable UHD"                               ON)
option(ENABLE_BLADERF  "Enable BladeRF"                           ON)
option(ENABLE_SOAPYSDR "Enable SoapySDR"                          ON)
option(ENABLE_HARDSIM  "Enable support for SIM cards"             OFF)

When running the crcodilehunter.py I get the following output. Is there something that needs to be passed to tell the script to use SoapySDR?

ubuntu@ubunu2004:~/crocodilehunter/src$ ./crocodilehunter.py -p default
* 22:00:10 default - INFO starting crododile hunter project: default
 * 22:00:10 default - INFO Starting WebUI
 * 22:00:10 default - INFO  * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * 22:00:10 default - INFO Checking for config file
 * 22:00:10 default - INFO Checking for SDR
 * 22:00:10 default - INFO No bladeRF devices connected. Assuming UHD device.
 * 22:00:10 default - INFO No UHD device found either
 * 22:00:10 default - CRITICAL Bootstrapping failed
 * 22:00:10 default - ERROR Exiting...
 * 22:00:10 default - WARNING Stopping Watchdog
 * 22:00:10 default - SUCCESS See you space cowboy...

@alphafox02
Copy link

alphafox02 commented Aug 17, 2020

I showed in the video above what needs to be passed when running srslte normally to use soapy. It doesn’t appear this is possible with the crocodile script.

@cooperq
Copy link
Collaborator Author

cooperq commented Aug 17, 2020

ah yea the problem here is the bootstrap script I have looks for either a bladeRF or Ettus device and quits if it doesn't find one. If you know bash this should be pretty easy to patch, if not I can try to get a patch today .

If you run crocodilehunter/src/srsLTE/build/lib/examples/cell_measurement -z <list,of,earfcns> on its own with the hackrf does it work?

@cooperq
Copy link
Collaborator Author

cooperq commented Aug 17, 2020

closing #91 as a duplicate of this issue.

@phantomdennis
Copy link

Yeah, I noticed that. I commented the tests out and found an issue with my gps. I'm working on that at the moment. I'll let you know if I get to the point where I can build and test the hackrf with the cell_measurement. Hopefully soon.

@phantomdennis
Copy link

phantomdennis commented Aug 17, 2020

So I was able to get it to run by commenting out the bladeRF and Ettus device checks. The web interface starts but still no joy on the SoapySDR for HackRF.

 * 01:11:23 default - INFO starting crododile hunter project: default
 * 01:11:23 default - INFO Starting WebUI
 * 01:11:23 default - INFO  * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * 01:11:23 default - INFO -e Checking for config file
 * 01:11:23 default - INFO -e Checking for SDR
 * 01:11:23 default - INFO -e Starting GPS
 * 01:11:24 default - INFO Warning: Stopping gpsd.service, but it can still be activated by:
 * 01:11:24 default - INFO   gpsd.socket
 * 01:11:24 default - INFO -e Waiting for GPS to sync
 * 01:11:25 default - INFO -e GPS successfully got location
 * 01:11:25 default - INFO -e Compiling srsUE
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c: In function ‘rf_soapy_open_multi’:
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:347:52: warning: passing argument 2 of ‘SoapySDRDevice_setupStream’ makes integer from pointer without a cast [-Wint-conversion]
 * 01:11:27 default - INFO   347 |     if(SoapySDRDevice_setupStream(handler->device, &(handler->rxStream), SOAPY_SDR_RX, SOAPY_SDR_CF32, rx_channels, numChannels, NULL) != 0) {
 * 01:11:27 default - INFO       |                                                    ^~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO       |                                                    |
 * 01:11:27 default - INFO       |                                                    SoapySDRStream ** {aka struct SoapySDRStream **}
 * 01:11:27 default - INFO In file included from /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:37:
 * 01:11:27 default - INFO /usr/local/include/SoapySDR/Device.h:295:31: note: expected ‘int’ but argument is of type ‘SoapySDRStream **’ {aka ‘struct SoapySDRStream **’}
 * 01:11:27 default - INFO   295 | SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
 * 01:11:27 default - INFO       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:347:74: warning: passing argument 3 of ‘SoapySDRDevice_setupStream’ makes pointer from integer without a cast [-Wint-conversion]
 * 01:11:27 default - INFO   347 |     if(SoapySDRDevice_setupStream(handler->device, &(handler->rxStream), SOAPY_SDR_RX, SOAPY_SDR_CF32, rx_channels, numChannels, NULL) != 0) {
 * 01:11:27 default - INFO       |                                                                          ^~~~~~~~~~~~
 * 01:11:27 default - INFO       |                                                                          |
 * 01:11:27 default - INFO       |                                                                          int
 * 01:11:27 default - INFO In file included from /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:37:
 * 01:11:27 default - INFO /usr/local/include/SoapySDR/Device.h:295:31: note: expected ‘const char *’ but argument is of type ‘int’
 * 01:11:27 default - INFO   295 | SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
 * 01:11:27 default - INFO       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:347:88: error: passing argument 4 of ‘SoapySDRDevice_setupStream’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 * 01:11:27 default - INFO   347 |     if(SoapySDRDevice_setupStream(handler->device, &(handler->rxStream), SOAPY_SDR_RX, SOAPY_SDR_CF32, rx_channels, numChannels, NULL) != 0) {
 * 01:11:27 default - INFO       |                                                                                        ^~~~~~~~~~~~~~
 * 01:11:27 default - INFO       |                                                                                        |
 * 01:11:27 default - INFO       |                                                                                        char *
 * 01:11:27 default - INFO In file included from /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:37:
 * 01:11:27 default - INFO /usr/local/include/SoapySDR/Device.h:295:31: note: expected ‘const size_t *’ {aka ‘const long unsigned int *’} but argument is of type ‘char *’
 * 01:11:27 default - INFO   295 | SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
 * 01:11:27 default - INFO       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:347:104: warning: passing argument 5 of ‘SoapySDRDevice_setupStream’ makes integer from pointer without a cast [-Wint-conversion]
 * 01:11:27 default - INFO   347 |     if(SoapySDRDevice_setupStream(handler->device, &(handler->rxStream), SOAPY_SDR_RX, SOAPY_SDR_CF32, rx_channels, numChannels, NULL) != 0) {
 * 01:11:27 default - INFO       |                                                                                                        ^~~~~~~~~~~
 * 01:11:27 default - INFO       |                                                                                                        |
 * 01:11:27 default - INFO       |                                                                                                        size_t * {aka long unsigned int *}
 * 01:11:27 default - INFO In file included from /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:37:
 * 01:11:27 default - INFO /usr/local/include/SoapySDR/Device.h:295:31: note: expected ‘size_t’ {aka ‘const long unsigned int’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
 * 01:11:27 default - INFO   295 | SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
 * 01:11:27 default - INFO       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:347:117: warning: passing argument 6 of ‘SoapySDRDevice_setupStream’ makes pointer from integer without a cast [-Wint-conversion]
 * 01:11:27 default - INFO   347 |     if(SoapySDRDevice_setupStream(handler->device, &(handler->rxStream), SOAPY_SDR_RX, SOAPY_SDR_CF32, rx_channels, numChannels, NULL) != 0) {
 * 01:11:27 default - INFO       |                                                                                                                     ^~~~~~~~~~~
 * 01:11:27 default - INFO       |                                                                                                                     |
 * 01:11:27 default - INFO       |                                                                                                                     size_t {aka long unsigned int}
 * 01:11:27 default - INFO In file included from /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:37:
 * 01:11:27 default - INFO /usr/local/include/SoapySDR/Device.h:295:31: note: expected ‘const SoapySDRKwargs *’ {aka ‘const struct <anonymous> *’} but argument is of type ‘size_t’ {aka ‘long unsigned int’}
 * 01:11:27 default - INFO   295 | SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
 * 01:11:27 default - INFO       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:347:8: error: too many arguments to function ‘SoapySDRDevice_setupStream’
 * 01:11:27 default - INFO   347 |     if(SoapySDRDevice_setupStream(handler->device, &(handler->rxStream), SOAPY_SDR_RX, SOAPY_SDR_CF32, rx_channels, numChannels, NULL) != 0) {
 * 01:11:27 default - INFO       |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO In file included from /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:37:
 * 01:11:27 default - INFO /usr/local/include/SoapySDR/Device.h:295:31: note: declared here
 * 01:11:27 default - INFO   295 | SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
 * 01:11:27 default - INFO       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:356:53: warning: passing argument 2 of ‘SoapySDRDevice_setupStream’ makes integer from pointer without a cast [-Wint-conversion]
 * 01:11:27 default - INFO   356 |     if (SoapySDRDevice_setupStream(handler->device, &(handler->txStream), SOAPY_SDR_TX, SOAPY_SDR_CF32, NULL, 0, NULL) != 0) {
 * 01:11:27 default - INFO       |                                                     ^~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO       |                                                     |
 * 01:11:27 default - INFO       |                                                     SoapySDRStream ** {aka struct SoapySDRStream **}
 * 01:11:27 default - INFO In file included from /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:37:
 * 01:11:27 default - INFO /usr/local/include/SoapySDR/Device.h:295:31: note: expected ‘int’ but argument is of type ‘SoapySDRStream **’ {aka ‘struct SoapySDRStream **’}
 * 01:11:27 default - INFO   295 | SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
 * 01:11:27 default - INFO       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:356:89: error: passing argument 4 of ‘SoapySDRDevice_setupStream’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 * 01:11:27 default - INFO   356 |     if (SoapySDRDevice_setupStream(handler->device, &(handler->txStream), SOAPY_SDR_TX, SOAPY_SDR_CF32, NULL, 0, NULL) != 0) {
 * 01:11:27 default - INFO       |                                                                                         ^~~~~~~~~~~~~~
 * 01:11:27 default - INFO       |                                                                                         |
 * 01:11:27 default - INFO       |                                                                                         char *
 * 01:11:27 default - INFO In file included from /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:37:
 * 01:11:27 default - INFO /usr/local/include/SoapySDR/Device.h:295:31: note: expected ‘const size_t *’ {aka ‘const long unsigned int *’} but argument is of type ‘char *’
 * 01:11:27 default - INFO   295 | SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
 * 01:11:27 default - INFO       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:356:105: warning: passing argument 5 of ‘SoapySDRDevice_setupStream’ makes integer from pointer without a cast [-Wint-conversion]
 * 01:11:27 default - INFO   356 |     if (SoapySDRDevice_setupStream(handler->device, &(handler->txStream), SOAPY_SDR_TX, SOAPY_SDR_CF32, NULL, 0, NULL) != 0) {
 * 01:11:27 default - INFO       |                                                                                                         ^~~~
 * 01:11:27 default - INFO       |                                                                                                         |
 * 01:11:27 default - INFO       |                                                                                                         void *
 * 01:11:27 default - INFO In file included from /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:37:
 * 01:11:27 default - INFO /usr/local/include/SoapySDR/Device.h:295:31: note: expected ‘size_t’ {aka ‘const long unsigned int’} but argument is of type ‘void *’
 * 01:11:27 default - INFO   295 | SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
 * 01:11:27 default - INFO       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:356:9: error: too many arguments to function ‘SoapySDRDevice_setupStream’
 * 01:11:27 default - INFO   356 |     if (SoapySDRDevice_setupStream(handler->device, &(handler->txStream), SOAPY_SDR_TX, SOAPY_SDR_CF32, NULL, 0, NULL) != 0) {
 * 01:11:27 default - INFO       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO In file included from /home/ubuntu/Desktop/crocodilehunter/src/srsLTE/lib/src/phy/rf/rf_soapy_imp.c:37:
 * 01:11:27 default - INFO /usr/local/include/SoapySDR/Device.h:295:31: note: declared here
 * 01:11:27 default - INFO   295 | SOAPY_SDR_API SoapySDRStream *SoapySDRDevice_setupStream(SoapySDRDevice *device,
 * 01:11:27 default - INFO       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
 * 01:11:27 default - INFO cc1: some warnings being treated as errors
 * 01:11:27 default - INFO make[2]: *** [lib/src/phy/rf/CMakeFiles/srslte_rf.dir/build.make:76: lib/src/phy/rf/CMakeFiles/srslte_rf.dir/rf_soapy_imp.c.o] Error 1
 * 01:11:27 default - INFO make[1]: *** [CMakeFiles/Makefile2:3197: lib/src/phy/rf/CMakeFiles/srslte_rf.dir/all] Error 2
 * 01:11:27 default - INFO make: *** [Makefile:163: all] Error 2
 * 01:11:27 default - INFO -e SrsUE built succesfully
 * 01:11:27 default - INFO -e Reticulating Splines
 * 01:11:27 default - SUCCESS Watchdog server running
 * 01:11:27 default - NOTICE Using earfcn list 41094,40978,8340,66836,66711,66586,675,5035,2225,1075,2485,66486,66487,8763,8640,66761,41292,40270,975,2000,8665,9820,5230,5110,8315
 * 01:11:27 default - INFO EARFCNS: 41094,40978,8340,66836,66711,66586,675,5035,2225,1075,2485,66486,66487,8763,8640,66761,41292,40270,975,2000,8665,9820,5230,5110,8315
 * 01:11:27 default - INFO Running srsUE
Traceback (most recent call last):
  File "./crocodilehunter.py", line 225, in <module>
    crocodile_hunter.start()
  File "./crocodilehunter.py", line 109, in start
    proc = self.start_srslte()
  File "./crocodilehunter.py", line 140, in start_srslte
    proc = Popen(["./srsLTE/build/lib/examples/cell_measurement", "-z", earfcns], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: './srsLTE/build/lib/examples/cell_measurement'
^ * 01:12:00 default - CRITICAL You pressed Ctrl+C!
 * 01:12:00 default - ERROR Exiting...
 * 01:12:00 default - WARNING Stopping Watchdog
 * 01:12:00 default - SUCCESS See you space cowboy...

@alphafox02
Copy link

So even if you build in soapy support (I just did with no errors), if you have a look at the examples they only allow or at least say they do “ -a RF args” and not device_name which is what I think is needed. If you have a look at the UE.conf you’ll see that device_name is different than device_args. I’m trying to run any of the examples with soapy but it reverts to uhd. I’ll keep trying but I think something more is needed.

@phantomdennis
Copy link

I don't think that the crocodilehunter/src/srsLTE/build/lib/examples/cell_measurement is being built. The directory is empty. I do have the crocodilehunter/src/srsLTE/lib/examples/cell_measurement.cc file.

@alphafox02
Copy link

alphafox02 commented Aug 17, 2020

Go to the src/srslte directory.
mkdir build
cd build
cmake ..
make

See where it’s failing. Are you building on 20.04? If so, it doesn’t build. 18.04 works.

@phantomdennis
Copy link

I am building on 20.04. So I need to do this on 18.04? I'll get a VM put together and see if I can try that out this afternoon.

@alphafox02
Copy link

alphafox02 commented Aug 17, 2020 via email

@phantomdennis
Copy link

phantomdennis commented Aug 18, 2020

I used the DragonOS, thank you @alphafox02 and I was able to get the system compiled and running a bit more than before. See output below. This is with the HackRF and SoapySDR. Any thoughts @cooperq?

 * 11:39:28 default - INFO starting crocodile hunter project: default
 * 11:39:28 default - INFO Starting WebUI
 * 11:39:28 default - INFO  * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * 11:39:28 default - INFO Checking for config file
 * 11:39:28 default - INFO Checking for SDR
 * 11:39:28 default - INFO Starting GPS
 * 11:39:29 default - INFO Waiting for GPS to sync
 * 11:39:30 default - INFO GPS successfully got location
 * 11:39:30 default - INFO Compiling srsUE
 * 11:39:34 default - INFO SrsUE built succesfully
 * 11:39:34 default - INFO Reticulating Splines
 * 11:39:34 default - SUCCESS Watchdog server running
 * 11:39:34 default - WARNING Getting earcn list for the first time, this might take a while
 * 11:39:38 default - NOTICE Using earfcn list
 * 11:39:38 default - INFO EARFCNS: 
 * 11:39:38 default - INFO Running srsUE
 * 11:39:38 default - SUCCESS srsUE started with pid 4256
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "./crocodilehunter.py", line 154, in monitor_srslte
    line = nbsr.readline(int(self.config["general"]["crash_timeout"]))
ValueError: invalid literal for int() with base 10: '30 ;number of seconds until we assume process has crashed. On a raspberry pi this needs to be more like 120'

@cooperq
Copy link
Collaborator Author

cooperq commented Aug 18, 2020

yea the process is crashing but we don't know why, if you run cell_measurement on its own what is the output?

@phantomdennis
Copy link

phantomdennis commented Aug 18, 2020

This is the output:

sudo ./cell_measurement -z 41094
- Scanning 1 EARFCNs
Opening RF device...

Then it just sits there.

@alphafox02
Copy link

alphafox02 commented Aug 18, 2020

So couple things, that exception trace back thing - it’s not actually crashing. It does it on my end and appears to be doing nothing but in fact it’s actually working and will find cells and move on. Each time it goes to look for a cell it’ll pop back up that exception thread 3 thing or more as you can sorta see in the background of the video I posted.

As for running cell measurement on its own you need to run it something like this ./cell_measurement -z 900

Or whatever earfcn list you have.. but as I mentioned there’s no way to specify soapy and so I believe it sticks to uhd only which hangs the hackrf. You can change devices args but not the device name. So I think you’ll find that crocodile hunter will work for you if you had a bladerf or usrp. I’m sitting here now using usrp and seeing that same “exception in thread” rubbish you show above. No impact on it running though.

@alphafox02
Copy link

I also just went ahead and added crocodile hunter to the ISO as that was quicker than making another one. I’ll upload it tonight and hopefully that’ll help some people... but I to would love this soapy + LimeSDR. or whatever. I think the examples need more added though. Hope I’m wrong.

@alphafox02
Copy link

I just edited the cmake file and disabled uhd and bladerf and only enabled soapy. I’ll see what happens, maybe that’ll let us know if those examples are made to run anything but uhd.

@phantomdennis
Copy link

I'm fairly certain it is using SoapySDR. I adjusted the CMakeList.txt to use only SoapySDR and turned off the UHD and USRP. I also ran the hackrf_info and the device is listed as busy while the cell_measure is running. I'm just not getting any output. What would I get if it found something with cell_measurement?

@phantomdennis
Copy link

I did a cell search. An suggestion on the band? I was thinking 700mhz? I dont know if I need to put this in hz or khz

./cell_search -v -s 41094 -e 42000 -b 700
Opening RF device...
Soapy has found device #0: device=HackRF One, driver=hackrf, label=HackRF One #0 , part_id=a000cb3c0055434e, serial=000000000000000, version=2018.01.1,
[INFO] Opening HackRF One #0 ...
Set Rx bandwidth to 2.50 MHz
Set Tx bandwidth to 1.75 MHz
Setting up RX stream
Setting up TX stream
Available device sensors:
Available sensors for RX channel 0:
State of gain elements for Rx channel 0 (AGC not supported):
 - LNA: 16.00 dB
 - AMP: 0.00 dB
 - VGA: 16.00 dB
State of gain elements for Tx channel 0 (AGC not supported):
 - LNA: 0.00 dB
 - AMP: 0.00 dB
 - VGA: 0.00 dB
Rx antenna set to TX/RX
Tx antenna set to TX/RX
Set master clock rate to 0.00 MHz
Error: Invalid band 700
Error getting EARFCN list

@alphafox02
Copy link

Okay this is looking good at least in my test with an ettus. I deleted the build directory for srslte. I then edited the CMakeLists.txt and put OFF next to uhd and bladerf and on next to soapy.

mkdir build
cmake ..
make

Now when I run the cell measurement example it tells me it’s using Soapy and not uhd!! Now the only other issue may be that I have soapy audio installed and it’s listed as the device 0 and my ettus is device 2. So with you running DragonOS do this

SoapySDRUtil —find

If it’s listing anything other than your hackrf then remove it.

Sudo apt-get remove soapysdr0.7-module-audio.

@alphafox02
Copy link

Nice! We both did the same thing.

@phantomdennis
Copy link

Bingo I can search with HackRF :)

./cell_search -v -s 5010 -e 5035 -b 12
Opening RF device...
Soapy has found device #0: device=HackRF One, driver=hackrf, label=HackRF One #0 , part_id=a000cb3c0055434e, serial=0000000000000000, version=2018.01.1,
[INFO] Opening HackRF One #0 
...
Set Rx bandwidth to 2.50 MHz
Set Tx bandwidth to 1.75 MHz
Setting up RX stream
Setting up TX stream
Available device sensors:
Available sensors for RX channel 0:
State of gain elements for Rx channel 0 (AGC not supported):
 - LNA: 16.00 dB
 - AMP: 0.00 dB
 - VGA: 16.00 dB
State of gain elements for Tx channel 0 (AGC not supported):
 - LNA: 0.00 dB
 - AMP: 0.00 dB
 - VGA: 0.00 dB
Rx antenna set to TX/RX
Tx antenna set to TX/RX
Set master clock rate to 0.00 MHz
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
***** plan dft 1d
Tuned Rx to 729.00 MHz
[INFO]: Set rf_freq to 729.000 MHz
[  0/25]: EARFCN 5010 Freq. 729.00 MHz looking for PSS.

[INFO]: Setting sampling frequency 1.92 MHz for PSS search
Set Rx bandwidth to 2.50 MHz
[INFO]: Starting receiver...
[INFO]: CP-CFO: estimated=0.001197, mean=0.001197
[INFO]: PSS: id=0, peak_pos=1097, peak_value=1.006247
[INFO]: SYNC FIND: sf_idx=0, ret=0, next_state=0

@alphafox02
Copy link

I’ll have a lime tomorrow or Monday. Also if you look at this link

#84

It shows how we can build work 20.04. Which I’m testing now and hoping to just include in m new DragonOS project.

@alphafox02
Copy link

LimeSDR mini in hand. It looks promising as it starts and runs with soapy but I’m getting some error about insufficient rx gain etc.. I think I need to get the device args right and manually place them in the crocodile file after I figure out what’s right running the cell measurement tool on its own. I’ll video it all tonight and see if anyone has advice, but again it looks promising at least with my quick check on 20.04 with latest LimeSuite from the PPa.

There’s still checking it in 18.04 and with different s versions of soapy etc etc.. hoping it’s just the device args though that’ll make it work regardless of other variables.

@alphafox02
Copy link

15:00 minutes in I start to mess with the LimeSDR and crocodile hunter. I think it’s a matter of correct device args being passed and if so maybe the crocodile hunter will need to have a way to pass them across to cell measurement, unless you just hard code them in the script.

Open to any suggestions anyone may have on what I could do differently to get it working.

https://youtu.be/1UHBfrG4pVs

@phantomdennis
Copy link

phantomdennis commented Aug 21, 2020

I noticed in your video your clock reference for the LimeSDR is at 40 MHz. In the srsLTE documentation it mentions that devices need to run a clock of 30.72 MHz. You may need to set the clock reference to 30.72 MHz. In the srsLTE issue 437, the user was able to get the clock reference to 30.72 MHz.

[INFO] Reference clock 30.72 MHz
[INFO] Device name: LimeSDR-USB
[INFO] Reference: 30.72 MHz

srsran/srsRAN_4G#437

@alphafox02
Copy link

I’ve found a way to change the clock reference in the lime suite GUI but I think there’s a difference between the normal LimeSDR and the mini.

https://discourse.myriadrf.org/t/limesdr-on-srslte-unable-to-find-network-on-lte-device/5182/2

@alexballas
Copy link

alexballas commented Aug 25, 2020

I’ve found a way to change the clock reference in the lime suite GUI but I think there’s a difference between the normal LimeSDR and the mini.

https://discourse.myriadrf.org/t/limesdr-on-srslte-unable-to-find-network-on-lte-device/5182/2

Unfortunately any changes applied to the GUI are relevant while the board is connected to it. Any configs in the GUI will go away as soon as you disconnect the board from it. I believe you can still save and restore the configs through the GUI but nothing gets stored to the chip.
For LimeSDR mini to support an external clock, you need to first do an board modification (move a 0ohm resistance).

Edit:
I can see that the Lime API also supports https://docs.myriadrf.org/LMS_API/group___f_n___l_o_w___l_v_l.html#gaf654ad677321956d6d782a9003d939c4 an API call to set the frequency of the clock, but haven't tested it.

@alphafox02
Copy link

alphafox02 commented Sep 10, 2020

Not sure if this would help any, but I’ve tried this program with the LimeSDR mini and it seems to work, https://github.com/falkenber9/falcon

“ Note: FALCON requires a patched version of srsLTE 18.12 that is automatically downloaded and included as subproject during the build process.”

@alexballas
Copy link

alexballas commented Sep 12, 2020

I got crocodilehunter working on LimeSDR mini (ubuntu 18.04). I found 3 issues:

  1. When crocodilehunter first loads I get the following error
    ValueError: invalid literal for int() with base 10: '30 ;number of seconds until we assume process has crashed. On a raspberry pi this needs to be more like 120'.
    I don't see any impact so far.

  2. ValueError: Not a boolean: false ;check if towers are operating with the MCCs and MNCs below, they vary by country. If not sure leave it to false
    This error keeps popping when finding towers. I don't see any impact so far.

  3. (High Impact): I've setup my config with 5 earfcns values. cell_measurement sub-process memory keeps going up non-stop. In just two minutes it's ~ 7GiB (res) memory. I keep killing it before it maxes out my laptop.

Strangely, If I try to run cell_measurement seperately, it will run for a while, locate some CELLs and then crash.

$ cat ./srsLTE.backtrace.crash
--- command='./srsLTE/build/lib/examples/cell_measurement -z ***' version=18.12.0 signal=6 date='12/09/2020 22:17:12' ---
	./srsLTE/build/lib/examples/cell_measurement(+0x57df1a) [0x55f8059d6f1a]
	/lib/x86_64-linux-gnu/libc.so.6(+0x3efd0) [0x7fe4884a1fd0]
	/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7) [0x7fe4884a1f47]
	/lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7fe4884a38b1]
	/lib/x86_64-linux-gnu/libc.so.6(+0x89907) [0x7fe4884ec907]
	/lib/x86_64-linux-gnu/libc.so.6(+0x9097a) [0x7fe4884f397a]
	/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6b4) [0x7fe4884fb074]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(+0x903d) [0x7fe4878e703d]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(libusb_handle_events_timeout_completed+0xf0) [0x7fe4878e8130]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(libusb_handle_events_completed+0x30) [0x7fe4878e8280]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(+0xab99) [0x7fe4878e8b99]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(+0xac9d) [0x7fe4878e8c9d]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(libusb_bulk_transfer+0xf) [0x7fe4878e903f]
	/usr/local/lib/libLimeSuite.so.20.07-1(+0x9046f) [0x7fe487b8646f]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime14LMS64CProtocol14TransferPacketERNS0_13GenericPacketE+0x167) [0x7fe487b49cd7]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime14LMS64CProtocol15ReadLMS7002MSPIEPKjPjmj+0x2c8) [0x7fe487b45588]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime8LMS7002M14SPI_read_batchEPKtPtt+0x1eb) [0x7fe487b30c7b]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime8LMS7002M8SPI_readEtbPi+0xcc) [0x7fe487b30fec]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime8LMS7002M19Modify_SPI_Reg_bitsEthhtb+0x2d) [0x7fe487b31e2d]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime8LMS7002M11EnableSXTDDEb+0x1e) [0x7fe487b333be]
	/usr/local/lib/libLimeSuite.so.20.07-1(+0x74dd5) [0x7fe487b6add5]
	/usr/local/lib/SoapySDR/modules0.7/libLMS7Support.so(+0xbd68) [0x7fe487dd7d68]
	/usr/local/lib/libSoapySDR.so.0.7(SoapySDRDevice_setFrequency+0x420) [0x7fe488250140]
	/home/alex/test/crocodilehunter/src/srsLTE/build/lib/src/phy/rf/libsrslte_rf.so(rf_soapy_set_rx_freq+0x16) [0x7fe4897c3356]
	./srsLTE/build/lib/examples/cell_measurement(main+0x3d9) [0x55f80558bf69]
	/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fe488484b97]
	./srsLTE/build/lib/examples/cell_measurement(_start+0x2a) [0x55f80558d8ca]

--- command='./srsLTE/build/lib/examples/cell_measurement -z ***' version=18.12.0 signal=6 date='12/09/2020 22:23:07' ---
	./srsLTE/build/lib/examples/cell_measurement(+0x57df1a) [0x55a4bdc0bf1a]
	/lib/x86_64-linux-gnu/libc.so.6(+0x3efd0) [0x7fa1a6894fd0]
	/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7) [0x7fa1a6894f47]
	/lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7fa1a68968b1]
	/lib/x86_64-linux-gnu/libc.so.6(+0x89907) [0x7fa1a68df907]
	/lib/x86_64-linux-gnu/libc.so.6(+0x9097a) [0x7fa1a68e697a]
	/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6b4) [0x7fa1a68ee074]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(+0x903d) [0x7fa1a5cda03d]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(libusb_handle_events_timeout_completed+0xf0) [0x7fa1a5cdb130]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(libusb_handle_events_completed+0x30) [0x7fa1a5cdb280]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(+0xab99) [0x7fa1a5cdbb99]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(+0xac9d) [0x7fa1a5cdbc9d]
	/lib/x86_64-linux-gnu/libusb-1.0.so.0(libusb_bulk_transfer+0xf) [0x7fa1a5cdc03f]
	/usr/local/lib/libLimeSuite.so.20.07-1(+0x9046f) [0x7fa1a5f7946f]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime14LMS64CProtocol14TransferPacketERNS0_13GenericPacketE+0x167) [0x7fa1a5f3ccd7]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime14LMS64CProtocol15ReadLMS7002MSPIEPKjPjmj+0x2c8) [0x7fa1a5f38588]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime8LMS7002M14SPI_read_batchEPKtPtt+0x1eb) [0x7fa1a5f23c7b]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime8LMS7002M8SPI_readEtbPi+0xcc) [0x7fa1a5f23fec]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime8LMS7002M19Modify_SPI_Reg_bitsEthhtb+0x2d) [0x7fa1a5f24e2d]
	/usr/local/lib/libLimeSuite.so.20.07-1(_ZN4lime8LMS7002M11EnableSXTDDEb+0x1e) [0x7fa1a5f263be]
	/usr/local/lib/libLimeSuite.so.20.07-1(+0x74dd5) [0x7fa1a5f5ddd5]
	/usr/local/lib/SoapySDR/modules0.7/libLMS7Support.so(+0xbd68) [0x7fa1a61cad68]
	/usr/local/lib/libSoapySDR.so.0.7(SoapySDRDevice_setFrequency+0x420) [0x7fa1a6643140]
	/home/alex/test/crocodilehunter/src/srsLTE/build/lib/src/phy/rf/libsrslte_rf.so(rf_soapy_set_rx_freq+0x16) [0x7fa1a7bb6356]
	./srsLTE/build/lib/examples/cell_measurement(main+0x3d9) [0x55a4bd7c0f69]
	/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fa1a6877b97]
	./srsLTE/build/lib/examples/cell_measurement(_start+0x2a) [0x55a4bd7c28ca]

Update:
For the first and second issues, I just fixed the config. The python code doesn't seem to support the default comments in the config.ini file.
Unfortunately the memory leak still persists.

@alphafox02
Copy link

alphafox02 commented Sep 12, 2020

I ended up trying the mini again and found that it located one cell when I let it run using uhd soapy vs forcing it to just the straight normal soapy. I would always get an error mx code 4 and something about the tx Calibration which is mentioned a lot on forums. Considering you found cells and I found one I have some hope it’ll be usable with some more work.

@alexballas
Copy link

alexballas commented Sep 12, 2020

Yes, I also get the

[ERROR] Tx Calibration: MCU error 4 (SXT tune failed)

but only once.

I fixed the first errors as you said.
Would it be possible to check the memory usage of cell_measurement?
It seems to go up faster if you have multiple earfcns

@cooperq
Copy link
Collaborator Author

cooperq commented Sep 15, 2020

Would it be possible to check the memory usage of cell_measurement?

The memory leak error was fixed in the commit referenced in #84. If you pull the latest release (and update the srsLTE sub repo) you will get the fix.

@cooperq
Copy link
Collaborator Author

cooperq commented Sep 15, 2020

UPDATE: IT WORKS see next comment
original comment below.


I just ran cell_measurement on my machine with a lime SDR mini and also get the error above:
[ERROR] Tx Calibration: MCU error 4 (SXT tune failed)
cell measurement goes as far as decoding the mib on the first pass but can't seem to decode it on the second pass or decode the sib. Going to look into this more. Once we get it working with the C code I will fix the bash script.

$ ./lib/examples/cell_measurement -z 5035,5230,5110,5330,5780
- Scanning 5 EARFCNs
Opening RF device...
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
Opening USRP with args: 
Error opening UHD: code 11
Soapy has found device #0: addr=24607:1027, driver=lime, label=LimeSDR Mini [USB 2.0] 1D3CCBDE66D3FA, media=USB 2.0, module=FT601, name=LimeSDR Mini, serial=1D3CCBDE66D3FA, 
[INFO] Make connection: 'LimeSDR Mini [USB 2.0] 1D3CCBDE66D3FA'
[INFO] Reference clock 40.00 MHz
[INFO] Device name: LimeSDR-Mini
[INFO] Reference: 40 MHz
[INFO] LMS7002M register cache: Disabled
[INFO] RX LPF configured
[INFO] RX LPF configured
Set Rx bandwidth to 2.50 MHz
[INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
[INFO] TX LPF configured
Set Tx bandwidth to 5.00 MHz
Setting up RX stream
Setting up TX stream
Available device sensors: 
 - clock_locked
 - lms7_temp
Available sensors for RX channel 0: 
 - lo_locked
[ERROR] Tx Calibration: MCU error 4 (SXT tune failed)
[INFO] Rx calibration finished
State of gain elements for Rx channel 0 (AGC not supported):
 - TIA: 9.00 dB
 - LNA: 30.00 dB
 - PGA: -4.00 dB
State of gain elements for Tx channel 0 (AGC not supported):
 - TIA: 9.00 dB
 - LNA: 30.00 dB
 - PGA: -4.00 dB
Rx antenna set to LNAH
Tx antenna set to BAND1
Starting AGC thread...
Set master clock rate to 245.76 MHz
******* first init multi
***** plan dft 1d
<snip>
******* first init multi done 
[INFO] Selected RX path: LNAW
Tuned Rx to 731.50 MHz
[  0/5]: EARFCN 5035 Freq. 731.50 MHz looking for PSS.
Set Rx bandwidth to 2.50 MHz
[INFO] Rx calibration finished
Tuned Rx to 751.00 MHz
[  1/5]: EARFCN 5230 Freq. 751.00 MHz looking for PSS.
Set Rx bandwidth to 2.50 MHz
[INFO] Rx calibration finished
Tuned Rx to 739.00 MHz
[  2/5]: EARFCN 5110 Freq. 739.00 MHz looking for PSS.
Set Rx bandwidth to 2.50 MHz
[INFO] Rx calibration finished
******* rf_mib_decoder
***** plan dft 1d
<snip>
Set Rx bandwidth to 2.50 MHz
[INFO] Rx calibration finished
******* rf_mib_decoder_done
Found CELL ID 416. 50 PRB, 2 ports
Tunning receiver to 739.000 MHz
Set master clock rate to 245.76 MHz
Setting sampling rate 11.52 MHz
[INFO] RX LPF configured
Set Rx bandwidth to 8.64 MHz
******* init multi
***** plan dft 1d
<snip>
***** plan dft 1d
******* start rx stream
[INFO] Rx calibration finished
******* start rx stream done
******* Begin SIB Decoding Loop******* Decoding MIB try 1
******* Decoding MIB try 2
******* Decoding MIB try 3
******* Decoding MIB try 4
******* Decoding MIB try 5
******* Decoding MIB try 6
******* Decoding MIB try 7
******* Decoding MIB try 8
******* Decoding MIB try 9
******* Decoding MIB try 10
******* Decoding MIB try 11
******* Decoding MIB try 12
******* Decoding MIB try 13
******* Decoding MIB try 14
******* Decoding MIB try 15
******* Decoding MIB try 16
******* Decoding MIB try 17
******* Decoding MIB try 18
******* Decoding MIB try 19
******* Decoding MIB try 20
******* Decoding MIB try 21
Tuned Rx to 763.00 MHz    7.8, FrameCnt: 0, State: 1
[  3/5]: EARFCN 5330 Freq. 763.00 MHz looking for PSS.
[INFO] RX LPF configured
Set Rx bandwidth to 2.50 MHz
[ERROR] Rx calibration: MCU error 4 (SXT tune failed)

@cooperq
Copy link
Collaborator Author

cooperq commented Sep 15, 2020

Update: IT WORKS
Apparently the solution was to plug it into a USB3 port and connect some better antennas! Here is the output from SoapySDRUtil:

$ SoapySDRUtil --find
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################
Found device 0
  addr = 24607:1027
  driver = lime
  label = LimeSDR Mini [USB 3.0] 1D3CCBDE66D3FA
  media = USB 3.0
  module = FT601
  name = LimeSDR Mini
  serial = 1D3CCBDE66D3FA

and here is the output from crocoidle hunter :

* 11:10:44 home2 - INFO starting crocodile hunter project: home2
 * 11:10:44 home2 - INFO Starting WebUI
 * 11:10:44 home2 - INFO  * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * 11:10:44 home2 - INFO Checking for config file
 * 11:10:44 home2 - INFO Skipping GPS test
 * 11:10:44 home2 - INFO Compiling srsUE
 * 11:10:44 home2 - INFO SrsUE built succesfully
 * 11:10:44 home2 - INFO Reticulating Splines
 * 11:10:44 home2 - SUCCESS Watchdog server running
 * 11:10:44 home2 - NOTICE Using earfcn list <snip>
 * 11:10:44 home2 - INFO Running srsUE
 * 11:10:44 home2 - SUCCESS srsUE started with pid 120685
 * 11:11:05 home2 - SUCCESS Adding a new tower: <snip>
 * 11:11:05 home2 - INFO Calculating suspiciousness for <snip>
 * 11:11:05 home2 - VERBOSE Found 1 towers a total of 1 times

And it goes on like that finding several other cells. The only change I made was to remove the SDR checking stuff from the bash script. 0ab5ac5 In conclusion try the following steps:

  1. Plug into usb3
  2. Pull the latest release
  3. Get an LTE antenna or get up high if you are using the stubby antennas that come with the limeSDR mini.

If those don't let you run crocodile hunter with the limeSDR mini please comment here.

@cooperq cooperq added the fixed label Sep 15, 2020
@alexballas
Copy link

Great work @cooperq !
I just tested with the latest version and cell_measurement seems to be doing find in terms of memory usage so far. Will test more.

I had mine running for 5 minutes (indoors) and got
-> * 21:27:19 default - VERBOSE Found 4 towers a total of 27 times

I had one last question about the towers I get.

I seem to be always getting a "eNodeb id" with value 0 and a PLMN value of 0-0. I get other ledgit towers, but that entry is always there too.

@cooperq
Copy link
Collaborator Author

cooperq commented Sep 15, 2020

yea I've noticed that in the past. I've been told that a 0-0-0 cell can be broadcast when an eNodeB is rebooting sometimes. You should go track it down using the GPS and direction finding!

@alphafox02
Copy link

This is great news. Thanks for making so many improvements. I’ll test it out ASAP. I’ve been using usb3 and good antennas so hopefully the improvements in the code will yield good results. A mini is such a great priced radio to use for this project!

@alexballas
Copy link

On another subject, MyriadRF confirmed here that they're working on a native version of the LimeSDR library for srsLTE which will also (hopefully) make things much smoother.

@alphafox02
Copy link

alphafox02 commented Sep 15, 2020

Speaking of uhd and soapy.. Are you guys now testing and finding good results with just soapy or uhd soapy when running the crocodile hunter?

edit: I see the outputs above which look as though you’re using just straight soapy. I’ll try both.

@cooperq
Copy link
Collaborator Author

cooperq commented Sep 16, 2020

I was using just soapy with the lime rf. I'll try UHD Soapy as well with the UHD device I have though.

@alphafox02
Copy link

I just mentioned uhd soapy because if I build this and have the uhd driver and soapy installed uhd Soapy takes precedence with the lime sdr until I go disable uhd in the cmake file and build srslte with just soapy support.

@cooperq
Copy link
Collaborator Author

cooperq commented Sep 16, 2020

does this cause a bug? Can you show me what the output is? I'm a little slow today but I don't totally understand the problem.

@alphafox02
Copy link

alphafox02 commented Sep 16, 2020

Built the latest and it works great so far with the lime-sdr. I didn’t change a thing at first so when I started it up it was using the “uhd soapy” with the LimeSDR. It seemed to run but something didn’t seem right, didn’t run it long enough to really evaluate it well.

So I stopped it, went in to srsLTE and changed the CMakefile list file to disable uhd and enable soapy. Rebuilt and reran and within a few minutes the LimeSDR found two cells/towers. It looked like it was running way faster with normal soapy when compared to uhd soapy.

Thanks for making this possible!

@alphafox02
Copy link

This is with the CMakelist file like this, which I had to manually do and it seems to run faster with the limesdr.

option(ENABLE_GUI "Enable GUI (using srsGUI)" OFF)
option(ENABLE_UHD "Enable UHD" OFF)
option(ENABLE_BLADERF "Enable BladeRF" ON)
option(ENABLE_SOAPYSDR "Enable SoapySDR" ON)

  • 13:56:43 default - INFO Running srsUE
  • 13:56:43 default - SUCCESS srsUE started with pid 11187
  • 13:56:44 default - DEBUG [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
  • 13:56:44 default - DEBUG [INFO] Make connection: 'LimeSDR Mini [USB 3.0] 1D4C3CEC7D3A8A'
  • 13:56:44 default - DEBUG [INFO] Reference clock 40.00 MHz
  • 13:56:44 default - DEBUG [INFO] Device name: LimeSDR-Mini
  • 13:56:44 default - DEBUG [INFO] Reference: 40 MHz
  • 13:56:44 default - DEBUG [INFO] LMS7002M register cache: Disabled
  • 13:56:47 default - DEBUG [INFO] RX LPF configured
  • 13:56:48 default - DEBUG [INFO] RX LPF configured
  • 13:56:48 default - DEBUG [INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
  • 13:56:48 default - DEBUG [INFO] TX LPF configured
  • 13:56:48 default - DEBUG [ERROR] Tx Calibration: MCU error 4 (SXT tune failed)
  • 13:56:48 default - DEBUG [INFO] Rx calibration finished
  • 13:56:48 default - DEBUG Invalid DL_EARFCN=68686
  • 13:56:48 default - DEBUG ******* first init multi
  • 13:56:48 default - DEBUG ***** plan dft 1d
  • 13:56:48 default - DEBUG ***** plan dft 1d
  • 13:56:48 default - DEBUG ***** plan dft 1d
  • 13:56:48 default - DEBUG ***** plan dft 1d
  • 13:56:48 default - DEBUG ***** plan dft 1d
  • 13:56:48 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ***** plan dft 1d
  • 13:56:49 default - DEBUG ******* first init multi done
  • 13:56:49 default - DEBUG - Scanning 38 EARFCNs
  • 13:56:49 default - DEBUG Opening RF device...
  • 13:56:49 default - DEBUG Soapy has found device #0: addr=24607:1027, driver=lime, label=LimeSDR Mini [USB 3.0] 1D4C3CEC7D3A8A, media=USB 3.0, module=FT601, name=LimeSDR Mini, serial=1D4C3CEC7D3A8A,
  • 13:56:49 default - DEBUG Set Rx bandwidth to 2.50 MHz
  • 13:56:49 default - DEBUG Set Tx bandwidth to 5.00 MHz
  • 13:56:49 default - DEBUG Setting up RX stream
  • 13:56:49 default - DEBUG Setting up TX stream
  • 13:56:49 default - DEBUG Available device sensors:
  • 13:56:49 default - DEBUG - clock_locked
  • 13:56:49 default - DEBUG - lms7_temp
  • 13:56:49 default - DEBUG Available sensors for RX channel 0:
  • 13:56:49 default - DEBUG - lo_locked
  • 13:56:49 default - DEBUG State of gain elements for Rx channel 0 (AGC not supported):
  • 13:56:49 default - DEBUG - TIA: 9.00 dB
  • 13:56:49 default - DEBUG - LNA: 30.00 dB
  • 13:56:49 default - DEBUG - PGA: -4.00 dB
  • 13:56:49 default - DEBUG State of gain elements for Tx channel 0 (AGC not supported):
  • 13:56:49 default - DEBUG - TIA: 9.00 dB
  • 13:56:49 default - DEBUG - LNA: 30.00 dB
  • 13:56:49 default - DEBUG - PGA: -4.00 dB
  • 13:56:49 default - DEBUG Rx antenna set to LNAH
  • 13:56:49 default - DEBUG Tx antenna set to BAND1
  • 13:56:49 default - DEBUG Starting AGC thread...
  • 13:56:49 default - DEBUG Set master clock rate to 245.76 MHz
  • 13:56:49 default - DEBUG Tuned Rx to 2120.00 MHz
  • 13:56:49 default - DEBUG [ 0/38]: EARFCN 2050 Freq. 2120.00 MHz looking for PSS.
  • 13:56:49 default - DEBUG [INFO] Rx calibration finished
  • 13:56:49 default - DEBUG Set Rx bandwidth to 2.50 MHz
  • 13:56:49 default - DEBUG Tuned Rx to 1960.00 MHz
  • 13:56:49 default - DEBUG [ 1/38]: EARFCN 900 Freq. 1960.00 MHz looking for PSS.
  • 13:56:50 default - DEBUG [INFO] Rx calibration finished
  • 13:56:50 default - DEBUG Set Rx bandwidth to 2.50 MHz
  • 13:56:50 default - DEBUG Tuned Rx to 3073.50 MHz
  • 13:56:50 default - DEBUG [ 2/38]: EARFCN 41094 Freq. 3073.50 MHz looking for PSS.
  • 13:56:50 default - DEBUG [INFO] Rx calibration finished
  • 13:56:50 default - DEBUG Set Rx bandwidth to 2.50 MHz
  • 13:56:50 default - DEBUG Tuned Rx to 1935.00 MHz
  • 13:56:50 default - DEBUG [ 3/38]: EARFCN 650 Freq. 1935.00 MHz looking for PSS.
  • 13:56:50 default - DEBUG [INFO] Rx calibration finished
  • 13:56:51 default - DEBUG Set Rx bandwidth to 2.50 MHz
  • 13:56:51 default - DEBUG Tuned Rx to 3113.10 MHz
  • 13:56:51 default - DEBUG [ 4/38]: EARFCN 41490 Freq. 3113.10 MHz looking for PSS.
  • 13:56:51 default - DEBUG [INFO] Rx calibration finished
  • 13:56:51 default - DEBUG Set Rx bandwidth to 2.50 MHz
  • 13:56:51 default - DEBUG Tuned Rx to 3061.90 MHz
  • 13:56:51 default - DEBUG [ 5/38]: EARFCN 40978 Freq. 3061.90 MHz looking for PSS.
  • 13:56:51 default - DEBUG [INFO] Rx calibration finished
  • 13:56:52 default - DEBUG Set Rx bandwidth to 2.50 MHz
  • 13:56:52 default - DEBUG Tuned Rx to 2150.00 MHz
  • 13:56:52 default - DEBUG [ 6/38]: EARFCN 66836 Freq. 2150.00 MHz looking for PSS.

And with it like this, which is how it is by default (I'm running it again this way now and will get you feedback asap)

option(ENABLE_GUI "Enable GUI (using srsGUI)" OFF)
option(ENABLE_UHD "Enable UHD" ON)
option(ENABLE_BLADERF "Enable BladeRF" ON)
option(ENABLE_SOAPYSDR "Enable SoapySDR" OFF)

  • 14:02:47 default - INFO Running srsUE
  • 14:02:47 default - SUCCESS srsUE started with pid 14567
  • 14:02:48 default - DEBUG [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
  • 14:02:48 default - DEBUG [INFO] [UHDSoapyDevice] Make connection: 'LimeSDR Mini [USB 3.0] 1D4C3CEC7D3A8A'
  • 14:02:49 default - DEBUG [INFO] [UHDSoapyDevice] Reference clock 40.00 MHz
  • 14:02:49 default - DEBUG [INFO] [UHDSoapyDevice] Device name: LimeSDR-Mini
  • 14:02:49 default - DEBUG [INFO] [UHDSoapyDevice] Reference: 40 MHz
  • 14:02:49 default - DEBUG [INFO] [UHDSoapyDevice] LMS7002M register cache: Disabled
  • 14:02:52 default - DEBUG [INFO] [UHDSoapyDevice] RX LPF configured
  • 14:02:52 default - DEBUG [INFO] [UHDSoapyDevice] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
  • 14:02:52 default - DEBUG [INFO] [UHDSoapyDevice] TX LPF configured
  • 14:02:52 default - DEBUG Invalid DL_EARFCN=68686
  • 14:02:52 default - DEBUG ******* first init multi
  • 14:02:52 default - DEBUG ***** plan dft 1d
  • 14:02:52 default - DEBUG ***** plan dft 1d
  • 14:02:52 default - DEBUG ***** plan dft 1d
  • 14:02:52 default - DEBUG ***** plan dft 1d
  • 14:02:52 default - DEBUG ***** plan dft 1d
  • 14:02:52 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ***** plan dft 1d
  • 14:02:53 default - DEBUG ******* first init multi done
  • 14:02:53 default - DEBUG - Scanning 38 EARFCNs
  • 14:02:53 default - DEBUG Opening RF device...
  • 14:02:53 default - DEBUG Opening USRP with args:
  • 14:02:53 default - DEBUG Starting AGC thread...
  • 14:02:53 default - DEBUG [ 0/38]: EARFCN 2050 Freq. 2120.00 MHz looking for PSS.
  • 14:02:53 default - DEBUG [FATAL] [UHDSoapyDevice] Tx Calibration: MCU error 4 (SXT tune failed)
  • 14:02:53 default - DEBUG [INFO] [UHDSoapyDevice] Rx calibration finished
  • 14:02:54 default - DEBUG [ 1/38]: EARFCN 900 Freq. 1960.00 MHz looking for PSS.
  • 14:02:54 default - DEBUG [INFO] [UHDSoapyDevice] Rx calibration finished
  • 14:02:54 default - DEBUG [ 2/38]: EARFCN 41094 Freq. 3073.50 MHz looking for PSS.
  • 14:02:55 default - DEBUG [INFO] [UHDSoapyDevice] Rx calibration finished
  • 14:02:55 default - DEBUG [ 3/38]: EARFCN 650 Freq. 1935.00 MHz looking for PSS.
  • 14:02:55 default - DEBUG [INFO] [UHDSoapyDevice] Rx calibration finished
  • 14:02:56 default - DEBUG [ 4/38]: EARFCN 41490 Freq. 3113.10 MHz looking for PSS.
  • 14:02:56 default - DEBUG [INFO] [UHDSoapyDevice] Rx calibration finished
  • 14:02:56 default - DEBUG [ 5/38]: EARFCN 40978 Freq. 3061.90 MHz looking for PSS.
  • 14:02:57 default - DEBUG [INFO] [UHDSoapyDevice] Rx calibration finished
  • 14:02:57 default - DEBUG [ 6/38]: EARFCN 66836 Freq. 2150.00 MHz looking for PSS.
  • 14:02:57 default - DEBUG [INFO] [UHDSoapyDevice] Rx calibration finished
    ^ * 14:02:57 default - CRITICAL You pressed Ctrl+C!

@cooperq cooperq closed this as completed Oct 15, 2020
@alexballas
Copy link

alexballas commented Oct 23, 2020

I know this is now closed. Just wanted to let you know that with the latest "master" checkout of LimeSuite, I don't get the " [ERROR] Tx Calibration: MCU error 4 (SXT tune failed)" any more

@alphafox02
Copy link

Oh interesting. I’m using the packaged version in 20.04. Should I maybe look at replacing that and build with source?

@alexballas
Copy link

These latest changes in the LimeSuite repo were probably triggered by the following MyriadRF forums discussion: https://discourse.myriadrf.org/t/how-to-fix-the-error-tx-calibration-mcu-error-4-sxt-tune-failed/

I would certainly recommend compiling from source. You just need to make sure that you also compile the latest 0.7.x version of Soapy SDR as the Master SoapySDR version defaults to 0.8 which is not supported by LimeSuite yet.
https://github.com/pothosware/SoapySDR/tree/soapy-sdr-0.7.2

tip: I used checkinstall to install the compiled versions instead of doing a make install as it generates deb files and it's cleaner.

@alphafox02
Copy link

Thanks for the tip! I do have soapysdr 0.7 in place and I like the idea of the deb packages, I’ll have to give it a try ASAP.

@cooperq
Copy link
Collaborator Author

cooperq commented Oct 27, 2020

Thanks for coninuing to test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants