srsran / srsRAN_4G

Open source SDR 4G software suite from Software Radio Systems (SRS) https://docs.srsran.com/projects/4g
https://www.srsran.com
GNU Affero General Public License v3.0
3.48k stars 1.14k forks source link

Compilation on non-Intel Ubuntu machines? #77

Closed HughAndersonNUS closed 7 years ago

HughAndersonNUS commented 7 years ago

Hi - I am not sure if this is an issue, or a request, but I wanted to run srsLTE on a small fast ARM board (The Odroid XU4), and using limeSDR. The processor board runs other gnuradio based software successfully, and soapy seems to work with UHD software (like tx_samples_from_file).

The compile proceeds with no issues, but when I run the first test example, I get a Bus Error: I guess my question is: Should I give up now, or is there some possibility that, through some debugging, this set of hardware could run srsLTE? Cheers Hugh I have attached a file messages.txt showing the full output of the first example command. In short, it ends like this: -- SoapyLMS7::setSampleRate(Rx, 0, 1.92 MHz), CGEN=30.72 MHz, ADC=7.68 MHz, decim=4 ConnectionSTREAM::ConfigureFPGA_PLL(tx=3.84MHz, rx=1.92MHz) Warning popping from TX, samples popped 0/1360 ----- FPGA PLL #0 CONFIG ----- M=136, N=1, Fvco=1044.480 MHz Configured phase: 0.0 (steps 0) Configured phase: 91.7 (steps 277) Rx pktLoss@4 - ts diff: 1232507136 pktLoss: 0.0 Rx pktLoss@7 - ts diff: 1206153216 pktLoss: 0.0 Bus error

suttonpd commented 7 years ago

Hi Hugh, Soapy supports applications which already use the UHD drivers but we haven't tested this approach ourselves with any SRS software. That being said, we are currently working with both the Odroid XU4 and limeSDR and expect to support both soon.

Regards, Paul

HughAndersonNUS commented 7 years ago

Hi Paul,

Thanks for that. I look forward to this. Any idea of a timescale?

Cheers Hugh

On Mon, 10 Apr 2017, Paul Sutton wrote:

Hi Hugh, Soapy supports applications which already use the UHD drivers but we haven't tested this approach ourselves with any SRS software. That being said, we are currently working with both the Odroid XU4 and limeSDR and expect to support both soon.

Regards, Paul

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/srsLTE/srsLTE/issues/77#issuecomment-292925339

Hugh Anderson E-mail: hugh@comp.nus.edu.sg SoC, National University of Singapore http://www.comp.nus.edu.sg/~hugh

HughAndersonNUS commented 7 years ago

Hi Paul, I have tried out srsLTE-next with my limeSDR and odroid XU4. I had one tiny teething trouble getting cmake to find the LimeSuite library: I had to add /usr/lib/arm-linux-gnueabihf to the srsLTE-next/cmake/modules/FindLimeSDR.cmake file:

find_library(LIMESDR_LIBRARIES 
    NAMES LimeSuite
    PATHS ${LIMESDR_PKG_LIBRARY_DIRS}
          /usr/lib/arm-linux-gnueabihf
          /usr/lib
          /usr/local/lib
    }

After doing that it compiled cleanly. However, it does not seem to work for me. For example, If I try to run cell_search, I end up like

-- SoapyLMS7::setGain(Rx, 0, LNA, 30 dB)
-- SoapyLMS7::setGain(Rx, 0, TIA, 12 dB)
-- SoapyLMS7::setGain(Rx, 0, PGA, 19 dB)
CGEN: Freq=30.72 MHz, VCO=2.4576 GHz, INT=79, FRAC=0, DIV_OUTCH_CGEN=39
SetFrequency using cache values vco:2, csw:157
[INFO]:  Set rf_freq to 1805.000 MHz
[  0/749]: EARFCN 1200 Freq. 1805.00 MHz looking for PSS.

Using Volk machine: neon_hardfp_orc
Warning popping from TX, samples popped 0/1360
[INFO]:  Setting sampling frequency 1.92 MHz for PSS search
ConnectionSTREAM::ConfigureFPGA_PLL(tx=3.84MHz, rx=1.92MHz)
----- FPGA PLL #0 CONFIG -----
M=136, N=1, Fvco=1044.480 MHz
Configured phase: 0.0 (steps 0)
Configured phase: 91.7 (steps 277)
[INFO]:  Starting receiver...
        Rx pktLoss@0 - ts diff: 1227108352  pktLoss: 0.0
        Rx pktLoss@3 - ts diff: 1190420480  pktLoss: 0.0
Warning popping from TX, samples popped 0/1360
Warning popping from TX, samples popped 0/1360
Bus error

My system seems to recognize the LimeSDR device OK, and I can use it with other gnuradio tools:

odroid@odroid:~/srsLTE-next/build/srslte/examples$ SoapySDRUtil --find
######################################################
## Soapy SDR -- the SDR abstraction library
######################################################

linux; GNU C++ version 5.3.1 20151219; Boost_105800; UHD_003.009.002-0-unknown

Found device 0
  addr = 1d50:6108
  driver = lime
  label = LimeSDR-USB [USB 3.0] 9060B00492A2A
  media = USB 3.0
  module = STREAM
  name = LimeSDR-USB
  serial = 00090XXXXXXX

Any idea where I can go from here?

yagoda commented 7 years ago

Hi!

The support for the LimeSDR is more stable using the SoapySDR API.

If you have Soapy installed you can pull the latest version of srsLTE/next and recompile and the cmake should now find the Soapy binaries and use them instead of the native Lime drivers.

Also make sure you have calibrated the your Lime board for the specific frequencies you wish to use by using the "LimeSuiteCalibrate" script that should be located in your /usr/bin folder.

Regards, Justin

HughAndersonNUS commented 7 years ago

Hi Justin, I think it is using the Soapy SDR. When I run cell_search, for example, it shows:

  -- SoapyLMS7::setGain(Rx, 0, LNA, 30 dB)
  -- SoapyLMS7::setGain(Rx, 0, TIA, 12 dB)

srsLTE-next works fine for me using an Ubuntu x86 machine, but I wanted to use the Odroid XU4, and it reliably gives me the bus error in my post. Cheers Hugh

yagoda commented 7 years ago

Hey Hugh,

I am having trouble reproducing your error, could you please delete your build folder, rerun cmake and post the output. Also, could you try running the following: _sudo taskset 0xF0 ./pdschue -f 930000000 -g 0.8

and send me the output of this also.

Be sure to LimeSuiteCalibrate for these frequencies before you run this command.

Thanks!

Justin