create new tag
, view all tags

OpenAirInterface real-time LTE softmodem

This page describes how to run OpenAirInterface LTE softmodem in real-time user-space on either the ExpressMIMO2 cards or USRP B200/B210. Soon we will provide instructions for USRP X300/310. We provide information for both RTAI and normal linux (preferably with a Low Latency kernel)


Prequisites for RTAI

  • Specific for ExpressMIMO2
    • Make sure that the ExpressMIMO2 card is operational (see ExpressMIMO)
      • dmesg should log: "[LEON card0]: ready." after running init_exmimo2.sh.
    • Make sure that /dev/openair0 is created
      • if not, run sudo make openair0 in targets/RT/
    • If you observe anormal behavior of EXMIMO, then initialize the card by running init_exmimo2.sh
    • if you are encoutering EXMIMO hardware failure (e.g.TIMEOUT in dmesg), then proceed as follows
      • lspci | grep Xilinx, and locate the locate the entry for device (e.g. 01:00.0)
      • echo "1" > /sys/bus/pci/devices/0000\:01\:00.0/remove (lspci | grep Xilinx, you should not see EXMIMO)
      • hard reset of lte card, button S2 in the borad
      • echo "1" > /sys/bus/pci/rescan (lspci | grep Xilinx, you should see again the EXMIMO)
  • Specific to RTAI:

    • Make sure that the latest version of RTAI is installed and working (see OpenAirKernelMainSetup)
    • Check if the RTAI modules are loaded ( lsmod | grep rtai), if not run ./init_rtai.sh in the targets/RT/USER
    • Make sure that the the fifos are created ( cat /dev/rtf0 to /dev/rtf63)
      • if not, run sudo make fifos in targets/RT. This will be used to see the logs in /dev/rtf62

Drivers (ExpressMIMO2)

  • To compile the drivers go to the directory $OPENAIR_TARGETS/RT/USER and do make drivers. That should compile the driver for the ExpressMIMO2 card (openair_rf.ko), the NAS driver (nasmesh.ko), as well as the tools to upload the firmware to the card and the rb_tool to set up the radio bearers.
  • init_exmimo2.sh <UE|eNB> loads all the drivers and initializes the firmware. The optional argument UE or eNB additional sets up the radio bearers for UE or eNB.

Drivers (USRP B200/210, X300/X310)


There are several targets in $OPENAIR_TARGETS/RTAI/USER. The main target today is lte-softmodem which provides the following functionality:

  • standalone eNB under RTAI or normal Linux. This does not have interfaces for an EPC and thus can only marginally work with a commercial LTE UE. It can provide full IP-connectivity with and OAI UE via the nasmesh network interface.
  • standalone eNB under RTAI or normal Linux with S1AP. This is a target which requires an MME, HSS and S-Gw to function. There are scripts for the various configurations that can be used to provide LTE connectivity with commercial LTE UEs. This is a much more complicated setup since it requires valid SIM cards with operator keys that must be provided in the HSS configuration.
  • standalone UE without NAS + nasmesh network interface. This is an "all-IP" UE which can work with the simple EPC-less eNB above.
  • standalone UE with NAS (eventually, smile ). This will provide a real-UE functionality which should be able to connect to a live LTE network (provided it is used with a synthetic software SIM card).
Below we give different examples of running lte-softmodem.

