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

254 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

      1. Hi Mr.Laurent,

        I followed your instructions but i am unable to view the NR DL Scope(Graph). I am getting below error.

        Could you please help me in fixing it.
        —–
        [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619080000.000000 Hz, rx_freq 3619080000.000000 Hz
        [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
        [PHY] HW: Configuring card 7, sample_rate 61440000.000000, tx/rx num_channels 1/1, duplex_mode TDD
        [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619080000.000000 Hz, rx_freq 3619080000.000000 Hz
        [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
        [HW] # /dev/cpu_dma_latency set to 2 us
        [CONFIG] loader.nrscope: 1/2 parameters successfully set
        shlib_path libnrscope.so
        [LOADER] library libnrscope.so successfully loaded
        [LOADER] load_module_shlib(): function end_forms not found: /home/innominds/5GTestbed/openairinterface5g/cmake_targets/ran_build/build/libnrscope.so: undefined symbol: end_forms
        [PHY] Intializing UE Threads for instance 0 (0x55983c31d8c0,0x7f12f8776010)…
        No protocol specified
        In fl_initialize() [flresource.c:995]: 5G-UE-scope: Can’t open display :10.0
        In fl_bgn_form() [forms.c:347]: Missing or failed call of fl_initialize()
        ————–

        Regards,
        Shaik.

          1. Hi Laurent,
            I didn’t use ssh. I just added ‘-d’ option to the nrUE command line hoping that nrUE scope GUI will open automatically.

            Is there any guide/blog/tutorial which explains the fix for this Graphical GUI issue?

            Thankyou.

            Regards,
            Shaik.

          2. Dear Shaik,
            your trace says: Can’t open display :10.0
            Please google this text, the issue has no relationship with OpenAir, except it is a Xwindow GUI
            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

      1. Hi Laurent,
        I met same problem with Claudy, we use free5GC as core network and OAI 5G & USRP b210 as gNB. At first gNB could connect with 5gc, when the UE try to connect gNB and registrate 5gc, the gNB released. The error message of gNB includes:
        [1] [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
        [2][NR_MAC] Unexpected ULSCH HARQ PID 0 (have -1) for RNTI 0xb70b (ignore this warning for RA)
        [3][NR_MAC] Unexpected ULSCH HARQ PID 2 (have -1) for RNTI 0x017f (ignore this warning for RA)

        We didnt find any configuration or definition of parameter , and dont know why it didnt work, can you give us some suggestions? Thank you very much!

        Thanks
        Best regards

        1. Hi,
          I think the RA (random access) trials are not a big issue.
          The gNB detects some RF energy in the RACH channel, it can be a too high Rx gain on the RF board ofr other issues, but it doesn’t kill other UE connections.
          I suggest to start with rfsimulator and OAI UE to validate the parameters and verify it works fine without RF HW.

          Then, with RF and commercial UE, have a look in a wireshark trace between 5GC and gNB.
          Depending on what we sse in trhe trace we can continue to investigate
          Regards,
          Laurent

  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

          1. Hi Laurent,

            We tried with OAI 5G SA (tag 2022.w08) and encounter with multiple “Msg3 CRC did not pass” warnings. We tested with a Quectel RM500Q and a SIMCOM8200. Did you solve this issue with the Oppo phone?

          2. Hi Carlos,
            No, we have not tested because we tested these UEs with commercial gNB: it doesn’t work either.

            Maybe some 5G SA phones are simply fake, and another part has locked firmware, on a combination of secrets: band+plmn (see https://mt-tech.fi/en/) with more hidden checks: SIM data, maybe GPS, …

            This is a bad situation that breaks the foundation of GSM advance over locked UE+operator (USA commercial model before GSM).

            GSM has offered: independence and re-usability of these 3 elements: subscription/UE/network and inter-operators roaming.

          3. How can you find the wrong information in SIB1? Was it caused by the source code? I have same problem with B200mini gNB and Huawei P40 Pro/Xiaomi Mi 10T UE

        2. Hi,
          Have you found out how to solve this problem? I’m trying to connect a Xiaomi redmi note 10 5G to the 5G SA network and I’m getting the same problem.

          Best regards.
          Mohamed.

          1. Hi,
            We changed the SIM programming SW to enable explicitly 5G SA
            Please try this by re-flashing your SIM
            It is unblocking some UEs, but not all of them

          2. Dear Laurent,

            I am also facing same problem. i configure imsi value in opencells
            IMSI value :208920100001134
            UE: xiaomi redmi note 10 5G
            USRP B210

            I was attached log file and config file . i am facing below error . Please anyone help me to resolve thisissue

            [NR_PHY] Number of bad PUCCH received: 0
            [NR_MAC] Frame.Slot 640.0

            [NR_PHY] Number of bad PUCCH received: 0
            [NR_MAC] Frame.Slot 768.0

            [NR_PHY] Number of bad PUCCH received: 0
            [NR_MAC] Frame.Slot 896.0

            [NR_PHY] Number of bad PUCCH received: 0
            [NR_PHY] [gNB 0][RAPROC] Frame 925, slot 19 Initiating RA procedure with preamble 20, energy 31.7 dB (I0 192, thres 120), delay 16 start symbol 0 freq index 0
            [MAC] UL_info[Frame 925, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:925/19
            [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 925 Activating Msg2 generation in frame 926, slot 7 using RA rnti 10b SSB index 0 RA index 0
            [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 926, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 2
            [NR_MAC] [gNB] Generate RAR MAC PDU frame 926 slot 7 preamble index 20 TA command 16
            [NR_MAC] Random Access 0 Msg3 CRC did not pass)
            [NR_MAC] [gNB 0][RAPROC] Frame 927, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (927,17)
            [NR_MAC] Random Access 0 Msg3 CRC did not pass)
            [NR_MAC] [gNB 0][RAPROC] Frame 928, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (928,17)
            [NR_MAC] Random Access 0 Msg3 CRC did not pass)
            [NR_MAC] [gNB 0][RAPROC] Frame 929, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (929,17)
            [NR_MAC] Random Access 0 failed at state 2 (Reached msg3 max harq rounds)
            [NR_MAC] to remove in mac rnti_to_remove[0] = 0x05c7
            [NR_MAC] handle_nr_ul_harq(): unknown RNTI 0x05c7 in PUSCH
            [NR_PHY] to remove rnti 0x05c7
            [NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
            [NR_MAC] Random Access 2 failed at state 2 (Reached msg3 max harq rounds)
            [NR_MAC] to remove in mac rnti_to_remove[0] = 0x68b1
            [NR_MAC] handle_nr_ul_harq(): unknown RNTI 0x68b1 in PUSCH
            [NR_PHY] to remove rnti 0x68b1
            [NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
            [NR_MAC] Frame.Slot 0.0

            Regards,
            Sivaneshkumar K

          3. Dear Sivanesh,
            This is not a SIM issue.
            the UE, using the SIM data do RACH acces to the gNB (or it is false RACH if you have too much Rx LNA gain)
            the gNB sends Msg2, but never receives Msg3 from the UE
            I’m not able to figure out why, there are multiple possible causes
            Regards,
            laurent

      3. Hi Laurent!

        I am running the command ./nr-softmodem -O ../../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf –sa -E but I get the following error:

        “IB1 TDA 0 would cause overlap with CSI-RS. Please select a different SIB1 TDA.”

        I am using USRP B200. Can you give me some hint?

        Thanks!

          1. Hi Laurent,

            Thanks, this has worked

            I understand that to raise the 5G SA network it is only necessary to run the Core 5G with sudo python3 core-network.py –type start-basic and the command I put in the previous message.

            This is correct, right?

            Thanks!

      4. Hi laurent,

        Sorry for the late response, I don’t know if you will see this, but I am writing a paper about 5G on OAI, and I was kinda trying to find some reputable source talking about that -E option, or some specification page, justifying and saying why it has to be 3/4 sampling and not the sampling rate 61440000.

        Do you know where I can find such information?

        1. Dear José,

          In this case, we use 106 resource blocks * 12 sub-carriers spacing 30KHz, so the total actual RF band is 38160MHz (not 40MHz)
          if we sample at 61440KHz, for 30KHz sub carriers, we have 61440/30 = 2048 DFT points, but we need only 1272 points (one per sub-carrier), we will discard the remaining part
          If we sample at 46080KHz, for 30KHz sub carriers, we have 46080/30 = 1572 DFT points, we will discard less points
          The result is the same, if we ignore “out of the useful band” signal

          One can sample at any entire multiplication of the subcarrier frequency, larger than the used number of sub carriers, and able to perform DFT.

          another example: NR 100MHz is 60KHz subcarriers, 132 RB, so 1584 subcarriers
          The regular sampling is 60KHz*2048 = 122880 kS/s
          We can’t do 60KHz*2048*(3/4)because this will produce 2048*(3/4) sub carriers sampled, than is 1536 sub carriers, less than the requirement: 1584 subcarriers
          Maybe, one can consider to not schedule the last 4 resource blocks ((1584-1536)/12) to use a radio that can do 92.160MHz sampling instead of 122.880MHz but i don’t know if anyone has checked the degradation (reference sub carriers, self interference, …), and this possible idea is not available in OAI.

          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

  36. Dear Laurent,

    What’s your highest speed test results on OAI 5G SA gNB with USRP B210 for
    band #78?

    Thanks
    Best Regards

    1. Dear Pooya,
      I have not run too much test myself, nevertheless i see consistent results with Quectel UE: 90Mb/s DL on: 40MHz 5G NR SA, TDD band 78
      Regards,

  37. Hello laurent,
    I use a b210 and quectel as UE and the UE maneaged to connect, unfortunately without internet connection,but the UE attached normally.
    When i use a n310 instead with the same configuration and
    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.usrpn310.conf –sa
    it can’t connect to ue and the logs print

    [NR_PHY] Number of bad PUCCH received: 0
    [NR_PHY] [gNB 0][RAPROC] Frame 957, slot 19 Initiating RA procedure with preamble 60, energy 54.9 dB (I0 167, thres 120), delay 6 start symbol 0 freq index 0
    [MAC] UL_info[Frame 957, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:957/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 957 Activating Msg2 generation in frame 958, slot 7 using RA rnti 10b SSB index 0 RA index 0
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 958, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 2
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_MAC] [gNB] Generate RAR MAC PDU frame 958 slot 7 preamble index 60 TA command 6
    [NR_MAC] [gNB 0] Adding UE with rnti 0x017f (num_UEs 0)
    [NR_MAC] [gNB 0][RAPROC] PUSCH with TC_RNTI 0x017f received correctly, adding UE MAC Context UE_id 0/RNTI 0x017f
    [NR_MAC] [RAPROC] RA-Msg3 received (sdu_lenP 7)
    [NR_RRC] [FRAME 00958][gNB][MOD 00][RNTI 17f] [RAPROC] Logical Channel DL-CCCH, Generating RRCSetup (bytes 106)
    [NR_MAC] Modified UE_id 0/17f with CellGroup
    [NR_MAC] Adding SchedulingRequestconfig
    [NR_MAC] Adding BSR config
    [NR_MAC] Adding TAG config
    [NR_MAC] Adding PHR config
    [NR_MAC] Adding LCID 1 (SRB 1)
    [RLC] /home/ubuntu/oai_2022_2/openairinterface5g/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c:741:add_rlc_srb: added srb 1 to UE with RNTI 0x17f
    [NR_MAC] Scheduling RA-Msg4 for TC_RNTI 0x017f (state 4, frame 960, slot 1)
    [NR_MAC] Unexpected ULSCH HARQ PID 0 (have -1) for RNTI 0x017f (ignore this warning for RA)
    [NR_MAC] [gNB 0] [RAPROC] CC_id 0 Frame 960, slotP 1: Generating RA-Msg4 DCI, state 4
    [NR_MAC] (ue 0, rnti 0x017f) Received Ack of RA-Msg4. CBRA procedure succeeded!
    [NR_MAC] Frame.Slot 0.0
    UE ID 0 RNTI 017f (1/1) PH 0 dB PCMAX 0 dBm, average RSRP 0 (0 meas)
    UE 0: dlsch_rounds 1/0/0/0, dlsch_errors 0, pucch0_DTX 0, BLER 0.10000 MCS 9
    UE 0: dlsch_total_bytes 123
    UE 0: ulsch_rounds 3/3/2/2, ulsch_DTX 10, ulsch_errors 2
    UE 0: ulsch_total_bytes_scheduled 348, ulsch_total_bytes_received 0

    [NR_PHY] Number of bad PUCCH received: 0
    [NR_PHY] [gNB 0][RAPROC] Frame 67, slot 19 Initiating RA procedure with preamble 62, energy 54.9 dB (I0 171, thres 120), delay 6 start symbol 0 freq index 0
    [MAC] UL_info[Frame 67, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:67/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 67 Activating Msg2 generation in frame 68, slot 7 using RA rnti 10b SSB index 0 RA index 0
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 68, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 2
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_MAC] [gNB] Generate RAR MAC PDU frame 68 slot 7 preamble index 62 TA command 6
    [NR_MAC] [gNB 0] Adding UE with rnti 0x49f8 (num_UEs 1)
    [NR_MAC] [gNB 0][RAPROC] PUSCH with TC_RNTI 0x49f8 received correctly, adding UE MAC Context UE_id 1/RNTI 0x49f8
    [NR_MAC] [RAPROC] RA-Msg3 received (sdu_lenP 7)
    [NR_MAC] Received UL_SCH_LCID_C_RNTI with C-RNTI 0x017f
    [RRC] Frame 68, Subframe 17: UE 17f UL failure reset, deactivating timer
    [NR_MAC] Scheduling RA-Msg4 for TC_RNTI 0x017f (state 4, frame 70, slot 1)
    [NR_MAC] Unexpected ULSCH HARQ PID 0 (have -1) for RNTI 0x49f8 (ignore this warning for RA)
    [NR_MAC] [gNB 0] Remove NR UE_id 1: rnti 0x49f8
    [NR_MAC] to remove in mac rnti_to_remove[0] = 0x49f8
    [NR_MAC] [gNB 0] [RAPROC] CC_id 0 Frame 70, slotP 1: Generating RA-Msg4 DCI, state 4
    [NR_MAC] (ue 0, rnti 0x017f) CBRA procedure succeeded!
    [NR_PHY] to remove rnti 0x49f8
    [NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [NR_PHY] [gNB 0][RAPROC] Frame 75, slot 19 Initiating RA procedure with preamble 42, energy 55.7 dB (I0 180, thres 120), delay 7 start symbol 4 freq index 0
    [MAC] UL_info[Frame 75, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:75/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 75 Activating Msg2 generation in frame 76, slot 7 using RA rnti 10f SSB index 0 RA index 0
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 76, slotP 7: Generating RA-Msg2 DCI, rnti 0x10f, state 1, CoreSetType 2
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_MAC] [gNB] Generate RAR MAC PDU frame 76 slot 7 preamble index 42 TA command 7
    [NR_MAC] [gNB 0] Adding UE with rnti 0x6ed7 (num_UEs 1)
    [NR_MAC] [gNB 0][RAPROC] PUSCH with TC_RNTI 0x6ed7 received correctly, adding UE MAC Context UE_id 1/RNTI 0x6ed7
    [NR_MAC] [RAPROC] RA-Msg3 received (sdu_lenP 7)
    [NR_MAC] Received UL_SCH_LCID_C_RNTI with C-RNTI 0x017f
    [RRC] Frame 76, Subframe 17: UE 17f UL failure reset, deactivating timer
    [NR_MAC] Scheduling RA-Msg4 for TC_RNTI 0x017f (state 4, frame 78, slot 1)
    [NR_MAC] Unexpected ULSCH HARQ PID 0 (have -1) for RNTI 0x6ed7 (ignore this warning for RA)
    [NR_MAC] [gNB 0] Remove NR UE_id 1: rnti 0x6ed7
    [NR_MAC] to remove in mac rnti_to_remove[0] = 0x6ed7
    [NR_MAC] [gNB 0] [RAPROC] CC_id 0 Frame 78, slotP 1: Generating RA-Msg4 DCI, state 4
    [NR_MAC] (ue 0, rnti 0x017f) CBRA procedure succeeded!
    [NR_PHY] to remove rnti 0x6ed7
    [NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [NR_PHY] [gNB 0][RAPROC] Frame 85, slot 19 Initiating RA procedure with preamble 18, energy 56.4 dB (I0 180, thres 120), delay 7 start symbol 0 freq index 0
    [MAC] UL_info[Frame 85, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:85/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 85 Activating Msg2 generation in frame 86, slot 7 using RA rnti 10b SSB index 0 RA index 0
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 86, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 2
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_MAC] [gNB] Generate RAR MAC PDU frame 86 slot 7 preamble index 18 TA command 7
    [NR_MAC] [gNB 0] Adding UE with rnti 0x28ca (num_UEs 1)
    [NR_MAC] [gNB 0][RAPROC] PUSCH with TC_RNTI 0x28ca received correctly, adding UE MAC Context UE_id 1/RNTI 0x28ca
    [NR_MAC] [RAPROC] RA-Msg3 received (sdu_lenP 7)
    [NR_MAC] Received UL_SCH_LCID_C_RNTI with C-RNTI 0x017f
    [RRC] Frame 86, Subframe 17: UE 17f UL failure reset, deactivating timer
    [NR_MAC] Scheduling RA-Msg4 for TC_RNTI 0x017f (state 4, frame 88, slot 1)
    [NR_MAC] Unexpected ULSCH HARQ PID 0 (have -1) for RNTI 0x28ca (ignore this warning for RA)
    [NR_MAC] [gNB 0] Remove NR UE_id 1: rnti 0x28ca
    [NR_MAC] to remove in mac rnti_to_remove[0] = 0x28ca
    [NR_MAC] [gNB 0] [RAPROC] CC_id 0 Frame 88, slotP 1: Generating RA-Msg4 DCI, state 4
    [NR_MAC] (ue 0, rnti 0x017f) CBRA procedure succeeded!
    [NR_PHY] to remove rnti 0x28ca
    [NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [NR_PHY] [gNB 0][RAPROC] Frame 93, slot 19 Initiating RA procedure with preamble 3, energy 54.9 dB (I0 180, thres 120), delay 7 start symbol 0 freq index 0
    [MAC] UL_info[Frame 93, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:93/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 93 Activating Msg2 generation in frame 94, slot 7 using RA rnti 10b SSB index 0 RA index 0
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 94, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 2
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_MAC] [gNB] Generate RAR MAC PDU frame 94 slot 7 preamble index 3 TA command 7
    [NR_MAC] [gNB 0] Adding UE with rnti 0x6da2 (num_UEs 1)
    [NR_MAC] [gNB 0][RAPROC] PUSCH with TC_RNTI 0x6da2 received correctly, adding UE MAC Context UE_id 1/RNTI 0x6da2
    [NR_MAC] [RAPROC] RA-Msg3 received (sdu_lenP 7)
    [NR_MAC] Received UL_SCH_LCID_C_RNTI with C-RNTI 0x017f
    [RRC] Frame 94, Subframe 17: UE 17f UL failure reset, deactivating timer
    [NR_MAC] Scheduling RA-Msg4 for TC_RNTI 0x017f (state 4, frame 96, slot 1)
    [NR_MAC] Unexpected ULSCH HARQ PID 0 (have -1) for RNTI 0x6da2 (ignore this warning for RA)
    [NR_MAC] [gNB 0] Remove NR UE_id 1: rnti 0x6da2
    [NR_MAC] to remove in mac rnti_to_remove[0] = 0x6da2
    [NR_MAC] [gNB 0] [RAPROC] CC_id 0 Frame 96, slotP 1: Generating RA-Msg4 DCI, state 4
    [NR_MAC] (ue 0, rnti 0x017f) CBRA procedure succeeded!
    [NR_PHY] to remove rnti 0x6da2
    [NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [NR_PHY] [gNB 0][RAPROC] Frame 101, slot 19 Initiating RA procedure with preamble 17, energy 54.9 dB (I0 181, thres 120), delay 7 start symbol 4 freq index 0
    [MAC] UL_info[Frame 101, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:101/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 101 Activating Msg2 generation in frame 102, slot 7 using RA rnti 10f SSB index 0 RA index 0
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 102, slotP 7: Generating RA-Msg2 DCI, rnti 0x10f, state 1, CoreSetType 2
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_MAC] [gNB] Generate RAR MAC PDU frame 102 slot 7 preamble index 17 TA command 7
    [NR_MAC] [gNB 0] Adding UE with rnti 0xe5a4 (num_UEs 1)
    [NR_MAC] [gNB 0][RAPROC] PUSCH with TC_RNTI 0xe5a4 received correctly, adding UE MAC Context UE_id 1/RNTI 0xe5a4
    [NR_MAC] [RAPROC] RA-Msg3 received (sdu_lenP 7)
    [NR_MAC] Received UL_SCH_LCID_C_RNTI with C-RNTI 0x017f
    [RRC] Frame 102, Subframe 17: UE 17f UL failure reset, deactivating timer
    [NR_MAC] Scheduling RA-Msg4 for TC_RNTI 0x017f (state 4, frame 104, slot 1)
    [NR_MAC] Unexpected ULSCH HARQ PID 0 (have -1) for RNTI 0xe5a4 (ignore this warning for RA)
    [NR_MAC] [gNB 0] Remove NR UE_id 1: rnti 0xe5a4
    [NR_MAC] to remove in mac rnti_to_remove[0] = 0xe5a4
    [NR_MAC] [gNB 0] [RAPROC] CC_id 0 Frame 104, slotP 1: Generating RA-Msg4 DCI, state 4
    [NR_MAC] (ue 0, rnti 0x017f) CBRA procedure succeeded!
    [NR_PHY] to remove rnti 0xe5a4
    [NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [NR_PHY] [gNB 0][RAPROC] Frame 111, slot 19 Initiating RA procedure with preamble 47, energy 54.9 dB (I0 178, thres 120), delay 7 start symbol 4 freq index 0
    [MAC] UL_info[Frame 111, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:111/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 111 Activating Msg2 generation in frame 112, slot 7 using RA rnti 10f SSB index 0 RA index 0
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 112, slotP 7: Generating RA-Msg2 DCI, rnti 0x10f, state 1, CoreSetType 2
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_MAC] [gNB] Generate RAR MAC PDU frame 112 slot 7 preamble index 47 TA command 7
    [NR_MAC] [gNB 0] Adding UE with rnti 0x54ed (num_UEs 1)
    [NR_MAC] [gNB 0][RAPROC] PUSCH with TC_RNTI 0x54ed received correctly, adding UE MAC Context UE_id 1/RNTI 0x54ed
    [NR_MAC] [RAPROC] RA-Msg3 received (sdu_lenP 7)
    [NR_MAC] Received UL_SCH_LCID_C_RNTI with C-RNTI 0x017f
    [RRC] Frame 112, Subframe 17: UE 17f UL failure reset, deactivating timer
    [NR_MAC] Scheduling RA-Msg4 for TC_RNTI 0x017f (state 4, frame 114, slot 1)
    [NR_MAC] Unexpected ULSCH HARQ PID 0 (have -1) for RNTI 0x54ed (ignore this warning for RA)
    [NR_MAC] [gNB 0] Remove NR UE_id 1: rnti 0x54ed
    [NR_MAC] to remove in mac rnti_to_remove[0] = 0x54ed
    [NR_MAC] [gNB 0] [RAPROC] CC_id 0 Frame 114, slotP 1: Generating RA-Msg4 DCI, state 4
    [NR_MAC] (ue 0, rnti 0x017f) CBRA procedure succeeded!
    [NR_PHY] to remove rnti 0x54ed
    [NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [NR_PHY] [gNB 0][RAPROC] Frame 119, slot 19 Initiating RA procedure with preamble 63, energy 54.0 dB (I0 181, thres 120), delay 6 start symbol 4 freq index 0
    [MAC] UL_info[Frame 119, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:119/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 119 Activating Msg2 generation in frame 120, slot 7 using RA rnti 10f SSB index 0 RA index 0
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 120, slotP 7: Generating RA-Msg2 DCI, rnti 0x10f, state 1, CoreSetType 2
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_MAC] [gNB] Generate RAR MAC PDU frame 120 slot 7 preamble index 63 TA command 6
    [NR_MAC] [gNB 0] Adding UE with rnti 0x1e01 (num_UEs 1)
    [NR_MAC] [gNB 0][RAPROC] PUSCH with TC_RNTI 0x1e01 received correctly, adding UE MAC Context UE_id 1/RNTI 0x1e01
    [NR_MAC] [RAPROC] RA-Msg3 received (sdu_lenP 7)
    [NR_MAC] Received UL_SCH_LCID_C_RNTI with C-RNTI 0x017f
    [RRC] Frame 120, Subframe 17: UE 17f UL failure reset, deactivating timer
    [NR_MAC] Scheduling RA-Msg4 for TC_RNTI 0x017f (state 4, frame 122, slot 1)
    [NR_MAC] Unexpected ULSCH HARQ PID 0 (have -1) for RNTI 0x1e01 (ignore this warning for RA)
    [NR_RRC] Received message NR_RRC_DCCH_DATA_IND
    [NR_RRC] [FRAME 00000][gNB][MOD 00][RNTI 17f] [RAPROC] Logical Channel UL-DCCH, processing NR_RRCSetupComplete from UE (SRB1 Active)
    [NR_RRC] [FRAME 00000][gNB][MOD 00][RNTI 17f] UE State = NR_RRC_CONNECTED
    [NGAP] [gNB 0] Chose AMF ‘OAI-AMF’ (assoc_id 49) through selected PLMN Identity index 0 MCC 208 MNC 95
    [NGAP] Found usable gNB_ue_ngap_id: 0x87919135 2274464053(10)
    [SCTP] Successfully sent 73 bytes on stream 1 for assoc_id 49
    [NR_MAC] [gNB 0] Remove NR UE_id 1: rnti 0x1e01
    [NR_MAC] to remove in mac rnti_to_remove[0] = 0x1e01
    [NR_MAC] [gNB 0] [RAPROC] CC_id 0 Frame 122, slotP 1: Generating RA-Msg4 DCI, state 4
    [NR_MAC] (ue 0, rnti 0x017f) CBRA procedure succeeded!
    [NR_PHY] to remove rnti 0x1e01
    [NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
    [NR_MAC] expected HARQ pid 9 feedback at 122.65535, but is at 122.7 instead (HARQ feedback is in the future)
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [SCTP] Found data for descriptor 101
    [SCTP] [49][101] Msg of length 552 received, on stream 0, PPID 60
    [NR_RRC] Received message NGAP_DOWNLINK_NAS
    [NR_RRC] [gNB 0] Received NGAP_DOWNLINK_NAS: ue_initial_id 1, gNB_ue_ngap_id 2274464053
    [NR_RRC] send RRC_DCCH_DATA_REQ to PDCP
    [NR_MAC] expected HARQ pid 9 feedback at 122.65535, but is at 124.17 instead (HARQ feedback is in the past)
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!
    [NR_MAC] Oh no! Could not find a harq in handle_nr_uci_pucch_0_1!

    Do you have any idea what is it?
    Thanks!

    1. Hi,
      We see the UE tries to connect several times: good, what UE do you use (model, firmware version)

      We see the gNB, at least one time starts dialog with core network:
      [NGAP] [gNB 0] Chose AMF ‘OAI-AMF’ (assoc_id 49) through selected PLMN Identity index 0 MCC 208 MNC 95
      [NGAP] Found usable gNB_ue_ngap_id: 0x87919135 2274464053(10)
      [SCTP] Successfully sent 73 bytes on stream 1 for assoc_id 49

      but no answer in the trace: what core network are you using ?
      You should likely trace with wireshark the N3 interface to see the gNB/5GC dialog

      Regards,
      Laurent

      1. Thanks i found the problem, i have had bad radio connection cause wrong frequency usrp’s antennas installation.
        My UE is a Quectel RM500Q with firmware RM500QGLABR11A06M4G but when it tried to connect with Windows or Linux, the gNB crashed during the success connection. On the other hand with B210 it works well.
        Do you thing that the problem is my low CPU frequency which does not effort the BW of n310?
        I have two Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz in a server with 2.7GHz turbo boost.

        1. Hi,
          E5-2673 v3 is quite old, but good and should be enough
          n310: I don’t know
          with n310, some parameters should be different: gain is lower.
          you have example files in oai/ci-scripts/config_files

  38. Hi Laurent,

    I am trying to follow this tutorial using a bladeRF 2.0 micro xA9 as the hardware. My purpose is to deploy a 5G NSA network, and I am being able to run the eNB perfectly fine. A COTS UE can connect to the eNB and can get to the Internet.

    When I try to add a gNB to the network everything crashes. I am getting a warning in the gNB like:

    ‘[WARNING @ host/libraries/libbladeRF/src/board/bladerf2/common.c:351] The total sample throughput for the 2 active channels, 122.88 Msps, is greater than the recommended maximum sample throughput, 80 Msps. You may experience dropped samples unless the sample rate is reduced, or some channels are deactivated.’

    I guess I should decrease my bandwidth, but I am not being able to do it. Any hint?

    I am attaching the entire gNB log:

    CMDLINE: “./cmake_targets/ran_build/build/nr-softmodem” “-O” “./configuration/bladeRF/gnb-band7-5mhz.conf”
    [CONFIG] get parameters from libconfig ./configuration/bladeRF/gnb-band7-5mhz.conf , debug flags: 0x00000000
    [LIBCONFIG] Path for include directive set to: ./configuration/bladeRF
    [CONFIG] function config_libconfig_init returned 0
    [CONFIG] config module libconfig loaded
    [LIBCONFIG] config: 1/1 parameters successfully set, (1 to default value)
    [LIBCONFIG] log_config: 3/3 parameters successfully set, (1 to default value)
    [LIBCONFIG] log_config: 55/55 parameters successfully set, (49 to default value)
    [LIBCONFIG] log_config: 55/55 parameters successfully set, (55 to default value)
    [LIBCONFIG] log_config: 16/16 parameters successfully set, (16 to default value)
    [LIBCONFIG] log_config: 16/16 parameters successfully set, (16 to default value)
    log init done
    [HW] # /dev/cpu_dma_latency set to 2 us
    Reading in command-line options
    [LIBCONFIG] (root): 34/34 parameters successfully set, (30 to default value)
    [LIBCONFIG] (root): 6/6 parameters successfully set, (5 to default value)
    [ENB_APP] nfapi running mode: MONOLITHIC
    [GNB_APP] Getting GNBSParams
    [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
    [LIBCONFIG] THREAD_STRUCT.[0]: 2/2 parameters successfully set, (0 to default value)
    [LIBCONFIG] THREAD_STRUCT.[0]: 2/2 parameters successfully set, (0 to default value)
    [CONFIG] parallel_conf is set to 2
    [CONFIG] worker_conf is set to 1
    Configuration: nb_rrc_inst 1, nb_nr_L1_inst 1, nb_ru 1
    [LIBCONFIG] TTracer: 4/4 parameters successfully set, (4 to default value)
    configuring for RAU/RRU
    CPU Freq is 2.400152
    [ITTI] Starting itti queue: TASK_UNKNOWN as task 0
    [ITTI] Starting itti queue: TASK_TIMER as task 1
    [ITTI] Starting itti queue: TASK_L2L1 as task 2
    [ITTI] Starting itti queue: TASK_BM as task 3
    [ITTI] Starting itti queue: TASK_PHY_ENB as task 4
    [ITTI] Starting itti queue: TASK_MAC_ENB as task 5
    [ITTI] Starting itti queue: TASK_RLC_ENB as task 6
    [ITTI] Starting itti queue: TASK_RRC_ENB_NB_IoT as task 7
    [ITTI] Starting itti queue: TASK_PDCP_ENB as task 8
    [ITTI] Starting itti queue: TASK_DATA_FORWARDING as task 9
    [ITTI] Starting itti queue: TASK_END_MARKER as task 10
    [ITTI] Starting itti queue: TASK_RRC_ENB as task 11
    [ITTI] Starting itti queue: TASK_RRC_GNB as task 12
    [ITTI] Starting itti queue: TASK_RAL_ENB as task 13
    [ITTI] Starting itti queue: TASK_S1AP as task 14
    [ITTI] Starting itti queue: TASK_NGAP as task 15
    [ITTI] Starting itti queue: TASK_X2AP as task 16
    [ITTI] Starting itti queue: TASK_M2AP_ENB as task 17
    [ITTI] Starting itti queue: TASK_M2AP_MCE as task 18
    [ITTI] Starting itti queue: TASK_M3AP as task 19
    [ITTI] Starting itti queue: TASK_M3AP_MME as task 20
    [ITTI] Starting itti queue: TASK_M3AP_MCE as task 21
    [ITTI] Starting itti queue: TASK_SCTP as task 22
    [ITTI] Starting itti queue: TASK_ENB_APP as task 23
    [ITTI] Starting itti queue: TASK_GNB_APP as task 24
    [ITTI] Starting itti queue: TASK_MCE_APP as task 25
    [ITTI] Starting itti queue: TASK_MME_APP as task 26
    [ITTI] Starting itti queue: TASK_FLEXRAN_AGENT as task 27
    [ITTI] Starting itti queue: TASK_PHY_UE as task 28
    [ITTI] Starting itti queue: TASK_MAC_UE as task 29
    [ITTI] Starting itti queue: TASK_RLC_UE as task 30
    [ITTI] Starting itti queue: TASK_PDCP_UE as task 31
    [ITTI] Starting itti queue: TASK_RRC_UE as task 32
    [ITTI] Starting itti queue: TASK_RRC_NRUE as task 33
    [ITTI] Starting itti queue: TASK_NAS_UE as task 34
    [ITTI] Starting itti queue: TASK_RAL_UE as task 35
    [ITTI] Starting itti queue: TASK_MSC as task 36
    [ITTI] Starting itti queue: TASK_GTPV1_U as task 37
    [ITTI] Starting itti queue: OCP_GTPV1_U as task 38
    [ITTI] Starting itti queue: TASK_UDP as task 39
    [ITTI] Starting itti queue: TASK_CU_F1 as task 40
    [ITTI] Starting itti queue: TASK_DU_F1 as task 41
    [ITTI] Starting itti queue: TASK_RRC_UE_SIM as task 42
    [ITTI] Starting itti queue: TASK_RRC_GNB_SIM as task 43
    [ITTI] Starting itti queue: TASK_RRC_NSA_UE as task 44
    [ITTI] Starting itti queue: TASK_RRC_NSA_NRUE as task 45
    [ITTI] Starting itti queue: TASK_NAS_NRUE as task 46
    [LIBCONFIG] opt: 3/3 parameters successfully set, (3 to default value)
    [OPT] OPT disabled
    [HW] Version: Branch: develop Abrev. Hash: 1ed58f65b7 Date: Tue Feb 8 14:11:17 2022 +0000
    [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
    [LIBCONFIG] gNBs.[0]: 22/22 parameters successfully set, (13 to default value)
    [NR_PHY] PRB blacklist
    [NR_PHY] RC.gNB = 0x55f805e0f240
    [LIBCONFIG] L1s.[0]: 14/14 parameters successfully set, (12 to default value)
    [NR_PHY] RC.gNB[0] = 0x7fec5072c010
    [NR_PHY] Copying 0 blacklisted PRB to L1 context
    Initializing northbound interface for L1
    [PHY] l1_north_init_gNB() RC.nb_nr_L1_inst:1
    [PHY] Installing callbacks for IF_Module – UL_indication
    [MAC] Allocating shared L1/L2 interface structure for instance 0 @ 0x55f805e11400
    [PHY] l1_north_init_gNB() RC.gNB[0] installing callbacks
    [SCTP] Starting SCTP layer
    [ITTI] Created Posix thread TASK_SCTP
    [LIBCONFIG] eNBs.[0]: 1/1 parameters successfully set, (1 to default value)
    [LIBCONFIG] gNBs.[0]: 1/1 parameters successfully set, (0 to default value)
    [ITTI] Created Posix thread TASK_X2AP
    [PHY] gNB_app_task() Task ready initialize structures
    [ITTI] Created Posix thread TASK_GNB_APP
    [NR_RRC] Creating NR RRC gNB Task
    [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
    [LIBCONFIG] gNBs.[0]: 22/22 parameters successfully set, (13 to default value)
    [NR_PHY] PRB blacklist
    [LIBCONFIG] L1s.[0]: 14/14 parameters successfully set, (12 to default value)
    [NR_PHY] Copying 0 blacklisted PRB to L1 context
    Initializing northbound interface for L1
    [PHY] l1_north_init_gNB() RC.nb_nr_L1_inst:1
    [PHY] Installing callbacks for IF_Module – UL_indication
    [PHY] l1_north_init_gNB() RC.gNB[0] installing callbacks
    [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
    [LIBCONFIG] gNBs.[0]: 22/22 parameters successfully set, (13 to default value)
    [LIBCONFIG] MACRLCs.[0]: 26/26 parameters successfully set, (23 to default value)
    [MAC] [MAIN] Init function start:nb_nr_macrlc_inst=1
    [NR_RRC] Entering main loop of NR_RRC message task
    [ITTI] Created Posix thread TASK_RRC_GNB
    [PHY] Installing callbacks for IF_Module – UL_indication
    [NR_MAC] PUSCH Target 200, PUCCH Target 150, PUCCH Failure 10, PUSCH Failure 10
    [NR_MAC] Blacklisted PRBS 0
    [PHY] gNB_app_task() RC.nb_nr_L1_inst:1
    [PHY] l1_north_init_gNB() RC.nb_nr_L1_inst:1
    [PHY] Installing callbacks for IF_Module – UL_indication
    [PHY] l1_north_init_gNB() RC.gNB[0] installing callbacks
    [GNB_APP] Allocating gNB_RRC_INST for 1 instances
    [PHY] gNB_app_task() RC.nb_nr_inst:1 RC.nrrrc:0x7fec48006340
    [PHY] gNB_app_task() Creating RRC instance RC.nrrrc[0]:0x7fec48006360 (1 of 1)
    [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
    [LIBCONFIG] gNBs.[0]: 22/22 parameters successfully set, (13 to default value)
    [LIBCONFIG] list gNBs.[0].pdcch_ConfigSIB1 not found in config file ./configuration/bladeRF/gnb-band7-5mhz.conf
    [ITTI] Created Posix thread TASK_GTPV1_U
    [LIBCONFIG] gNBs.[0].servingCellConfigCommon.[0]: 60/60 parameters successfully set, (9 to default value)
    [RRC] Read in ServingCellConfigCommon (PhysCellId 0, ABSFREQSSB 641272, DLBand 78, ABSFREQPOINTA 640000, DLBW 106,RACH_TargetReceivedPower -100
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [LIBCONFIG] list gNBs.[0].servingCellConfigDedicated not found in config file ./configuration/bladeRF/gnb-band7-5mhz.conf
    [RRC] DL PTRS frequencyDensity 1 not set. Assuming PTRS not present!
    [RRC] UL PTRS frequencyDensity 1 not set. Assuming PTRS not present!
    NRRRC 0: Southbound Transport local_mac
    [NR_RRC] Setting node_type to ngran_gNB
    [LIBCONFIG] gNBs.[0].plmn_list.[0]: 3/3 parameters successfully set, (0 to default value)
    SSB SCO 31
    pdsch_AntennaPorts 1
    pusch_AntennaPorts 1
    minTXRXTIME 2
    Do CSI-RS 0
    [LIBCONFIG] security: 4/4 parameters successfully set, (2 to default value)
    [RRC] no preferred ciphering algorithm set in configuration file, applying default parameters (no security)
    [RRC] no preferred integrity algorithm set in configuration file, applying default parameters (nia2)
    [GNB_APP] RRC starting with node type 2
    [GNB_APP] Sending configuration message to NR_RRC task
    [PDCP] pdcp init,usegtp
    [PDCP] node is gNB
    [X2AP] X2AP enabled
    [X2AP] GNB_ID: 0
    [NR_RRC] Received message NRRRC_CONFIGURATION_REQ
    [NR_RRC] [gNB 0] Received NRRRC_CONFIGURATION_REQ : 0x7fec48007ab0
    [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
    [NR_RRC] [FRAME 00000][gNB][MOD 00][RNTI 0] Init…
    [LIBCONFIG] gNBs.[0]: 22/22 parameters successfully set, (13 to default value)
    [LIBCONFIG] gNBs.[0].plmn_list.[0]: 3/3 parameters successfully set, (0 to default value)
    [LIBCONFIG] gNBs.[0].servingCellConfigCommon.[0]: 60/60 parameters successfully set, (9 to default value)
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [X2AP] gNB configuration parameters: nr_band: 78, nr_ARFCN: 640000, DL_RBs: 106, num_cc: 1
    [LIBCONFIG] gNBs.[0].target_enb_x2_ip_address.[0]: 3/3 parameters successfully set, (0 to default value)
    [LIBCONFIG] gNBs.[0]: 4/4 parameters successfully set, (0 to default value)
    [LIBCONFIG] gNBs.[0].NETWORK_INTERFACES: 10/10 parameters successfully set, (2 to default value)
    [GTPU] Configuring GTPu
    [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
    [LIBCONFIG] gNBs.[0].NETWORK_INTERFACES: 10/10 parameters successfully set, (2 to default value)
    [GTPU] NSA mode
    [GTPU] Configuring GTPu address : 192.168.0.113 -> 7100a8c0
    [GNB_APP] [gNB 0] gNB_app_register for instance 0
    [GTPU] Initializing UDP for local address 192.168.0.113 with port 2152
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_RRC] [FRAME 00000][gNB][MOD 00][RNTI 0] Checking release
    [NR_RRC] do_SIB23_NR, size 9
    [NR_RRC] Done init_NR_SI
    [NR_MAC] Configuring common parameters from NR ServingCellConfig
    [NR_MAC] config_common() dl_BandwidthP:40
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] Computing frequency (pointA 640000 => 3600000 KHz (freq_min 3300000 KHz, NR band 78 N_OFFs 620000))
    [NR_MAC] config_common() dl_BandwidthP:40
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] Computing frequency (pointA 640000 => 3600000 KHz (freq_min 3300000 KHz, NR band 78 N_OFFs 620000))
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_MAC] Set TX/RX antenna number to 1 (num ssb 1: 80000000,0)
    [NR_MAC] Setting TDD configuration period to 6
    [NR_MAC] TDD has been properly configurated
    DL frequency 3619080000: band 48, UL frequency 3619080000
    [PHY] DL frequency 3619080000 Hz, UL frequency 3619080000 Hz: band 48, uldl offset 0 Hz
    [PHY] Configuring MIB for instance 0, : (Nid_cell 0,DL freq 3619080000, UL freq 3619080000)
    [PHY] Initializing frame parms for mu 1, N_RB 106, Ncp 0
    [PHY] Init: N_RB_DL 106, first_carrier_offset 1412, nb_prefix_samples 144,nb_prefix_samples0 176
    [PHY] Doing symbol rotation calculation for gNB TX/RX, f0 3619080000.000000 Hz, Nsymb 28
    [PHY] Symbol rotation 0/28 => (18204,-27245)
    [PHY] Symbol rotation 1/28 => tl 0.000036 (-23170,-23170) (0.375000)
    [PHY] Symbol rotation 2/28 => tl 0.000072 (-27245,18204) (0.593750)
    [PHY] Symbol rotation 3/28 => tl 0.000108 (12539,30272) (0.812500)
    [PHY] Symbol rotation 4/28 => tl 0.000143 (32137,-6393) (0.031250)
    [PHY] Symbol rotation 5/28 => tl 0.000179 (-1,-32767) (0.250000)
    [PHY] Symbol rotation 6/28 => tl 0.000215 (-32138,-6393) (0.468750)
    [PHY] Symbol rotation 7/28 => tl 0.000250 (-12540,30272) (0.687500)
    [PHY] Symbol rotation 8/28 => tl 0.000286 (27244,18204) (0.906250)
    [PHY] Symbol rotation 9/28 => tl 0.000322 (23169,-23170) (0.125000)
    [PHY] Symbol rotation 10/28 => tl 0.000357 (-18205,-27245) (0.343750)
    [PHY] Symbol rotation 11/28 => tl 0.000393 (-30273,12539) (0.562500)
    [PHY] Symbol rotation 12/28 => tl 0.000429 (6392,32137) (0.781250)
    [PHY] Symbol rotation 13/28 => tl 0.000464 (32767,0) (1.000000)
    [PHY] Symbol rotation 14/28 => tl 0.000500 (18204,-27245) (0.156250)
    [PHY] Symbol rotation 15/28 => tl 0.000536 (-23170,-23170) (0.375000)
    [PHY] Symbol rotation 16/28 => tl 0.000572 (-27245,18204) (0.593750)
    [PHY] Symbol rotation 17/28 => tl 0.000608 (12539,30272) (0.812500)
    [PHY] Symbol rotation 18/28 => tl 0.000643 (32137,-6393) (0.031250)
    [PHY] Symbol rotation 19/28 => tl 0.000679 (0,-32767) (0.250000)
    [PHY] Symbol rotation 20/28 => tl 0.000715 (-32138,-6393) (0.468750)
    [PHY] Symbol rotation 21/28 => tl 0.000750 (-12540,30272) (0.687500)
    [PHY] Symbol rotation 22/28 => tl 0.000786 (27244,18204) (0.906250)
    [PHY] Symbol rotation 23/28 => tl 0.000822 (23169,-23170) (0.125000)
    [PHY] Symbol rotation 24/28 => tl 0.000857 (-18205,-27245) (0.343750)
    [PHY] Symbol rotation 25/28 => tl 0.000893 (-30273,12539) (0.562500)
    [PHY] Symbol rotation 26/28 => tl 0.000929 (6392,32137) (0.781250)
    [PHY] Symbol rotation 27/28 => tl 0.000964 (32766,0) (1.000000)
    [PHY] Doing symbol rotation calculation for gNB TX/RX, f0 3619080000.000000 Hz, Nsymb 28
    [PHY] Symbol rotation 0/28 => (18204,-27245)
    [PHY] Symbol rotation 1/28 => tl 0.000036 (-23170,-23170) (0.375000)
    [PHY] Symbol rotation 2/28 => tl 0.000072 (-27245,18204) (0.593750)
    [PHY] Symbol rotation 3/28 => tl 0.000108 (12539,30272) (0.812500)
    [PHY] Symbol rotation 4/28 => tl 0.000143 (32137,-6393) (0.031250)
    [PHY] Symbol rotation 5/28 => tl 0.000179 (-1,-32767) (0.250000)
    [PHY] Symbol rotation 6/28 => tl 0.000215 (-32138,-6393) (0.468750)
    [PHY] Symbol rotation 7/28 => tl 0.000250 (-12540,30272) (0.687500)
    [PHY] Symbol rotation 8/28 => tl 0.000286 (27244,18204) (0.906250)
    [PHY] Symbol rotation 9/28 => tl 0.000322 (23169,-23170) (0.125000)
    [PHY] Symbol rotation 10/28 => tl 0.000357 (-18205,-27245) (0.343750)
    [PHY] Symbol rotation 11/28 => tl 0.000393 (-30273,12539) (0.562500)
    [PHY] Symbol rotation 12/28 => tl 0.000429 (6392,32137) (0.781250)
    [PHY] Symbol rotation 13/28 => tl 0.000464 (32767,0) (1.000000)
    [PHY] Symbol rotation 14/28 => tl 0.000500 (18204,-27245) (0.156250)
    [PHY] Symbol rotation 15/28 => tl 0.000536 (-23170,-23170) (0.375000)
    [PHY] Symbol rotation 16/28 => tl 0.000572 (-27245,18204) (0.593750)
    [PHY] Symbol rotation 17/28 => tl 0.000608 (12539,30272) (0.812500)
    [PHY] Symbol rotation 18/28 => tl 0.000643 (32137,-6393) (0.031250)
    [PHY] Symbol rotation 19/28 => tl 0.000679 (0,-32767) (0.250000)
    [PHY] Symbol rotation 20/28 => tl 0.000715 (-32138,-6393) (0.468750)
    [PHY] Symbol rotation 21/28 => tl 0.000750 (-12540,30272) (0.687500)
    [PHY] Symbol rotation 22/28 => tl 0.000786 (27244,18204) (0.906250)
    [PHY] Symbol rotation 23/28 => tl 0.000822 (23169,-23170) (0.125000)
    [PHY] Symbol rotation 24/28 => tl 0.000857 (-18205,-27245) (0.343750)
    [PHY] Symbol rotation 25/28 => tl 0.000893 (-30273,12539) (0.562500)
    [PHY] Symbol rotation 26/28 => tl 0.000929 (6392,32137) (0.781250)
    [PHY] Symbol rotation 27/28 => tl 0.000964 (32766,0) (1.000000)
    [PHY] Timeshift symbol rotation 0 => (32767,0) 0.000000
    [PHY] Timeshift symbol rotation 1 => (32717,1809) -0.055223
    [PHY] Timeshift symbol rotation 2 => (32567,3612) -0.110447
    [PHY] Timeshift symbol rotation 3 => (32318,5404) -0.165670
    [PHY] Timeshift symbol rotation 4 => (31971,7179) -0.220893
    [PHY] Timeshift symbol rotation 5 => (31526,8933) -0.276117
    [PHY] Timeshift symbol rotation 6 => (30985,10659) -0.331340
    [PHY] Timeshift symbol rotation 7 => (30349,12353) -0.386563
    [PHY] Timeshift symbol rotation 8 => (29621,14010) -0.441786
    [PHY] Timeshift symbol rotation 9 => (28803,15623) -0.497010
    [PHY] gNB 0 configured
    [NR_MAC] Total available RO 3, num of active SSB 1: unused RO = 0 association_period 1 N_RA_sfn 1 total_prach_occasions_per_config_period 3
    [NR_RRC] [FRAME 00000][gNB][MOD 00][RNTI 0] gNB:OPENAIR NR RRC IN….
    [GTPU] bind: Cannot assign requested address
    [GTPU] failed to bind socket: 192.168.0.113 2152
    [GTPU] can’t create GTP-U instance
    [GTPU] Created gtpu instance id: -1
    [X2AP] Registered new eNB[0] and home eNB id 3584
    [X2AP] eNB[0] eNB id 3584 acting as a listner (server)
    [SCTP] Received SCTP_INIT_MSG_MULTI_REQ
    NFAPI MODE:MONOLITHIC
    START MAIN THREADS
    RC.nb_nr_L1_inst:1
    Initializing gNB threads single_thread_flag:1 wait_for_sync:0
    [PHY] Initializing gNB 0 single_thread_flag:1
    [PHY] Initializing gNB 0
    [PHY] Registering with MAC interface module (before 0x55f805e11400)
    [PHY] Installing callbacks for IF_Module – UL_indication
    [PHY] Registering with MAC interface module (after 0x55f805e11400)
    [PHY] Setting indication lists
    [PHY] [nr-gnb.c] gNB structure allocated
    wait_gNBs()
    Waiting for gNB L1 instances to all get configured … sleeping 50ms (nb_nr_sL1_inst 1)
    [SCTP] Creating new listen socket on port 36422 with
    [SCTP] ipv4 addresses:
    [SCTP] – 127.0.0.181
    [X2AP] eNB[0] eNB id 3584 acting as an initiator (client)
    [SCTP] Converted ipv4 address 127.0.0.180 to network type
    [SCTP] sctp_connectx SUCCESS, used 1 addresses assoc_id 18
    [SCTP] Inserted new descriptor for sd 102 in list, nb elements 2, assoc_id 18
    [SCTP] Found data for descriptor 102
    [SCTP] Received notification for sd 102, type 32769
    [SCTP] Client association changed: 0
    [SCTP] ———————-
    [SCTP] Peer addresses:
    [SCTP] – [127.0.0.180]
    [SCTP] ———————-
    [SCTP] ———————-
    [SCTP] SCTP Status:
    [SCTP] assoc id …..: 18
    [SCTP] state ……..: 4
    [SCTP] instrms ……: 32
    [SCTP] outstrms …..: 32
    [SCTP] fragmentation : 65484
    [SCTP] pending data .: 0
    [SCTP] unack data …: 0
    [SCTP] rwnd ………: 106496
    [SCTP] peer info :
    [SCTP] state ….: 2
    [SCTP] cwnd …..: 131064
    [SCTP] srtt …..: 0
    [SCTP] rto ……: 3000
    [SCTP] mtu ……: 65532
    [SCTP] ———————-
    [SCTP] Comm up notified for sd 102, assigned assoc_id 18
    here comes the tree (instance 0):
    ———————————————
    ———————–
    eNB id 0 (null)
    state 1
    nextstream 0
    in_streams 0 out_streams 0
    cnx_id 1 assoc_id -1
    ———————————————
    here comes the tree (instance 0):
    ———————————————
    ———————–
    eNB id 0 (null)
    state 1
    nextstream 0
    in_streams 0 out_streams 0
    cnx_id 1 assoc_id -1
    ———————————————
    here comes the tree (instance 0):
    ———————————————
    ———————–
    eNB id 0 (null)
    state 1
    nextstream 0
    in_streams 0 out_streams 0
    cnx_id 1 assoc_id -1
    ———————————————
    here comes the tree (instance 0):
    ———————————————
    ———————–
    eNB id 0 (null)
    state 1
    nextstream 0
    in_streams 32 out_streams 32
    cnx_id 1 assoc_id 18
    ———————————————
    [X2AP] 3584 -> 00000e
    [X2AP] TAC: 7 -> 000007

    36

    244

    252

    09 F1 07

    00000000000000000000111000000000

    253

    0

    09 F1 07

    000000000000000000000000111000000000

    00 00 07

    09 F1 07

    640000

    78

    00

    [SCTP] Successfully sent 65 bytes on stream 0 for assoc_id 18
    gNB L1 are configured
    About to Init RU threads RC.nb_RU:1
    Initializing RU threads
    configuring RU from file
    [LIBCONFIG] RUs.[0]: 29/29 parameters successfully set, (19 to default value)
    Set RU mask to 1
    Creating RC.ru[0]:0x55f805e135f0
    [PHY] RU clock source set as internal
    [PHY] Setting time source to internal
    Setting function for RU 0 to gNodeB_3GPP
    [PHY] number of L1 instances 1, number of RU 1, number of CPU cores 16
    [PHY] DJP – delete code above this /home/artemis/openairinterface_develop/openairinterface5g/executables/nr-ru.c:1932
    [PHY] Copying frame parms from gNB in RC to gNB 0 in ru 0 and frame_parms in ru
    configuring ru_id 0 (start_rf 0x55f8022c0080)
    [PHY] Starting ru_thread 0
    [PHY] Initializing RU proc 0 (,synch_to_ext_device),
    [PHY] Starting RU 0 (,synch_to_ext_device),
    [PHY] Initializing frame parms for mu 1, N_RB 106, Ncp 0
    [PHY] Init: N_RB_DL 106, first_carrier_offset 1412, nb_prefix_samples 144,nb_prefix_samples0 176
    [PHY] fp->scs=30000
    [PHY] fp->ofdm_symbol_size=2048
    [PHY] fp->nb_prefix_samples0=176
    [PHY] fp->nb_prefix_samples=144
    [PHY] fp->slots_per_subframe=2
    [PHY] fp->samples_per_subframe_wCP=57344
    [PHY] fp->samples_per_frame_wCP=573440
    [PHY] fp->samples_per_subframe=61440
    [PHY] fp->samples_per_frame=614400
    [PHY] fp->dl_CarrierFreq=3619080000
    [PHY] fp->ul_CarrierFreq=3619080000
    [PHY] Channel 0: setting tx_gain offset 0.000000, rx_gain offset 114.000000, tx_freq 3619080000 Hz, rx_freq 3619080000 Hz
    [PHY] Initializing RU signal buffers (if_south local RF) nb_tx 1
    [PHY] [INIT] common.txdata[0] = 0x7fec4c36b040 (2458880 bytes,sf_extension 320)
    [PHY] [INIT] common.txdata[0] = 0x7fec4c36b540
    [PHY] nb_tx 1
    [PHY] rxdata_7_5kHz[0] 0x7fec4c021040 for RU 0
    [PHY] [INIT] common.txdata_BF= 0x7fec24000b00 (8 bytes)
    [PHY] txdataF_BF[0] 0x7fec4436e040 for RU 0
    [PHY] rxdataF[0] 0x7fec442fd040 for RU 0
    [PHY] [INIT] nr_phy_init_RU() ru->num_gNB:1
    [PHY] init feptx thread 0
    [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 successfully loaded

    [BRF] sampling_rate 61440000, num_buffers 128, buffer_size 2048, num transfer 16, timeout_ms (rx 0, tx 0)
    [PHY] init feptx thread 1
    wait RUs
    [PHY] Waiting for RUs to be configured … RC.ru_mask:01
    [BRF] init dev 0x7fec24003060
    [BRF] Device operates at max speed
    [BRF] set RX frequency to 3619080000
    [BRF] set RX sample rate to 61440000, 61440000
    [BRF] set RX bandwidth to 80000000, 56000000
    cal 0: freq 2300000000.000000, offset 53.500000, diff 1319080000.000000
    cal 1: freq 1880000000.000000, offset 57.000000, diff 1739080000.000000
    cal 2: freq 816000000.000000, offset 73.000000, diff 2803080000.000000
    [BRF] set RX gain to 60 (53)
    [BRF] set TX Frequency to 3619080000
    [BRF] set TX sampling rate to 61440000
    [BRF] set TX bandwidth to 80000000
    [BRF] set the TX gain to 0
    [BRF] configured TX sync interface
    [BRF] configured Rx sync interface
    [BRF] TX module enabled
    [WARNING @ host/libraries/libbladeRF/src/board/bladerf2/common.c:351] The total sample throughput for the 2 active channels, 122.88 Msps, is greater than the recommended maximum sample throughput, 80 Msps. You may experience dropped samples unless the sample rate is reduced, or some channels are deactivated.
    [BRF] RX module enabled
    BLADERF: Initializing openair0_device
    [HW] [RAU] has loaded BLADERF device.
    setup_RU_buffers: frame_parms = 0x7fec4c5c4010
    [PHY] RU 0 Setting N_TA_offset to 800 samples (factor 2.000000, UL Freq 3600000, N_RB 106, mu 1)
    [PHY] Signaling main thread that RU 0 is ready, sf_ahead 3
    waiting for sync (ru_thread,-1/0x55f802ee82b4,0x55f803c984e0,0x55f803aed9c0)
    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]:0x7fec5072c010
    [PHY] [gNB 0] phy_init_nr_gNB() About to wait for gNB to be configured
    [LIBCONFIG] loader.dfts: 2/2 parameters successfully set, (1 to default value)
    [LOADER] library libdfts.so successfully loaded
    [LIBCONFIG] loader.ldpc: 2/2 parameters successfully set, (1 to default value)
    [LOADER] library libldpc.so successfully loaded
    [PHY] Initialise nr transport
    [PHY] Allocating Transport Channel Buffers for PUCCH 0/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 1/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 2/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 3/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 4/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 5/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 6/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 7/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 8/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 9/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 10/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 11/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 12/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 13/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 14/16
    [PHY] Allocating Transport Channel Buffers for PUCCH 15/16
    [PHY] Allocating Transport Channel Buffer for ULSCH 0/8
    [PHY] Allocating Transport Channel Buffer for ULSCH 1/8
    [PHY] Allocating Transport Channel Buffer for ULSCH 2/8
    [PHY] Allocating Transport Channel Buffer for ULSCH 3/8
    [PHY] Allocating Transport Channel Buffer for ULSCH 4/8
    [PHY] Allocating Transport Channel Buffer for ULSCH 5/8
    [PHY] Allocating Transport Channel Buffer for ULSCH 6/8
    [PHY] Allocating Transport Channel Buffer for ULSCH 7/8
    [PHY] Mapping RX ports from 1 RUs to gNB 0
    [PHY] gNB->num_RU:1
    [PHY] Attaching RU 0 antenna 0 to gNB antenna 0
    [PHY] Number of threads requested in config file: 4, Number of threads available on this machine: 16
    create a thread for core -1
    create a thread for core -1
    create a thread for core -1
    create a thread for core -1
    [PHY] Allocating Transport Channel Buffers for DLSCH 0/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 1/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 2/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 3/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 4/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 5/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 6/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 7/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 0/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 1/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 2/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 3/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 4/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 5/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 6/8
    [PHY] Allocating Transport Channel Buffers for DLSCH 7/8
    waiting for sync (L1_stats_thread,-1/0x55f802ee82b4,0x55f803c984e0,0x55f803aed9c0)
    ALL RUs ready – ALL gNBs ready
    Sending sync to all threads
    About to call end_configmodule() from main() /home/artemis/openairinterface_develop/openairinterface5g/executables/nr-softmodem.c:818
    Called end_configmodule() from main() /home/artemis/openairinterface_develop/openairinterface5g/executables/nr-softmodem.c:823
    TYPE TO TERMINATE
    Entering ITTI signals handler
    got sync (ru_thread)
    got sync (L1_stats_thread)
    [WARNING @ host/libraries/libbladeRF/src/board/bladerf2/common.c:351] The total sample throughput for the 2 active channels, 122.88 Msps, is greater than the recommended maximum sample throughput, 80 Msps. You may experience dropped samples unless the sample rate is reduced, or some channels are deactivated.
    [PHY] RU 0 rf device ready
    RX overrun (1) is detected. t=153987Got 18796 samples. nsymps 30720
    RX bad samples count, wanted 30720, got 18796
    RX overrun (2) is detected. t=215006Got 508 samples. nsymps 30720
    RX bad samples count, wanted 30720, got 508
    [BRF] brf_error: Requested timestamp is in the past

    Regards,
    íñigo

    1. Hi,
      We don’t use bladeRF, nevertheless it is almost a USRP B210
      AD9361 can do 5G NR 40MHz with OAI if you pass parameter ‘-E’ for 3/4 sampling
      Regards,
      Laurent

      1. Hello again,

        sorry for bothering again. Even though the behaviour of the gNB seems a little random, it works!

        Now I have another problem, whenever want to connect a UE to that gNB it is the MME who crashes. I would really appreciate if you could have a look and try to help me. The error I am receiving, when the usual connection protocol is taking place, is the next one:

        [0m[0;37m001814 00068:902612 7F261FFFF700 TRACE MME-AP /mme_app/mme_app_apn_selection.c:0051 Entering mme_app_select_apn()
        [0m[0;32m001815 00068:902635 7F261FFFF700 DEBUG MME-AP /mme_app/mme_app_apn_selection.c:0101 Selected APN oai.openair5G.eur for UE 901700000052122
        [0m[0;37m001816 00068:902656 7F261FFFF700 TRACE MME-AP /mme_app/mme_app_apn_selection.c:0104 Leaving mme_app_select_apn() (rc=0)
        [0m[0;32m001817 00068:902677 7F261FFFF700 DEBUG NAS-ES e/src/src/nas/esm/sap/esm_recv.c:0345 ESM-SAP – No ESM procedure for UE 1 exists. Proceeding with handling the new ESM request (pti=47) for PDN connectivity.
        [0m[0;37m001818 00068:902699 7F261FFFF700 TRACE MME-AP mme_app/mme_app_esm_procedures.c:0081 Entering mme_app_nas_esm_create_pdn_connectivity_procedure()
        [0m[0;37m001819 00068:902720 7F261FFFF700 TRACE MME-AP mme_app/mme_app_esm_procedures.c:0130 Leaving mme_app_nas_esm_create_pdn_connectivity_procedure() (rc=139799105116880)
        [0mObtained 8 stack frames.
        /snap/oai-mme/18/mme/mme(display_backtrace+0x28) [0x55b7fa637f25]
        /snap/oai-mme/18/mme/mme(copy_protocol_configuration_options+0x11a) [0x55b7fa644f9a]
        /snap/oai-mme/18/mme/mme(esm_recv_pdn_connectivity_request+0xbe4) [0x55b7fa6273e4]
        /snap/oai-mme/18/mme/mme(_esm_sap_recv+0x2ca) [0x55b7fa5eaba4]
        /snap/oai-mme/18/mme/mme(nas_esm_proc_data_ind+0x7e) [0x55b7fa5e88ab]
        /snap/oai-mme/18/mme/mme(+0x115691) [0x55b7fa515691]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f262b9cb6db]
        /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f2629b8371f]

        Best regard.

  39. Hello Laurent,

    It has been a while since you uploaded this guide, actually I was the first to ask. This time I modified the OAI to run ONCE in SA mode just to create IQ_files and then exit out gracefully.

    However, I thought I had exited out the main function gracefully when now, I want to create different IQ_files, so I put that oai main function inside a loop, obviously it is inside a API wrapper that calls that “main nr-softmodem” function, as a result I am stock at this place when it is called for second time:


    [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.rfsimulator: 2/2 parameters successfully set, (1 to default value)
    [LOADER] library librfsimulator.so has been loaded previously, reloading function pointers
    [LOADER] library librfsimulator.so successfully loaded
    [LIBCONFIG] rfsimulator: 8/8 parameters successfully set, (4 to default value)
    [New Thread 0x7fffe92ad700 (LWP 5781)]
    [Thread 0x7fffe92ad700 (LWP 5781) exited]
    [New Thread 0x7fffe92ad700 (LWP 5786)]
    [Thread 0x7fffe92ad700 (LWP 5786) exited]
    [PHY] init feptx thread in nr_init 0
    [HW] rfsimulator: will save written IQ samples in /tmp/IQ_file.dat
    [HW] rfsimulator: running as server waiting opposite rfsimulators to connect
    [HW] [RAU] has loaded RFSIMULATOR device.
    setup_RU_buffers: frame_parms = 0x555555ab8620
    [PHY] RU 0 Setting N_TA_offset to 800 samples (factor 2.000000, UL Freq 2574270, N_RB 106, mu 1)
    [PHY] Signaling main thread that RU 0 is ready
    waiting for sync (ru_thread,0/0x7ffff6ad7b98,0x7ffff7752a80,0x7ffff7638920)
    got sync (ru_thread)

    Thread 23 “thread_FH” received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7fffea7fc700 (LWP 5776)]
    __GI___pthread_mutex_lock (mutex=0x10) at ../nptl/pthread_mutex_lock.c:67
    67 ../nptl/pthread_mutex_lock.c: No such file or directory.
    (gdb) bt
    #0 __GI___pthread_mutex_lock (mutex=0x10) at ../nptl/pthread_mutex_lock.c:67
    #1 0x00007ffff4b4876d in pushNotifiedFIFO (msg=, nf=0x0) at /home/wisp/OAI_repo/oai/gNB/common/utils/threadPool/thread-pool.h:132
    #2 ru_thread (param=0x5555558b5bd0) at /home/wisp/OAI_repo/oai/gNB/executables/nr-ru.c:1295
    #3 0x00007ffff325a6db in start_thread (arg=0x7fffea7fc700) at pthread_create.c:463
    #4 0x00007ffff39b471f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

    As you can see the pushNotified is giving me lock issues, this is the function in your thread-pool.h header:
    static inline void pushNotifiedFIFO(notifiedFIFO_t *nf, notifiedFIFO_elt_t *msg) {
    mutexlock(nf->lockF); notifF);
    mutexunlock(nf->lockF);
    }

    Could please advise how I can close the FIFO list, so the nr-softmodem can exit and be called X amount of times? (I forgot to mentioned that when the ru_thread finish first time, it deletes all the notified messages or at least it calls the deleteNotifiedFIFO function).

    Maybe based on the gdb messages, you might have a kind of clue about the reason mutexlock is complaining.

    Thanks

    1. Hi,

      There is only initNotifiedFIFO() on purpose, neither posix function to “uninit” the call to pthread_mutex_init()

      To implement your need of “create different IQ_files”, it is better to close/open files in:
      targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
      if ( recPlay != NULL) { // record mode
      // Copy subframes to memory (later dump on a file)

      in this if block, you can write a file and continue

      regards,
      Laurent

      1. Thank you for your prompt response, the thing is we are continuously reconfiguring the gNB to send different MIB and SIB1 at different band locations, get the IQ data in a file and so on.

        Regards,
        Julian

  40. Dear Laurent,

    I am trying to run a NSA setup, but I’m getting the following error from both eNB and gNB.

    Error: signal 11:
    ./ran_build/build/nr-softmodem(signal_handler+0xb8)[0x558b31bb9528]
    /lib/x86_64-linux-gnu/libc.so.6(+0x3ef10)[0x7f0421a94f10]
    [0x558b33cb0c98]
    terminate called after throwing an instance of ‘boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector >’
    what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument
    Linux signal Aborted…
    /home/g-ran/NSA/openairinterface5g-2020.w39/executables/softmodem-common.c:187 signal_handler() Exiting OAI softmodem: softmodem starting exit procedure

    Any suggestion please?

  41. Hello, Laurent
    I use B210 to emulate nrUE and X310 to emulate gNB. When the UE tries to connect to the gNB, the message of PBCH decoding failure appears.I tried expanding the sample drift compensation, but still can’t sync.
    Any suggestion please?

    Regards,
    SongMu.

    The following is some error messages:

    [PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch (mode 6)
    [PHY] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 48632, val = 33364738786 (104 dB) avg 72 dB, ffo 0.000000
    PSS execution duration 143878 microseconds
    [PHY] [UE0] Initial sync : Estimated PSS position 48632, Nid2 0
    [PHY] sync_pos 48632 ssb_offset 48524
    [PHY] Calling sss detection (normal CP)
    Nid2 0 Nid1 0 tot_metric 186427, phase_max 7
    [NR_PHY] ffo_pss 0.000000 (0 Hz), ffo_sss 0.002194 (65 Hz), ffo_pss+ffo_sss 0.002194 (65 Hz)
    [PHY] [UE0] Initial sync: starting PBCH detection (rx_offset 0)
    [NR_RRC] Configuring MAC for first MIB reception
    [PHY] [UE0] Initial sync: pbch decoded sucessfully
    [PHY] TDD Normal prefix: CellId 0 metric 186427, phase 7, pbch 0
    [PHY] [UE0] In synch, rx_offset 45212 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] [UE 0] Measured Carrier Frequency 3619080000 Hz (offset 0 Hz)
    [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 4, carrier off 0 Hz, rxgain 110.000000 (DL 3619080000.000000 Hz, UL 3619080000.000000 Hz)
    Setting USRP TX Freq 3619080000.000000, RX Freq 3619080000.000000
    [PHY] Resynchronizing RX by 45212 samples (mode = 6)
    [PHY] [UE 0] frame 80, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 82, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 84, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 14 samples
    [PHY] [UE 0] frame 86, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -11 samples
    [PHY] [UE 0] frame 88, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 90, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 92, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 94, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 13 samples
    [PHY] [UE 0] frame 96, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 98, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 7 samples
    [PHY] [UE 0] frame 100, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 3 samples
    [PHY] [UE 0] frame 102, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 9 samples
    [PHY] [UE 0] frame 104, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -5 samples
    [PHY] [UE 0] frame 106, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 5 samples
    [PHY] [UE 0] frame 108, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 110, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 112, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 114, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 2 samples
    [PHY] [UE 0] frame 116, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 13 samples
    [PHY] [UE 0] frame 118, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 120, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 5 samples
    [PHY] [UE 0] frame 122, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -8 samples
    [PHY] [UE 0] frame 124, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -7 samples
    [PHY] [UE 0] frame 126, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 11 samples
    [PHY] [UE 0] frame 128, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] ============================================
    [NR_PHY] Harq round stats for Downlink: 0/0/0/0 DLSCH errors: 0
    [NR_PHY] ============================================
    [PHY] [UE 0] frame 130, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -3 samples
    [PHY] [UE 0] frame 132, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 134, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 9 samples
    [PHY] [UE 0] frame 136, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 138, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 10 samples
    [PHY] [UE 0] frame 140, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 142, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 144, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 14 samples
    [PHY] [UE 0] frame 146, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 148, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -5 samples
    [PHY] [UE 0] frame 150, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -12 samples
    [PHY] [UE 0] frame 152, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -6 samples
    [PHY] [UE 0] frame 154, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 156, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -2 samples
    [PHY] [UE 0] frame 158, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 160, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 162, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 4 samples
    [PHY] [UE 0] frame 164, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 4 samples
    [PHY] [UE 0] frame 166, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 168, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 170, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 172, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 14 samples
    [PHY] [UE 0] frame 174, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 176, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 178, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 180, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 182, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -9 samples
    [PHY] [UE 0] frame 184, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -4 samples
    [PHY] [UE 0] frame 186, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -6 samples
    [PHY] [UE 0] frame 188, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 1 samples
    [PHY] [UE 0] frame 190, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 11 samples
    [PHY] [UE 0] frame 192, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] ============================================
    [NR_PHY] Harq round stats for Downlink: 0/0/0/0 DLSCH errors: 0
    [NR_PHY] ============================================
    [NR_PHY] Adjusting frame in time by -2 samples
    [PHY] [UE 0] frame 194, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 6 samples
    [PHY] [UE 0] frame 196, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 14 samples
    [PHY] [UE 0] frame 198, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -11 samples
    [PHY] [UE 0] frame 200, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -11 samples
    [PHY] [UE 0] frame 202, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -5 samples
    [PHY] [UE 0] frame 204, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 8 samples
    [PHY] [UE 0] frame 206, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -10 samples
    [PHY] [UE 0] frame 208, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 210, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 212, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 214, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -8 samples
    [PHY] [UE 0] frame 216, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -13 samples
    [PHY] [UE 0] frame 218, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 220, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 222, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 224, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -6 samples
    [PHY] [UE 0] frame 226, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -3 samples
    [PHY] [UE 0] frame 228, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 230, nr_slot_rx 0, Error decoding PBCH!
    [PHY] DCI false positive. Dropping DCI index 0. Mismatched bits: 190/432. Current DCI threshold: 95
    [NR_PHY] Adjusting frame in time by -10 samples
    [PHY] [UE 0] frame 232, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 234, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 13 samples
    [PHY] [UE 0] frame 236, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -10 samples
    [PHY] [UE 0] frame 238, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -10 samples
    [PHY] [UE 0] frame 240, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 242, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 1 samples
    [PHY] [UE 0] frame 244, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 9 samples
    [PHY] [UE 0] frame 246, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 248, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -7 samples
    [PHY] [UE 0] frame 250, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -4 samples
    [PHY] [UE 0] frame 252, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -1 samples
    [PHY] [UE 0] frame 254, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 256, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] ============================================
    [NR_PHY] Harq round stats for Downlink: 0/0/0/0 DLSCH errors: 0
    [NR_PHY] ============================================
    [NR_PHY] Adjusting frame in time by -1 samples
    [PHY] [UE 0] frame 258, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 260, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -11 samples
    [PHY] [UE 0] frame 262, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 264, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 266, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 268, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 270, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 272, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by -13 samples
    [PHY] [UE 0] frame 274, nr_slot_rx 0, Error decoding PBCH!
    [NR_PHY] Adjusting frame in time by 10 samples
    [PHY] [UE 0] frame 276, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 278, nr_slot_rx 0, Error decoding PBCH!
    [PHY] More that 100 consecutive PBCH errors! Exiting!
    /root/Desktop/openairinterface5g/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c:441 nr_ue_pbch_procedures() Exiting OAI softmodem: More that 100 consecutive PBCH errors! Exiting!

  42. Hello,laurent
    When I was setting up the 5g physical layer I ran into some problems. I use
    B210 to emulate nrUE and X310 to emulate gNB. When the UE tries to connect to
    the gNB, the message of PBCH decoding failure appears. According to the error
    message, it can be seen that the PBCH decoding is successful, but after the
    message “[PHY] Resynchronizing RX by 45212 samples (mode = 6)”, subsequent
    decoding fails due to frame synchronization problems. I tried expanding the
    time drift compensation, but still can’t sync. Is there a solution to this?
    Thanks&Regard.
    The following is my error message:
    [PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch (mode 6)
    [PHY] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 48632, val =
    33364738786 (104 dB) avg 72 dB, ffo 0.000000
    PSS execution duration 143878 microseconds
    [PHY] [UE0] Initial sync : Estimated PSS position 48632, Nid2 0
    [PHY] sync_pos 48632 ssb_offset 48524
    [PHY] Calling sss detection (normal CP)
    Nid2 0 Nid1 0 tot_metric 186427, phase_max 7
    [NR_PHY] ffo_pss 0.000000 (0 Hz), ffo_sss 0.002194 (65 Hz), ffo_pss+ffo_sss
    0.002194 (65 Hz)
    [PHY] [UE0] Initial sync: starting PBCH detection (rx_offset 0)
    [NR_RRC] Configuring MAC for first MIB reception
    [PHY] [UE0] Initial sync: pbch decoded sucessfully
    [PHY] TDD Normal prefix: CellId 0 metric 186427, phase 7, pbch 0
    [PHY] [UE0] In synch, rx_offset 45212 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] [UE 0] Measured Carrier Frequency 3619080000 Hz (offset 0 Hz)
    [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 4, carrier off 0 Hz, rxgain 110.000000 (DL
    3619080000.000000 Hz, UL 3619080000.000000 Hz)
    Setting USRP TX Freq 3619080000.000000, RX Freq 3619080000.000000
    [PHY] Resynchronizing RX by 45212 samples (mode = 6)
    [PHY] [UE 0] frame 80, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 82, nr_slot_rx 0, Error decoding PBCH!
    [PHY] [UE 0] frame 84, nr_slot_rx 0, Error decoding PBCH!

  43. Hello,laurent
    When I was setting up the 5g physical layer I ran into some problems. I use B210 to emulate nrUE and X310 to emulate gNB. When the UE tries to connect to the gNB, the message of PBCH decoding failure appears.
    According to the error message, it can be seen that the PBCH decoding is successful, but after the message “[PHY] Resynchronizing RX by 45212 samples (mode = 6)”, subsequent decoding fails due to frame synchronization problems. I tried expanding the time drift compensation, but still can’t sync. Is there a solution to this?
    Thanks&Regard.

    Thanks&Regard.

    1. Hi,
      It can work, but i don’t know the exact issue here.
      Resynchronizing RX by 45212 samples is good: the UE decoded the PSS and SSS
      One first step could be to provide the same external 10MHz reference clock to both B210 and X310

  44. Hi laurent,
    I’m sorry to bother you.I use gNB and UE in SA and noS1 and rfsim mode. When I ping UE on gNB side, it doesn’t work. Could you please give me some suggestions?Thank you very much!Here is my run environment and run commands

    gNB and UE run on different machines on the same LAN.

    gNB commands(192.168.1.1):
    sudo RFSIMULATOR=server ./nr-softmodem –rfsim –noS1 –nokrnmod 1 -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf.bak 2>&1 | sudo tee gnb.log

    UE commands(192.168.1.2):
    sudo RFSIMULATOR=192.168.1.1 ./nr-uesoftmodem -r 106 –numerology 1 –band 78 -C 3619200000 -s 516 –rfsim –phy-test –noS1 –nokrnmod 1 –non-stop –ue-fo-compensation 2>&1 | sudo tee ue.log

    Best regards,
    Kyrie

    1. Dear Kyrie,
      you should put –phy-test on each side
      noS1 mode is not developed in OAI 5G (it skips the GTP-U tunnels because this comes from 4G code, but this is not enough to make noNG mode)
      Regards,
      Laurent

      1. Dear laurent,
        I’m sorry.I found that I wrote the wrong run command.I use gNB and UE in SA and noS1 and rfsim mode.Here are the correct commands.

        gNB commands(192.168.1.1):
        sudo RFSIMULATOR=server ./nr-softmodem –sa –rfsim –noS1 –nokrnmod 1 -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf 2>&1 | sudo tee gnb.log

        UE commands(192.168.1.2):
        sudo RFSIMULATOR=192.168.1.1 ./nr-uesoftmodem -C 3619200000 –band 78 –rfsim -s 516 –sa –noS1 –nokrnmod 1 –non-stop –ue-fo-compensation 2>&1 | sudo tee ue.log
        Regards,
        Kyrie

  45. Dear laurent,
    I want to know whether OAI nrUE can cooperate with OAI gNB and OAI CN to work together in SA mode?Can OAI UE be assigned an IP address?Can OAI nrUE success ping OAI CN?Thanks a lot!
    Regards,
    zx

      1. Dear laurent,
        I tried to connect OAI gNB and OAI CN with OAI UE according to your tutorial, gNB is well connected to the CN, then I wrote the contents of targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf into docker-compose/oai_db.sql.The following is the content that has written.

        INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES
        (‘2089900007487’, ‘5G_AKA’, ‘fec86ba6eb707ed08905757b1bb44b8f’, ‘fec86ba6eb707ed08905757b1bb44b8f’, ‘{\”sqn\”: \”000000000020\”, \”sqnScheme\”: \”NON_TIME_BASED\”, \”lastIndexes\”: {\”ausf\”: 0}}’, ‘8000’, ‘milenage’, ‘C42449363BBAD02B66D16BC975D77CC1’, NULL, NULL, NULL, NULL, ‘2089900007487’);

        but I did not see the IP address of CN and UE when I used ifconfig command.And I see in the oai-smf log ‘Create PDU Session Establishment Reject’.Can you give me some advice? Thank you very much!!
        Best regards,
        zx

        1. Dear Zx,
          if the authentication is sucessful, then the pdu session may fail probably: bad NSSAI or bad DNN
          If you record and decode NGAP protocol in wireshark, you will see clearly the sequence flow
          Best regards,
          Laurent

          1. Dear laurent,
            Thanks for your advice.I successfully solved the problem that the PDU session could not be established.
            Now I deploy OAI gNB and OAI CN on the same machine, OAI UE on another machine, and UE successfully access GNB and CN, AMF registration is successful, PDU session establishment is successful, UE has been assigned 12.1.1.2 IP address.However, I used ping 12.1.1.2 on the CN side but ping failed.Do I need to set up some routing and forwarding rules?Can you give me some advice?Thanks a lot!
            Best regards,
            zx

  46. Hi Mr.Laurent,

    I am successfully able to run gNB and nrUE (on same host) but unable to view the NR DL Scope UE graph when i add the -d option to the UE command line.
    It’s throwing below error.
    ———-
    [PHY] HW: Configuring card 6, sample_rate 61440000.000000, tx/rx num_channels 1/1, duplex_mode TDD
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619080000.000000 Hz, rx_freq 3619080000.000000 Hz
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
    [PHY] HW: Configuring card 7, sample_rate 61440000.000000, tx/rx num_channels 1/1, duplex_mode TDD
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619080000.000000 Hz, rx_freq 3619080000.000000 Hz
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
    [HW] # /dev/cpu_dma_latency set to 2 us
    [CONFIG] loader.nrscope: 1/2 parameters successfully set
    shlib_path libnrscope.so
    [LOADER] library libnrscope.so successfully loaded
    [LOADER] load_module_shlib(): function end_forms not found: /home/innominds/5GTestbed/openairinterface5g/cmake_targets/ran_build/build/libnrscope.so: undefined symbol: end_forms
    [PHY] Intializing UE Threads for instance 0 (0x55983c31d8c0,0x7f12f8776010)…
    No protocol specified
    In fl_initialize() [flresource.c:995]: 5G-UE-scope: Can’t open display :10.0
    In fl_bgn_form() [forms.c:347]: Missing or failed call of fl_initialize()
    ——————-
    Could you please help in fixing it.

    Regards,
    Shaik.

  47. Hi laurent,
    I’m trying to using nrUE connecting to gNB in sa mode, and my sdr is N310, but But I ran into the following problem on nrUE’s side, where nrUE has been cycling detecting PBCH and SIB1.
    ——————————————————
    ———————–nrUE log———————–
    ——————————————————
    [PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch (mode 6)
    [PHY] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 189588, val = 9144019558189 (129 dB) avg 90 dB, ffo 0.003966
    [PHY] [UE0] Initial sync : Estimated PSS position 189588, Nid2 0
    [PHY] sync_pos 189588 ssb_offset 189444
    [PHY] Calling sss detection (normal CP)
    [NR_PHY] ffo_pss 0.003933 (117 Hz), ffo_sss 0.031720 (951 Hz), ffo_pss+ffo_sss 0.035653 (1069 Hz)
    [PHY] [UE0] Initial sync: starting PBCH detection (rx_offset 185056)
    [PHY] [UE0] Initial sync: pbch decoded sucessfully
    [PHY] TDD Normal prefix: CellId 0 metric 523691, phase 4, pbch 0
    [PHY] [UE0] In synch, rx_offset 185028 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] [UE 0] Measured Carrier Frequency 3619200118 Hz (offset 118 Hz)
    [NR_MAC] Got NACK on NR-BCCH-DL-SCH-Message (SIB1 or SI)
    [PHY] [SCHED][UE] Check absolute frequency DL 3619200000.000000, UL 3619200000.000000 (RF card 0, oai_exit 0, channel 0, rx_num_channels 1)
    [PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch (mode 6)
    [PHY] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 189580, val = 9702054151189 (129 dB) avg 90 dB, ffo 0.039330
    [PHY] [UE0] Initial sync : Estimated PSS position 189580, Nid2 0
    [PHY] sync_pos 189580 ssb_offset 189436
    [PHY] Calling sss detection (normal CP)
    [NR_PHY] ffo_pss 0.039300 (1179 Hz), ffo_sss -0.010211 (-306 Hz), ffo_pss+ffo_sss 0.029089 (872 Hz)
    [PHY] [UE0] Initial sync: starting PBCH detection (rx_offset 185028)
    [PHY] [UE0] Initial sync: pbch decoded sucessfully
    [PHY] TDD Normal prefix: CellId 0 metric 561139, phase 8, pbch 0
    [PHY] [UE0] In synch, rx_offset 185020 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] [UE 0] Measured Carrier Frequency 3619201179 Hz (offset 1179 Hz)
    [NR_MAC] Got NACK on NR-BCCH-DL-SCH-Message (SIB1 or SI)
    [PHY] [SCHED][UE] Check absolute frequency DL 3619200000.000000, UL 3619200000.000000 (RF card 0, oai_exit 0, channel 0, rx_num_channels 1)
    ——————————————————
    ———————–nrUE log———————–
    ——————————————————

    Here are my commands to run GNB and UE.
    sudo ./nr-softmodem –sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf.bak

    sudo ./nr-uesoftmodem –sa –band 78 -C 3619200000 –usrp-args “type=n3xx,sdr_addrs=192.168.20.2,clock_source=gpsdo,time_source=gpsdo” -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf

    Have you faced this problem?Thanks!
    Regards,
    Mark

    1. Dear Mark,
      I don’t have two n310, nevertheless i know there is another team in the community that do exactly the same as you.
      I suggest you post on OAI mailing list.
      If you don’t get answer, write me here again, i’ll trigger them
      Regards,
      Laurent

  48. Dear Laurent,

    I was able to attach ue and core network . After connecting data we are able to browse data but after some time gnb was aborted automatically . I got below error anyone help me how to resolve the issue . I was attached gnb config file and log file

    My setup:
    intel i9 with ubuntu 18.04 OS low latency
    USRP B 210
    UE: oneplus 8T

    gnb command:

    sudo ./nr-softmodem -O /home/mobiveil/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf –sa -E –continuous-tx

    [PDCP] discard NR PDU rcvd_count=22243
    [PDCP] discard NR PDU rcvd_count=22244
    [PDCP] discard NR PDU rcvd_count=22265
    [NR_MAC] Frame.Slot 640.0
    UE ID 0 RNTI 9696 (1/1) PH 15 dB PCMAX 11 dBm, average RSRP 0 (0 meas)
    UE 0: dlsch_rounds 60978/6412/127/11, dlsch_errors 8, pucch0_DTX 6553, BLER 0.11948 MCS 6
    UE 0: dlsch_total_bytes 212641667
    UE 0: ulsch_rounds 115717/7481/2011/520, ulsch_DTX 977, ulsch_errors 81
    UE 0: ulsch_total_bytes_scheduled 16180079, ulsch_total_bytes_received 16124533
    UE 0: LCID 1: 500 bytes TX
    UE 0: LCID 4: 210314193 bytes TX
    UE 0: LCID 4: 3642759 bytes RX

    [NR_PHY] Number of bad PUCCH received: 5349
    [NR_PHY] [gNB 0][RAPROC] Frame 641, slot 19 Initiating RA procedure with preamble 52, energy 22.7 dB (I0 79, thres 120), delay 16 start symbol 0 freq index 0
    [NR_PHY] [gNB 0][RAPROC] Frame 641, slot 19 Initiating RA procedure with preamble 56, energy 23.5 dB (I0 96, thres 120), delay 3 start symbol 4 freq index 0
    [MAC] UL_info[Frame 641, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:641/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 641 Activating Msg2 generation in frame 642, slot 7 using RA rnti 10b SSB index 0 RA index 0
    [MAC] UL_info[Frame 642, Slot 0] Calling initiate_ra_proc RACH:SFN/SLOT:641/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 641 Activating Msg2 generation in frame 642, slot 7 using RA rnti 10b SSB index 0 RA index 1
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 642, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 2
    [NR_MAC] [gNB] Generate RAR MAC PDU frame 642 slot 7 preamble index 56 TA command 3
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 642, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 2

    Assertion (!vrb_map_UL[i + ra->msg3_first_rb + ra->msg3_bwp_start]) failed!
    In nr_add_msg3() /home/mobiveil/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c:1133
    RB 8 in 642.17 is already taken, cannot allocate Msg3!

    Exiting execution
    Aborted

    1. Dear Sivanesh,
      I think it is a known bug in OAI.
      I will retry oppo phones next week.
      You should also retry with yesterday develop version, we fixed a lot of bugs in this new version, the connection is much more stable.
      Regards,
      Laurent

      1. Dear Laurent,
        I am using below commit

        CN : commit ID 212f92fc6a2fb82b5df1e8f4ef20075e75acefb3

        gNB: commit ID 57d1b22ca4296ba3e92a990ad41432e895f83ceb

        Which commit i need to use please suggest me still i am facing same issue

        1. for sure, your trace is a gNB issue, not CN
          I would suggest to take the latest develop branch commit
          This branch should be always having the latest stable, tested version

          I checked better
          this bug is not fixed, nevertheless you reach it because you had many errors before
          (Number of bad PUCCH received: 5349)

          You have to make better UL radio link
          one possibility:
          change the parameter in gNB config file:
          pucch0_dtx_threshold = 60;

          to force the UE to emit more RF power

          1. Dear Laurent,

            I was changed pucch0_dtx_threshold = 60; in gnb config file . still i am getting same error. Please advice me any-other parameters need to change in gnb file

            Regards,
            Sivaneshkumar K

        1. Hi,
          I tested oppo can see the network and send RACH with new version of program_uicc
          Regards,
          Laurent

  49. Hi Mr.Laurent,

    I have 5G NR SA setup working over the air with 2 B210 board, and I have few issue:
    (Source code at develop branch)
    1. gNB always receives a lot of RACH while no UE is turned on.
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_PHY] [gNB 0][RAPROC] Frame 175, slot 19 Initiating RA procedure with preamble 28, energy 48.0 dB (I0 353, thres 120), delay 0 start symbol 0 freq index 0
    [MAC] UL_info[Frame 175, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:175/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 175 Activating Msg2 generation in frame 176, slot 7 using RA rnti 10b SSB index 0 RA index 0
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 176, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 2
    [NR_MAC] [gNB] Generate RAR MAC PDU frame 176 slot 7 preamble index 28 TA command 0
    [NR_MAC] Random Access 0 Msg3 CRC did not pass)
    [NR_MAC] [gNB 0][RAPROC] Frame 177, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (177,17)
    [NR_MAC] Random Access 0 Msg3 CRC did not pass)
    [NR_MAC] [gNB 0][RAPROC] Frame 178, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (178,17)
    [NR_MAC] Random Access 0 Msg3 CRC did not pass)
    [NR_MAC] [gNB 0][RAPROC] Frame 179, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (179,17)
    [NR_MAC] Random Access 0 failed at state 2 (Reached msg3 max harq rounds)
    [NR_MAC] to remove in mac rnti_to_remove[0] = 0x16a8
    [NR_MAC] handle_nr_ul_harq(): unknown RNTI 0x16a8 in PUSCH
    [NR_PHY] to remove rnti 0x16a8

    2. nrUE is looped in sync
    [PHY] [SCHED][UE] Check absolute frequency DL 3619200000.000000, UL 3619200000.000000 (RF card 0, oai_exit 0, channel 0, rx_num_channels 1)
    [PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch (mode 6)
    [PHY] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 85416, val = 100551789 (79 dB) avg 61 dB, ffo 0.000000
    PSS execution duration 24520 microseconds
    [PHY] [UE0] Initial sync : Estimated PSS position 85416, Nid2 2
    [PHY] sync_pos 85416 ssb_offset 85380
    [PHY] Calling sss detection (normal CP)
    [PHY] TDD Normal prefix: CellId 5 metric 1861, phase 15, pbch -1
    [PHY] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 23772, val = 160695545 (82 dB) avg 62 dB, ffo 0.000000
    PSS execution duration 26602 microseconds
    [PHY] [UE0] Initial sync : Estimated PSS position 23772, Nid2 0
    [PHY] sync_pos 23772 ssb_offset 23736
    [PHY] Calling sss detection (normal CP)
    [PHY] TDD Normal prefix: CellId 177 metric 4845, phase 15, pbch -1
    [PHY] [UE0] Initial sync : Estimated power: 0 dB
    [PHY] [SCHED][UE] Check absolute frequency DL 3619200000.000000, UL 3619200000.000000 (RF card 0, oai_exit 0, channel 0, rx_num_channels 1)
    [PHY] Starting sync detection

    3. When I turn on my phone (Iphone 12 pro max and Xiaomi MI 10T), The phone can’t find the network.

    This below is run command:
    gNB: ./cmake_targets/ran_build/build/nr-softmodem -O ci-scripts/conf_files/gnb.sa.band78.fr1.24PRB.usrpb210.conf –sa
    UE: ./ran_build/build/nr-uesoftmodem -r 24 –numerology 1 –band 78 -C 3619200000 -s 516 –sa

    Can you give me some suggestions? Thank you very much!

    1. Dear Daniel,

      Receive ghost RACH: this is possible in 3GPP spec, if you have many, you need to reduce the Rx noise (typically reduce the Rx LNA gain)

      Initial sync : Estimated power: 0 dB => it seems your UE doesn’t detect any energy

      Commercial UEs: when UEs can’t find the network in network scanning procedure, the most frequent problem is the UE are locked on not published configuration
      Huawei, Quectel phones are not locked
      Apple: i never tried, but Apple is maybe at the top of hidden behavior companies
      Xiaomi: i have not managed also to connect
      Oppo: with our SIM and our latest tool “program_uicc”, we can see the network

      This last example “oppo” shows the kind of difficulty: we were not setting in the SIM the operator controlled list of PLMN with access technologies explicitly to 5G SA + the SIM IMSI
      in this case, Oppo doesn’t display the 5G network in scanning (unlogical, but it is the Oppo firmware)

      Regards,
      Laurent

  50. Dear all,
    we have problem with running OAI 5G SA, we using N310 and Quectel UE.
    gNodeB not receiving SIB1 from UE.
    Do you met that problem? Some ideas? 🙂
    We tested with RSRP ~ 60dBm and 80dBm so signal looks good on UE side.

    gNodeB
    sudo ./nr-softmodem -O gnb.band78.sa.fr1.106PRB.usrpn310_208_93_cell_1.conf –sa –threadIQ 3 –threadOddSubframe 1 –threadEvenSubframe 2

    [0m[0m[NR_PHY] Number of bad PUCCH received: 0
    [0m[0m[NR_MAC] Frame.Slot 256.0
    (etc.)

    UE
    14:32:26.154 02:04:34.698 <— BCCH:BCH 5GNR 5GNR MasterInformationBlock
    14:32:26.263 02:04:34.759 UL 5GMM vF40 5GNR Registration request
    14:32:26.301 02:04:34.795 —> UL CCCH vF90 5GNR rrcSetupRequest
    14:32:26.301 02:04:34.795 5GNR RACH 5GNR 5GNR MAC RACH Trigger – CONNECTION_REQUEST
    14:32:26.384 02:04:34.883 5GNR RACH 5GNR 5GNR MAC RACH Attempt – FAILURE_MSG2_RA_TIMER_EXP

  51. Dear Laurent

    While setup 5G SA
    SDR USRP B210
    i configure imsi value in opencells sim.

    After checking the logs it seems that —
    UE, trying do RACH acces to the gNB, gNB sends Msg2, but never receives Msg3 from the UE.

    I’m not able to figure out why, there are multiple possible causes if anyone can advise please ?

    got sync (ru_thread)
    got sync (L1_stats_thread)
    TYPE TO TERMINATE
    Entering ITTI signals handler
    [PHY] RU 0 rf device ready
    sleep…
    sleep…
    sleep…
    sleep…
    sleep…
    sleep…
    sleep…
    sleep…
    sleep…
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_MAC] Frame.Slot 128.0
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_MAC] Frame.Slot 256.0
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_MAC] Frame.Slot 384.0
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_MAC] Frame.Slot 512.0
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_MAC] Frame.Slot 640.0
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_MAC] Frame.Slot 768.0
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_MAC] Frame.Slot 896.0
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_MAC] Frame.Slot 0.0
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_MAC] Frame.Slot 128.0
    [NR_PHY] Number of bad PUCCH received: 0
    [NR_MAC] Frame.Slot 256.0

    regards
    Sharique

    1. Dear Sharique,
      It seems you have no RACH from this trace.
      Why do you think the RACH is sent ?
      Regards,
      Laurent

  52. Hi Laurent,

    since this blog helped already a lot I thought I would put this question here. I have installed the OAI-RAN and the OAI-Core and I already managed to send bytes between my both PCs using Ettus B210. However after stopping the RAN at the UE and trying it again, I only get NACK’s. This is my output of my command at the UE-RAN right now.

    If you have any idea where the error could be or where I should search, please let me know.

    Grettings
    Nicolas

    [Nicolas@SDR-UE]$ sudo UHD_IMAGES_DIR=/usr/share/uhd/images ./nr-uesoftmodem -r 106 –numerology 1 –band 78 -C 3619200000 -s 516 –sa -E
    Calling sched_setscheduler(79)
    CMDLINE: “./nr-uesoftmodem” “-r” “106” “–numerology” “1” “–band” “78” “-C” “3619200000” “-s” “516” “–sa” “-E”
    [CONFIG] get parameters from cmdline , debug flags: 0x00400000
    [CONFIG] log_config: 2/3 parameters successfully set
    [CONFIG] log_config: 55/55 parameters successfully set
    [CONFIG] log_config: 55/55 parameters successfully set
    [CONFIG] log_config: 16/16 parameters successfully set
    [CONFIG] log_config: 16/16 parameters successfully set
    log init done
    [CONFIG] (root): 29/33 parameters successfully set
    [CONFIG] (root): 4/5 parameters successfully set
    [ENB_APP] nfapi running mode: MONOLITHIC
    [CONFIG] TTracer: 4/4 parameters successfully set
    create a thread for core -1
    create a thread for core -1
    CPU Freq is 3.400064
    [ITTI] Starting itti queue: TASK_UNKNOWN as task 0
    [ITTI] Starting itti queue: TASK_TIMER as task 1
    [ITTI] Starting itti queue: TASK_L2L1 as task 2
    [ITTI] Starting itti queue: TASK_BM as task 3
    [ITTI] Starting itti queue: TASK_PHY_ENB as task 4
    [ITTI] Starting itti queue: TASK_MAC_ENB as task 5
    [ITTI] Starting itti queue: TASK_RLC_ENB as task 6
    [ITTI] Starting itti queue: TASK_RRC_ENB_NB_IoT as task 7
    [ITTI] Starting itti queue: TASK_PDCP_ENB as task 8
    [ITTI] Starting itti queue: TASK_DATA_FORWARDING as task 9
    [ITTI] Starting itti queue: TASK_END_MARKER as task 10
    [ITTI] Starting itti queue: TASK_RRC_ENB as task 11
    [ITTI] Starting itti queue: TASK_RRC_GNB as task 12
    [ITTI] Starting itti queue: TASK_RAL_ENB as task 13
    [ITTI] Starting itti queue: TASK_S1AP as task 14
    [ITTI] Starting itti queue: TASK_NGAP as task 15
    [ITTI] Starting itti queue: TASK_X2AP as task 16
    [ITTI] Starting itti queue: TASK_M2AP_ENB as task 17
    [ITTI] Starting itti queue: TASK_M2AP_MCE as task 18
    [ITTI] Starting itti queue: TASK_M3AP as task 19
    [ITTI] Starting itti queue: TASK_M3AP_MME as task 20
    [ITTI] Starting itti queue: TASK_M3AP_MCE as task 21
    [ITTI] Starting itti queue: TASK_SCTP as task 22
    [ITTI] Starting itti queue: TASK_ENB_APP as task 23
    [ITTI] Starting itti queue: TASK_GNB_APP as task 24
    [ITTI] Starting itti queue: TASK_MCE_APP as task 25
    [ITTI] Starting itti queue: TASK_MME_APP as task 26
    [ITTI] Starting itti queue: TASK_FLEXRAN_AGENT as task 27
    [ITTI] Starting itti queue: TASK_PHY_UE as task 28
    [ITTI] Starting itti queue: TASK_MAC_UE as task 29
    [ITTI] Starting itti queue: TASK_RLC_UE as task 30
    [ITTI] Starting itti queue: TASK_PDCP_UE as task 31
    [ITTI] Starting itti queue: TASK_RRC_UE as task 32
    [ITTI] Starting itti queue: TASK_RRC_NRUE as task 33
    [ITTI] Starting itti queue: TASK_NAS_UE as task 34
    [ITTI] Starting itti queue: TASK_RAL_UE as task 35
    [ITTI] Starting itti queue: TASK_GTPV1_U as task 36
    [ITTI] Starting itti queue: TASK_CU_F1 as task 37
    [ITTI] Starting itti queue: TASK_DU_F1 as task 38
    [ITTI] Starting itti queue: TASK_RRC_UE_SIM as task 39
    [ITTI] Starting itti queue: TASK_RRC_GNB_SIM as task 40
    [ITTI] Starting itti queue: TASK_RRC_NSA_UE as task 41
    [ITTI] Starting itti queue: TASK_RRC_NSA_NRUE as task 42
    [ITTI] Starting itti queue: TASK_NAS_NRUE as task 43
    [CONFIG] opt: 3/3 parameters successfully set
    [OPT] OPT disabled
    [CONFIG] loader: 2/2 parameters successfully set
    [CONFIG] loader.ldpc: 1/2 parameters successfully set
    shlib_path libldpc.so
    [LOADER] library libldpc.so successfully loaded
    [HW] Version: Branch: develop Abrev. Hash: 4c4cbc963b Date: Fri Apr 22 12:28:09 2022 +0200
    [NR_MAC] [UE0] Applying default macMainConfig
    [MAC] Running without CellGroupConfig
    [PDCP] pdcp init,usegtp
    [CONFIG] (root): 24/24 parameters successfully set
    [PHY] Set UE mode 6, UE_fo_compensation 0, UE_scan_carrier 0, UE_no_timing_correction 0
    , do_prb_interpolation 0
    [PHY] Set UE nb_rx_antenna 1, nb_tx_antenna 1, threequarter_fs 1, ssb_start_subcarrier 516
    DL frequency 3619200000: band 48, UL frequency 3619200000
    [PHY] SA init parameters. DL freq 3619200000 UL offset 0 SSB numerology 1 N_RB_DL 106
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[23].band = 48)
    [NR_MAC] NR band 48, duplex mode TDD, duplex spacing = 0 KHz
    [PHY] Init: N_RB_DL 106, first_carrier_offset 900, nb_prefix_samples 108,nb_prefix_samples0 132
    [PHY] Doing symbol rotation calculation for gNB TX/RX, f0 3619200000.000000 Hz, Nsymb 28
    [PHY] Symbol rotation 0/28 => (-32767,-1)
    [PHY] Symbol rotation 1/28 => tl 0.000036 (32767,-1) (0.000000)
    [PHY] Symbol rotation 2/28 => tl 0.000072 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 3/28 => tl 0.000108 (32767,0) (0.000000)
    [PHY] Symbol rotation 4/28 => tl 0.000143 (-32767,0) (0.500000)
    [PHY] Symbol rotation 5/28 => tl 0.000179 (32767,-1) (0.000000)
    [PHY] Symbol rotation 6/28 => tl 0.000215 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 7/28 => tl 0.000250 (32767,0) (0.000000)
    [PHY] Symbol rotation 8/28 => tl 0.000286 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 9/28 => tl 0.000322 (32767,0) (1.000000)
    [PHY] Symbol rotation 10/28 => tl 0.000357 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 11/28 => tl 0.000393 (32767,0) (1.000000)
    [PHY] Symbol rotation 12/28 => tl 0.000429 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 13/28 => tl 0.000464 (32767,0) (1.000000)
    [PHY] Symbol rotation 14/28 => tl 0.000500 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 15/28 => tl 0.000536 (32767,0) (1.000000)
    [PHY] Symbol rotation 16/28 => tl 0.000572 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 17/28 => tl 0.000608 (32767,0) (1.000000)
    [PHY] Symbol rotation 18/28 => tl 0.000643 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 19/28 => tl 0.000679 (32767,0) (1.000000)
    [PHY] Symbol rotation 20/28 => tl 0.000715 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 21/28 => tl 0.000750 (32766,0) (1.000000)
    [PHY] Symbol rotation 22/28 => tl 0.000786 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 23/28 => tl 0.000822 (32766,0) (1.000000)
    [PHY] Symbol rotation 24/28 => tl 0.000857 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 25/28 => tl 0.000893 (32766,0) (1.000000)
    [PHY] Symbol rotation 26/28 => tl 0.000929 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 27/28 => tl 0.000964 (32766,0) (1.000000)
    [PHY] Doing symbol rotation calculation for gNB TX/RX, f0 3619200000.000000 Hz, Nsymb 28
    [PHY] Symbol rotation 0/28 => (-32767,-1)
    [PHY] Symbol rotation 1/28 => tl 0.000036 (32767,-1) (0.000000)
    [PHY] Symbol rotation 2/28 => tl 0.000072 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 3/28 => tl 0.000108 (32767,0) (0.000000)
    [PHY] Symbol rotation 4/28 => tl 0.000143 (-32767,0) (0.500000)
    [PHY] Symbol rotation 5/28 => tl 0.000179 (32767,-1) (0.000000)
    [PHY] Symbol rotation 6/28 => tl 0.000215 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 7/28 => tl 0.000250 (32767,0) (0.000000)
    [PHY] Symbol rotation 8/28 => tl 0.000286 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 9/28 => tl 0.000322 (32767,0) (1.000000)
    [PHY] Symbol rotation 10/28 => tl 0.000357 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 11/28 => tl 0.000393 (32767,0) (1.000000)
    [PHY] Symbol rotation 12/28 => tl 0.000429 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 13/28 => tl 0.000464 (32767,0) (1.000000)
    [PHY] Symbol rotation 14/28 => tl 0.000500 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 15/28 => tl 0.000536 (32767,0) (1.000000)
    [PHY] Symbol rotation 16/28 => tl 0.000572 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 17/28 => tl 0.000608 (32767,0) (1.000000)
    [PHY] Symbol rotation 18/28 => tl 0.000643 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 19/28 => tl 0.000679 (32767,0) (1.000000)
    [PHY] Symbol rotation 20/28 => tl 0.000715 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 21/28 => tl 0.000750 (32766,0) (1.000000)
    [PHY] Symbol rotation 22/28 => tl 0.000786 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 23/28 => tl 0.000822 (32766,0) (1.000000)
    [PHY] Symbol rotation 24/28 => tl 0.000857 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 25/28 => tl 0.000893 (32766,0) (1.000000)
    [PHY] Symbol rotation 26/28 => tl 0.000929 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 27/28 => tl 0.000964 (32766,0) (1.000000)
    [PHY] Timeshift symbol rotation 0 => (32767,0) 0.000000
    [PHY] Timeshift symbol rotation 1 => (32717,1809) -0.055223
    [PHY] Timeshift symbol rotation 2 => (32567,3612) -0.110447
    [PHY] Timeshift symbol rotation 3 => (32318,5404) -0.165670
    [PHY] Timeshift symbol rotation 4 => (31971,7179) -0.220893
    [PHY] Timeshift symbol rotation 5 => (31526,8933) -0.276117
    [PHY] Timeshift symbol rotation 6 => (30985,10659) -0.331340
    [PHY] Timeshift symbol rotation 7 => (30349,12353) -0.386563
    [PHY] Timeshift symbol rotation 8 => (29621,14010) -0.441786
    [PHY] Timeshift symbol rotation 9 => (28803,15623) -0.497010
    [PHY] Initializing UE vars for gNB TXant 1, UE RXant 1
    [CONFIG] loader.dfts: 1/2 parameters successfully set
    shlib_path libdfts.so
    [LOADER] library libdfts.so successfully loaded
    [PHY] Doing symbol rotation calculation for gNB TX/RX, f0 3619200000.000000 Hz, Nsymb 28
    [PHY] Symbol rotation 0/28 => (-32767,-1)
    [PHY] Symbol rotation 1/28 => tl 0.000036 (32767,-1) (0.000000)
    [PHY] Symbol rotation 2/28 => tl 0.000072 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 3/28 => tl 0.000108 (32767,0) (0.000000)
    [PHY] Symbol rotation 4/28 => tl 0.000143 (-32767,0) (0.500000)
    [PHY] Symbol rotation 5/28 => tl 0.000179 (32767,-1) (0.000000)
    [PHY] Symbol rotation 6/28 => tl 0.000215 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 7/28 => tl 0.000250 (32767,0) (0.000000)
    [PHY] Symbol rotation 8/28 => tl 0.000286 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 9/28 => tl 0.000322 (32767,0) (1.000000)
    [PHY] Symbol rotation 10/28 => tl 0.000357 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 11/28 => tl 0.000393 (32767,0) (1.000000)
    [PHY] Symbol rotation 12/28 => tl 0.000429 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 13/28 => tl 0.000464 (32767,0) (1.000000)
    [PHY] Symbol rotation 14/28 => tl 0.000500 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 15/28 => tl 0.000536 (32767,0) (1.000000)
    [PHY] Symbol rotation 16/28 => tl 0.000572 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 17/28 => tl 0.000608 (32767,0) (1.000000)
    [PHY] Symbol rotation 18/28 => tl 0.000643 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 19/28 => tl 0.000679 (32767,0) (1.000000)
    [PHY] Symbol rotation 20/28 => tl 0.000715 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 21/28 => tl 0.000750 (32766,0) (1.000000)
    [PHY] Symbol rotation 22/28 => tl 0.000786 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 23/28 => tl 0.000822 (32766,0) (1.000000)
    [PHY] Symbol rotation 24/28 => tl 0.000857 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 25/28 => tl 0.000893 (32766,0) (1.000000)
    [PHY] Symbol rotation 26/28 => tl 0.000929 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 27/28 => tl 0.000964 (32766,0) (1.000000)
    [PHY] Doing symbol rotation calculation for gNB TX/RX, f0 3619200000.000000 Hz, Nsymb 28
    [PHY] Symbol rotation 0/28 => (-32767,-1)
    [PHY] Symbol rotation 1/28 => tl 0.000036 (32767,-1) (0.000000)
    [PHY] Symbol rotation 2/28 => tl 0.000072 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 3/28 => tl 0.000108 (32767,0) (0.000000)
    [PHY] Symbol rotation 4/28 => tl 0.000143 (-32767,0) (0.500000)
    [PHY] Symbol rotation 5/28 => tl 0.000179 (32767,-1) (0.000000)
    [PHY] Symbol rotation 6/28 => tl 0.000215 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 7/28 => tl 0.000250 (32767,0) (0.000000)
    [PHY] Symbol rotation 8/28 => tl 0.000286 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 9/28 => tl 0.000322 (32767,0) (1.000000)
    [PHY] Symbol rotation 10/28 => tl 0.000357 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 11/28 => tl 0.000393 (32767,0) (1.000000)
    [PHY] Symbol rotation 12/28 => tl 0.000429 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 13/28 => tl 0.000464 (32767,0) (1.000000)
    [PHY] Symbol rotation 14/28 => tl 0.000500 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 15/28 => tl 0.000536 (32767,0) (1.000000)
    [PHY] Symbol rotation 16/28 => tl 0.000572 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 17/28 => tl 0.000608 (32767,0) (1.000000)
    [PHY] Symbol rotation 18/28 => tl 0.000643 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 19/28 => tl 0.000679 (32767,0) (1.000000)
    [PHY] Symbol rotation 20/28 => tl 0.000715 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 21/28 => tl 0.000750 (32766,0) (1.000000)
    [PHY] Symbol rotation 22/28 => tl 0.000786 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 23/28 => tl 0.000822 (32766,0) (1.000000)
    [PHY] Symbol rotation 24/28 => tl 0.000857 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 25/28 => tl 0.000893 (32766,0) (1.000000)
    [PHY] Symbol rotation 26/28 => tl 0.000929 (-32767,-1) (0.500000)
    [PHY] Symbol rotation 27/28 => tl 0.000964 (32766,0) (1.000000)
    [PHY] UE 0 Setting N_TA_offset to 600 samples (factor 1.500000, UL Freq 3619200000, N_RB 106, mu 1)
    [PHY] HW: Configuring card 0, sample_rate 46080000.000000, tx/rx num_channels 1/1, duplex_mode TDD
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619200000.000000 Hz, rx_freq 3619200000.000000 Hz
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
    [PHY] HW: Configuring card 1, sample_rate 46080000.000000, tx/rx num_channels 1/1, duplex_mode TDD
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619200000.000000 Hz, rx_freq 3619200000.000000 Hz
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
    [PHY] HW: Configuring card 2, sample_rate 46080000.000000, tx/rx num_channels 1/1, duplex_mode TDD
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619200000.000000 Hz, rx_freq 3619200000.000000 Hz
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
    [PHY] HW: Configuring card 3, sample_rate 46080000.000000, tx/rx num_channels 1/1, duplex_mode TDD
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619200000.000000 Hz, rx_freq 3619200000.000000 Hz
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
    [PHY] HW: Configuring card 4, sample_rate 46080000.000000, tx/rx num_channels 1/1, duplex_mode TDD
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619200000.000000 Hz, rx_freq 3619200000.000000 Hz
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
    [PHY] HW: Configuring card 5, sample_rate 46080000.000000, tx/rx num_channels 1/1, duplex_mode TDD
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619200000.000000 Hz, rx_freq 3619200000.000000 Hz
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
    [PHY] HW: Configuring card 6, sample_rate 46080000.000000, tx/rx num_channels 1/1, duplex_mode TDD
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619200000.000000 Hz, rx_freq 3619200000.000000 Hz
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
    [PHY] HW: Configuring card 7, sample_rate 46080000.000000, tx/rx num_channels 1/1, duplex_mode TDD
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_freq 3619200000.000000 Hz, rx_freq 3619200000.000000 Hz
    [PHY] HW: Configuring channel 0 (rf_chain 0): setting tx_gain 0.000000, rx_gain 110.000000
    [HW] # /dev/cpu_dma_latency set to 2 us
    [PHY] Intializing UE Threads for instance 0 (0x55b1b285ef00,0x7f0f6dfc1010)…
    [CONFIG] device.recplay: 8/8 parameters successfully set
    [CONFIG] device: 1/1 parameters successfully set
    [CONFIG] loader.oai_device: 1/2 parameters successfully set
    shlib_path liboai_device.so
    [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 4.1.0.4-release (4.1.0)
    UE threads created by 2398
    TYPE TO TERMINATE
    [NR_RRC] create TASK_RRC_NRUE
    [ITTI] Created Posix thread TASK_RRC_NRUE
    [INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_4.1.0.4-release
    [INFO] [B200] Loading firmware image: /usr/share/uhd/images/usrp_b200_fw.hex…
    [ITTI] Created Posix thread TASK_NAS_NRUE
    [HW] Found USRP b200
    [INFO] [B200] Detected Device: B210
    [INFO] [B200] Loading FPGA image: /usr/share/uhd/images/usrp_b210_fpga.bin…
    [INFO] [B200] Operating over USB 3.
    [INFO] [B200] Detecting internal GPSDO….
    [INFO] [GPS] No GPSDO found
    [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
    [INFO] [B200] Asking for clock rate 46.080000 MHz…
    [INFO] [B200] Actually got clock rate 46.080000 MHz.
    [HW] cal 0: freq 3500000000.000000, offset 44.000000, diff 119200000.000000
    [HW] cal 1: freq 2660000000.000000, offset 49.800000, diff 959200000.000000
    [HW] cal 2: freq 2300000000.000000, offset 51.000000, diff 1319200000.000000
    [HW] cal 3: freq 1880000000.000000, offset 53.000000, diff 1739200000.000000
    [HW] cal 4: freq 816000000.000000, offset 57.000000, diff 2803200000.000000
    [HW] RX Gain 0 110.000000 (44.000000) => 66.000000 (max 76.000000)
    [HW] USRP TX_GAIN:89.75 gain_range:89.75 tx_gain:0.00
    [HW] Actual master clock: 46.080000MHz…
    [HW] Actual clock source internal…
    [HW] Actual time source internal…
    [HW] RF board max packet size 1916, size for 100µs jitter 4608
    [HW] rx_max_num_samps 1916
    [HW] setting rx channel 0
    [HW] RX Channel 0
    [HW] Actual RX sample rate: 46.080000MSps…
    [HW] Actual RX frequency: 3.619200GHz…
    [HW] Actual RX gain: 66.000000…
    [HW] Actual RX bandwidth: 40.000000M…
    [HW] Actual RX antenna: RX2…
    [HW] TX Channel 0
    [HW] Actual TX sample rate: 46.080000MSps…
    [HW] Actual TX frequency: 3.619200GHz…
    [HW] Actual TX gain: 89.750000…
    [HW] Actual TX bandwidth: 40.000000M…
    [HW] Actual TX antenna: TX/RX…
    [HW] Actual TX packet size: 1916
    [HW] Device timestamp: 2.169344…
    [HW] [RRU] has loaded USRP B200 device.
    sleep…
    sleep…
    sleep…
    sleep…
    sleep…
    sleep…
    sleep…
    sleep…
    sleep…
    [PHY] [SCHED][UE] Check absolute frequency DL 3619200000.000000, UL 3619200000.000000 (RF card 0, oai_exit 0, channel 0, rx_num_channels 1)
    [PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch (mode 6)
    [PHY] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 37456, val = 49042026216 (106 dB) avg 69 dB, ffo 0.000000
    PSS execution duration 165397 microseconds
    [PHY] [UE0] Initial sync : Estimated PSS position 37456, Nid2 0
    [PHY] sync_pos 37456 ssb_offset 37348
    [PHY] Calling sss detection (normal CP)
    Nid2 0 Nid1 0 tot_metric 212307, phase_max 14
    [NR_PHY] ffo_pss 0.000000 (0 Hz), ffo_sss -0.070562 (-2116 Hz), ffo_pss+ffo_sss -0.070562 (-2116 Hz)
    [PHY] [UE0] Initial sync: starting PBCH detection (rx_offset 0)
    [NR_RRC] Configuring MAC for first MIB reception
    [PHY] [UE0] Initial sync: pbch decoded sucessfully
    [PHY] TDD Normal prefix: CellId 0 metric 212307, phase 14, pbch 0
    [PHY] [UE0] In synch, rx_offset 34036 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] [UE 0] Measured Carrier Frequency 3619200000 Hz (offset 0 Hz)
    [NR_MAC] Got NACK on NR-BCCH-DL-SCH-Message (SIB1 or SI)
    [PHY] [SCHED][UE] Check absolute frequency DL 3619200000.000000, UL 3619200000.000000 (RF card 0, oai_exit 0, channel 0, rx_num_channels 1)
    [PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch (mode 6)
    [PHY] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 37464, val = 50002585178 (106 dB) avg 70 dB, ffo 0.000000
    PSS execution duration 162929 microseconds
    [PHY] [UE0] Initial sync : Estimated PSS position 37464, Nid2 0
    [PHY] sync_pos 37464 ssb_offset 37356
    [PHY] Calling sss detection (normal CP)
    Nid2 0 Nid1 0 tot_metric 214235, phase_max 14
    [NR_PHY] ffo_pss 0.000000 (0 Hz), ffo_sss -0.071317 (-2139 Hz), ffo_pss+ffo_sss -0.071317 (-2139 Hz)
    [PHY] [UE0] Initial sync: starting PBCH detection (rx_offset 34036)
    [PHY] [UE0] Initial sync: pbch decoded sucessfully
    [PHY] TDD Normal prefix: CellId 0 metric 214235, phase 14, pbch 0
    [PHY] [UE0] In synch, rx_offset 34044 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] [UE 0] Measured Carrier Frequency 3619200000 Hz (offset 0 Hz)
    [NR_MAC] Got NACK on NR-BCCH-DL-SCH-Message (SIB1 or SI)

    1. Hi,
      I would start with rfsim:
      add –rfsim on gNB and UE
      add –rfsimulator.serveraddr server on gNB –rfsimulator.serveraddr on UE line
      if it doesn’t connect we will be sure this is not a radio issue
      if it connects, we will have to understand the radio problem
      Regards,
      Laurent

      1. Dear Laurent,

        I tested the simulation and with the simulation, there is a connection between a UE and the gNB. Since everything is working properly in this case, I assume that there is another problem. I noticed that in the simulation, it says that it successfully decoded the sib1, which it does not say outside of it. I still do not understand how everything worked outside the simulation exactly once in the past, but has not worked since I restarted the UE in order to test if the success was reproducible.

        Maybe I should mention the following; I changed 2 things in that config file:
        1. I put sib1_tda =1 (since i saw that in that blog post and it helped.)
        2. I set the tracking area code to 40960 (since i received an amf setup failure before and after changing this, it worked exactly once).

        I hope you have an idea what I should do.

        Greetings
        Nicolas Schmitt

        1. Hi, Nicolas,
          I’m trying the same as you using two USRP B210 with SA mode.
          I also encounter the same problem that nrUE has been cycling detecting PBCH and SIB1.
          It seems that the UE did not connect to the gNB and the UE did not send any message to gNB.
          And the following error message occurs. [NR_MAC] Got NACK on NR-BCCH-DL-SCH-Message (SIB1 or SI)
          On the gNB side, there is no new message but only repeat
          [NR MAC] Frame.slot 128.0
          [NR MAC] Frame.slot 256.0 …..

          I tried to find the solution but I still get stuck here for a quite long time.
          Have you solved the problem now?
          If yest, could you please give some clue on how to solve this?

          1. Adding this flag “–ue-fo-compensation” to the command I use to run the UE solved the problem for me. I hope it works for you as well

  53. Dear laurent,
    I was rooted redmi note10T 5G mobile . After root also i am not able to see 5G network in my network list.
    I was programed opencells by using uicc V2.5

    I need to change any setting in mobile let me know .please give some idea .
    I am using mcc- 001 and mnc -01 plmn .

    Regards,
    Sivaneshkumar K

  54. Dear Laurent ,

    Thankyou for the update please share me the link to download new version program_uicc.

    Is this version possible to work on redmi note 10 T 5G UE ?

    Regards,
    Sivaneshkumar k

    1. Dear Sivanesh,
      We have not succeeded with Xiaomi
      It seems it is better with band n38 than n78 but i have not tried
      this is not very logical: my xioami supports n78 on the paper spec
      Regards,
      Laurent

  55. Hi Laurent, I am been trying on running 5g NSA follow tutorial
    https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/TESTING_GNB_W_COTS_UE.md
    I am using Ubuntu 18.04, USRP B210, COTS UE: S21 Plus 5G Chip Exynos 2100, S10 5G chip Exynos 990 (Android 12 UI 4.1)
    When UE tried to rach to gNB in 5G NSA , it failed. it seems that UE is not receiving or decoding wrong msg2, then it proceeds to rach again. Fail log repeated at the last part. Could you please have a check on it? Thank you very much.
    I put all logs here if you need: https://drive.google.com/drive/folders/1yR93II12n5PB5hZg8QpRtK5Zc14j-Yhf?usp=sharing

    [0m[32m[NR_RRC] Handling of reconfiguration complete message at RRC gNB is pending
    [0m[34m[MAC] Frame 781 slot 19: Getting PRACH info from index 98 (col 6 1) absoluteFrequencyPointA 640000 mu 1 frame_type 1 start_symbol 0 N_t_slot 3 N_dur 4 N_RA_slot 1 RA_sfn_index 0
    [0m[34m[MAC] get_NCS: indx 13,format0 162, restriced_set_config 0
    [0m[34m[MAC] Scheduling ssb 0 at frame 782 and slot 0
    [0m[34m[MAC] Frame 783 slot 19: Getting PRACH info from index 98 (col 6 1) absoluteFrequencyPointA 640000 mu 1 frame_type 1 start_symbol 0 N_t_slot 3 N_dur 4 N_RA_slot 1 RA_sfn_index 0
    [0m[34m[MAC] get_NCS: indx 13,format0 162, restriced_set_config 0
    [0m[34m[MAC] [gNB 0] Frame 784 : MIB->BCH CC_id 0, Received 3 bytes
    [0m[34m[MAC] Scheduling ssb 0 at frame 784 and slot 0
    [0m[NR_PHY] [gNB 0][RAPROC] Frame 783, slot 19 Initiating RA procedure with preamble 63, energy 48.0 dB (I0 142, thres 150), delay 4 start symbol 0 freq index 0
    [0m[32m[MAC] UL_info[Frame 783, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:783/19
    [0m[34m[MAC] Frame 783 slot 19: Getting PRACH info from index 98 (col 6 1) absoluteFrequencyPointA 640000 mu 1 frame_type 1 start_symbol 0 N_t_slot 3 N_dur 4 N_RA_slot 1 RA_sfn_index 0
    [0m[NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 783 Activating Msg2 generation in frame 784, slot 7 using RA rnti 10b SSB index 0 RA index 0
    [0m[34m[MAC] Coreset : BWPstart 0, BWPsize 106, SCS 1, freq ff, , duration 1,
    [0m[32m[NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 784, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 1
    [0m[34m[MAC] NrofSymbols:5, startSymbol:1, mappingtype:0, dmrs_TypeA_Position:0
    [0m[34m[MAC] l0:4, ld:6,row:4, column:0, addpos:0, maxlen:1
    [0m[34m[MAC] PDSCH DMRS MASK in HEX:4
    [0m[34m[MAC] PUSCH DMRS MASK in HEX:400
    [0m[NR_MAC] [gNB] Generate RAR MAC PDU frame 784 slot 7 preamble index 63 TA command 4
    [0m[NR_MAC] rarh->E = 0x0
    [0m[NR_MAC] rarh->T = 0x1
    [0m[NR_MAC] rarh->RAPID = 0x3f (63)
    [0m[NR_MAC] rar->R = 0x0
    [0m[NR_MAC] rar->TA1 = 0x0
    [0m[NR_MAC] rar->TA2 = 0x4
    [0m[NR_MAC] rar->UL_GRANT_1 = 0x0
    [0m[NR_MAC] rar->UL_GRANT_2 = 0xa
    [0m[NR_MAC] rar->UL_GRANT_3 = 0x82
    [0m[NR_MAC] rar->UL_GRANT_4 = 0x16
    [0m[NR_MAC] rar->TCRNTI_1 = 0x5e
    [0m[NR_MAC] rar->TCRNTI_2 = 0x91
    [0m[NR_MAC] Frame 784, Subframe 7: Setting RA-Msg3 reception for Frame 784 Subframe 17
    [0m[34m[MAC] Frame 785 slot 19: Getting PRACH info from index 98 (col 6 1) absoluteFrequencyPointA 640000 mu 1 frame_type 1 start_symbol 0 N_t_slot 3 N_dur 4 N_RA_slot 1 RA_sfn_index 0
    [0m[34m[MAC] get_NCS: indx 13,format0 162, restriced_set_config 0
    [0m[93m[NR_MAC] Random Access 0 failed at state 2 (NSA msg3 reception failed)
    [0m[93m[NR_MAC] to remove in mac rnti_to_remove[0] = 0x5e91
    [0m[1;31m[NR_MAC] handle_nr_ul_harq(): unknown RNTI 0x5e91 in PUSCH
    [0m[93m[NR_PHY] to remove rnti 0x5e91
    [0m[93m[NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
    [0m[34m[MAC] Scheduling ssb 0 at frame 786 and slot 0
    [0m[NR_PHY] [gNB 0][RAPROC] Frame 785, slot 19 Initiating RA procedure with preamble 63, energy 51.0 dB (I0 173, thres 150), delay 5 start symbol 0 freq index 0
    [0m[32m[MAC] UL_info[Frame 785, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:785/19
    [0m[34m[MAC] Frame 785 slot 19: Getting PRACH info from index 98 (col 6 1) absoluteFrequencyPointA 640000 mu 1 frame_type 1 start_symbol 0 N_t_slot 3 N_dur 4 N_RA_slot 1 RA_sfn_index 0
    [0m[NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 785 Activating Msg2 generation in frame 786, slot 7 using RA rnti 10b SSB index 0 RA index 0
    [0m[34m[MAC] Coreset : BWPstart 0, BWPsize 106, SCS 1, freq ff, , duration 1,
    [0m[32m[NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 786, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 1
    [0m[34m[MAC] NrofSymbols:5, startSymbol:1, mappingtype:0, dmrs_TypeA_Position:0
    [0m[34m[MAC] l0:4, ld:6,row:4, column:0, addpos:0, maxlen:1
    [0m[34m[MAC] PDSCH DMRS MASK in HEX:4
    [0m[34m[MAC] PUSCH DMRS MASK in HEX:400
    [0m[NR_MAC] [gNB] Generate RAR MAC PDU frame 786 slot 7 preamble index 63 TA command 5
    [0m[NR_MAC] rarh->E = 0x0
    [0m[NR_MAC] rarh->T = 0x1
    [0m[NR_MAC] rarh->RAPID = 0x3f (63)
    [0m[NR_MAC] rar->R = 0x0
    [0m[NR_MAC] rar->TA1 = 0x0
    [0m[NR_MAC] rar->TA2 = 0x5
    [0m[NR_MAC] rar->UL_GRANT_1 = 0x0
    [0m[NR_MAC] rar->UL_GRANT_2 = 0xa
    [0m[NR_MAC] rar->UL_GRANT_3 = 0x82
    [0m[NR_MAC] rar->UL_GRANT_4 = 0x16
    [0m[NR_MAC] rar->TCRNTI_1 = 0x5e
    [0m[NR_MAC] rar->TCRNTI_2 = 0x91
    [0m[NR_MAC] Frame 786, Subframe 7: Setting RA-Msg3 reception for Frame 786 Subframe 17
    [0m[34m[MAC] Frame 787 slot 19: Getting PRACH info from index 98 (col 6 1) absoluteFrequencyPointA 640000 mu 1 frame_type 1 start_symbol 0 N_t_slot 3 N_dur 4 N_RA_slot 1 RA_sfn_index 0
    [0m[34m[MAC] get_NCS: indx 13,format0 162, restriced_set_config 0
    [0m[93m[NR_MAC] Random Access 0 failed at state 2 (NSA msg3 reception failed)
    [0m[93m[NR_MAC] to remove in mac rnti_to_remove[0] = 0x5e91
    [0m[1;31m[NR_MAC] handle_nr_ul_harq(): unknown RNTI 0x5e91 in PUSCH
    [0m[93m[NR_PHY] to remove rnti 0x5e91
    [0m[93m[NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
    [0m[34m[MAC] Scheduling ssb 0 at frame 788 and slot 0
    [0m[NR_PHY] [gNB 0][RAPROC] Frame 787, slot 19 Initiating RA procedure with preamble 63, energy 52.7 dB (I0 198, thres 150), delay 5 start symbol 0 freq index 0
    [0m[32m[MAC] UL_info[Frame 787, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:787/19
    [0m[34m[MAC] Frame 787 slot 19: Getting PRACH info from index 98 (col 6 1) absoluteFrequencyPointA 640000 mu 1 frame_type 1 start_symbol 0 N_t_slot 3 N_dur 4 N_RA_slot 1 RA_sfn_index 0
    [0m[NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 787 Activating Msg2 generation in frame 788, slot 7 using RA rnti 10b SSB index 0 RA index 0
    [0m[34m[MAC] Coreset : BWPstart 0, BWPsize 106, SCS 1, freq ff, , duration 1,
    [0m[32m[NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 788, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 1
    [0m[34m[MAC] NrofSymbols:5, startSymbol:1, mappingtype:0, dmrs_TypeA_Position:0
    [0m[34m[MAC] l0:4, ld:6,row:4, column:0, addpos:0, maxlen:1
    [0m[34m[MAC] PDSCH DMRS MASK in HEX:4
    [0m[34m[MAC] PUSCH DMRS MASK in HEX:400
    [0m[NR_MAC] [gNB] Generate RAR MAC PDU frame 788 slot 7 preamble index 63 TA command 5
    [0m[NR_MAC] rarh->E = 0x0
    [0m[NR_MAC] rarh->T = 0x1
    [0m[NR_MAC] rarh->RAPID = 0x3f (63)
    [0m[NR_MAC] rar->R = 0x0
    [0m[NR_MAC] rar->TA1 = 0x0
    [0m[NR_MAC] rar->TA2 = 0x5
    [0m[NR_MAC] rar->UL_GRANT_1 = 0x0
    [0m[NR_MAC] rar->UL_GRANT_2 = 0xa
    [0m[NR_MAC] rar->UL_GRANT_3 = 0x82
    [0m[NR_MAC] rar->UL_GRANT_4 = 0x16
    [0m[NR_MAC] rar->TCRNTI_1 = 0x5e
    [0m[NR_MAC] rar->TCRNTI_2 = 0x91
    [0m[NR_MAC] Frame 788, Subframe 7: Setting RA-Msg3 reception for Frame 788 Subframe 17
    [0m[34m[MAC] Frame 789 slot 19: Getting PRACH info from index 98 (col 6 1) absoluteFrequencyPointA 640000 mu 1 frame_type 1 start_symbol 0 N_t_slot 3 N_dur 4 N_RA_slot 1 RA_sfn_index 0
    [0m[34m[MAC] get_NCS: indx 13,format0 162, restriced_set_config 0
    [0m[93m[NR_MAC] Random Access 0 failed at state 2 (NSA msg3 reception failed)
    [0m[93m[NR_MAC] to remove in mac rnti_to_remove[0] = 0x5e91
    [0m[1;31m[NR_MAC] handle_nr_ul_harq(): unknown RNTI 0x5e91 in PUSCH
    [0m[93m[NR_PHY] to remove rnti 0x5e91
    [0m[93m[NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0
    [0m[34m[MAC] Scheduling ssb 0 at frame 790 and slot 0
    [0m[NR_PHY] [gNB 0][RAPROC] Frame 789, slot 19 Initiating RA procedure with preamble 63, energy 54.0 dB (I0 216, thres 150), delay 5 start symbol 0 freq index 0
    [0m[32m[MAC] UL_info[Frame 789, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:789/19
    [0m[34m[MAC] Frame 789 slot 19: Getting PRACH info from index 98 (col 6 1) absoluteFrequencyPointA 640000 mu 1 frame_type 1 start_symbol 0 N_t_slot 3 N_dur 4 N_RA_slot 1 RA_sfn_index 0
    [0m[NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 789 Activating Msg2 generation in frame 790, slot 7 using RA rnti 10b SSB index 0 RA index 0
    [0m[34m[MAC] Coreset : BWPstart 0, BWPsize 106, SCS 1, freq ff, , duration 1,
    [0m[32m[NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 790, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 1
    [0m[34m[MAC] NrofSymbols:5, startSymbol:1, mappingtype:0, dmrs_TypeA_Position:0
    [0m[34m[MAC] l0:4, ld:6,row:4, column:0, addpos:0, maxlen:1
    [0m[34m[MAC] PDSCH DMRS MASK in HEX:4
    [0m[34m[MAC] PUSCH DMRS MASK in HEX:400
    [0m[NR_MAC] [gNB] Generate RAR MAC PDU frame 790 slot 7 preamble index 63 TA command 5
    [0m[NR_MAC] rarh->E = 0x0
    [0m[NR_MAC] rarh->T = 0x1
    [0m[NR_MAC] rarh->RAPID = 0x3f (63)
    [0m[NR_MAC] rar->R = 0x0
    [0m[NR_MAC] rar->TA1 = 0x0
    [0m[NR_MAC] rar->TA2 = 0x5
    [0m[NR_MAC] rar->UL_GRANT_1 = 0x0
    [0m[NR_MAC] rar->UL_GRANT_2 = 0xa
    [0m[NR_MAC] rar->UL_GRANT_3 = 0x82
    [0m[NR_MAC] rar->UL_GRANT_4 = 0x16
    [0m[NR_MAC] rar->TCRNTI_1 = 0x5e
    [0m[NR_MAC] rar->TCRNTI_2 = 0x91
    [0m[NR_MAC] Frame 790, Subframe 7: Setting RA-Msg3 reception for Frame 790 Subframe 17
    [0m[34m[MAC] Frame 791 slot 19: Getting PRACH info from index 98 (col 6 1) absoluteFrequencyPointA 640000 mu 1 frame_type 1 start_symbol 0 N_t_slot 3 N_dur 4 N_RA_slot 1 RA_sfn_index 0
    [0m[34m[MAC] get_NCS: indx 13,format0 162, restriced_set_config 0
    [0m[93m[NR_MAC] Random Access 0 failed at state 2 (NSA msg3 reception failed)
    [0m[93m[NR_MAC] to remove in mac rnti_to_remove[0] = 0x5e91
    [0m[1;31m[NR_MAC] handle_nr_ul_harq(): unknown RNTI 0x5e91 in PUSCH
    [0m[93m[NR_PHY] to remove rnti 0x5e91
    [0m[93m[NR_PHY] to remove rnti_to_remove_count=1, up_removed=1 down_removed=0 pucch_removed=0

    1. Hi,
      We don’t do NSA.

      Also, i think nobody managed to use Samsung phones in SA mode, if you manage please publish how
      In SA mode, the problem looks to be before RACH: the UE likely is locked on some PLMN table, or a information it doesn’t find in the SIM

      Regards,
      Laurent

    2. Hi,

      We are getting same issue in case of NSA. Kindly let us know if you have solved this issue. It would be helpful for us to debug further.

      Regards
      Mothi N

  56. Hi,Laurent,
    Recently, I met some problems in the process of simulation, and I hope to get your help. I have tried to carry out the simulation of gNB and nrUE on a computer, and they can ping through each other very well. After that, I ran these on USRP B210. The IP of gNB was 10.0.1.1 and that of nrUE was 10.0.1.2, but they could not ping through each other. Have you ever tried to run it on real hardware?Or can you give me some advice on where I should go to solve this problem?
    Regards,
    SongMu

    1. Dear SongMu,
      I think you test in “phy-test” mode.
      This is tested in each OpenAir CI run with USRPs even if I described only the rfsim test.
      Read the log to see if the UE synchonize correctly with the gNB
      If not, I suggest to provide the same 10MHz reference signal , or GPS clock source on the USRPs
      A option can also help in the UE: –ue-fo-compensation
      Regards,
      Laurent

  57. Hello everyone,

    I’m testing OAI’s 5G technology. I am using a One Plus 8T phone and a USRP B210. The branch I am using is 2039-w39. 106 PRB.
    Once I get the mobile phone connected to the network. With accessing the internet I start to get the following messages on the screen:
    “[NR_MAC] Normalized power XXX based on current resources (RBs 4, MCS 6) exceed reported PHR -2147483603 (normalized value)” and the connection becomes very slow.

    The configuration I am using is:
    pdcch_ConfigSIB1 = ({
    controlResourceSetZero = 12;
    searchSpaceZero = 0;
    });
    initialDLBWPlocationAndBandwidth = 28875;
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    initialDLBWPsubcarrierSpacing = 1;

    pusch_TargetSNRx10 = 150;
    pucch_TargetSNRx10 = 200;
    prach_dtx_threshold = 150;
    pucch0_dtx_threshold = 120;
    nb_tx = 1;
    nb_rx = 1;
    att_tx = 12;
    att_rx = 12;
    bands = [78];
    max_pdschReferenceSignalPower = -27;
    max_rxgain = 110;

    # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
    dl_UL_TransmissionPeriodicity = 6;
    nrofDownlinkSlots = 7;
    nrofDownlinkSymbols = 6;
    nrofUplinkSlots = 2;
    nrofUplinkSymbols = 4;

    I tried to increase the MCS value with the argument “–MACRLCs.[0].ul_max_mcs XXX” but I still have the same problem. The MCS does not change.

    I don’t know what parameter could be affecting the performance.

    Thank you very much.
    Best regards.

  58. Greetings Laurent,

    I believe I managed to complete the simulation. However, I do not know how to interpret the results very well. Is there any online material which would help me to figure things out?

    Thanks for the tutorial, it really helped!

    Regards,
    Leonardo

  59. I was running OAI 5g core with usrp b210 and UE ( oneplus 8)

    We are able to connect 5g core to gNB and after that UE was also get attached. On UE, we are able to see 5g signal and ip is also assign to UE but the issue is that, we are not able to access internet.

    On gNB, we can see error :-
    [PDCP] discard NR PDU rcvd_count=99, entity->rx_deliv 101,sdu_in_list 0

    And one more thing UE is disconnected continously after few seconds.

  60. Hi,
    while generating traffic, I have ran following commands in sequential manner

    1. sudo ip netns add oaitun_ue1

    2. sudo ip netns exec oaitun_ue1 bash

    3. ping -I oaitun_ue1 10.0.1.1 -s 1000

    PS: Error : “ping: SO_BINDTODEVICE: Invalid Argument”, could I know how I can solve this?

    1. Hi,
      Likely the device “oaitun_ue1” doesn’t exists because you have not started the process nr-uesoftmodem (or lte if you do 4G) in the same name space
      if you do ‘ip a’ you will list the existing “interfaces”, you will see your ethernet card, your wifi card, … and a virtual interface to the 4G/5G UE called oaitun_ue1

  61. I have successfully run the OpenAI gNB and OpenAI UE and have established a connection between them. I used the following commands to start the software:
    *sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf –noS1 –gNBs.[0].min_rxtxtime 6 –sa -E –continuous-tx –nokrnmod 1 2>&1 | tee GNB.log
    *sudo ./nr-uesoftmodem -r 106 –numerology 1 –band 78 -C 3619200000 –nokrnmod –ue-fo-compensation –sa -E –uicc0.imsi 001010000000001 –noS1 2>&1 | tee UE.log

    However, when I tried to test the connectivity between the gNB and UE, I was unsuccessful. Can someone assist me in troubleshooting this issue?”

      1. Dear Lourent,

        I am still encountering an error even though I have followed the tutorial. Could you please provide me with assistance in resolving this issue?

          1. I am now runnig oai gnb and oai ue with USRPb210 on standalone mode. For the gNb it’s ok but when I deploy the ue using USRPb210 I have got this error :
            [HW] [recv] received 10419 samples out of 23040
            [HW] Time: 3.23147 s
            ERROR_CODE_OVERFLOW (Overflow)

            The command line for ue: sudo ./nr-uesoftmodem -r 106 –numerology 1 –band 78 -C 3619200000 –nokrnmod –ue-fo-compensation –sa -E
            The command line for gNB: sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf –gNBs.[0].min_rxtxtime 6 –sa -E –continuous-tx 2>&1 | tee gnb.log

          2. Dear Yessine,
            ERROR_CODE_OVERFLOW comes from UHD driver: we don’t collect I/Q samples fast enough or the UHD has bugs 😀 or both
            For oai UE, we merged recently a quite big change in RF board interaction
            do you use latest develop branch ?

            Anyway, we will continue to modify this UE in next weeks because we need to handle –gNBs.[0].min_rxtxtime 2 to be compliant with the standard

            Let me know your tests, it is hot topic currently

  62. Dear Lorent,
    Thank you for your response.
    Yes, I used the latest version. But the error still, I am trying now to select the right value for the ue-rxgain and txgain.
    You don’t have any suggetions ?

    1. Hi,
      You posted the same on OAI mailing list, no need to duplicate the discussion.
      Your msg is more complete on the mailing list
      LLLL means “late” to USRP: not enough CPU, stupid VM/Windows, USB2 instead of USB3, …
      Regards,
      Laurent

        1. Hi,
          I don’t understand why you consider to replace your usrp
          What is the computer ?
          do you see USB3 in the trace when OAI connects to the usrp (or USB2) ?

          1. Hi,
            My computer model is Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz.
            And yes I see usb3 in the trace when OAI connects to the usrp

  63. Dear laurent,
    Thank you for your response.
    Now, I am trying to deploy gNB in NSA architecture and I have this error : Assertion (1==0) failed!
    In rx_nr_prach_ru() /home/enb/test/openairinterface5g/openair1/PHY/NR_TRANSPORT/nr_prach.c:237
    Illegal prach format 5 for length 839.
    Do you know how fix this error ?

  64. Hello,
    When I try to configure the sim card with the right values(IMSI, Ki, oPC). Then, I put the sim card to the phone(Sumsung Galaxy A32-5G),and I edit the network(DNN) but I didn’t see the connection betwenn the core network and the UE and I’m sure about the values(same in database).

    1. Dear Yessine,
      Many people reported issues between OAI and Samsung UEs
      I have been surprized 2 days ago to see a positive report on the page “UE testing”, but the contributor has not put any details.
      Have you succeeded to run with RFSIM, same gNB config file?
      If yes, if you scan networks in the phone, do you see the OAI network ?
      Regards,

        1. Hi,
          so, if the UE doesn’t detect the cell, either you don’t emit power, or the Samsung is locked to some secret configuration.
          Please check in OAI mailing list today, there is a first report of a successful usage of a Samsung.
          this brand is complex: they use the same name like “S21” with very different chipset inside
          May you try another UE ?
          What is your RF board?

          1. Hi, My question wa about gNB RF board, but it maybe UE if you run OAI UE
            I can’t understand what you do, so it is difficult to provide any help

    1. 18.04 is the oldest supposed in OAI.
      For myself, i prefer to use 22.04, as it is the current version for a live development project

  65. Hello laurent,
    I got this problem when I try to deploy nrUE:
    O[HW] [recv] received 22811 samples out of 23040
    [HW] Time: 3.001 s
    ERROR_CODE_OVERFLOW (Overflow).
    If you have any idea about that tell mel please

    1. Dear Yessine,
      This is UHD issue, that comes out usually when the application (so OAI software) doesn’t read/write the I/Q samples fast enough
      Nevertheless, there are also bugs in UHD, that nobody managed to correct.
      What is the computer ?
      For UHD:
      on ubuntu 18.04, try UHD 3.15 (compile from source)
      on ubuntu 22, try the latest in the main UHD branch
      On the main mailing list you will find many discussions on the best UHD version, nevertheless:
      – if the computer is much much faster than the actual load, this won’t appear
      – UHD source code is a nightmare, not managed since NI bought Ettus

      1. Dear laurent,
        I finally succeded to deploy all the architecture, It works fine now.
        Now, I will try to use the COST UE.
        Thank you very much for your help.

        1. Hi Yessine,

          I am alsp facing same issue [HW] [recv] received 22811 samples out of 23040.
          what are the architecture you deploy?
          can you please help here?

  66. Hi Laurent,

    I would like to know if it is possible to test with multiple UEs at the same time for the below setup:

    https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/NR_SA_Tutorial_OAI_nrUE.md#52-testing-oai-nrue-with-rfsimulator

    I am using the OAI UE itself, with the RF simulator (on the same machine):

    1. sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf –gNBs.[0].min_rxtxtime 6 –rfsim –sa

    2. sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 –numerology 1 –band 78 -C 3619200000 –rfsim –sa –nokrnmod -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf

    When we run the above, an interface oaitun_ue1 is created. If we run another instance of the UE it shows below error:
    ‘[PDCP] TUN: Error opening socket oaitun_ue1 916: Device or resource busy)’

    Could you please help me with what configuration we need to change or add to run multiple instances.

    Thanks
    Anjali

  67. Hello,
    when we started we have the next problem:

    On the first start we had those end message:
    [NR_RRC] SIB1 decoded
    [NR_MAC] NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
    [NR_MAC] NR band 78, duplex mode TDD, duplex spacing = 0 KHz
    [NR_MAC] TDD has been properly configured
    [NR_MAC] [UE 0] : Logical Channel UL-CCCH (SRB0), Generating RRCSetupRequest ( bytes 6m gNB 0)

    And all, the terminal didn`t gave another message.

    When we tryed again

    [HW] [recv] received 11256 samples out of 23040
    [HW] Time: 1.03924 s
    ERROR_CODE_OVERFLOW (Out of sequence error)

    Is there the solve for this problem?

    1. Hi,
      The second error is a USRP/UHD internal issue, if you have it often, you need a faster computer.
      I would recommand to follow the tutorials in OAI source code tree, directory “doc” and to follow first the tutorial with RFSIM.
      When you setup will run fine with rfsim, you can try USRPs.
      My experience is that present OAI UE require a accurate clock.
      In my lab, i sync the USRPs on the same 10MHz external clock to get a decent AOI UE working with OAI gNB
      Laurent

  68. Hi Laurent,

    I firstly run the OAI gNB module on my PC with USRB B210, the command is just the same as in the OAI WiKi as follows:

    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf –gNBs.[0].min_rxtxtime 6 –sa -E

    However, an error (” failed to bind socket: 192.168.70.129 2152 “) happened when assigning an address for GTPU, but I find no one used the port 2152, so could you tell me what’s the problem? thank you so much?!

    Following is the corresponding log:
    [GTPU] Configuring GTPu address : 192.168.70.129, port : 2152
    [PHY] DL frequency 3619200000 Hz, UL frequency 3619200000 Hz: band 48, uldl offset 0 Hz
    [PHY] Configuring MIB for instance 0, : (Nid_cell 0,DL freq 3619200000, UL freq 3619200000)
    [GTPU] Initializing UDP for local address 192.168.70.129 with port 2152
    [PHY] Initializing frame parms for mu 1, N_RB 106, Ncp 0
    [PHY] Init: N_RB_DL 106, first_carrier_offset 900, nb_prefix_samples 108,nb_prefix_samples0 132, ofdm_symbol_size 1536
    [GTPU] bind: Cannot assign requested address
    [GTPU] failed to bind socket: 192.168.70.129 2152
    [GTPU] can’t create GTP-U instance
    [GTPU] Created gtpu instance id: -1
    [E1AP] Failed to create CUUP N3 UDP listener[UTIL] Creating thread TASK_GTPV1_U with affinity -1 and priority 50
    [PHY] gNB 0 configured

      1. I met with the same problem, my 5GCN ip is 192.168.50.234 and my core network interface is called docker-openxg. Inside docker, it is 172.11.200.1 for amf and ngu and I have forwarded by running sudo route add -net 172.11.200.0 netmask 255.255.255.0 gw 192.168.50.234
        ////////// AMF parameters:
        amf_ip_address = ( { ipv4 = “192.168.50.234”;
        ipv6 = “192:168:30::17”;
        active = “yes”;
        preference = “ipv4”;
        }
        );

        NETWORK_INTERFACES :
        {
        GNB_INTERFACE_NAME_FOR_NG_AMF = “docker-openxg”;
        GNB_IPV4_ADDRESS_FOR_NG_AMF = “172.11.200.1”;
        GNB_INTERFACE_NAME_FOR_NGU = “docker-openxg”;
        GNB_IPV4_ADDRESS_FOR_NGU = “172.11.200.1”;
        GNB_PORT_FOR_S1U = 2152; # Spec 2152
        };

        }
        );

    1. hi Xin are you resolved the issue because i am also facing same issue while running cuup in different host. I try to change demoai ip still having same issue

  69. Hi,
    I add –build-lib all on the line ./build_oai to get scope graph, However, an error (” Library rte_pmd_hpac_sdfec_pmd for T1 offload not found“) happened. It seems that we can’t find this library, so could you tell me what’s the problem? thank you so much?

    Yin

  70. Hi, Laurent

    I am using USRP B200, Xiaomi 9 pro 5G which should supports band78 and band41
    but no luck, when running, Xiaomi UE can not detect the signal and here is the error:
    [NR_MAC] Frame.Slot 256.0

    [NR_MAC] Frame.Slot 384.0

    [NR_PHY] [gNB 0][RAPROC] Frame 427, slot 19 Initiating RA procedure with preamble 46, energy 27.0 dB (I0 147, thres 120), delay 7 start symbol 0 freq index 0
    [MAC] UL_info[Frame 427, Slot 19] Calling initiate_ra_proc RACH:SFN/SLOT:427/19
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 427 Activating Msg2 generation in frame 428, slot 7 using RA rnti 10b SSB, new rnti 8503 index 0 RA index 0
    [NR_MAC] [gNB 0][RAPROC] CC_id 0 Frame 428, slotP 7: Generating RA-Msg2 DCI, rnti 0x10b, state 1, CoreSetType 2
    [NR_MAC] [RAPROC] Msg3 slot 17: current slot 7 Msg3 frame 428 k2 7 Msg3_tda_id 3
    [NR_MAC] [gNB 0][RAPROC] Frame 428, Subframe 7: rnti 8503 RA state 2
    [NR_MAC] handle harq for rnti 8503, in RA process
    [NR_MAC] [gNB 0][RAPROC] Frame 429, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (429,17)
    [NR_MAC] handle harq for rnti 8503, in RA process
    [NR_MAC] [gNB 0][RAPROC] Frame 430, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (430,17)
    [NR_MAC] handle harq for rnti 8503, in RA process
    [NR_MAC] [gNB 0][RAPROC] Frame 431, Slot 10 : CC_id 0 Scheduling retransmission of Msg3 in (431,17)
    [NR_MAC] Random Access 0 failed at state 2 (Reached msg3 max harq rounds)
    [NR_MAC] handle harq for rnti 8503, in RA process
    [NR_MAC] handle_nr_ul_harq(): unknown RNTI 0x8503 in PUSCH
    [NR_MAC] Frame.Slot 512.0

    [NR_MAC] Frame.Slot 640.0

    Why is there only repeating Frame.slot … except the error ? no [NR_PHY] Number of bad PUCCH received ?
    How can i solve the issue above, is it because of the Xiaomi UE ?

    [GTPU] SA mode
    [GTPU] Configuring GTPu address : 172.11.200.1, port : 2152
    [GTPU] Initializing UDP for local address 172.11.200.1 with port 2152
    [GTPU] bind: Cannot assign requested address
    [GTPU] failed to bind socket: 172.11.200.1 2152 !!!
    [GTPU] can’t create GTP-U instance
    [GTPU] Created gtpu instance id: -1
    [E1AP] Failed to create CUUP N3 UDP listener[UTIL] Creating thread TASK_GTPV1_U with affinity -1 and priority 50
    [RRC] Accepting new CU-UP ID 3584 name gNB-OpenXG (assoc_id -1)
    [ITTI] Created Posix thread TASK_GTPV1_U

    When initializing, it can not bind to 172.11.200.1:2152, does this mean gNB is not connected to 5GCN? How can I test the connectivity? I connect 2 Linux computers via a router both using cables, I can ping through, is this setting correct? I have done ip routing in gNB host by sudo route add -net 172.11.200.0 netmask 255.255.255.0 gw 192.168.50.234 //192.168.50.234 is CN core network ip

    my gnb.sa.band41.fr1.106PRB:

    ////////// AMF parameters:
    amf_ip_address = ( { ipv4 = “172.11.200.14”; //192.168.50.234 is CN core network ip, is this correct?
    ipv6 = “192:168:30::17”;
    active = “yes”;
    preference = “ipv4”;
    }
    );

    NETWORK_INTERFACES :
    {
    GNB_INTERFACE_NAME_FOR_NG_AMF = “docker-openxg”;
    GNB_IPV4_ADDRESS_FOR_NG_AMF = “172.11.200.1”;
    GNB_INTERFACE_NAME_FOR_NGU = “docker-openxg”;
    GNB_IPV4_ADDRESS_FOR_NGU = “172.11.200.1”;
    GNB_PORT_FOR_S1U = 2152; # Spec 2152
    };

    }
    I believe core network is functioning, and so does the antenna,
    Can you help me with above issues?

    THANKS!!!

    1. i think your gNB receives the RACH (or call it msg1), so UL is working
      but the UE probably never receive the msg2, so the gNB traces it doesn’t receive msg3
      yo should probably check the tx: antenna, power,…

  71. Hello Laurent,

    I hope you are well.

    I have a question regarding the OAI 5G Core Network. I am deploying it on a virtual machine from OVH and deploying the OAI gNB separately. My issue is that the core network and the gNB are not in the same LAN, so I am unable to connect the gNB to the core network. What can I do?

      1. Dear Yessine,
        Of course, the 5GC can be remote, not on same LAN.
        3GPP use IP network, not ethernet, so it has no relation with LAN/WAN.
        Maybe, you mean you have NAPT in the middle, or simply your IP routing table is not well made.
        The OAI 5GC creates it’s own difficulties in term of routing because they use docker containers.
        What is the issue you face?
        Regards,
        Laurent

        1. Hello Laurent,

          Thank you for your response.
          I believe my issue lies in my IP routing. I am attempting to add the route of the 5GC on the gNB host as mentioned in the OAI documentation, but I encountered the following error: “Nexthop has an invalid gateway.” I am unsure how to resolve this error.

          Best regards,
          Yessine

          1. Hi,
            Let’s go socket by socket
            I think the first is the NG-AP connection from gNB to AMF.
            have you set the AMF address in the gNB config file ?
            can you see this SCTP connection in wireshark ?

          2. Yes, I set it to 192.168.70.132.
            In the section NETWORK_INTERFACES in gNB configuration file: I set the GNB_INTERFACE_NAME and GNB_IPV4_ADDRESS of the host where OAI gNB is installed?”
            And, also I have to add the route of 5GC to gNB host: how exactly I do that ?
            No, I cannot see anything in Wireshark.

          3. Hi,
            GNB_INTERFACE_NAME is not used in the code
            GNB_IPV4_ADDRESS: yes but it is not very important
            you must set AMF address to the AMF address, this address should be routed to the right machine
            you can try ‘ping x.x.x.x’ from the gnb machine to the AMF
            the AMF address is in AMF config file

          4. Hello Laurent,

            I solved the problem; it’s working now. I just added the port in the Docker Compose file for SCTP.

  72. Hello Laurent,
    i wish you will be able to help me with this because i really need it for my masters degree
    when trying to connect a UE here is what i get
    MAC] [eNB 0][RAPROC] CC_id 0 Frame 520 Activating RAR generation in Frame 520, subframe 6 for process 0, rnti 51b3, state 1
    [RRC] [FRAME 00521][eNB][MOD 00][RNTI 51b3] Decoding UL CCCH 51.e3.f5.22.1.e6 (0x782d13ff2543)
    [RRC] [FRAME 00521][eNB][MOD 00][RNTI 51b3] Accept new connection from UE random UE identity (0x1e20523f1e000000) MME code 0 TMSI 0 cause 3
    [MAC] UE 0 RNTI 51b3 adding LC 1 idx 0 to scheduling control (total 1)
    [MAC] UE 0 RNTI 51b3 adding LC 2 idx 1 to scheduling control (total 2)
    [MAC] Added physicalConfigDedicated 0x782cb8004b00 for 0.0
    [RRC] [FRAME 00521][eNB][MOD 00][RNTI 51b3] [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionSetup (bytes 29)
    [RRC] [FRAME 00521][eNB][MOD 00][RNTI 51b3]CALLING RLC CONFIG SRB1 (rbid 1)
    [PDCP] add new uid is 0 51b3
    [PDCP] [FRAME 00521][eNB][MOD 00][RNTI 51b3][SRB 01] Action ADD LCID 1 (SRB id 1) configured with SN size 5 bits and RLC AM
    [MAC] [eNB 0][RAPROC] CC_id 0 Frame 521, subframeP 6: Generating Msg4 with RRC Piggyback (RNTI 51b3)
    [MAC] UE 0 rnti 51b3: UL Failure timer 1
    [RRC] Removing UE 51b3 instance because of RRC Connection Setup timer timeout
    [RRC] [eNB 0] Removing UE RNTI 51b3
    [RRC] Put UE 51b3 into freeList
    [PHY] add ue 20915 in free list, context flag: 1
    [MAC] clean eNb uci_vars[0] UE 51b3
    [MAC] Removing UE 0 from Primary CC_id 0 (rnti 51b3)
    [PDCP] remove uid is 0/0 51b3
    [PHY] remove RNTI 51b3

    1. Hi,

      in you trace: UL Failure timer
      the UE performs RACH with successn then it drops the connection
      a lot of possible causes

  73. Hello Laurent,
    I’m reaching out to you again with another issue 🙂 This time, there’s an obstacle to accessing the internet despite having set up the network and ensured that all configurations are correct. The UE is successfully connected to the network, and the SMF has assigned an IP address to it. However, internet access remains unavailable. Do you have any insights on this matter?

  74. Laurent,
    I am reaching out as I have detected a new error after pulling the most recent commit from the OAI develop branch. The terminal output is as follows on the UE side:
    [NR_PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch
    [PHY] [UE] nr_synchro_time: Sync source (nid2) = 0, Peak found at pos 1728, val = 5342996 (67 dB power over signal avg 48 dB), ffo 0.000000
    [PHY] PSS execution duration 3264 microseconds
    [PHY] Failed to detect SSS after PSS, metric of SSS 1943, threshold to consider SSS valid 30000, detected PCI: 249
    [PHY] [UE] nr_synchro_time: Sync source (nid2) = 1, Peak found at pos 58016, val = 181850 (51 dB power over signal avg 47 dB), ffo 0.000000
    [PHY] PSS execution duration 3233 microseconds
    [PHY] [SCHED][UE] Check absolute frequency DL 3619200000.000000, UL 3619200000.000000 (RF card 0, oai_exit 0, channel 0, rx_num_channels 1)
    [NR_PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch
    [PHY] [UE] nr_synchro_time: Sync source (nid2) = 0, Peak found at pos 2648, val = 5840305 (67 dB power over signal avg 48 dB), ffo 0.000000
    [PHY] PSS execution duration 3382 microseconds
    [PHY] Failed to detect SSS after PSS, metric of SSS 72, threshold to consider SSS valid 30000, detected PCI: 375
    [PHY] [UE] nr_synchro_time: Sync source (nid2) = 1, Peak found at pos 57360, val = 176290 (51 dB power over signal avg 47 dB), ffo 0.000000
    [PHY] PSS execution duration 3244 microseconds
    [PHY] [SCHED][UE] Check absolute frequency DL 3619200000.000000, UL 3619200000.000000 (RF card 0, oai_exit 0, channel 0, rx_num_channels 1)
    [NR_PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch
    [PHY] [UE] nr_synchro_time: Sync source (nid2) = 2, Peak found at pos 1520, val = 5327242 (67 dB power over signal avg 48 dB), ffo 0.000000
    [PHY] PSS execution duration 3287 microseconds
    [PHY] Failed to detect SSS after PSS, metric of SSS 1920, threshold to consider SSS valid 30000, detected PCI: 314
    [PHY] [UE] nr_synchro_time: Sync source (nid2) = 1, Peak found at pos 144312, val = 167009 (51 dB power over signal avg 47 dB), ffo 0.000000
    [PHY] PSS execution duration 3245 microseconds
    If you have any insight or if anyone has encountered the same problem I would love to brainstorm some more on how to fix this.

    1. Dear Zach,
      The detected PCI varies, so the radio signal is poor or there is a pure bug.
      Nid2 seems to be 0 (as PSS detection say 67dB over 48dB for this Nid2, so a decent gap)
      Nid1 (SSS) is not well detected.
      I don’t know recent issue about this, i only updated the trace to make it clearer.
      Maybe you missed fo compensation parameter (or you have a perfect clock as ffO is 0)
      Regards,

      1. Laurent,
        Not sure about the radio signal being poor, as we have adjusted attenuation and gain in many different configurations, things also look alright on Spectrum Analyzer. Also, we have tried running the UE with both the “–ue-fo-compensation” flag and without, we also do have a perfect clock for both the N310s being used. We are thinking it may be a bug and are planning on investigating it. It you have any update or any other ideas please let me know.

        1. Hi,
          maybe the SSB offset is not passed to the UE ?
          The UE is not (yet) capable of discovering SSB offset, or to do full scanning

          1. Laurent,
            We are positive we are passing the right SSB offset to the UE as sometimes the UE is able to find the gNB and get out of this sync loop. However, most of the time (~90%) the UE is unable to detect the SSS as stated above.

          2. Laurent,
            Something else to go along with this, we are able to get the UE and gNB to sync using B200s reliably. However, using the N310s we seem to be stuck in our investigation at the moment. Please let me know if you have any ideas.

          3. Hi,
            N310 works, but the rx and tx gains values are very different.
            Example files are in OAI CI configuration files
            What is the issue you see ?

  75. I have a big problem, for me i have cloned the repository, and now i am trying to run these commandes

    1st terminal:
    sudo RFSIMULATOR=server ./nr-uesoftmodem –rfsim -O
    –sl-mode 2 –sa –sync-ref –rfsimulator.serverport 4048

    2nd terminal:
    sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem –rfsim -O
    –sl-mode 2 –sa –rfsimulator.serverport 4048

    when i tried to do ping -I oaitun_ue3 10.0.0.1 , the ping is not working

    the solution proposed is to use multi-ue.sh to make the ping working,
    the script is below, but i don’t know how to use it , i tried to create 2 namespaces and run the first command in the first and the second in the second, but an error saying that 127.0.0.1 refuese to connect

    please , i need help

    multi-ue.sh:
    #!/bin/bash

    ue_id=-1

    create_namespace() {
    ue_id=$1
    local name=”ue$ue_id”
    echo “creating namespace for UE ID ${ue_id} name ${name}”
    ip netns add $name
    ip link add v-eth$ue_id type veth peer name v-ue$ue_id
    ip link set v-ue$ue_id netns $name
    BASE_IP=$((200+ue_id))
    ip addr add 10.$BASE_IP.1.100/24 dev v-eth$ue_id
    ip link set v-eth$ue_id up
    iptables -t nat -A POSTROUTING -s 10.$BASE_IP.1.0/255.255.255.0 -o lo -j MASQUERADE
    iptables -A FORWARD -i lo -o v-eth$ue_id -j ACCEPT
    iptables -A FORWARD -o lo -i v-eth$ue_id -j ACCEPT
    ip netns exec $name ip link set dev lo up
    ip netns exec $name ip addr add 10.$BASE_IP.1.$ue_id/24 dev v-ue$ue_id
    ip netns exec $name ip link set v-ue$ue_id up
    }

    delete_namespace() {
    local ue_id=$1
    local name=”ue$ue_id”
    echo “deleting namespace for UE ID ${ue_id} name ${name}”
    ip link delete v-eth$ue_id
    ip netns delete $name
    }

    list_namespaces() {
    ip netns list
    }

    open_namespace() {
    if [[ $ue_id -lt 1 ]]; then echo “error: no last UE processed”; exit 1; fi
    local name=”ue$ue_id”
    echo “opening shell in namespace ${name}”
    echo “type ‘ip netns exec $name bash’ in additional terminals”
    ip netns exec $name bash
    }

    usage () {
    echo “$1 -c : create namespace \”ue\””
    echo “$1 -d : delete namespace \”ue\””
    echo “$1 -e : execute shell in last processed namespace”
    echo “$1 -l : list namespaces”
    echo “$1 -o : open shell in namespace \”ue\””
    }

    prog_name=$(basename $0)

    if [[ $(id -u) -ne 0 ]] ; then echo “Please run as root”; exit 1; fi
    if [[ $# -eq 0 ]]; then echo “error: no parameters given”; usage $prog_name; exit 1; fi

    while getopts c:d:ehlo: cmd
    do
    case “${cmd}” in
    c) create_namespace ${OPTARG};;
    d) delete_namespace ${OPTARG};;
    e) open_namespace; exit;;
    h) usage ${prog_name}; exit;;
    l) list_namespaces;;
    o) ue_id=${OPTARG}; open_namespace;;
    /?) echo “Invalid option”; usage ${prog_name}; exit;;
    esac
    done

  76. Hi ,

    I am facing some issue when runnning ntn GEO example as https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/RUNMODEM.md#how-to-run-a-ntn-configuration

    This GNB logs:
    nb.sa.band66.fr1.25PRB.usrpx300.conf –sa –rfsim –rfsimulator.prop_delay 238.74
    CMDLINE: “./ran_build/build/nr-softmodem” “-O” “../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf” “–sa” “–rfsim” “–rfsimulator.prop_delay” “238.74”
    [LIBCONFIG] Path for include directive set to: ../targets/PROJECTS/GENERIC-NR-5GC/CONF
    [CONFIG] function config_libconfig_init returned 0
    [CONFIG] config module libconfig loaded
    [CONFIG] debug flags: 0x00000000
    log init done
    Reading in command-line options
    [ENB_APP] nfapi (0) running mode: MONOLITHIC
    [GNB_APP] Getting GNBSParams
    Configuration: nb_rrc_inst 1, nb_nr_L1_inst 1, nb_ru 1
    configuring for RAU/RRU
    [OPT] OPT disabled
    [HW] Version: Branch: develop Abrev. Hash: 72f7d0409c Date: Fri Aug 30 16:14:41 2024 +0200
    [NR_PHY] RC.gNB = 0x608b0978c220
    [NR_PHY] PRB blacklist
    [NR_PHY] Copying 0 blacklisted PRB to L1 context
    [PHY] L1_RX_THREAD_CORE -1 (15)
    [PHY] TX_AMP = 519 (-36 dBFS)
    Initializing northbound interface for L1
    [PHY] l1_north_init_gNB() RC.nb_nr_L1_inst:1
    [PHY] Installing callbacks for IF_Module – UL_indication
    [MAC] Allocating shared L1/L2 interface structure for instance 0 @ 0x608b09794a80
    [PHY] l1_north_init_gNB() RC.gNB[0] installing callbacks
    [PHY] create_gNB_tasks() Task ready initialize structures
    [PHY] No prs_config configuration found..!!
    [GNB_APP] pdsch_AntennaPorts N1 1 N2 1 XP 1 pusch_AntennaPorts 1
    [GNB_APP] minTXRXTIME 6
    [GNB_APP] SIB1 TDA 5
    [GNB_APP] “disable_harq” is a REL17 feature and is incompatible with REL15 and REL16 UEs!
    [GNB_APP] CSI-RS 0, SRS 0, 256 QAM may be on, delta_MCS off, maxMIMO_Layers -1, HARQ feedback disabled, num DLHARQ:32, num ULHARQ:32
    [GNB_APP] sr_ProhibitTimer 0, sr_TransMax 64, sr_ProhibitTimer_v1700 512, t300 2000, t301 2000, t310 2000, n310 10, t311 3000, n311 1, t319 2000
    [RRC] Read in ServingCellConfigCommon (PhysCellId 0, ABSFREQSSB 430590, DLBand 66, ABSFREQPOINTA 430086, DLBW 25,RACH_TargetReceivedPower -118
    [NR_MAC] nrarfcn 430590 is not on the channel raster for step size 20
    [RRC] absoluteFrequencySSB 430590 corresponds to 2152950000 Hz
    [MAC] [MAIN] Init function start:nb_nr_macrlc_inst=1
    [UTIL] threadCreate() for MAC_STATS: creating thread with affinity ffffffff, priority 2
    [PHY] Installing callbacks for IF_Module – UL_indication
    [NR_MAC] Configuring common parameters from NR ServingCellConfig
    [NR_MAC] DL_Bandwidth:5
    [NR_MAC] nrarfcn 430086 is not on the channel raster for step size 20
    [NR_MAC] DL_Bandwidth:5
    [NR_MAC] nrarfcn 350086 is not on the channel raster for step size 20
    [NR_MAC] ssb_OffsetPointA 4, ssb_SubcarrierOffset 0
    [NR_MAC] Set RX antenna number to 1, Set TX antenna number to 1 (num ssb 1: 80000000,0)
    DL frequency 2152680000: band 66, UL frequency 1752680000
    [PHY] DL frequency 2152680000 Hz, UL frequency 1752680000 Hz: band 66, uldl offset -400000000 Hz
    [PHY] Configuring MIB for instance 0, : (Nid_cell 0,DL freq 2152680000, UL freq 1752680000)
    [PHY] Initializing frame parms for mu 0, N_RB 25, Ncp 0
    [PHY] Init: N_RB_DL 25, first_carrier_offset 362, nb_prefix_samples 36,nb_prefix_samples0 40, ofdm_symbol_size 512
    [PHY] Doing symbol rotation calculation for TX/RX, f0 2152680000.000000 Hz, Nsymb 14
    [PHY] Doing symbol rotation calculation for TX/RX, f0 1752680000.000000 Hz, Nsymb 14
    [PHY] gNB 0 configured
    [NR_MAC] PUSCH Target 150, PUCCH Target 200, PUCCH Failure 10, PUSCH Failure 10
    [NR_RRC] SIB1 freq: offsetToPointA 4
    [GNB_APP] F1AP: gNB idx 0 gNB_DU_id 3584, gNB_DU_name 5G-GOA-gNB, TAC 1 MCC/MNC/length 208/99/2 cellID 12345678
    [GNB_APP] ngran_DU: Configuring Cell 0 for FDD

    430590

    0

    [PHY] create_gNB_tasks() RC.nb_nr_L1_inst:1
    [PHY] l1_north_init_gNB() RC.nb_nr_L1_inst:1
    [PHY] Installing callbacks for IF_Module – UL_indication
    [PHY] l1_north_init_gNB() RC.gNB[0] installing callbacks
    [GNB_APP] Allocating gNB_RRC_INST for 1 instances
    NRRRC 0: Southbound Transport local_mac
    [GNB_APP] SDAP layer is disabled
    [GNB_APP] Data Radio Bearer count 1
    [NR_RRC] do_SIB23_NR, size 9
    [GNB_APP] default drx 0
    [GNB_APP] [gNB 0] gNB_app_register for instance 0
    [UTIL] threadCreate() for TASK_SCTP: creating thread with affinity ffffffff, priority 50
    [ITTI] Created Posix thread TASK_SCTP
    [X2AP] X2AP is disabled.
    [UTIL] threadCreate() for TASK_NGAP: creating thread with affinity ffffffff, priority 50
    [NGAP] Starting NGAP layer
    [NGAP] Registered new gNB[0] and macro gNB id 3584
    amf_ip 192.168.71.132
    [NGAP] [gNB 0] check the amf registration state
    [ITTI] Created Posix thread TASK_NGAP
    [UTIL] threadCreate() for TASK_GNB_APP: creating thread with affinity ffffffff, priority 50
    [SCTP] sctp_bindx() SCTP_BINDX_ADD_ADDR failed: errno 99 Cannot assign requested address
    [SCTP] could not open socket, no SCTP connection established
    [ITTI] Created Posix thread TASK_GNB_APP
    [UTIL] threadCreate() for TASK_RRC_GNB: creating thread with affinity ffffffff, priority 50
    [ITTI] Created Posix thread TASK_RRC_GNB
    [NR_RRC] Entering main loop of NR_RRC message task
    [NR_RRC] Received F1 Setup Request from gNB_DU 3584 (5G-GOA-gNB) on assoc_id -1
    [GTPU] Configuring GTPu
    [RRC] Accepting DU 3584 (5G-GOA-gNB), sending F1 Setup Response
    [RRC] DU uses RRC version 17.3.0
    [MAC] received F1 Setup Response from CU (null)
    [MAC] CU uses RRC version 17.3.0
    [MAC] Clearing the DU’s UE states before, if any.
    [GTPU] SA mode
    [GTPU] Configuring GTPu address : 192.168.71.129, port : 2152
    [GTPU] Initializing UDP for local address 192.168.71.129 with port 2152
    [GTPU] bind: Cannot assign requested address
    [GTPU] failed to bind socket: 192.168.71.129 2152
    [GTPU] can’t create GTP-U instance
    [GTPU] Created gtpu instance id: -1
    [E1AP] Failed to create CUUP N3 UDP listener[NR_RRC] Accepting new CU-UP ID 3584 name 5G-GOA-gNB (assoc_id -1)
    [UTIL] threadCreate() for TASK_GTPV1_U: creating thread with affinity ffffffff, priority 50
    [ITTI] Created Posix thread TASK_GTPV1_U
    START MAIN THREADS
    RC.nb_nr_L1_inst:1
    Initializing gNB threads wait_for_sync:0
    [PHY] Initializing gNB 0
    [PHY] Initializing gNB 0
    [PHY] Registering with MAC interface module (before 0x608b09794a80)
    [PHY] Installing callbacks for IF_Module – UL_indication
    [PHY] Registering with MAC interface module (after 0x608b09794a80)
    [PHY] Setting indication lists
    [PHY] [nr-gnb.c] gNB structure allocated
    wait_gNBs()
    Waiting for gNB L1 instances to all get configured … sleeping 50ms (nb_nr_sL1_inst 1)
    gNB L1 are configured
    About to Init RU threads RC.nb_RU:1
    Initializing RU threads
    configuring RU from file
    Set RU mask to 1
    Creating RC.ru[0]:0x608b097e3340
    [PHY] RU GPIO control set as ‘generic’
    [PHY] RU clock source set as internal
    [PHY] Setting time source to internal
    Setting function for RU 0 to gNodeB_3GPP
    [RU 0] Setting nr_flag 0, nr_band 7, nr_scs_for_raster 1
    [RU 0] Setting half-slot parallelization to 1
    [PHY] number of L1 instances 1, number of RU 1, number of CPU cores 4
    [PHY] Copying frame parms from gNB in RC to gNB 0 in ru 0 and frame_parms in ru
    configuring ru_id 0 (start_rf 0x608b05462e40)
    [PHY] Initialized RU proc 0 (,synch_to_ext_device),
    [PHY] RU Thread pool size 2
    [PHY] RU thread-pool core string -1,-1
    [UTIL] threadCreate() for Tpool0_-1: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for Tpool1_-1: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for ru_thread: creating thread with affinity ffffffff, priority 97
    [PHY] Starting RU 0 (,synch_to_ext_device) on cpu 2
    [PHY] Initializing frame parms for mu 0, N_RB 25, Ncp 0
    [PHY] Init: N_RB_DL 25, first_carrier_offset 362, nb_prefix_samples 36,nb_prefix_samples0 40, ofdm_symbol_size 512
    [PHY] fp->scs=15000
    [PHY] fp->ofdm_symbol_size=512
    [PHY] fp->nb_prefix_samples0=40
    [PHY] fp->nb_prefix_samples=36
    [PHY] fp->slots_per_subframe=1
    [PHY] fp->samples_per_subframe_wCP=7168
    wait RUs
    [PHY] fp->samples_per_frame_wCP=71680
    [PHY] fp->samples_per_subframe=7680
    [PHY] Waiting for RUs to be configured … RC.ru_mask:01
    [PHY] fp->samples_per_frame=76800
    [PHY] fp->dl_CarrierFreq=2152680000
    [PHY] fp->ul_CarrierFreq=1752680000
    [PHY] fp->Nid_cell=0
    [PHY] fp->first_carrier_offset=362
    [PHY] fp->ssb_start_subcarrier=0
    [PHY] fp->Ncp=0
    [PHY] fp->N_RB_DL=25
    [PHY] fp->numerology_index=0
    [PHY] fp->nr_band=66
    [PHY] fp->ofdm_offset_divisor=8
    [PHY] fp->threequarter_fs=0
    [PHY] fp->sl_CarrierFreq=0
    [PHY] fp->N_RB_SL=0
    [PHY] Initializing RU signal buffers (if_south local RF) nb_tx 1, nb_rx 1
    [PHY] [INIT] common.txdata[0] = 0x7908f11b4040 (307200 bytes,sf_extension 0)
    [PHY] [INIT] common.txdata[0] = 0x7908f11b4040
    [PHY] nb_tx 1
    [PHY] rxdata_7_5kHz[0] 0x7908c8000a40 for RU 0
    [PHY] [INIT] common.txdata_BF= 0x7908c801eb40 (8 bytes)
    [PHY] txdataF_BF[0] 0x7908c801ebc0 for RU 0
    [PHY] rxdataF[0] 0x7908c8025cc0 for RU 0
    [PHY] [INIT] nr_phy_init_RU() ru->num_gNB:1
    [PHY] Setting RF config for N_RB 25, NB_RX 1, NB_TX 1
    [PHY] tune_offset 0 Hz, sample_rate 7680000 Hz
    [PHY] Channel 0: setting tx_gain offset 0, tx_freq 2152680000 Hz
    [PHY] Channel 0: setting rx_gain offset 114, rx_freq 1752680000 Hz
    shlib_path librfsimulator.so
    [LOADER] library librfsimulator.so successfully loaded
    [HW] CirSize = 2294324
    [HW] propagation delay 238.740104 ms, 1833524 samples
    [HW] Running as server waiting opposite rfsimulators to connect
    Initializing random number generator, seed 17238276771805256638
    [HW] [RAU] has loaded RFSIMULATOR device.
    setup_RU_buffers: frame_parms = 0x7908f1459010
    [PHY] Signaling main thread that RU 0 is ready, sl_ahead 6
    waiting for sync (ru_thread,-1/0x608b060480a8,0x608b068d9920,0x608b068d98e0)
    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]:0x7908f0a00010
    [PHY] [gNB 0] phy_init_nr_gNB() About to wait for gNB to be configured
    shlib_path libdfts.so
    [LOADER] library libdfts.so successfully loaded
    shlib_path libldpc.so
    [LOADER] library libldpc.so successfully loaded
    shlib_path libldpc.so
    [LOADER] library libldpc.so has been loaded previously, reloading function pointers
    [LOADER] library libldpc.so successfully loaded
    [PHY] Initialise nr transport
    [PHY] Mapping RX ports from 1 RUs to gNB 0
    [PHY] gNB->num_RU:1
    [PHY] Attaching RU 0 antenna 0 to gNB antenna 0
    [UTIL] threadCreate() for Tpool0_-1: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for Tpool1_-1: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for Tpool2_-1: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for Tpool3_-1: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for Tpool4_-1: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for Tpool5_-1: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for Tpool6_-1: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for Tpool7_-1: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for L1_rx_thread: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for L1_tx_thread: creating thread with affinity ffffffff, priority 97
    [UTIL] threadCreate() for L1_stats: creating thread with affinity ffffffff, priority 1
    waiting for sync (L1_stats_thread,-1/0x608b060480a8,0x608b068d9920,0x608b068d98e0)
    ALL RUs ready – ALL gNBs ready
    Sending sync to all threads
    Entering ITTI signals handler
    TYPE TO TERMINATE
    got sync (ru_thread)
    got sync (L1_stats_thread)
    [PHY] RU 0 rf device ready
    [PHY] RU 0 RF started opp_enabled 0
    [HW] No connected device, generating void samples…
    [PHY] Command line parameters for OAI UE: -C 2152680000 –CO -400000000 -r 25 –numerology 0 –ssb 48
    [NR_MAC] Frame.Slot 128.0

    [HW] A client connects, sending the current time
    [HW] Not supported to send Tx out of order 17241600, 17241599
    [NR_MAC] Frame.Slot 256.0

    [NR_PHY] [RAPROC] 375.4 Initiating RA procedure with preamble 62, energy 54.0 dB (I0 0, thres 120), delay 1 start symbol 0 freq index 0
    [NR_MAC] 375.4 UE RA-RNTI 0039 TC-RNTI 619f: Activating RA process index 0
    [NR_MAC] UE 619f: 376.3 Generating RA-Msg2 DCI, RA RNTI 0x39, state 1, CoreSetType 0, RAPID 62
    [NR_MAC] UE 619f: Msg3 scheduled at 424.9 (376.3 TDA 0)
    [NR_MAC] UE 619f: 376.3 RA is active, Msg3 in (424,9)
    [NR_MAC] Starting RA Contention Resolution timer with 64 ms + 2 * 484 K2 (1032 slots) duration
    [NR_MAC] Frame.Slot 384.0

    [NR_MAC] rx_sdu for rnti 619f
    [NR_MAC] Adding new UE context with RNTI 0x619f
    [NR_MAC] [gNB 0][RAPROC] PUSCH with TC_RNTI 0x619f received correctly, adding UE MAC Context RNTI 0x619f
    [NR_MAC] [RAPROC] RA-Msg3 received (sdu_lenP 28)
    [RLC] Activated srb0 for UE 24991
    [RLC] Added srb 1 to UE 24991
    [NR_MAC] Activating scheduling RA-Msg4 for TC_RNTI 0x619f (state WAIT_Msg3)
    [NR_RRC] Decoding CCCH: RNTI 619f, payload_size 6
    [NR_RRC] Created new UE context: CU UE ID 1 DU UE ID 24991 (rnti: 619f, random ue id 5c302959a5000000)
    [RRC] activate SRB 1 of UE 1
    [NR_RRC] rrc_gNB_generate_RRCSetup for RNTI 619f
    [NR_MAC] No CU UE ID stored for UE RNTI 619f, adding CU UE ID 1
    [NR_MAC] UE 619f Generate msg4: feedback at 475. 8, payload 201 bytes, next state WAIT_Msg4_ACK
    [NR_MAC] (UE RNTI 0x619f) Received Ack of RA-Msg4. CBRA procedure succeeded!
    [NR_MAC] Frame.Slot 512.0
    UE RNTI 619f CU-UE-ID 1 in-sync PH 0 dB PCMAX 0 dBm, average RSRP 0 (0 meas)
    UE 619f: dlsch_rounds 1, dlsch_errors 0, pucch0_DTX 0, BLER 0.00000 MCS (0) 0
    UE 619f: ulsch_rounds 4, ulsch_errors 0, ulsch_DTX 0, BLER 0.00000 MCS (0) 0 (Qm 2 dB) NPRB 0 SNR 50.5 dB
    UE 619f: MAC: TX 0 RX 0 bytes
    UE 619f: LCID 1: TX 0 RX 0 bytes

    [NR_MAC] rx_sdu for rnti 619f
    [NR_RRC] UE 1 Processing NR_RRCSetupComplete from UE
    none
    before plmn
    amf_data_p 0x7908e0000ea0 amf_data_p->state -252622657
    The association between AMF and gNB is not ready
    amf not overloadn
    gafter plmn
    no gumai and stmsi
    [NGAP] No AMF is associated to the gNB
    [NR_RRC] [FRAME 00000][gNB][MOD 00][RNTI 1] UE State = NR_RRC_CONNECTED

    It says NO AMF assoicated to gnb.

    The Config:
    Active_gNBs = ( “5G-GOA-gNB”);
    # Asn1_verbosity, choice in: none, info, annoying
    Asn1_verbosity = “none”;

    gNBs =
    (
    {
    ////////// Identification parameters:
    gNB_ID = 0xe00;
    gNB_name = “5G-GOA-gNB”;

    // Tracking area code, 0x0000 and 0xfffe are reserved values
    tracking_area_code = 1;
    plmn_list = ({
    mcc = 208;
    mnc = 99;
    mnc_length = 2;
    snssaiList = (
    {
    sst = 1;
    sd = 0x1; // 0 false, else true
    },
    {
    sst = 1;
    sd = 0x112233; // 0 false, else true
    }
    );

    });

    nr_cellid = 12345678L;

    ////////// Physical parameters:

    sib1_tda = 5;
    min_rxtxtime = 6;
    disable_harq = 1;
    num_dlharq = 32;
    num_ulharq = 32;

    servingCellConfigCommon = (
    {
    #spCellConfigCommon

    physCellId = 0;

    # downlinkConfigCommon
    #frequencyInfoDL
    # this is 2150.43 MHz + 14 PRBs@15kHz SCS (same as initial BWP), points to Subcarrier 0 of RB#10 of SSB block
    absoluteFrequencySSB = 430590;
    dl_frequencyBand = 66;
    # this is 2150.43 MHz
    dl_absoluteFrequencyPointA = 430086;
    #scs-SpecificCarrierList
    dl_offstToCarrier = 0;
    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    dl_subcarrierSpacing = 0;
    dl_carrierBandwidth = 25;
    #initialDownlinkBWP
    #genericParameters
    # this is RBstart=0,L=25 (275*(L-1))+RBstart
    initialDLBWPlocationAndBandwidth = 6600;
    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    initialDLBWPsubcarrierSpacing = 0;
    #pdcch-ConfigCommon
    initialDLBWPcontrolResourceSetZero = 2;
    initialDLBWPsearchSpaceZero = 0;

    #uplinkConfigCommon
    #frequencyInfoUL
    ul_frequencyBand = 66;
    # this is 1750.43 MHz
    ul_absoluteFrequencyPointA = 350086;
    #scs-SpecificCarrierList
    ul_offstToCarrier = 0;
    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    ul_subcarrierSpacing = 0;
    ul_carrierBandwidth = 25;
    pMax = 20;
    #initialUplinkBWP
    #genericParameters
    initialULBWPlocationAndBandwidth = 6600;
    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    initialULBWPsubcarrierSpacing = 0;
    #rach-ConfigCommon
    #rach-ConfigGeneric
    prach_ConfigurationIndex = 98;
    #prach_msg1_FDM
    #0 = one, 1=two, 2=four, 3=eight
    prach_msg1_FDM = 0;
    prach_msg1_FrequencyStart = 0;
    zeroCorrelationZoneConfig = 13;
    preambleReceivedTargetPower = -118;
    #preamblTransMax (0…10) = (3,4,5,6,7,8,10,20,50,100,200)
    preambleTransMax = 6;
    #powerRampingStep
    # 0=dB0,1=dB2,2=dB4,3=dB6
    powerRampingStep = 1;
    #ra_ReponseWindow
    #1,2,4,8,10,20,40,80
    ra_ResponseWindow = 4;
    #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
    #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
    ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
    #oneHalf (0..15) 4,8,12,16,…60,64
    ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
    #ra_ContentionResolutionTimer
    #(0..7) 8,16,24,32,40,48,56,64
    ra_ContentionResolutionTimer = 7;
    rsrp_ThresholdSSB = 19;
    #prach-RootSequenceIndex_PR
    #1 = 839, 2 = 139
    prach_RootSequenceIndex_PR = 2;
    prach_RootSequenceIndex = 1;
    # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
    #
    msg1_SubcarrierSpacing = 0;
    # restrictedSetConfig
    # 0=unrestricted, 1=restricted type A, 2=restricted type B
    restrictedSetConfig = 0;

    msg3_DeltaPreamble = 1;
    p0_NominalWithGrant =-90;

    # pucch-ConfigCommon setup :
    # pucchGroupHopping
    # 0 = neither, 1= group hopping, 2=sequence hopping
    pucchGroupHopping = 0;
    hoppingId = 40;
    p0_nominal = -90;
    # ssb_PositionsInBurs_BitmapPR
    # 1=short, 2=medium, 3=long
    ssb_PositionsInBurst_PR = 2;
    ssb_PositionsInBurst_Bitmap = 1;

    # ssb_periodicityServingCell
    # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
    ssb_periodicityServingCell = 2;

    # dmrs_TypeA_position
    # 0 = pos2, 1 = pos3
    dmrs_TypeA_Position = 0;

    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    subcarrierSpacing = 0;

    #tdd-UL-DL-ConfigurationCommon
    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    referenceSubcarrierSpacing = 0;
    # pattern1
    # dl_UL_TransmissionPeriodicity
    # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
    dl_UL_TransmissionPeriodicity = 6;
    nrofDownlinkSlots = 7;
    nrofDownlinkSymbols = 6;
    nrofUplinkSlots = 2;
    nrofUplinkSymbols = 4;

    ssPBCH_BlockPower = -25;

    #ext2
    #ntn_Config_r17
    cellSpecificKoffset_r17 = 478; # GEO satellite
    #cellSpecificKoffset_r17 = 40; # LEO satellite
    }

    );

    TIMERS :
    {
    sr_ProhibitTimer = 0;
    sr_TransMax = 64;
    sr_ProhibitTimer_v1700 = 512;
    t300 = 2000;
    t301 = 2000;
    t319 = 2000;
    };

    # ——- SCTP definitions
    SCTP :
    {
    # Number of streams to use in input/output
    SCTP_INSTREAMS = 2;
    SCTP_OUTSTREAMS = 2;
    };

    ////////// AMF parameters:
    amf_ip_address = ({ ipv4 = "192.168.71.132"; });

    NETWORK_INTERFACES :
    {
    GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.129/26";
    GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.129/26";
    GNB_PORT_FOR_S1U = 2152; # Spec 2152
    };

    }
    );

    MACRLCs = (
    {
    num_cc = 1;
    tr_s_preference = "local_L1";
    tr_n_preference = "local_RRC";
    pusch_TargetSNRx10 = 150;
    pucch_TargetSNRx10 = 200;
    }
    );

    L1s = (
    {
    num_cc = 1;
    tr_n_preference = "local_mac";
    prach_dtx_threshold = 120;
    pucch0_dtx_threshold = 150;
    ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
    }
    );

    RUs = (
    {
    local_rf = "yes";
    nb_tx = 1;
    nb_rx = 1;
    att_tx = 0;
    att_rx = 0;
    bands = [7];
    max_pdschReferenceSignalPower = -27;
    max_rxgain = 114;
    sf_extension = 0;
    eNB_instances = [0];
    ##beamforming 1×2 matrix: 1 layer x 2 antennas
    bf_weights = [0x00007fff, 0x0000];
    ##beamforming 1×4 matrix: 1 layer x 4 antennas
    #bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
    ## beamforming 2×2 matrix:
    # bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
    ## beamforming 4×4 matrix:
    #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
    sdr_addrs = "type=x300";
    clock_src = "internal";
    # if_freq = 3700000000L;
    # if_offset = 1000000;
    }
    );

    rfsimulator :
    {
    serveraddr = "server";
    serverport = 4043;
    options = (); #("saviq"); or/and "chanmod"
    IQfile = "/tmp/rfsimulator.iqs";
    };

    security = {
    # preferred ciphering algorithms
    # the first one of the list that an UE supports in chosen
    # valid values: nea0, nea1, nea2, nea3
    ciphering_algorithms = ( "nea0" );

    # preferred integrity algorithms
    # the first one of the list that an UE supports in chosen
    # valid values: nia0, nia1, nia2, nia3
    integrity_algorithms = ( "nia2", "nia0" );

    # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
    # what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
    drb_ciphering = "yes";
    drb_integrity = "no";
    };

    log_config :
    {
    global_log_level ="info";
    hw_log_level ="info";
    phy_log_level ="info";
    mac_log_level ="info";
    rlc_log_level ="info";
    pdcp_log_level ="info";
    rrc_log_level ="info";
    ngap_log_level ="debug";
    f1ap_log_level ="debug";
    };

    @include "channelmod_rfsimu_LEO_satellite.conf"

    Can You please help me ?

    Regards,
    Sonia

    1. Dear Sonia,
      the answer looks simple: you have not started a 5G core network (a 5GC) on the address you have set in gnb.conf
      Regards,
      Laurent

  77. Hi Laurent,

    I am using an x310 (as gNB) and B210 (as UE). I have successfully tested 3.576 GHz with 40 MHz BW (i.e. 106 PRBs, SCS 30 KHz). The distance between gNB-UE is about 20 feet. So I have seen, the UE only gets attached to gNB if max gain is used, otherwise UE keeps searching for gNB.

    Now I want to modify the BW to 10 MHz (i.e. 24 PRBs with 30 KHz SCS). In this case the UE is unable to synch with gNB and is in a loop (as below). I do see that Estimated power: 0 dB, but as I was able to connect with 40 MHz BW, power should not be an issue for 10 MHz. Also if I save IQ samples and plot a spectrogram, I am able to see the SSBs from gNB. I am wondering if anything is wrong with the gNB config or the way I am running the nodes. Would really appreciate if you can shed some lights on..

    UE :
    sudo numactl –membind=0 –cpubind=0 /var/tmp/oairan/cmake_targets/ran_build/build/nr-uesoftmodem -O /var/tmp/etc/oai/ue.conf -r 24 -C 3576000000 –usrp-args “clock_source=internal,type=b200” –band 78 –numerology 1 –ue-fo-compensation –ue-txgain 0 –ue-rxgain 120 –nokrnmod –dlsch-parallel 4 –sa

    gNB:
    sudo numactl –membind=0 –cpubind=0 /var/tmp/oairan/cmake_targets/ran_build/build/nr-softmodem -O /var/tmp/etc/oai/gnb.sa.band78.fr1.24PRB.usrpx310.conf –gNBs.[0].min_rxtxtime 6 –sa –MACRLCs.[0].dl_max_mcs 28

    UE LOG:
    ——
    [NR_PHY] Starting sync detection
    [PHY] [UE thread Synch] Running Initial Synch
    [PHY] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 138904, val = 1573378 (62 dB) avg 48 dB, ffo -0.022508
    [PHY] PSS execution duration 5654 microseconds
    [PHY] [UE0] Initial sync : Estimated PSS position 138904, Nid2 1
    [PHY] sync_pos 138904 ssb_offset 138868
    [PHY] Calling sss detection (normal CP)
    [PHY] TDD Normal prefix: CellId 577 metric 643, phase 15, pbch -1
    [PHY] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 6776, val = 2042660 (63 dB) avg 48 dB, ffo -0.019125
    [PHY] PSS execution duration 5627 microseconds
    [PHY] [UE0] Initial sync : Estimated PSS position 6776, Nid2 1
    [PHY] sync_pos 6776 ssb_offset 6740
    [PHY] Calling sss detection (normal CP)
    [PHY] TDD Normal prefix: CellId 298 metric 675, phase 2, pbch -1
    [PHY] [UE0] Initial sync : Estimated power: 0 dB
    [PHY] [SCHED][UE] Check absolute frequency DL 3576000000.000000, UL 3576000000.000000 (RF card 0, oai_exit 0, channel 0, rx_num_channels 1)
    ———————————————-
    gNB Config file
    ———————————————-
    Active_gNBs = ( “gNB-OAI”);
    # Asn1_verbosity, choice in: none, info, annoying
    Asn1_verbosity = “none”;

    gNBs =
    (
    {
    ////////// Identification parameters:
    gNB_ID = 0xe00;
    gNB_name = “gNB-OAI”;

    // Tracking area code, 0x0000 and 0xfffe are reserved values
    tracking_area_code = 1;
    plmn_list = ({
    mcc = 999;
    mnc = 99;
    mnc_length = 2;
    snssaiList = ({
    sst = 1;
    sd = 0x000001; // 0 false, else true
    });

    });

    nr_cellid = 12345678L;

    ////////// Physical parameters:

    do_CSIRS = 1;
    do_SRS = 1;
    sib1_tda = 15;
    min_rxtxtime = 6;

    pdcch_ConfigSIB1 = (
    {
    controlResourceSetZero = 12;
    searchSpaceZero = 0;
    }
    );

    servingCellConfigCommon = (
    {
    #spCellConfigCommon

    physCellId = 0;

    # downlinkConfigCommon
    #frequencyInfoDL
    # this is 3576 MHz
    absoluteFrequencySSB = 640288;
    dl_frequencyBand = 78;
    # this is 3556.92 MHz
    dl_absoluteFrequencyPointA = 640000;
    #scs-SpecificCarrierList
    dl_offstToCarrier = 0;
    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    dl_subcarrierSpacing = 1;
    dl_carrierBandwidth = 24;
    #initialDownlinkBWP
    #genericParameters
    # this is RBstart=27,L=48 (275*(L-1))+RBstart
    initialDLBWPlocationAndBandwidth = 6325; # 6366 12925 12956 28875 12952
    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    initialDLBWPsubcarrierSpacing = 1;
    #pdcch-ConfigCommon
    initialDLBWPcontrolResourceSetZero = 2 #12;
    initialDLBWPsearchSpaceZero = 0;

    #uplinkConfigCommon
    #frequencyInfoUL
    ul_frequencyBand = 78;
    #scs-SpecificCarrierList
    ul_offstToCarrier = 0;
    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    ul_subcarrierSpacing = 1;
    ul_carrierBandwidth = 24;
    pMax = 20 #26;
    #initialUplinkBWP
    #genericParameters
    initialULBWPlocationAndBandwidth = 6325;
    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    initialULBWPsubcarrierSpacing = 1;
    #rach-ConfigCommon
    #rach-ConfigGeneric
    prach_ConfigurationIndex = 98;
    #prach_msg1_FDM
    #0 = one, 1=two, 2=four, 3=eight
    prach_msg1_FDM = 0;
    prach_msg1_FrequencyStart = 0;
    zeroCorrelationZoneConfig = 13;
    preambleReceivedTargetPower = -96;
    #preamblTransMax (0…10) = (3,4,5,6,7,8,10,20,50,100,200)
    preambleTransMax = 6;
    #powerRampingStep
    # 0=dB0,1=dB2,2=dB4,3=dB6
    powerRampingStep = 1;
    #ra_ReponseWindow
    #1,2,4,8,10,20,40,80
    ra_ResponseWindow = 4;
    #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
    #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
    ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
    #oneHalf (0..15) 4,8,12,16,…60,64
    ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
    #ra_ContentionResolutionTimer
    #(0..7) 8,16,24,32,40,48,56,64
    ra_ContentionResolutionTimer = 7;
    rsrp_ThresholdSSB = 19;
    #prach-RootSequenceIndex_PR
    #1 = 839, 2 = 139
    prach_RootSequenceIndex_PR = 2;
    prach_RootSequenceIndex = 1;
    # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
    #
    msg1_SubcarrierSpacing = 1,
    # restrictedSetConfig
    # 0=unrestricted, 1=restricted type A, 2=restricted type B
    restrictedSetConfig = 0,

    msg3_DeltaPreamble = 1;
    p0_NominalWithGrant =-90;

    # pucch-ConfigCommon setup :
    # pucchGroupHopping
    # 0 = neither, 1= group hopping, 2=sequence hopping
    pucchGroupHopping = 0;
    hoppingId = 40;
    p0_nominal = -90;
    # ssb_PositionsInBurs_BitmapPR
    # 1=short, 2=medium, 3=long
    ssb_PositionsInBurst_PR = 2;
    ssb_PositionsInBurst_Bitmap = 1;

    # ssb_periodicityServingCell
    # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
    ssb_periodicityServingCell = 2;

    # dmrs_TypeA_position
    # 0 = pos2, 1 = pos3
    dmrs_TypeA_Position = 0;

    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    subcarrierSpacing = 1;

    #tdd-UL-DL-ConfigurationCommon
    # subcarrierSpacing
    # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
    referenceSubcarrierSpacing = 1;
    # pattern1
    # dl_UL_TransmissionPeriodicity
    # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
    dl_UL_TransmissionPeriodicity = 6;
    nrofDownlinkSlots = 7;
    nrofDownlinkSymbols = 6;
    nrofUplinkSlots = 2;
    nrofUplinkSymbols = 4;

    ssPBCH_BlockPower = -25;
    }

    );

    # ——- SCTP definitions
    SCTP :
    {
    # Number of streams to use in input/output
    SCTP_INSTREAMS = 2;
    SCTP_OUTSTREAMS = 2;
    };

    ////////// MME parameters:
    amf_ip_address = ( { ipv4 = "192.168.70.132";
    ipv6 = "192:168:30::17";
    active = "yes";
    preference = "ipv4";
    }
    );

    NETWORK_INTERFACES :
    {
    GNB_INTERFACE_NAME_FOR_NG_AMF = "enp134s0f1";
    GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.1.2";
    GNB_INTERFACE_NAME_FOR_NGU = "enp134s0f1";
    GNB_IPV4_ADDRESS_FOR_NGU = "192.168.1.2";
    GNB_PORT_FOR_S1U = 2152; # Spec 2152
    };

    }
    );

    MACRLCs = (
    {
    num_cc = 1;
    tr_s_preference = "local_L1";
    tr_n_preference = "local_RRC";
    pusch_TargetSNRx10 = 150;
    pucch_TargetSNRx10 = 200;
    ulsch_max_frame_inactivity = 0;
    }
    );

    L1s = (
    {
    num_cc = 1;
    tr_n_preference = "local_mac";
    pusch_proc_threads = 8;
    prach_dtx_threshold = 120;
    pucch0_dtx_threshold = 150;
    ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
    }
    );

    RUs = (
    {
    local_rf = "yes"
    nb_tx = 1
    nb_rx = 1
    att_tx = 0
    att_rx = 0
    bands = [78];
    #beamforming 1×4 matrix:
    #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
    clock_src = "internal";
    time_src = "internal";
    max_pdschReferenceSignalPower = -27;
    max_rxgain = 114;
    eNB_instances = [0];
    sdr_addrs = "type=x300";

    }
    );

    THREAD_STRUCT = (
    {
    #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
    parallel_config = "PARALLEL_SINGLE_THREAD";
    #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
    worker_config = "WORKER_ENABLE";
    }
    );

    rfsimulator :
    {
    serveraddr = "server";
    serverport = "4043";
    options = (); #("saviq"); or/and "chanmod"
    modelname = "AWGN";
    IQfile = "/tmp/rfsimulator.iqs";
    };

    security = {
    # preferred ciphering algorithms
    # the first one of the list that an UE supports in chosen
    # valid values: nea0, nea1, nea2, nea3
    ciphering_algorithms = ( "nea0" );

    # preferred integrity algorithms
    # the first one of the list that an UE supports in chosen
    # valid values: nia0, nia1, nia2, nia3
    integrity_algorithms = ( "nia2", "nia0" );

    # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
    # what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
    drb_ciphering = "yes";
    drb_integrity = "no";
    };

    log_config :
    {
    global_log_level ="info";
    global_log_verbosity ="medium";
    hw_log_level ="info";
    hw_log_verbosity ="medium";
    phy_log_level ="info";
    phy_log_verbosity ="medium";
    mac_log_level ="info";
    mac_log_verbosity ="high";
    rlc_log_level ="info";
    rlc_log_verbosity ="medium";
    pdcp_log_level ="info";
    pdcp_log_verbosity ="medium";
    rrc_log_level ="info";
    rrc_log_verbosity ="medium";
    ngap_log_level ="debug";
    ngap_log_verbosity ="medium";
    };

    1. Hi,

      I try with latest develpop branch version:
      [RRC] Read in ServingCellConfigCommon (PhysCellId 0, ABSFREQSSB 640288, DLBand 78, ABSFREQPOINTA 640000, DLBW 24,RACH_TargetReceivedPower -96
      [RRC] absoluteFrequencySSB 640288 corresponds to 3604320000 Hz

      Assertion ((freq - 3000000000) % 1440000 == 0) failed!
      In check_ssb_raster() /data/oai.dev/common/utils/nr/nr_common.c:362
      SSB frequency 3604320000 Hz not on the synchronization raster (3000 MHz + N * 1.44 MHz)

      Exiting execution

      so i guess you have not configured correctly the gNB

      I suggest also to test first with rfsimulator, to validate the system with perfect radio

      Regards,
      Laurent

Leave a Reply to laurent Cancel reply

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