5G OpenAir first run

version: update July, 23rd 2020

Tutorial to run 5G OpenAir, from current develop branch.

OAI 5G is very partial, only a fixed scheduler, for one UE, no network entry (no radio network entry, no upper layers network entry).

We can use “phy-test” mode, that hard code a permanent UL and DL shared channel (means a data channel dedicated to one UE in 3GPP jargon).

Of course there is no core network in this very special “phy-test” mode and some upper layer pieces are still 4G (PDCP for example).

Please read the 4G tutorial for more information on how to make initial installation of OpenAir.

Then, you can compile and run 5G tests

To compile:

./build_oai --gNB --nrUE

Run the gNB in one windows

sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --parallel-config PARALLEL_SINGLE_THREAD --rfsim --phy-test --rfsimulator.serveraddr server --noS1 -d

If you use the same machine for the UE, we have the same IP address problem as in 4G (see our post rf-simulator-and-oai-ue-tutorial)

so, create a new Linux namespace as in this tutorial

In the namespace, run

sudo ./nr-uesoftmodem -d --rrc_config_path . --nokrnmod --phy-test --rfsim --rfsimulator.serveraddr 10.200.1.1 --noS1

If it runs fine, you should see this graph:

If the graph doesn’t show working PDSCH, restart the UE as there is a random bug in UE initial synchronization.

Then, open one more text window and set it in the UE network name space

sudo ip netns exec ueNameSpace bash

It is now possible to ping the gNB output interface

ping -I oaitun_ue1 10.0.1.1 -s 1000

Sends in both directions packets of 1000 bytes.

Ping also checks the packet content is the same.

What is today available on top of this simple tutorial:

  • If you make IP routing configuration, any IP traffic can get through the pair UE+gNB
  • if you run the UE on another machine, it is also fine (no need of network namespaces)
  • Ettus RF board may also work, if the machine is fast enough

106 thoughts on “5G OpenAir first run”

  1. Hi Laurent,

    I have this setup working over the air with 2 x300s, I few things I see and would like to improve:

    1. When using ssh interface, I can have synchronization between nrUE and gNB. But when using the ubuntu terminal I can see I have performance issues, Underuns and Lates. I followed your suggestions on how to improve real time and every thing seems ok but still issues using the ubuntu terminal with and without the scope (-d). Obviously, it performs better without the scope but after few seconds I got performance issues anyway. I rather use the ubuntu terminal and able to use scope because I will be able show the channels decoding instead SSH with no scope option.

    2. I would like to modify the code so the system can recover after PBCH decoding fail 100 times. I tried to modify the exit_fun to check for only PBCH fail to decode 100 times and set the oai_exit flag back to “0” and create a new UE_thread to start sync and processing threads but I have many issues.
    Could you please provide a brief guidance on how to handle the pool of threads (I can see you are its author) and creating new UE_thread after PBCH failure 100 times? I thought using the abort and delete functions for those old threads before setting the oai_exit flag “0” and creating the new UE_thread, please advice.

    Thank you so much for your help .

    Julian

    1. Hi,

      I’ve wrote some documentation on the thread pool in: $OPENAIR_DIR/common/utils/threadPool/thread-pool.md

      For the real time questions, direct display in a “tty” is an issue because the real time process depends on the Xwindow server
      So, for example, lauch the process with ‘nohup xxxx > /tmp/myTrace.txt’,
      then if you want to see the trace in real time, do tail -f /tmp/myTrace

      Laurent

      1. Thanks you,

        I did what you suggested with nohup command but still got U and Ls. I decided to double check URSP performance using the benchmark_rate, setting the clock_master 184.32 MHz and rate 61.44MHz for almost 10 min and did not get any performance issues. I may be missing something as using SSH it works with no issues and using both nohup or ubuntu terminal “TTY” I got U and Ls with or without -d option.

        1. Hi Julian,

          I’m not surprised: I tried OAI 5G with recent computer (i7-9900K, fastest double channel memory, …) and X310 boards about 6 month ago.
          The gNB was failing quickly as yours.
          There was a UHD bug: massage “poke32”, nevertheless the computer was not catching real time.
          As you, the UHD benchmark was running well.
          The CPU was not highly loaded.
          with Linux tool “stress-ng” I figured out the memory bus (RAM access) was overloaded.
          I stopped testing on X3100 or N300 for 6 months.
          Please report in the OAI mailing list: I think the problem for everybody.
          Laurent

      2. Hi Julian
        I have this setup working over the air with 2 N310s and computer (i9-9700K) like you,and I have run gNB and nrUE. Can I contact you by email?look forward to your reply.

  2. Hi laurent,
    I am very interested in your work.I want to know whether these precedures can preocess in ubuntu18.04(Linux version 4.15.0-99-lowlatency (buildd@lcy01-amd64-013) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #100-Ubuntu SMP PREEMPT Wed Apr 22 21:10:38 UTC 2020
    ) or in container in the future.Everytime,I have to install new dependency in a new computer that will cause many new issues.
    THANK YOU IN ADVANCE

    1. Hi,
      Yes it can, nevertheless we have no planning to deliver ready to use virtual machine images.
      Laurent

      1. Dear laurent,
        I have finished OAI first run according to your blog and OAI website guide and got the same graph like aforeshowed.However,I can not find more detais about the explanation about x axis and y axis on this graph.Can you explain offer more deatils especially the unit of X axis and Y axis on this graph.
        Thany you in andvance!
        Best Regards

  3. Dear Laurent,

    I followed your tutorial to build up nr-softmodem and nr-uesoftmodem recently. Could I ask you some questions?

    The below is what reply I can see after gNB and UE are connected:

    [PHY] —— PBCH ChannelComp/LLR: frame.slot 58.0 ——
    [MAC] [L2][MAC] decode mib
    [RRC] MIB PDU : 95
    [RRC] MIB PDU : 246
    [RRC] MIB PDU : 6
    [MAC] <<<<<<<<<index_4msb 12 num_rbs 48 num_symb 1 rb_offset 16
    [PHY] start adjust sync slot = 0 no timing 0
    [PHY] Decoded frame index (762) is not compatible with current context (58), UE should go back to synch mode
    [PHY] ****** start TX-Chain for AbsSubframe 762.8 ******
    [PHY] ****** end TX-Chain for AbsSubframe 762.8 ******
    [HW] UEsock: 85 gap of: 17536 in reception
    [HW] UEsock: 85 gap of: 17536 in reception
    [PHY] SET rx_offset 614382
    [PHY] ****** start TX-Chain for AbsSubframe 763.8 ******
    [PHY] ****** end TX-Chain for AbsSubframe 763.8 ******
    [HW] UEsock: 85 gap of: 17536 in reception
    [HW] UEsock: 85 gap of: 17536 in reception

    We only can receive MIB in this branch? the RA, RAR and other procedures won't do?

    And I can't ping and iperf UE or gNB each other from different host, but if I create the namespace to run UE then I can ping and iperf, I don't know why?
    The steps I follow to create namespace:

    ip netns delete ueNameSpace
    ip link delete v-eth1
    ip netns add ueNameSpace
    ip link add v-eth1 type veth peer name v-ue1
    ip link set v-ue1 netns ueNameSpace
    ip addr add 10.200.1.1/24 dev v-eth1
    ip link set v-eth1 up
    iptables -t nat -A POSTROUTING -s 10.200.1.0/255.255.255.0 -o enp0s31f6 -j MASQUERADE
    iptables -A FORWARD -i enp0s31f6 -o v-eth1 -j ACCEPT
    iptables -A FORWARD -o enp0s31f6 -i v-eth1 -j ACCEPT
    ip netns exec ueNameSpace ip link set dev lo up
    ip netns exec ueNameSpace ip addr add 10.200.1.2/24 dev v-ue1
    ip netns exec ueNameSpace ip link set v-ue1 up

    I am just learn it so I am not clearly understand what its function. Could you help me?

    Best regards,
    Tony

    1. Dear Tony,

      RA,RAR, …: are not yet in this branch called “develop”

      Network namespace: we need a network namespace because the gNB in this mode acts as a core network (a 5GC, a EPC, …) so it tells to “internet” it is the UE (it pretend the UE IP address is in the 5GC/EPC).
      The same design exists in 4G: the UE IP address is routed by the UE and by the P-GW (the SGi interface)
      So, if we run both in the same machine, we need to isolate the two interfaces that routes the same IP address.
      This GTP tunnel is there to hide to internet the UE mobility. IP protocol is not mobile, so GTP (3GPP), mobile IP (IETF) are tunelling data.

      Laurent

        1. Dear Zx,
          If you want to do 5G NSA, please use develop branch
          IF you want to do 5G SA, and see RACH, the most advance branch today is: develop-SA-CBRA
          This is under development, I manage to get RACH decoded from commercial UE
          Regards,
          Laurent

          1. Dear laurent,
            Thank you very much for your reply.
            I want to know whether OAI UE can connect OAI gNB with do-ra mode? I just use OAI UE connect OAI gNB in noS1 mode and do-ra mode with the lastest develop branch, but the OAI UE always print ‘decode mib’.
            Regards,
            Zx

  4. Dear Tony, Laurent:

    Can you pls mention the commit ID in which ping works in the 5G NR, rfsimulator setup?

    This is what we got :
    Version from May 15, the UE works and is able to connect to the gNB.

    What is the issue:
    In the UE, we don’t get the oai network interface up.So ping, etc. does not work.
    Rgds,
    Ashok

  5. Dear Laurent,

    Thanks for putting up this info. Appreciate it.

    We are trying to bring up the 5G NR code base in a single machine and we are able connect, but unable to ping.

    Can you provide the commit ID’s we need to use on the UE and the gNB side?
    Rgds, Ashok

    1. Dear Ashok,

      It should work with latest develop commit.
      Let me know the error details if you need more help

      Laurent

  6. Dear,laurent
    I have finished the OAI first run work according to the OAI gitlab guider and your blog.So,i have got the same graph like aforeshowed.However,I find these parameters are hard to comprehend in this graph .Becase I can not find any detail description about x axis and y axis on this paragraph.Can you offer more details about this graph especially the explanation of x and y axis.
    Thany you in advance!

    1. Hi,
      X/Y axis per graph:
      received signal: x=sample(time) y=log(power)
      channel impluse: x=time y=power
      channel freq= x=frequency y=power
      all llr graphs: x=array of bits received in the channel, y=softbit (probability it is 0 or 1)
      I/Q graphs: x and y represent the real and the imaginary parts of the demodulated sample
      Laurent

  7. Dear team,
    According to the gitlab website guide and this blog,I have finished the work OAI rfsimulator successfully and got the graph of NR DL SCOPE UE.However,I don not find the source code which plot the graph.Furthermore,where is the source code related with field measurements like Synchronization Signal and DM-RS.I need your help.Thank your very munch.
    Best Regards,
    Peter

    1. Dear Peter,

      The scope source is in: openair1/PHY/TOOLS/nr_phy_scope.c

      I did a lot of modifications in this source that will be in next commit in develop branch.

      It will also make the gNB scope working.

      More will come in one more merge, then the new code structure will be in place (by end of this month).

      Laurent

    2. Hi Laurent,

      Thanks for the post, I have given it a try and got the following error, it basically cannot find the reconfig.raw in the current directory (build directory).
      Do I need to compile the nrUE with -P?

      The command for running:
      ~/oai-dev/cmake_targets/ran_build/build> sudo ./nr-uesoftmodem -d –rrc_config_path . –nokrnmod –phy-test –rfsim –rfsimulator.serveraddr 192.168.1.112

      If I specify the reconfig.raw path as
      sudo ./nr-uesoftmodem -d –rrc_config_path /home/oai-dev/openair1/SIMULATION/NR_PHY –nokrnmod –phy-test –rfsim –rfsimulator.serveraddr 192.168.1.112
      It fails in finding the rbconfig.raw this time which I do not know where it is?

      Assertion (fd) failed!
      In openair_rrc_top_init_ue_nr() /home/oai-dev/openair2/RRC/NR_UE/rrc_UE.c:336
      cannot read file ./reconfig.raw: errno 2, No such file or directory

      Assertion (fd) failed!
      In openair_rrc_top_init_ue_nr() /home/oai-dev/openair2/RRC/NR_UE/rrc_UE.c:349
      cannot read file /home/gnb1/oai-dev/openair1/SIMULATION/NR_PHY/rbconfig.raw: errno 2, No such file or directory

      BR,
      Ari

      1. Hi Ari,

        These files are made by the nr-softmodem when you start it.
        Whatever the method you use, the nr-uesoftmodem need to find them in the directory pointed by the parameter –rrc_config_path

        Regards,
        Laurent

        1. Thanks, Laurent,
          I ran gNB and UE in different machines and that was the problem.
          I need to copy those files into the UE machine after running gNB as you suggested.

          BR,
          Ari

  8. Hello dear Laurent
    Thanks for your guidance and sharing, I have already successfully built OAI gNB and nrUE on two separate PCs under develop branch
    On the other hand, I took gnb.band78.tm1.106PRB.usrpn300.conf as test example.
    But I was trapped by the problem of PSS synchronous postion when running nrUE. According the message of the terminal, it seemed that the nrUE program is looped at sync step.
    If you are free, would you mind giving me some suggestion or helping me?
    Thanks a lot.
    Attached information:
    (Always loop the below information at nrUE terminal)
    [PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch (mode 0)
    [PHY] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 455440, val = 3816661 (66 dB) avg 63 dB, ffo 0.000000
    PSS execution duration 475615 microseconds
    [PHY] [UE0] Initial sync : Estimated PSS position -1, Nid2 2
    [PHY] sync_pos -1 ssb_offset 614255
    [PHY] TDD Normal prefix: SSS error condition: sync_pos -1
    [PHY] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 374440, val = 4278293 (66 dB) avg 63 dB, ffo 0.000000
    PSS execution duration 472482 microseconds
    [PHY] [UE0] Initial sync : Estimated PSS position -1, Nid2 2
    [PHY] sync_pos -1 ssb_offset 614255
    [PHY] TDD Normal prefix: SSS error condition: sync_pos -1
    [PHY] [UE0] Initial sync : Estimated power: 0 dB
    [PHY] [initial_sync] trying carrier off -100 Hz, rxgain 80 (DL 3579999900, UL 3619079900)
    Setting USRP TX Freq 3619079900.000000, RX Freq 3579999900.000000
    [PHY] [SCHED][UE] Check absolute frequency DL 3580000000, UL 3619080000 (oai_exit 0, rx_num_channels 1)

    1. Hi,
      I tested again, with latest develop branch commit.
      please try exactly this:
      cd cmake_targets
      ./build_oai -c -w USRP –nrUE –gNB -g Debug –ninja
      cd ran_build/build
      sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf –parallel-config PARALLEL_SINGLE_THREAD –rfsim –rfsimulator.serveraddr server –noS1 -d –phy-test

      in another window, same machine
      cd openairinterface5g/cmake_targets/ran_build/build
      sudo ./nr-uesoftmodem –rrc_config_path . –nokrnmod –phy-test –rfsim –rfsimulator.serveraddr 127.0.0.1 –noS1 -d –phy-test

      you should get after a couple of seconds the UR synched and the two scope windows showing it decodes channels.
      Regards,
      laurent

  9. Dear Laurent
    Thanks for the post, I have given it a try with 2 computers and 2 USRP N310,and got the following error when I run gNB with “./nr-softmodem -O ../../../ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf –parallel-config PARALLEL_SINGLE_THREAD –rfsim –phy-test –rfsimulator.serveraddr server”:

    [RRC] Dumping NR_RRCReconfiguration message (302 bytes)
    08812b5c40f1c032086fc61a083cc8390a83c4201065742dcc600349c80802693880000004d2c69466a0c0a500a201ac036d20268000134e4e34a332a31000d54662fe4c0092f1856f0b15385c00a1c0300842c076012461234c48c4003551980007e1b600203805b2012400404808c659c32cca281ffff000000010e0008206102860e6e088600001010034a0144035806cca8040ffff8000000087000410308143070dc210c00008059001012023256152c0e104160e0c10e10071281c0000205ef401000200000f400141001973865995188006aa3317f26004978c2b7858a9c2e0050e0d54835010208841840601180068086001803142f681050bd920f23456700008000fe8421080100804b038410583830438401c4a0700000817bd004000800003d00050400e00203100
    Error: signal 11:
    ./nr-softmodem(signal_handler+0xb8)[0x55ac49105128]
    /lib/x86_64-linux-gnu/libc.so.6(+0x3efd0)[0x7f2f35154fd0]
    /lib/x86_64-linux-gnu/libc.so.6(fwrite+0x1e)[0x7f2f3519592e]
    ./nr-softmodem(generate_CG_Config+0x2b1)[0x55ac492f1451]
    ./nr-softmodem(rrc_add_nsa_user+0x1ac)[0x55ac492ef81c]
    ./nr-softmodem(+0x7c05a5)[0x55ac492ed5a5]
    ./nr-softmodem(openair_rrc_gNB_configuration+0x140)[0x55ac492ede40]
    ./nr-softmodem(rrc_gnb_task+0x4ed)[0x55ac492ee8bd]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f2f3705d6db]
    /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f2f35237a3f]

    If you are free, would you mind giving me some suggestion or helping me?
    In addition, I am a novice Chinese student and I would like to ask if you could share a more detailed tutorial.
    Thank your very munch.

    1. Dear Fuaiyong
      I tried your command line with latest commit in develop branch
      I had to modify the IP addresses in ../../../ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf, then it runs
      ….
      [RRC] Dumping NR_RRCReconfiguration message (302 bytes)
      08812b5c40f1c032086fc61a083cc8390a83c4201065742dcc600349c80802693880000004d2c69466a0c0a500a201ac036d20268000134e4e34a332a31000d54662fe4c0092f1856f0b15385c00a1c0300842c076012461234c48c4003551980007e1b600203805b2012400404808c659c32cca281ffff000000010e0008206102860e6e0886000010100694028806b00d9950081ffff000000010e0008206102860e1b84218000100b20020240464ac2a581c2082c1c1821c200e25038000040bde802000400001e8005040065ce19665462001aa8cc5fc980125e30ade162a70b80143835520d40408221061018046001a021800600c50bda04142f6483c8d159c00020003fa1084200402012c0e104160e0c10e10071281c0000205ef401000200000f400282007001018800
      [RRC] Dumping scg_RB_Config message (8 bytes)
      1409281782c00c00
      [MAC] [gNB 0] Adding UE with rnti 1234 (next avail 0, num_UEs 0)
      [MAC] gNB 0] Add NR UE_id 0 : rnti 1234
      …..
      maybe you changed something else in the configuration file.

      Regards,
      Laurent

  10. Hello again Laurent,

    Sorry to bother, I’d like to see how SIB1 is generated in nr OAI, I have followed the main function in nr-softmodem.c but when dealing with your server threat poll link list I got lost. Could you please point me to the right place where the SIB1 is generated?

    Thanks

    1. Hi Julian,
      There is no relation between SIB generation and the thread pool 😉 isn’t it ?
      So, coming to your actual question:
      I think SIB1 is generated in function do_SIB1_NR()
      this function is never called in nr-softmodem, for the code on “develop” branch.
      So, please ask this question on the OAI mailing list
      Laurent

  11. Thanks,

    Sorry I was talking about the ITTI tasks, not the processing and sync processes. However, you helped me to clarify some other things. I checked the call hierarchy for do_SIB1_NR() function but did not get any results.

    1. I agree, in current code it is never called, so the SIB won’t be sent over the air
      In 5G NSA, SIB is not very usefull

      1. Laurent,

        I think I got lost with your comment about SIB is not very useful, I know that minimum SI is used by a nrUE to camp on a cell and also that the code in the DEVELOP branch is using .raw files so the nrUE can configure itself to be able to initiate sync with the gNB, reason by which MIB and SIB are not needed. am I correct?

        In regards of the NSA, I will have a look at the OAI NSA with COTs UE document where I may assume that in this case the minimum SI is being sent over the air.

        Thanks

        1. Julian,
          3GPP standard is huge and very difficult to catch, nevertheless i think in ENDC or NSA mode, SIB 1 transmission is not required

    2. Hello Laurent
      I have this setup working over the air with 2 N310s, I’ve seen a lot of people having problems with two USRP devices working over the air like me.Could you please provide a more detailed tutorial with two USRP devices working over the air? Thank you very much!

  12. Very interesting tutorial, thanks a lot for sharing. What is the maximum throughput we can expect using iperf in DL and UL?

    1. Hi,
      We don’t plan to do so.
      We focus on making 5G SA
      For 5G SA, we will make a tutorial as soon as we have something working better that the ‘phy-test’ mode
      Laurent

      1. Hi Laurent,
        I couldn’t found code related to the procedure in 5G SA mode,I can see rrc_gNB_nsa.c but couldn’t find rrc_gnb_sa.c,so it seems that the openairinterface code even in develop branch doesn’t support 5G SA mode now,right?When will you make it wok?

        1. Dear Eva,
          5G SA in Openair is far from being completed.
          We are working on it, some other members also.
          Some pieces are already there: SIB1 is the first must to have for a UE to detect a SA gNB.
          In OpenAir:
          gNB has the SIB1 encoding piece of code, but all the scheduling in missing.
          UE has a bit more: it could schedule SIB1 reception
          All this code has been abandoned when OAI switched to NSA.
          It is now time to come back to SA and finish it.
          LAurent

  13. Hi Laurent
    I try to Connect OAI eNB(USRP B210) with COTS UE,but I have met some problem,
    OAI eNB Received LTE_RRCConectionReconfigurationComplete from UE,and then uplink failure timer timeout,radio connection with ue lost
    Could you please help me about this problem?

    That error LOG is:
    [RRC] Received message S1AP_DOWNLINK_NAS
    [RRC] [eNB 0] Received S1AP_DOWNLINK_NAS: ue_initial_id 0, eNB_ue_s1ap_id 420141
    [RRC] generated xid is 2
    [RRC] sent RRC_DCCH_DATA_REQ to TASK_PDCP_ENB
    [RLC] [FRAME 00000][eNB][MOD 00][RNTI a053][SRB AM 02] RLC_AM_DATA_REQ size 51 Bytes, NB SDU 1 current_sdu_index=0 next_sdu_index=1 conf 0 mui 6 vtA 0 vtS 0
    [MAC] [eNB 0][PUSCH 3] CC_id 0 129.1 ULSCH in error in round 1, ul_cqi 116, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 129.9 ULSCH in error in round 2, ul_cqi 116, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 130.7 ULSCH in error in round 3, ul_cqi 120, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 131.5 ULSCH in error in round 0, ul_cqi 121, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 132.3 ULSCH in error in round 1, ul_cqi 113, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 133.1 ULSCH in error in round 2, ul_cqi 112, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 133.9 ULSCH in error in round 3, ul_cqi 114, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 134.7 ULSCH in error in round 0, ul_cqi 116, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 135.5 ULSCH in error in round 1, ul_cqi 116, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 136.3 ULSCH in error in round 2, ul_cqi 114, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 137.1 ULSCH in error in round 3, ul_cqi 122, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 137.9 ULSCH in error in round 0, ul_cqi 120, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 138.7 ULSCH in error in round 1, ul_cqi 116, UE_id 0, RNTI a053
    [MAC] [eNB 0][PUSCH 3] CC_id 0 139.5 ULSCH in error in round 2, ul_cqi 118, UE_id 0, RNTI a053



    [MAC] UE 0 rnti a053: UL Failure timer 1
    [RLC] [FRAME 00162][eNB][MOD 00][RNTI a053][SRB AM 02][RLC AM MAX RETX=33] SN 0000
    [MAC] UE rnti a053 : in synch, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : in synch, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : in synch, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE 0 rnti a053: UL Failure after repeated PDCCH orders: Triggering RRC
    [RRC] Frame 550, Subframe 2: UE a053 UL failure, activating timer
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [RRC] UE rnti a053 failure timer 4739/8
    [PHY] prach_I0 = 0.0 dB
    [PHY] max_I0 24, min_I0 18
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [RRC] UE rnti a053 failure timer 14979/8
    [PHY] prach_I0 = 0.0 dB
    [PHY] max_I0 24, min_I0 17
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [MAC] UE rnti a053 : out of sync, PHR 40 dB DL CQI 15 PUSCH SNR 17 PUCCH SNR 0
    [RRC] Removing UE a053 instance, because of uplink failure timer timeout
    [RRC] [eNB 0] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI a053, cause 21, radio connection with ue lost
    [SCTP] Successfully sent 27 bytes on stream 1 for assoc_id 4
    [SCTP] Found data for descriptor 82
    [SCTP] Received notification for sd 82, type 32777
    [SCTP] Found data for descriptor 82
    [SCTP] [4][82] Msg of length 22 received from port 36412, on stream 1, PPID 18
    [RRC] Received message S1AP_UE_CONTEXT_RELEASE_COMMAND

    and my board is USRP B210 , which is connect to my computer using USB 3.0
    enb.Band3.tm1.25PRB.usrpb210.conf

  14. Dear Laurent,
    Can you explain the upper left graph.when I change some parameters,I can not find any change on the graph.Even set -s -30 or -s 30,I can find the change of nosie.But the burst emerge never change.
    My goal is to use this part to demonstrate the real time RSRP.
    Thank you in advance!
    Peter

    1. Dear Peter,
      ‘-s’ is now part of the channel simulation, that you need to enable with:
      –rfsimulator.options chanmod
      in the command line
      Regards,
      Laurent

      1. Dear laurent,
        Maybe I didn’t express the problem correctly!
        I can get different result by set -s 20 or -s -20,but only the bottom part changes on NR DL SCOPE UE.
        Whatever I do,the burst emerge part(Received Signal) seems is fixed.Is there anyway can change the Received Signal strength or combine it with Hong li Wang’s job (https://gitlab.eurecom.fr/oai/openairinterface5g/-/commit/4d4843e7b1fa978e30398f06a67d4d0e32eafd28)
        I want to replace the fixed Received Signal dispaly (never change)with real time nr_RSRP (openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c)
        Is it reasonale to combine the NR DL SCOPE UE with real time nr_RSRP display?If it can realize,I guess it will save much time.Hoping get you replay.
        Thany you very much.
        Peter

        1. Hi Peter,
          François have added this option quite recently, the documentation is maybe not fully updated.
          Add:
          –rfsimulator.options chanmod –rfsimulator.ploss -6
          ‘ploss’ is for path loss, if you set positive value, it amplifies the signal

          Regards,
          Laurent

  15. Hi Laurent,
    I have used two N310 as OAI gNB and OAI UE.I try to connect UE with gNB.I changed the frequency points in the .C and gNB conf file following this tutorial (https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/TESTING_GNB_W_COTS_UE.md).I run gNB with sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf –clock-source 2 –time-source 2 –do-ra –noS1 –nokrnmod –parallel-config PARALLEL_SINGLE_THREAD -d.And I run UE with sudo ./nr-uesoftmodem –usrp-args “addr=192.168.20.4,clock_source=gpsdo,time_source=gpsdo” -C 3619080000 –do-ra –noS1 –nokrnmod –ue-rxgain 40 –ue-txgain 20 -d.UE has been in the loop of “decode mib”.gNB has been in the loop of “retransmission UE 0/RNTI eb4e”.Do you have any good suggestions?Thank you very much!

  16. Hi Laurent,
    I have used two N310 as OAI gNB and OAI UE.I try to connect UE with gNB.I want to ask how to set absoluteFrequencySSB.The protocol says PointA + offsetopointa + Kssb, the configuration file only gives a Kssb of 0 and a absouluteFrequencyPointA of 640000.I’m assuming that offsetopointa is 0,and run the program with the calculated SSB frequency points,however, UE does not detect SSB.
    I run gNB with sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf –clock-source 2 –time-source 2 –do-ra –noS1 –nokrnmod –parallel-config PARALLEL_SINGLE_THREAD -d.
    I run UE with sudo ./nr-uesoftmodem –usrp-args “addr=192.168.20.4,clock_source=gpsdo,time_source=gpsdo” -C 3619080000 –do-ra –noS1 –nokrnmod –ue-rxgain 40 –ue-txgain 20 -d

      1. Dear Laurent,
        I’m using the NSA now. I’m using — do-ra mode. I want to know if the default frequency in the configuration file is set correctly? If not, how do I fix it?
        Regards,
        zx

  17. Hi Laurent,
    I have used two N310 as OAI gNB and OAI UE.I use the develop branch code and the commit is dfb110bf.I run it with ‘–do-ra’ mode.I run gNB with sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf –clock-source 2 –time-source 2 –do-ra –noS1 –nokrnmod –parallel-config PARALLEL_SINGLE_THREAD -d.I run UE with sudo ./nr-uesoftmodem –usrp-args “addr=192.168.20.4,clock_source=gpsdo,time_source=gpsdo” –do-ra –noS1 –nokrnmod –ue-rxgain 40 –ue-txgain 20 -d.The gNB side operated normally,but the UE side always prints ‘decode mib’.Can you give me some suggestions?Thank you very much!
    Regards,
    zx

  18. Hi Laurent,

    Following your tutorial, after starting nrUE, MAC seems stucking in mib decoding and no scope graph showed. But from PHY log, seems PBCH decoded successfully. Do you have any idea? Thanks.

    [PHY] [UE0] Initial sync: starting PBCH detection (rx_offset 0)
    [MAC] [L2][MAC] decode mib
    [PHY] [UE0] Initial sync: pbch decoded sucessfully
    [PHY] TDD Normal prefix: CellId 0 metric 55586, phase 3, pbch 0
    [PHY] [UE0] In synch, rx_offset 30720 samples
    [PHY] [UE 0] RRC Measurements => rssi -inf dBm (dig -inf dB, gain 110), N0 0 dBm, rsrp -inf dBm/RE, rsrq -inf dB
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 20.000000, rx_gain 110.000000, tx_freq 3619080000.000000 Hz, rx_freq 3619080000.000000 Hz
    [PHY] HW: Configuring channel 1 (rf_chain 0): setting tx_gain 20.000000, rx_gain 110.000000, tx_freq 0.000000 Hz, rx_freq 0.000000 Hz
    [PHY] HW: Configuring channel 2 (rf_chain 0): setting tx_gain 20.000000, rx_gain 110.000000, tx_freq 0.000000 Hz, rx_freq 0.000000 Hz
    [PHY] HW: Configuring channel 3 (rf_chain 0): setting tx_gain 20.000000, rx_gain 110.000000, tx_freq 0.000000 Hz, rx_freq 0.000000 Hz
    [PHY] Got synch: hw_slot_offset 2, carrier off 0 Hz, rxgain 110.000000 (DL 3619080000.000000 Hz, UL 3619080000.000000 Hz)
    [PHY] Resynchronizing RX by 30720 samples (mode = 0)
    [HW] No samples Tx occured, so we send 1 sample to notify it: Tx:60825599, Rx:60827823
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    ….forever

    1. Hi,
      Many changes in the code since this tuto.
      We may make a second version
      To answer your issue: add –build-lib all on the line ./build_oai
      The scope is now existing for UE and gNB (add -d to run it)
      I modified the scope also on time and frequency domains: one line per frame with colors
      The frequency domain is still not good: only the first slot is correct in the frame.
      I will update it asap
      Laurent

  19. Dear Laurent,

    Does core i7 9700 with 16GB ram enough for gNB? (enb and EPC are on diffrent PCs)
    Also Do i need Crystal clock for sync two B210 ( one for gNB and the other for eNB)

    Thanks
    Best regards

    1. Hi,
      Yes, i7 9700 is good, better than expensive Xeon/NUMA machines from my point o view.
      We use similar processors.
      I think you want to run 5G NSA from your question: I don’t think you need common 10MHz.
      Nevertheless, stable common 10MHz reference helps, for example if you run OpenAir UE.
      Regards,
      Laurent

      1. Thank u so much for ur prompt answer.
        Yea, i’m gonna try NSA with two B210 and COTS UE. so internal sync is Ok for them?
        One other question, I know i can’t use this repo (https://gitlab.eurecom.fr/oai/openair-cn.git) because its too old!
        can u help me on Core Part? How can i run EPC using Docker while it needs to have DNS !
        Do u have any recommend?

        Thanks
        Best regards

  20. Hi laurent,
    I want to ask you some question.
    In the openairinterface5g\openairinterface5g\openair1\SCHED_NR_UE\phy_procedures_nr_ue.c file, the’nr_fill_rx_indication()’ function, ‘case FAPI_NR_RX_PDU_TYPE_SIB’ and ‘case FAPI_NR_RX_PDU_TYPE_DLSCH’ are empty, why is that?
    Hope to hear from you, thank you very much
    Regards,
    ZX

    1. Hi,
      It is not empty:
      switch (pdu_type){
      case FAPI_NR_RX_PDU_TYPE_SIB:
      case FAPI_NR_RX_PDU_TYPE_DLSCH:
      case FAPI_NR_RX_PDU_TYPE_RAR:
      harq_pid = dlsch0->current_harq_pid;
      rx_ind->rx_indication_body[n_pdus – 1].pdsch_pdu.pdu = dlsch0->harq_processes[harq_pid]->b;
      rx_ind->rx_indication_body[n_pdus – 1].pdsch_pdu.pdu_length = dlsch0->harq_processes[harq_pid]->TBS / 8;
      break;

      Means for the three valuesFAPI_NR_RX_PDU_TYPE_SIB, FAPI_NR_RX_PDU_TYPE_DLSCH and FAPI_NR_RX_PDU_TYPE_RAR we do the same action (there is no “break;” in the switch)
      Regards,
      Laurent

  21. Hello Laurent,
    thanks for your nice tutorial. Is it possible to modify/improve the RAN beaconing process to speed up the attachment of my UE? Which variables are in charge of this in OAI? The UE I have takes a lot of time to connect to the RAN, so it is quite an issue for me.
    Thanks

    1. hi,
      The most common delay is the UE scanning.
      It is even worse if you use a expensive UE,that manages a lot of frequency bands and technologies.
      I suggest to lock the UE on the technology, the frequency band, … as much as you can in Android customisation of your UE vendor.
      Laurent

  22. Dear Laurent,

    I currently follow this document(https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/TESTING_GNB_W_COTS_UE.md) but have encountered some problems. We use two usrpb210 , but when the UE is connected, gnb quickly released. The error message of gnb is as follows:

    [MAC] gNB 0] Add NR UE_id 0 : rnti 73f9
    [MAC] [gNB 0][RAPROC] PUSCH with TC_RNTI 73f9 received correctly, adding UE MAC Context UE_id 0/RNTI 73f9
    [MAC] reset RA state information for RA-RNTI 73f9/index 0
    [MAC] Unexpected ULSCH HARQ PID 0 (have -1) for RNTI 73f9 (ignore this warning for RA)
    [PHY] [gNB 0][RAPROC] Frame 469, slot 19 Initiating RA procedure with preamble 3, energy 30.9 dB, delay 8 start symbol 0 freq index 0
    [MAC] UL_info[Frame 470, Slot 0] Calling initiate_ra_proc RACH:SFN/SLOT:469/19
    [MAC] [gNB 0][RAPROC] FAILURE: CC_id 0 Frame 469 initiating RA procedure for preamble index 3
    [PHY] [gNB 0][RAPROC] Frame 471, slot 19 Initiating RA procedure with preamble 39, energy 33.5 dB, delay 8 start symbol 0 freq index 0
    [MAC] UL_info[Frame 472, Slot 0] Calling initiate_ra_proc RACH:SFN/SLOT:471/19
    [MAC] [gNB 0][RAPROC] FAILURE: CC_id 0 Frame 471 initiating RA procedure for preamble index 39
    [PHY] [gNB 0][RAPROC] Frame 473, slot 19 Initiating RA procedure with preamble 14, energy 35.1 dB, delay 9 start symbol 0 freq index 0
    [MAC] UL_info[Frame 474, Slot 0] Calling initiate_ra_proc RACH:SFN/SLOT:473/19
    [MAC] [gNB 0][RAPROC] FAILURE: CC_id 0 Frame 473 initiating RA procedure for preamble index 14
    [PHY] [gNB 0][RAPROC] Frame 475, slot 19 Initiating RA procedure with preamble 49, energy 38.3 dB, delay 8 start symbol 0 freq index 0
    [MAC] UL_info[Frame 476, Slot 0] Calling initiate_ra_proc RACH:SFN/SLOT:475/19
    [MAC] [gNB 0][RAPROC] FAILURE: CC_id 0 Frame 475 initiating RA procedure for preamble index 49
    [PHY] [gNB 0][RAPROC] Frame 477, slot 19 Initiating RA procedure with preamble 9, energy 40.8 dB, delay 8 start symbol 0 freq index 0
    [MAC] UL_info[Frame 478, Slot 0] Calling initiate_ra_proc RACH:SFN/SLOT:477/19
    [MAC] [gNB 0][RAPROC] FAILURE: CC_id 0 Frame 477 initiating RA procedure for preamble index 9
    ……

    Can you give me some suggestions?Thank you very much!
    Thanks
    Best regards

  23. 2021/6/6
    Hi,laurent,
    I run gNB and nrUE with two USRP N310.And I use the command ping 10.0.1.1 -s 5000 on the UE side.The MAC layer error will be output on the gNB side, it says residual mac pdu length <0 !, pdu_len: -1.Do you know what the problem is?Thanks a lot。
    Best regards,
    ZX

  24. Hi,laurent,
    I can’t set the parameters of the -D and -U options, can you give me some suggestions? I am using a 30KHz subcarrier spacing, and there are 20 time slots in a frame
    Best regards,
    ZX

  25. Dear Laurent,
    Have you tested the maximum downlink rate between gmb and ue? My test result under 106PRB, 30KHz, 64QAM, code rate 0.852 and SISO is only about 20Mbps, and the theoretical value should be about 100Mbps. Hope your reply, thank you! The following are my commands to run gnb and ue.
    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf –phy-test -m 19 -M 106 -D 130175 –clock-source 2 –time-source 2 –noS1 –nokrnmod 1 –use-256qam-table -d 2>&1 | sudo tee gnb.log
    sudo ./nr-uesoftmodem –clock-source 2 –time-source 2 –phy-test -r 106 –rrc_config_path ./ –noS1 –nokrnmod 1 –usrp-args “type=n3xx,sdr_addrs=192.168.20.4,clock_source=gpsdo,time_source=gpsdo” –ue-rxgain 55 –ue-txgain 10 –ue-fo-compensation -d 2>&1 | sudo tee ue.log

    1. Hi,
      I don’t think phy-test mode fill up all resources blocks
      So, the throughput is related to the RB actually used.
      Regards,
      Laurent

      1. Hi,laurent,
        Thanks your reply!I would like to ask how to fill up all resource blocks?Could you give me some suggestions?Thanks!
        Regards,
        Kyrie

  26. Dear Laurent,
    Thank you for this tutorial.
    Can you, please, give me some suggestions?

    [INFO] [B200] Actually got clock rate 30.720000 MHz.
    [HW] Time source set neither in usrp_args nor on command line, using default!
    — Using calibration table: calib_table_b210_38

    Thread 7 “thread_FH” received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7fffedde6700 (LWP 23941)]
    0x00007fffe694ad50 in ?? () from /usr/lib/x86_64-linux-gnu/libuhd.so.3.15.0
    (gdb) where
    #0 0x00007fffe694ad50 in ?? () from /usr/lib/x86_64-linux-gnu/libuhd.so.3.15.0
    #1 0x00007fffe6977edf in ?? () from /usr/lib/x86_64-linux-gnu/libuhd.so.3.15.0
    #2 0x00007fffe74bc285 in device_init (device=, openair0_cfg=)
    at /home/user/openairinterface5g/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp:1201
    #3 0x0000555555dfc56e in load_lib (device=device@entry=0x555557cb5740,
    openair0_cfg=openair0_cfg@entry=0x555557cb5c40, cfg=cfg@entry=0x0, flag=flag@entry=0 ‘\000’)
    at /home/user/openairinterface5g/targets/ARCH/COMMON/common_lib.c:136
    #4 0x0000555555dfc6f4 in openair0_device_load (device=device@entry=0x555557cb5740,
    openair0_cfg=openair0_cfg@entry=0x555557cb5c40)
    at /home/user/openairinterface5g/targets/ARCH/COMMON/common_lib.c:144
    #5 0x0000555555df5d6f in ru_thread (param=0x555557cb52d0)
    at /home/user/openairinterface5g/executables/nr-ru.c:1254
    #6 0x00007ffff779a6db in start_thread (arg=0x7fffedde6700) at pthread_create.c:463
    #7 0x00007ffff5c3171f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

    Thanks!

    1. Hi,
      My guess:
      You have probably more than one UHD version on your compuer
      You used uhd.h of oe version, then link (or use at run time) another libuhd.so
      Regards,
      Laurent

  27. Dear Laurent,

    I’m having some trouble.I use the option ‘–dlsch-parallel 4’ on the nrUE.But it’s always wrong,it say ‘Assertion ((msgToPush_dl=pullNotifiedFIFO_nothreadSafe(&freeBlocks_dl)) != ((void *)0)) failed!
    In nr_dlsch_decoding_mthread() /home/admin2/oai/openairinterface5g/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c:936 chained list failure’. Do I need to turn on hyper-threading in Bios?

    Thanks,
    Best regards.

    1. Dear Kyrie,
      no relation to hyper-threading.
      It is a bug.
      The author use pullNotifiedFIFO_nothreadSafe() from different threads.
      Please report on OpenAir email list
      Regards,
      Laurent

      1. I read the code: it needs major fix, don’t use –dlsch-parallel until it is fixed
        when it will be fixed: the global int nbDlProcessing =0; and the thread “thread_dlsch()” must be removed

  28. Dear Laurent,
    My CPU has 20 cores. With GNB and UE running, CPU0 has 100% usage and the other cores have a low usage.Do you know how to let gNB and UE run on multiple CPU cores?
    Best regards,
    Kyrie.

  29. Dear Laurent, Hi
    I have problem running gnb!
    i used this command using Develope branch and UHD V4.0 with USRPB210 for running SA

    “”sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf –sa””

    But faced this problem::::

    wait RUs
    [PHY] Waiting for RUs to be configured … RC.ru_mask:01
    [LOADER] library liboai_device.so successfully loaded
    [HW] openair0_cfg[0].sdr_addrs == ‘(null)’
    [HW] openair0_cfg[0].clock_source == ‘0’ (internal = 0, external = 1)
    [HW] UHD version 3.15.0.0-release (3.15.0)
    [INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release
    [HW] Found USRP b200
    [INFO] [B200] Detected Device: B210
    [INFO] [B200] Operating over USB 3.
    [INFO] [B200] Initialize CODEC control…
    [INFO] [B200] Initialize Radio control…
    [INFO] [B200] Performing register loopback test…
    [INFO] [B200] Register loopback test passed
    [INFO] [B200] Performing register loopback test…
    [INFO] [B200] Register loopback test passed
    [INFO] [B200] Asking for clock rate 30.720000 MHz…
    [INFO] [B200] Actually got clock rate 30.720000 MHz.
    [HW] Setting clock source to internal
    [HW] Setting time source to internal
    — Using calibration table: calib_table_b210_38
    [HW] Error: unknown sampling rate 61440000.000000

    I also tried to change the 106 to 75 or 50!
    But it has other Errors

    Can you please give me a hint?

    Firstly i installed some dependencies and then installed UHD from the Source with UHD git page and then git commit to UHD V4 and then cloned the OAI repo with develop branch and tried to install OAI using ./build_oai -I -w USRP –gNB and at the end the first command!

    Am i doing something wrong??

    Thanks
    Best regards

    1. Hi,

      You need to add “-E” to use 3/4 sampling because B210 can’t make sampling rate 61440000
      It doesn’t harm, NR with 3/4 sampling on 40MHz is fine.

      On UHD, 4.0 is not working very well on my computer.
      Ettus/NI told us to use 4.1.0.2, our first trials are better

      On OAI, 5G SA, the current status is there is still some issues with commercial phones.
      Please let us know the result of your trails and the phone type+firmware.

      Regards,
      Laurent

      1. Thanks for your Prompt response and also your detailed solution.

        I think the problem is with UHD, when i used this command
        “./build_oai -I -w USRP –gNB”
        it automatically downloaded the UHD 3.15 as shown in text of main question. should i omit -I option?
        in other word is the -I just download UHD or other packages as well. what should i do in order not to overwrite UHD 3.15 on top of my UHD V4.1.0.2?

        Sure i will replay back when i get a stable internet connection …

        Thanks
        Best regards

        1. Hi,
          3.15 is also a good version.
          I prefer to use a recent version, in ubuntu 20.04, but a choice like 3.15 and ubuntu 18.04 is also good.
          Regards,
          Laurent

      2. Dear Laurent,
        many thanks for this hint. We could reproduce this as well with USRP B200 on latest development branch commit. The gNB is starting with –sa -E.

        The config file is (more or less): gnb.sa.band78.fr1.106PRB.usrpb210.conf

        However, the only UE which is somehow responsive is an Oppo Find X2 Pro smartphone. With this UE we get at least log file entries in the gnb. However, they cause some errors (I assume a CRC check is the cause for this). Here a snipped on this:

        [PHY] Number of bad PUCCH received: 0
        [PHY] Number of bad PUCCH received: 0
        [PHY] Number of bad PUCCH received: 0
        [PHY] Number of bad PUCCH received: 0
        [PHY] [gNB 0][RAPROC] Frame 473, slot 19 Initiating RA procedure with preamble 49, energy 55.7 dB (I0 157, thres 120), delay 11 start symbol 0 freq index 0
        [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 474, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1
        [NR_MAC] [gNB] Generate RAR MAC PDU frame 474 slot 7 preamble index 49 TA command 11
        [NR_MAC] In nr_fill_rar: Transmitted RAR with t_alloc 2 f_alloc 1166 ta_command 11 mcs 0 freq_hopping 0 tpc_command 3 csi_req 0 t_crnti 5118
        [NR_MAC] [gNB 0][RAPROC] Frame 474, Subframe 7: RA state 2
        [NR_MAC] Random Access 0 Msg3 CRC did not pass)
        [NR_MAC] [gNB 0][RAPROC] Frame 475, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (475,17)
        [NR_MAC] Random Access 0 Msg3 CRC did not pass)
        [PHY] [gNB 0][RAPROC] Frame 475, slot 19 Initiating RA procedure with preamble 57, energy 55.7 dB (I0 193, thres 120), delay 10 start symbol 0 freq index 0
        [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 476, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1
        [NR_MAC] [gNB] Generate RAR MAC PDU frame 476 slot 7 preamble index 57 TA command 10
        [NR_MAC] In nr_fill_rar: Transmitted RAR with t_alloc 2 f_alloc 1166 ta_command 10 mcs 0 freq_hopping 0 tpc_command 3 csi_req 0 t_crnti 8e6c
        [NR_MAC] [gNB 0][RAPROC] Frame 476, Subframe 7: RA state 2
        [NR_MAC] [gNB 0][RAPROC] Frame 476, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (476,17)
        [NR_MAC] Random Access 0 Msg3 CRC did not pass)
        [NR_MAC] Random Access 1 Msg3 CRC did not pass)
        [NR_MAC] [gNB 0][RAPROC] Frame 477, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (477,17)
        [NR_MAC] [gNB 0][RAPROC] Frame 477, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (477,17)
        [NR_MAC] nr_generate_Msg3_retransmission(): cannot find free CCE for RA RNTI 8e6c!
        [NR_MAC] [gNB 0][RAPROC] Frame 477, Slot 11 : CC_id 0 Scheduling retransmission of Msg3 in (477,18)
        [NR_MAC] Random Access 0 failed at state 2 (Reached msg3 max harq rounds)
        [NR_MAC] to remove in mac rnti_to_remove[0] = 0x5118
        [NR_MAC] handle_nr_ul_harq(): unknown RNTI 5118 in PUSCH
        [PHY] to remove rnti 20760
        [PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
        [NR_MAC] Random Access 1 Msg3 CRC did not pass)

        If you require further information you can contact me by mail.

        best
        Ralf

        1. Ralf,
          Interesting, we had quite the same with Huawei phones.
          But it was fixed.
          The problem was that the SIB1 was providing wrong information to the phone, so the Msg1 was ok, but not Msg3
          I will try to find a oppo phone working
          Regards,
          Laurent

  30. Dear Laurent, Hi
    I am a novice!so if I ask some stupid questions,Hope you understand!!thanks!!
    I want to use gNB and UE in noS1,(do not use EPC),when I run
    sudo -E ./nr-softmodem –noS1 -O ~/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf -d
    It shows that
    [NGAP]No configuration in the file.
    …..
    …..
    [PHY] DJP – delete code above this /home/xxx/openairinterface5g/executables/nr-ru.c:1860
    ….

    I haven’t run UE yet,
    and I want to know where I have a problem!!
    This problem has troubled me for a long time, thank you for your help!!!

    1. Hi,
      first easy
      DJP – delete code above this /home/xxx/openairinterface5g/executables/nr-ru.c:1860
      “DJP” (i don’t know who it is) have let this in the code for about 2 years, i will push for cleanup

      noS1: doesn’t work in 5G OAI (not developped)

      Regards,
      Laurent

      1. hi,laurent!
        Thank you so much for answering my question!
        and I wnt to know if noS1 doesn’t work in 5G oAI
        So why does noS1 appear in this tutorial? like this:
        sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf –parallel-config PARALLEL_SINGLE_THREAD –rfsim –phy-test –rfsimulator.serveraddr server –noS1 -d
        Whether in rfsimulator mode, 5G noS1 can still be used,
        thank you!!

        Regards,
        bing

        1. Hi,
          –phy-test mode is very specific, so, yes in this context it uses ‘noS1’ and no core network is needed
          in –phy-test mode, there is no UE attachement procedure, no bearer channel establishment procedure, all is hardcoded to a fix configuration
          Regards,
          Laurent

  31. hi,laurent!
    Thank you for your previous help, now I have encountered a new problem!
    when I run this:
    sudo ./nr-softmodem -O ~/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf –parallel-config PARALLEL_SINGLE_THREAD –rfsim –noS1 | sudo tee nr_gnb1.log

    the result is:
    ….
    wait RUs
    [PHY] Waiting for RUs to be configured … RC.ru_mask:00
    [PHY] RUs configured
    ALL RUs READY!
    RC.nb_RU:1
    ALL RUs ready – init gNBs
    Not NFAPI mode – call init_eNB_afterRU()
    [PHY] init_eNB_afterRU() RC.nb_nr_inst:1
    [PHY] RC.nb_nr_CC[inst:0]:0x7f4c6bd46010
    [PHY] [gNB 0] phy_init_nr_gNB() About to wait for gNB to be configured

    and then it stoped,I want to know where the problem is
    thank you!!

    Regards,
    bing

  32. hi,laurent!
    Thank you very much for your tutorial!
    my UE and GNB have successfully pinged
    But my UE side has been cyclically decoding MIB,
    and the graphical interface cannot be displayed
    the UE running results:
    ……
    ……
    [NR_RRC] Configuring MAC for first MIB reception
    [PHY] [UE0] Initial sync: pbch decoded sucessfully
    [PHY] TDD Normal prefix: CellId 0 metric 55611, phase 3, pbch 0
    [PHY] [UE0] In synch, rx_offset 552960 samples
    [PHY] [UE 0] RRC Measurements => rssi -inf dBm (dig -inf dB, gain 0), N0 0 dBm, rsrp -inf dBm/RE, rsrq -inf dB
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619080000.000000 Hz, rx_freq 3619080000.000000 Hz
    [PHY] Got synch: hw_slot_offset 36, carrier off 0 Hz, rxgain 0.000000 (DL 3619080000.000000 Hz, UL 3619080000.000000 Hz)
    [PHY] Resynchronizing RX by 552960 samples (mode = 6)
    [HW] No samples Tx occured, so we send 1 sample to notify it: Tx:6143999, Rx:6146223
    [MAC] [L2][MAC] decode mib
    [PHY] Missed previous DCI detections. NDI toggled but rv 2 does not correspond to first reception
    [PHY] In ue_ta_procedures: [UE 0] [11.7] Got timing advance command 31 from MAC, new value is 0
    [MAC] [L2][MAC] decode mib
    …….
    ……
    [PHY] ============================================
    [PHY] Harq round stats for Downlink: 35705/1/0/0 DLSCH errors: 0
    [PHY] ============================================
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [PHY] In ue_ta_procedures: [UE 0] [904.7] Got timing advance command 31 from MAC, new value is 0
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [MAC] [L2][MAC] decode mib
    [PHY] In ue_ta_procedures: [UE 0] [914.7] Got timing advance command 31 from MAC, new value is 0
    [MAC] [L2][MAC] decode mib
    could you help me to check out where the problem is?
    thank you!!!

    Regards,
    bing

    1. Hi,
      MIB is master information block.
      The gNB sends it periodically and the UE decodes it.
      If you don’t want these traces, add on command line: –log_config.mac_log_level warning
      Regards,
      Laurent

  33. hi,laurent!
    Now I have successfully run your tutorial,and I have a question to ask you:
    I know when I use –rfsimulator.options saviq , the the IQ samples can be saved for future replay , and the saved file suffix is iqs
    If I want to view this file, how should I view it?
    Or how do I change the file suffix to bin?
    How do I control the number of users and the allocation settings of each channel?
    thank you!
    Regards,
    bing

    1. Hi,
      Saved iq file: it is blocks of data with header
      If you want to read the file and produce another format, the source code: targets/ARCH/rfsimulator/stored_node.c
      Is a starting point for you: it reads the file to send it in replay usage.
      You can easily make file output with the format you would like instead of replaying
      Regards,
      Laurent

  34. hi,laurent!
    I have some questions ask you,
    1.I know the –phy-test will generate random UL and DL traffic at every scheduling opportunity ,so when I view the spectrogram of the IQ file,only some frame have signal,
    Now I want to have signal in every frame by configuring file,
    I want to configure the channel and user of each frame,(I run the –rfsim –noS1 –phy-test)
    I hope to get your help!
    2.if the rfsimulator、gnb、UE cannot configure the channel and user of each frame, can rfsimulator、enb、ue 、epc be configured?
    3.Which file has the configuration information I want?
    thank you!
    Regards,
    bing

  35. Dear Laurent, Hi

    i have problem installing OAI gnb on my i7 9700 with B210!

    the problem is
    “””
    [PHY] fp->scs=30000
    [PHY] fp->ofdm_symbol_size=1536
    [PHY] fp->nb_prefix_samples0=132
    [PHY] fp->nb_prefix_samples=108
    [PHY] fp->slots_per_subframe=2
    [PHY] fp->samples_per_subframe_wCP=43008
    [PHY] fp->samples_per_frame_wCP=430080
    [PHY] fp->samples_per_subframe=46080
    [PHY] fp->samples_per_frame=460800
    [PHY] fp->dl_CarrierFreq=3619200000
    [PHY] fp->ul_CarrierFreq=3619200000
    [PHY] Channel 0: setting tx_gain offset 0.000000, rx_gain offset 114.000000, tx_freq 3619200000 Hz, rx_freq 3619200000 Hz
    [PHY] Initializing RU signal buffers (if_south local RF) nb_tx 1
    [PHY] [INIT] common.txdata[0] = 0x7f3c60205040 (1844480 bytes,sf_extension 320)
    [PHY] [INIT] common.txdata[0] = 0x7f3c60205540
    [PHY] nb_tx 1
    [PHY] rxdata_7_5kHz[0] 0x7f3c59f47040 for RU 0
    [PHY] [INIT] common.txdata_BF= 0x7f3c44000b00 (8 bytes)
    [PHY] txdataF_BF[0] 0x7f3c60017040 for RU 0
    [PHY] rxdataF[0] 0x7f3c59d4d040 for RU 0
    [PHY] [INIT] nr_phy_init_RU() ru->num_gNB:1
    [LIBCONFIG] device.recplay: 7/7 parameters successfully set, (7 to default value)
    [LIBCONFIG] device: 1/1 parameters successfully set, (1 to default value)
    [LIBCONFIG] loader: 2/2 parameters successfully set, (2 to default value)
    [LIBCONFIG] loader.oai_device: 2/2 parameters successfully set, (1 to default value)
    [LOADER] library liboai_device.so is not loaded: liboai_device.so: cannot open shared object file: No such file or directory

    Assertion ((ret >= 0)) failed!
    In load_lib() /home/oai/openairinterface5g/targets/ARCH/COMMON/common_lib.c:134
    Library oai_device couldn’t be loaded

    Exiting execution
    Linux signal Aborted…
    /home/oai/openairinterface5g/executables/softmodem-common.c:198 signal_handler() Exiting OAI softmodem: softmodem starting exit procedure

    [PHY] init feptx thread 0
    [PHY] init feptx thread 1
    wait RUs
    [PHY] Waiting for RUs to be configured … RC.ru_mask:01
    “”””

    I have tried with different UHD Version including 4.0.0 / 4.1.0…
    with Develope branch of OAI but it doesnt work on ubuntu 18.04!

    the UHD is ok and i can test it but in oai it goes with weird problems!

    I have also used these command but no chance!:
    “”” sudo apt-get install cpufrequtils
    sudo nano /etc/default/cpufrequtils
    And add the following line to it:
    GOVERNOR=”performance”
    Save and exit.
    sudo systemctl disable ondemand “””

    Can you please guide me on that?

    Thanks Best regards

    1. Hi,
      1) Library oai_device couldn’t be loaded => ./build_oai -W USRP

      2) Ubuntu 20.04, 21.04 => I made: cmake_targets/install_external_packages.ubuntu20
      that will install ussual packages, but you have to install UHD yourself

      3) cpufrequtils
      did i write something like this?

      Regards,
      Laurent

Leave a Reply

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