Private LTE with LimeSDR and srsRAN – Part 1 (Software)

|

Introduction

Having previously worked for an employer who had multiple private LTE setups for testing I saw the value in such a setup.

At the time however these systems didn’t come cheap. For a company specialising in mobile communication such a setup made perfect sense. For me as an occasional user the cost wasn’t justified.

At the heart of many of these systems the radio providing the over-the-air interface is a software-defined radio (SDR). Commercial LTE networking equipment has traditionally made use of special purpose hardware, bringing with it a high cost of entry. The SDR approach however makes use of a general purpose radio. While leveraging the high performance compute found in modern general purpose computers to achieve the same result with a greatly reduced cost.

That being said it was the cost of SDR radio equipment that put me off previously, with an entry level unit from a supplier like Ettus Research coming it at over £1500 in the UK. That was until Lime Microsystems released their LimeSDR product, providing comparable specifications at a fraction of the cost.

Having missed out on their original crowd funding campaign I ordered one from Mouser, a little over a year ago. Like many companies Lime Microsystems appear to have been badly Impacted by the chip shortage, which is a great shame. Luckily for me an as-new unit appeared on eBay, which I snapped up. Thereby starting me on my descent into madness….

This post details my journey from knowing a little about SDRs and the inner workings of mobile networks, to connecting a customer’s project to the internet via my own private network.

I thought it best to split it over a few posts as its unsurprising not all that straightforward a task….as I soon found out.

This first part will cover building the libraries and software required, while outlining how they relate to one another.

The second part will cover hardware configuration.

The third part will dive into SIM card acquisition and programming.

The forth part will cover how to tie the first three parts together, configuring and firing up the system. Before connecting a device and getting it on the internet 😃.

Software

I decided to make use of srsRAN (previously srsLTE) due to it supporting both 4G and 5G networks and because there are examples of others using it with the LimeSDR hardware.

This section details how to acquire and build each of the required libraries / applications. I’ve tried these on both Ubuntu 20.04 and Debian 11….(it’s a long story).

Having had a few issues early on I wanted to try and contain the libraries and applications installed. Therefore rather than installing them into the usual system directories, I’ve used some cmake and linker voodoo to contain them to a directory within my home directory (srsRAN). Given that this works well, I may be tempted to dockerize the setup in future.

To allow this location to be customised, set an environment variable:

export SRSRAN_INSTALL=${HOME}/srsRAN

SoapySDR

SoapySDR is a library which provides an abstraction layer, allowing an application to support a range of different SDR hardware with little modification. srsRAN uses soapySDR to provide support to many vendors hardware in this way, including LimeSDR. The SoapySDR project provides a framework, with a loadable module system. Lime Microsystems themselves then provide a module specific to the LimeSDR family of devices. The SoapySDR project provides a build guide, which I adapted to the following:

sudo apt-get install cmake g++ libpython3-dev python3-numpy swig
git clone --branch soapy-sdr-0.8.1 https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH=${SRSRAN_INSTALL} -DCMAKE_INSTALL_PREFIX=${SRSRAN_INSTALL} ..
make -j`nproc` && make install

Having built and installed the SoapySDR framework, a basic sanity check can be performed:

export LD_LIBRARY_PATH=${SRSRAN_INSTALL}/lib
export PATH=${SRSRAN_INSTALL}/bin:$PATH
SoapySDRUtil --info

If all goes well you should see something similar to the following:

######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Lib Version: v0.8.1-g1cf5a539
API Version: v0.8.0
ABI Version: v0.8
Install root: /home/user/srsRAN
Search path:  /home/user/srsRAN/lib/SoapySDR/modules0.8 (missing)
No modules found!
Available factories... No factories found!
Available converters...
 -  CF32 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS16 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS32 -> [CS32]
 -   CS8 -> [CF32, CS16, CS8, CU16, CU8]
 -  CU16 -> [CF32, CS16, CS8]
 -   CU8 -> [CF32, CS16, CS8]
 -   F32 -> [F32, S16, S8, U16, U8]
 -   S16 -> [F32, S16, S8, U16, U8]
 -   S32 -> [S32]
 -    S8 -> [F32, S16, S8, U16, U8]
 -   U16 -> [F32, S16, S8]
 -    U8 -> [F32, S16, S8]