There are also some test programs to test your setup.



  • cd $OPENAIR_TARGETS/RT/USER && make clean && make lte-softmodem -jX (where X is the number of cores you have)
  • Further compile options are:
    • RTAI=0 (for normal linux, RTAI=1 is default)
    • USRP=1 (for UHD interfaces, USRP=0 is default)
    • EXMIMO=1 (for EXMIMO2 target, 0 by default)
    • ETHERNET=1 (for ETHERNET target (RRH), 0 by default)
    • XFORMS=1: compile with xforms enabled (to get a signal scope, constellation, etc., XFORMS=0 is default)
    • OPENAIR2=0: disables all layer 2 and above (static configurations for PDSCH/PUSCH for testing, OPENAIR2=1 is default)
    • NAS=1: compiles with nasmesh support enabled (requires NAS driver)
    • EMOS=1: compiles for EMOS channel sounding (only validated together with OPENAIR2=0)
    • HARD_RT=1: enables hard real-time support
    • DISABLE_XER_PRINT=1: turns off ASN.1 message tracing, DISPLAY_XER_PRINT=0 is default
    • ENABLE_ITTI=1: turns on ITTI which is an intertask communication/tracing mechanism when RRC and S1AP and L2 stack are run in separate threads, default is 0
    • USE_MME=R10: enable the MME
    • LINK_PDCP_TO_GTPV1U=1: enables link to core network
    • SECU=1: enables security
    • MSG_PRINT=1: enables low level traces of control and user plane traffic
    • LIBCONFIG_LONG=1: this needs to be set on machines running Ubuntu 12.04 64bit
  • IMPORTANT: alway do a make clean with the same compile options as for make lte-softmodem (especially when changing the options)
  • you should have an executable called lte-softmodem
Compilation Examples

To compile for ExpressMIMO2 with RTAI without EPC support

make lte-softmodem EXMIMO=1 HARD_RT=1 XFORMS=1 NAS=1

To compile for USRP without RTAI without EPC support

make lte-softmodem RTAI=0 USRP=1 NAS=1

To compile for ExpressMIMO2 with RTAI and EPC support


To compile for ExpressMIMO2 with lowlatency kernel and EPC support


To compile for USRP without RTAI and EPC support



  • If RTAI is installed, the preferred way to run lte-softmodem is by using make run_UE0 or make run_eNB0, and whose configuration depends on the RTAI .runinfo file in $OPENAIR_TARGETS/RT/USER/.runinfo.
  • You can also run lte-softmodem directly from the command line (using sudo). This is useful for debugging with gdb. It is also required when RTAI is not used. If RTAI is used, you need to load the rtai-modules manually using ./init_rtai.sh.
  • The command line parameters of lte-softmodem are:
    • -O file: eNB configuration file (this is the preferred way to pass basic parameters and there are several examples in $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE_EPC/CONF/
    • -g LEVEL: set the level of debug for the log generation (-g7 is quite high and useful to trace bugs in the procedures/protocols, -g9 even dumps packets at all levels of the protocol stack)
    • -d: enables xforms signal tracer
    • -U: start as UE (default: eNB)
    • -C freq: set carrier frequency to f0 for all chains (extension to independent frequencies trivial)
    • -V: enables the VCD debugging tool (this is a temporal event tracer, which is useful for real-time debugging using GTKWave)
    • -K file: ITTI logfile. ITTI is an intertask tracing utility which helps debugging with an EPC. It can traces all exchanges between RRC<->S1AP, RRC<->PDCP, PDCP<->S1
    • -S: do not exit for the missing slots, instead increment the counter.
    • --calib-ue-rx: run in calibration mode with high gain(ExpressMIMO2)
    • --calib-ue-rx-med: run in calibration mode with medium gain(ExpressMIMO2)
    • --calib-ue-rx-byp: run in calibration mode with bypass amplifier(ExpressMIMO2)
    • --debug-ue-prach: only send prach but do not connect
    • --no-L2-connect: only runs rx, does not send prach
  • If RTAI is used, the logs are redirected to a real-time FIFO. You can read them from another command window using cat /dev/rtf62
  • Under normal linux they are sent to stdout, so it would be worth sending the log to a file.
An eNB example for RTAI + ExpressMIMO2

make run_eNB0

This will execute the following line in the file .runinfo

eNB0:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -d -O../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.conf -V -K /tmp/itti_eNB0.log;sleep 1;popall:control_c

This target activates the XFORMS signal scope, generates a VCD file (in /tmp/openair_dump_eNB.vcd) for time-tracing using GTKWAVE, generates an ITTI log file (if ENABLE_ITTI=1, which it isn't here so it doesn't generating anything actually). It reads its configuration from the enb.sfr.sud.conf file which is Band 7 FDD (2.6 GHz), 5 MHz channel, among other parameters.

With this example you can:

  • analyze the eNB signal quality with a signal analyzer (e.g. Rohde&Schwarz FSQ). You should see Cell-specific RS, PBCH, PSS, SSS, PDCCH+PDSCH in subframe 5 corresponding to the System Information.
  • connect and OAI UE and open an IPv4 default radio bearer
  • connect a commercial UE and get all the way to receiving the UECapabilityInformation (it will do PRACH, RAR, Msg3, RRCConnectionSetup,RRCConnectionSetupComplete, RRCSecurityModeCommand, RRCSecurityModeFailure, UECapabilityEnquiry, UECapabitilityInformation before the UE eventually drops the connection and tries again. Eventually it will give up completely and bar the cell. This is because it needs the EPC to go any further. Nevertheless, you can derive protocol traces from the logfile that is generate in /dev/rtf62 if you dump it to a file. Ask questions on the mailing list about this if you're interested.
  • See how the process scheduling is done in the MODEM via gtkwave. Ask questions on the mailing list about this if you're interested.
  • Analyze the exchanges between RRC<->S1AP, RRC<->PDCP, PDCP<->S1 using the ITTIAnalyzer (If compiled with ITTI_ENABLED).

An eNB example for Normal Linux + ExpressMIMO2

sudo ./lte-softmodem -d -O../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.exmimo2.conf -V

Note that this is run with a sudo (so the user must be identified in the /etc/sudoers file)

You may also need to configure the "enb.band7.exmimo2.conf" file

An eNB example for Normal Linux + USRP B210

sudo ./lte-softmodem -d -O../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf -V

When you run this you might want to redirect the output to a file. Normally you should see that the B210 has been identified at the beginning.

You may also need to configure the "enb.band7.usrpb210.conf" file

An eNB example for Normal Linux + ExpressMIMO2 + EPC

To run OpenAirInterface with a third-party EPC or openair-CN the MME IP addresses for S1AP and GTPu must be included in the .conf file that's used to run the eNB. The code must also be compiled with ENABLE_ITTI=1 to make use of the S1AP/GTPu interfaces for communication with the EPC.

Once the EPC is set up properly, the lte-softmodem should be run according to the target as described above.

sleeptest, synctest, and emos-raw (note: these are for RTAI only, skip for normal Linux)

sleeptest will test your RTAI setup. It is a little bit like the latency test, but more targeted to our needs. It does not require the ExpressMIMO card. Compile it using

  • make sleeptest
An run it using
  • rtai-load sleeptest
You should see an output similar to the RTAI latency test that shows the measured sleep times (min/max/avg). The avg should be around the requested time of 0.5ms. The last number in each line (ratio of demanded and measured time) should be very close to one.

synctest is very similar to sleeptest, but it now uses the ExpressMIMO card to measure the synchronization accuracy. Compile it using

  • make synctest
An run it using
  • rtai-load synctest
There is no periodic output on the screen, but you should not see any error messages.

emos-raw is a program that allows to record signals in real-time. It can also be used to test the setup. Compile it using

  • make emos-raw XFORMS=1
An run it using
  • rtai-load emos-raw
You should see a scope that shows the signals in real-time. If you want to change the frequency, antennas, or bandwidth configuration, you will have to do that directly in the file emos-raw.c You can also record the data to a file if you compile it with the option EMOS=1. More details in EurecomMimoOpenairSounder.

-- NavidNikaein - 24 Feb 2015

Topic revision: r27 - 09 Mar 2015 - FlorianKaltenberger
Copyright 2004-2010 Institut Eurecom & all contributing authors.