|
Running OAI Basic Simulator |
This page is valid on the following branches:
masterstarting from tagv1.1.0developstarting from tag2019.w11
After the build simplification, the basic simulator is available directly from the standard build.
$ source oaienv
$ cd cmake_targets
$ ./build_oai --eNB --UEBoth eNB (lte-softmodem) and UE (lte-uesoftmodem) are present on cmake_targets/lte_build_oai/build folder.
More details are available on the build page.
The basic simulator is a oai device replacing the radio heads (for example the USRP device). It allows connecting the oai UE and the oai eNodeB through a network interface carrying the time-domain samples, getting rid of over the air unpredictable perturbations.
This is the ideal tool to check signal processing algorithms and protocols implementation and having debug sessions without any HW radio equipment.
The main limitations are:
- A single OAI UE will connect to the OAI eNB
- No channel noise
The basic simulator is able to run with a connected EPC or without any (the so-called "noS1" mode).
Example 1: running in FDD mode with EPC.
$ source oaienv
$ cd cmake_targets/lte_build_oai/build
$ ENODEB=1 sudo -E ./lte-softmodem -O $OPENAIR_HOME/ci-scripts/conf_files/lte-fdd-basic-sim.conf --basicsimEdit previously the ci-scripts/conf_files/lte-fdd-basic-sim.conf file to modify:
N_RB_DLfield to change the Bandwidth (25, 50, 100)CI_MME_IP_ADDRwith the EPC IP addressCI_ENB_IP_ADDRwith the container (physical server, virtual machine, ...) on which you are executing the eNB soft-modem
Example 2: running in TDD mode without any EPC.
$ source oaienv
$ cd cmake_targets/lte_build_oai/build
$ ENODEB=1 sudo -E ./lte-softmodem -O $OPENAIR_HOME/ci-scripts/conf_files/lte-tdd-basic-sim.conf --basicsim --noS1Before starting the UE, you may need to edit the SIM parameters to adapt to your eNB configuration and HSS database.
The file to use for conf2uedate is openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
You need to set the correct OPC, USIM_API_K, MSIN (this is the end par of the IMSI), HPLMN (the front part of IMSI) to match values from HSS.
$ source oaienv
# Edit openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
$ cd cmake_targets/lte_build_oai/build
$ ../../nas_sim_tools/build/conf2uedata -c $OPENAIR_HOME/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o .
$ sudo -E ./lte-uesoftmodem -C 2625000000 -r 25 --ue-rxgain 140 --basicsim [--noS1]The -r 25 is to use if in the conf file of the eNB you use N_RB_DL=25. Use 50 if you have N_RB_DL=50 and 100 if you have N_RB_DL=100.
The -C 2625000000 is the downlink frequency. Use the same value as downlink_frequency in the eNB configuration file.
The --noS1 is mandatory if you started the eNB in that mode.
First we need to retrieve the IP address allocated to the OAI UE.
On the server that runs the UE:
$ ifconfig oaitun_ue1
oaitun_ue1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.172.0.2 P-t-P:192.172.0.2 Mask:255.255.255.0
...192.172.0.2 is the IP address that has been allocated by the SPGW in the EPC.
On the server that runs the EPC:
$ ping -c 20 192.172.0.2
--- 192.172.0.2 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19020ms
rtt min/avg/max/mdev = 13.241/18.999/24.208/2.840 msYou can ping the EPC from the UE:
$ ping -I oaitun_ue1 -c 20 192.172.0.1
--- 192.172.0.1 ping statistics ---
...
20 packets transmitted, 20 received, 0% packet loss, time 19019ms
rtt min/avg/max/mdev = 13.015/18.674/23.738/2.917 msFor DL iperf testing:
On the server that runs the UE.
$ iperf -B 192.172.0.2 -u -s -i 1 -fm -p 5001On the server that runs the EPC.
$ iperf -c 192.172.0.2 -u -t 30 -b 10M -i 1 -fm -B 192.172.0.1 -p 5001For UL iperf testing:
On the server that runs the EPC.
$ iperf -B 192.172.0.1 -u -s -i 1 -fm -p 5001On the server that runs the UE.
$ iperf -c 192.172.0.1 -u -t 30 -b 2M -i 1 -fm -B 192.172.0.2 -p 5001The IP addresses are fixed. But we can still retrieve them programmatically.
For the UE it is quite the same:
$ ifconfig oaitun_ue1
oaitun_ue1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.0.1.2 P-t-P:10.0.1.2 Mask:255.255.255.0
...For the eNB:
$ ifconfig oaitun_enb1
oaitun_enb1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.0.1.1 P-t-P:10.0.1.1 Mask:255.255.255.0
...Pinging like this:
$ ping -I oaitun_ue1 -c 20 10.0.1.1
$ ping -I oaitun_enb1 -c 20 10.0.1.2And the same for iperf:
$ iperf -B 10.0.1.2 -u -s -i 1 -fm
$ iperf -c 10.0.1.2 -u -b 1.00M -t 30 -i 1 -fm -B 10.0.1.1