LimeSuite

LimeSuite provides several functions. It provides an application LimeSuiteGUI which allows for management of the SDR’s various sub-systems and different hardware peripherals at a register level. It provides a SoapySDR module, which combined with the SoapySDR framework provides srsRAN access to the radio hardware. It also provides a couple of utilities. LimeQuickTest implements self-test facilities for the hardware and LimeUtil provides a collection of useful device specific utilities, such as firmware updates. Lime Microsystems provide a build guide which I adapted to the following:

sudo apt-get install git g++ cmake libsqlite3-dev
sudo apt-get install libi2c-dev libusb-1.0-0-dev
sudo apt-get install libwxgtk3.0-gtk3-dev freeglut3-dev
git clone --branch v22.09.1 https://github.com/myriadrf/LimeSuite.git
cd LimeSuite
mkdir builddir && cd builddir
cmake -DCMAKE_PREFIX_PATH=${SRSRAN_INSTALL} -DCMAKE_INSTALL_PREFIX=${SRSRAN_INSTALL} ..
make -j`nproc` && make install
cd ../udev-rules
sudo bash install.sh

The above should build and install LimeSuite, along with its udev rules configuring security such that regular users have permission to access the hardware.

LimeSuiteGUI may be launched if desired for testing as follows:

export LD_LIBRARY_PATH=${SRSRAN_INSTALL}/lib
export PATH=${SRSRAN_INSTALL}/bin:$PATH
LimeSuiteGUI

With a LimeSDR board connected via USB, selecting “Options->ConnectionSettings” should present a list of connected LimeSDR devices. Selecting a device followed by clicking “Connect” in the dialog should result in message similar to the following appear in the log area at the bottom of the main window:

[00:04:28] INFO: Reference clock 30.72 MHz
[00:04:28] INFO: Connected Control port: LimeSDR-USB FW:4 HW:4 Protocol:1 GW:2.23 Ref Clk: 30.72 MHz

As a side note, it was about this point in my setup that I wanted to ensure my SDR was running the latest firmware. Which can be achieved using LimeUtil as follows:

export LD_LIBRARY_PATH=${SRSRAN_INSTALL}/lib
export PATH=${SRSRAN_INSTALL}/bin:$PATH
LimeUtil --update

srsGUI

srsGUI is a graphics library providing generating plots specifically for SDR applications. Its used by srsRAN to generate various visualisations. It’s optional but potentially useful on systems with a display output. The GitHub readme contains a build guide which I adapted to the following:

sudo apt-get install libboost-system-dev libboost-test-dev libboost-thread-dev libqwt-qt5-dev qtbase5-dev
git clone --branch release_2_0_qt5 https://github.com/srsran/srsGUI.git
cd srsGUI
mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH=${SRSRAN_INSTALL} -DCMAKE_INSTALL_PREFIX=${SRSRAN_INSTALL} ..
make -j`nproc` && make install

srsRAN

srsRAN provides the various components required to run an LTE network. Making use of the libraries build above to access the radio hardware. The srsRAN project provides a collection of excellent documentation, which includes the build guide from which the following was adapted:

sudo apt-get install build-essential cmake libfftw3-dev libmbedtls-dev libboost-program-options-dev libconfig++-dev libsctp-dev
sudo apt-get install pkg-config
git clone --branch release_23_04 https://github.com/srsran/srsRAN_4G.git
cd srsRAN_4G
mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH=${SRSRAN_INSTALL} -DCMAKE_INSTALL_PREFIX=${SRSRAN_INSTALL} -DUSE_LTE_RATES=ON ..
make -j`nproc`
make test
make install
./srsran_install_configs.sh user

If you’ve managed to make it this far, well done, take a break…..you’ve got all the required software built.

In part two we’ll be looking at hooking up the hardware.

Was this article helpful?
YesNo

Updates

04/06/23

  • Bumped srsRAN version from 22.10 to 23.04.
  • Refined build instructions based on PlutoSDR work.
, , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *