[[Include(WikiToC)]] == Amarisoft 4G/5G SDR System == === Description === This tutorial contains instructions for running the [https://www.amarisoft.com/ amarisoft] eNB and UE on various platforms. === Prerequisites === In order to access the test bed, create a reservation and have it approved by the reservation service. Access to the resources is granted after the reservation is confirmed. Please follow the process shown on the COSMOS [wiki:GettingStarted getting started] page to get started. === Resources required === 2 servers, 2 USRP N310s or 2 USRP X310s in [https://wiki.cosmos-lab.org/wiki/Architecture/Domains/cosmos_sb1 COSMOS SB1] domain === Tutorial Setup === Follow the steps below to gain access to the [wiki:/hardware/Domains/sb1 sandbox 1 console] and set up nodes with appropriate images. 1. If you don't have one already, sign up for a [https://www.cosmos-lab.org/portal-2/ COSMOS account] 1. [wiki:/GettingStarted#MakeaReservation Create a resource reservation] on sandbox 1 1. [Documentation/Short/Login Login] into sandbox 1 console (console.sb1.cosmos-lab.org) with two SSH sessions. 1. Make sure all the resources in the domain are turned off: {{{#!shell omf tell -a offh -t system:topo:allres }}} For this tutorial we will be using the SB1 servers, srv1-lg1, srv2-lg1 and USRP N310s, sdr1-md1, sdr1-s1-lg1 1. Load amarisoft-tutorial-cosmos.ndz on srv1-lg1,srv2-lg1. {{{#!shell omf load -i amarisoft-tutorial-cosmos.ndz -t srv1-lg1,srv2-lg1 }}} 1. Turn all the required resources on and check the status {{{#!shell omf tell -a on -t srv1-lg1,srv2-lg1,sdr1-md1,sdr1-s1-lg1 }}} {{{#!shell omf stat -t system:topo:allres }}} 1. ssh to the nodes, use option -Y for using GUI. === Tutorial Execution === [[CollapsibleStart(Check SDRs)]] * Upon logging into the nodes, run eth_config.sh script to setup the 10G data interfaces on the nodes, DATA1, DATA2. After running the script, you should see that the data interfaces have the appropriate IP addresses assigned, as per this [https://wiki.cosmos-lab.org/wiki/Architecture/Domains/cosmos_sb1#IPAddressAssignment table].The nodes should then be able to access the USRP N310s sdr1-s1-lg1 and sdr1-md1 which can be checked by running uhd_find_devices. {{{#!td {{{#!shell root@srv1-lg1:~# ./eth_config.sh }}} {{{#!shell root@srv1-lg1:~# ifconfig DATA1 DATA1: flags=4163 mtu 9000 inet 10.38.1.1 netmask 255.255.0.0 broadcast 10.38.255.255 inet6 fe80::1e34:daff:fe42:c3c prefixlen 64 scopeid 0x20 ether 1c:34:da:42:0c:3c txqueuelen 1000 (Ethernet) RX packets 61195963 bytes 199994153268 (199.9 GB) RX errors 0 dropped 6680 overruns 0 frame 0 TX packets 58734853 bytes 190912589303 (190.9 GB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 root@srv1-lg1:~# ifconfig DATA2 DATA2: flags=4163 mtu 9000 inet 10.39.1.1 netmask 255.255.0.0 broadcast 10.39.255.255 inet6 fe80::1e34:daff:fe42:c3d prefixlen 64 scopeid 0x20 ether 1c:34:da:42:0c:3d txqueuelen 1000 (Ethernet) RX packets 7378 bytes 651944 (651.9 KB) RX errors 0 dropped 6682 overruns 0 frame 0 TX packets 282 bytes 82239 (82.2 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 }}} }}} {{{#!td {{{#!shell root@srv1-lg1:~# uhd_find_devices [INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release -------------------------------------------------- -- UHD Device 0 -------------------------------------------------- Device Address: serial: 3176DF5 addr: 10.38.2.1 claimed: False mgmt_addr: 10.37.2.1 mgmt_addr: 10.38.2.1 mgmt_addr: 10.39.2.1 product: n310 type: n3xx -------------------------------------------------- -- UHD Device 1 -------------------------------------------------- Device Address: serial: 3196937 addr: 10.38.3.1 claimed: False mgmt_addr: 10.37.3.1 mgmt_addr: 10.38.3.1 mgmt_addr: 10.39.3.1 product: n310 type: n3xx }}} }}} [[CollapsibleEnd]] [[CollapsibleStart(Run MME)]] * Run the Amarisoft MME on srv1-lg1. Run lte_init.sh to setup IP forwarding so that the UEs can connect to the Internet. Tihhnetwork uses PLMN 310014 (USA Test network) as configured in mme.cfg. {{{#!shell root@srv1-lg1:~# cd /opt/amarisoft/ltemme-linux-2021-09-18 root@srv1-lg1:/opt/amarisoft/ltemme-linux-2021-09-18# ./lte_init.sh Select CTRL default interface root@srv1-lg1:/opt/amarisoft/ltemme-linux-2021-09-18# ./ltemme config/mme.cfg Core version 2021-09-18, Copyright (C) 2012-2021 Amarisoft This software is licensed to Rutgers University (The State University of New Jersey). License server: license.orbit-lab.org (0b-b4-46-dc-2f-83-58-cb) Support and software update available until 2022-08-18. (mme) }}} [[CollapsibleEnd]] [[CollapsibleStart(Run eNodeB/gNodeB)]] {{{#!shell root@srv1-lg1:~# cd /opt/amarisoft/lteenb-linux-2021-09-18 root@srv1-lg1:/opt/amarisoft/lteenb-linux-2021-09-18# ./lteenb config/gnb-sa-n310.cfg Base Station version 2021-09-18, Copyright (C) 2012-2021 Amarisoft This software is licensed to Rutgers University (The State University of New Jersey). License server: license.orbit-lab.org (0b-b4-46-dc-2f-83-58-cb) Support and software update available until 2022-08-18. [INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=10.38.2.1,type=n3xx,product=n310,serial=3176DF5,claimed=False,addr=10.38.2.1,master_clock_rate=122.88e6 [INFO] [MPM.PeriphManager] init() called with device args `product=n310,mgmt_addr=10.38.2.1,time_source=internal,clock_source=internal,master_clock_rate=122.88e6'. [INFO] [0/Replay_0] Initializing block control (NOC ID: 0x4E91A00000000004) [INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000011312) [INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000011312) [INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000) [INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000) [INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000002) [INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000002) [INFO] [0/FIFO_0] Initializing block control (NOC ID: 0xF1F0000000000000) [INFO] [0/FIFO_1] Initializing block control (NOC ID: 0xF1F0000000000000) [INFO] [0/FIFO_2] Initializing block control (NOC ID: 0xF1F0000000000000) [INFO] [0/FIFO_3] Initializing block control (NOC ID: 0xF1F0000000000000) RF0: sample_rate=30.720 MHz dl_freq=3489.420 MHz ul_freq=3489.420 MHz (band n78) dl_ant=2 ul_ant=1 (enb) WARNING: The GPS is not locked. If you need time synchronization, you should restart the program when the GPS is locked. Chan Gain(dB) Freq(MHz) TX1 35.0 3489.420000 TX2 35.0 3489.420000 RX1 40.0 3489.420000 (enb) ng gNB NG connection state: - server=127.0.1.100:38412 state=setup_done PLMN=310014 (enb) cell phy [gnb0012345] PLMN=310014 gNB_ID=0x12345 --------Global-------- ----------DL---------- ----------UL---------- ----SSB--- Cell RAT BAND BW P ARFCN ANT NL SCS QAM ARCFN ANT NL SCS QAM ARFCN SCS 0x001 NR n78 20 0 632628 2 2 30 256 632628 1 1 30 256 632544 30 (enb) }}} [[CollapsibleEnd]] [[CollapsibleStart(Run UE)]] {{{#!shell root@srv2-lg1:~# cd /opt/amarisoft/lteue-linux-2021-09-18 root@srv2-lg1:/opt/amarisoft/lteue-linux-2021-09-18# ./lteue config/ue-nr-sa-n310.cfg LTE UE version 2021-09-18, Copyright (C) 2012-2021 Amarisoft This software is licensed to Rutgers University (The State University of New Jersey). License server: license.orbit-lab.org (0b-b4-46-dc-2f-83-58-cb) Support and software update available until 2022-08-18. [INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=10.38.3.1,type=n3xx,product=n310,serial=3196937,claimed=False,addr=10.38.3.1,master_clock_rate=122.88e6 [INFO] [MPM.PeriphManager] init() called with device args `clock_source=internal,mgmt_addr=10.38.3.1,time_source=internal,master_clock_rate=122.88e6,product=n310'. [INFO] [0/Replay_0] Initializing block control (NOC ID: 0x4E91A00000000004) [INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000011312) [INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000011312) [INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000) [INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000) [INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000002) [INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000002) [INFO] [0/FIFO_0] Initializing block control (NOC ID: 0xF1F0000000000000) [INFO] [0/FIFO_1] Initializing block control (NOC ID: 0xF1F0000000000000) [INFO] [0/FIFO_2] Initializing block control (NOC ID: 0xF1F0000000000000) [INFO] [0/FIFO_3] Initializing block control (NOC ID: 0xF1F0000000000000) RF0: sample_rate=30.720 MHz dl_freq=3489.420 MHz ul_freq=3489.420 MHz (band n78) dl_ant=2 ul_ant=1 (ue) WARNING: The GPS is not locked. If you need time synchronization, you should restart the program when the GPS is locked. Chan Gain(dB) Freq(MHz) TX1 35.0 3489.420000 RX1 45.0 3489.420000 RX2 45.0 3489.420000 (ue) ue # UE_ID CL RNTI RRC_STATE EMM_STATE #ERAB IP_ADDR 5G 0 1 0 0 offline power off 0 5G 1 2 0 0 offline power off 0 (ue) power_on 1 (ue) power_on 2 (ue) ue # UE_ID CL RNTI RRC_STATE EMM_STATE #ERAB IP_ADDR 5G 0 1 0 0 idle registered 1 192.168.2.2 5G 1 2 0 4602 running registered 1 192.168.2.6 (ue) }}} {{{#!shell (mme) gnb PLMN RAN_ID IP:Port #UEctx TACs 310014 0x12345 127.0.1.1:49526 0 0x64 (mme) ue SUPI IMEISV CN M-TMSI/5G-TMSI REG TAC #BEARER IP_ADDR 001010123456789 0123456700000101 5GC 0x526d3bcc Y 310014. 0x64 1 192.168.2.2 001010123456790 0123456700000201 5GC 0xf33020aa Y 310014. 0x64 1 192.168.2.6 (mme) }}} [[CollapsibleEnd]] [[CollapsibleStart(Using the Web Interface)]] [[CollapsibleEnd]] [[CollapsibleStart(Connecting Phones)]] [[CollapsibleEnd]]