srsran / srsRAN_Project

Open source O-RAN 5G CU/DU solution from Software Radio Systems (SRS) https://docs.srsran.com/projects/project
https://www.srsran.com
GNU Affero General Public License v3.0
504 stars 170 forks source link

srsUE unable to connect to srsgNB #859

Open LuxeZN opened 1 week ago

LuxeZN commented 1 week ago

Issue Description

Following the tutorial here https://docs.srsran.com/projects/project/en/latest/tutorials/source/srsUE/source/index.html we are able to get srsUE and the srsgNB working with B210s. We are trying to adapt the setup to work on N310s, we have seen some issues here and on the 4G repo to say that the N310 is not reliable as the UE. We were wondering if anyone could provide any insight or solutions.

Setup Details

Both computers have the same internals and setups:

CPU: Intel Core i9-13900TE Ubuntu: 20.04 UHD: 4.6.0.0 Radio: N310 srsRAN_Project commit: 51e44a642 srsRAN_4G commit: ec29b0c1f

Expected Behavior

srsUE to be able to find the srsgNB and connect/sync

Actual Behaviour

srsUE completes cell selection, starts the SIB1 acquisition, but fails the CRC check for PBCH-MIB. Looping error message "PBCH-MIB: CRC failed"

Steps to reproduce the problem

Configuration files: gNB - gnb_conf.txt UE - ue_conf.txt

Additional Information

Benchmark scripts and srsRAN performance scripts have been ran, we have the radios working using OpenAirInterface.

Log files: gNB - gnb.log UE - ue.log

yanggao017 commented 5 days ago

we have met the same problem

LuxeZN commented 3 days ago

we have met the same problem

have you had any progress?

pgawlowicz commented 3 days ago

please try to add the following to the srsue config file:

[expert]
lte_sample_rates = true

check here: https://docs.srsran.com/projects/project/en/latest/tutorials/source/srsUE/source/index.html#usrp-x300-x310

LuxeZN commented 2 days ago

please try to add the following to the srsue config file:

[expert]
lte_sample_rates = true

check here: https://docs.srsran.com/projects/project/en/latest/tutorials/source/srsUE/source/index.html#usrp-x300-x310

Retested with that parameter in the UE file, also tested with no timing advance, 45 timing advance, and 300 timing advance. Here are the logs: No timing advance: gNB - gnb.log UE - ue.log

45 timing advance: gNB - gnb45.log UE - ue45.log

300 timing advance: gNB - gnb300.log UE - ue300.log

The 45 timing advance seems to provide the most interesting result in which we are getting "PBCH-MIB: NR SFN (XXX) does not match current SFN (XXX)". Not sure if this is just a timing advance problem and we just need to iron out what value to use or something else? As a reference using OpenAirInterface gNB and UE we used 45 as our timing advance parameter which is why that value was tested.

LuxeZN commented 2 days ago

Also, in the terminal output at least we are getting confirmation that the RA procedure is trying to start after adding the parameter into the UE config. " Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0xf, tti=5451 Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0xf, tti=5481 Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0xf, tti=5511 Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0xf, tti=5541 Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0xf, tti=5571 Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0xf, tti=5601 Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0xf, tti=5611 "

pgawlowicz commented 2 days ago

could you try the patch from this comment https://github.com/srsran/srsRAN_Project/issues/826#issuecomment-2370588502

LuxeZN commented 2 days ago

could you try the patch from this comment #826 (comment)

Just tried, here are logs. Not sure why there are so many underflows in UE. Same terminal output as above. Logs: gNB - gnb_after_patch.log UE - ue_after_patch.log

pgawlowicz commented 2 days ago

do you run over RF cables or over the air?

could you reduce tx/rx gains of both gnb and ue?

LuxeZN commented 2 days ago

do you run over RF cables or over the air?

could you reduce tx/rx gains of both gnb and ue?

RF cables, 30 dB attenuation on each TX port, reduced RX and TX gain to 35 on gNB and UE. Logs: gNB - gnb_gain_down.log UE - ue_gain_down.log

pgawlowicz commented 2 days ago

the UE sends PRACH but the gnb does not receive it.

there are also issues with RF on gnb:

2024-10-16T17:38:27.499954 [RF      ] [W] Real-time failure in RF: underflow
2024-10-16T17:38:27.502869 [RF      ] [W] Real-time failure in RF: late

Do you run both gnb and srsue on the same pc?

Did you execute srsran_performance script?

Are the n310 directly connected to hostmachines?

Could you try this config for the gnb?

ru_sdr:
  device_driver: uhd
  device_args: type=n3xx, clock_source=external, time_source=external
  clock: external
  sync: external
  srate: 30.72
  tx_gain: 35
  rx_gain: 60
LuxeZN commented 2 days ago

I realized that, still not sure why there are so many RF issues.

  1. gNB and srsue are ran on separate machines
  2. The performance script has been ran on both machines
  3. The N310s are connected directly to host machines

Ran with that configuration you just sent, here are the logs: gNB - gnb_new_conf.log UE - ue_new_gnb_conf.log

pgawlowicz commented 2 days ago

Which UHD version do you use? Could you update ubuntu to at least 22.04? I think we are no longer supporting 20.04

LuxeZN commented 2 days ago

UHD is 4.6.0.0 on both machines, need to use 20.04 unfortunately. What do you think could be the difference in 22 vs 20 for this problem?

LuxeZN commented 2 days ago

Also, is there any patch needed to apply to srsRAN_Project repo instead of 4G from https://github.com/srsran/srsRAN_Project/issues/826#issuecomment-2370588502 ?

pgawlowicz commented 2 days ago

It is worth checking. A user was able to run gnb correctly with ubuntu 24.04 and n310 here: https://github.com/srsran/srsRAN_Project/discussions/863

LuxeZN commented 2 days ago

It is worth checking. A user was able to run gnb correctly with ubuntu 24.04 and n310 here: #863

We have to use 20.04 unfortunately. We will be doing some more testing I will put results here, let me know if you have any more insights on what could be going on.

LuxeZN commented 1 day ago

Testing cross configuration with N310/B210 as gNB and UE:

N310 as gNB and B210 as UE: Configs: gNB - gnb_n310_config.txt UE - ue_b210_config.txt Logs: gNB - gnb_n310_ue_b210.log UE - ue_b210_gnb_n310.log

Does not work, won't start RA procedure. Also tried using the working B210 config (the both config) below for the UE, same result

N310 as UE and B210 as gNB: Configs: gNB - gnb_b210_config.txt UE - ue_n310_config.txt Logs: gNB - gnb_b210.log UE - ue_n310.log

Does not work, won't start RA procedure. Also tried using the working B210 config (the both config) below for the gNB, same result.

B210 as UE and B210 as gNB: Configs: gNB - gnb_b210_both_config.txt UE - ue_b210_both_config.txt Logs: gNB - gnb_b210_both.log UE - ue_b210_both.log

This one works as expected, config files are almost identical to ones tried with N310s. Not sure what would change between them or have any affect but maybe you have some more insight? I really don't believe this to be an operating system support issue, please let me know your thoughts. I can do more testing to investigate specifics too.

LuxeZN commented 1 day ago

Just tried configuration with B210 as UE and N310 as gNB using configurations from above with both hooked up to the octoclock with the same result. Configs: gNB - gnb_n310_config (above) UE - ue_b210_both_config (above) Logs: gNB - gnb_n310_octo.log UE - ue_b210_octo.log

RA procedure never starts.

Erick5G commented 1 day ago

Hi @pgawlowicz @LuxeZN Will you know how to solve this issue?

unam5g@unam5g-Precision-3630-Tower:~$ uhd_usrp_probe [INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.7.0.0-0ubuntu1~jammy1 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.20.2,type=n3xx,product=n310,serial=316CD0E,claimed=False,addr=192.168.20.2 [INFO] [MPM.main] Launching USRP/MPM, version: 3.13.0.2-gunknown [INFO] [MPM.main] Spawning RPC process... [INFO] [MPM.PeriphManager] Device serial number: 316CD0E [INFO] [MPM.PeriphManager] Initialized 2 daughterboard(s). [ERROR] [MPM.PeriphManager] Major compat number mismatch for component `FPGA': Expected: 5.2 Actual: 8.2 [ERROR] [MPM.PeriphManager] Failed to initialize motherboard: Major compat number mismatch for component `FPGA': Expected: 5.2 Actual: 8.2 [ERROR] [MPM.PeriphManager] Cannot run init(), device was never fully initialized! [INFO] [MPM.RPCServer] RPC server ready! [INFO] [MPM.RPCServer] Spawning watchdog task... Error: rpc::timeout: Timeout of 2000ms while calling RPC function 'set_device_id' unam5g@unam5g-Precision-3630-Tower:~$ uhd_image_loader --args="type=n3xx,addr=192.168.20.2" [INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.7.0.0-0ubuntu1~jammy1 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.20.2,type=n3xx,product=n310,serial=316CD0E,claimed=False,skip_init=1 [WARNING] [MPM.RPCServer] A timeout event occured! [WARNING] [MPM.PeriphManager] Cannot run deinit(), device was never fully initialized! [INFO] [MPMD] Claimed device without full initialization. Error: EnvironmentError: IOError: Could not find the image 'usrp_n310_fpga.bit' in the image directory /usr/share/uhd/images/ For more information regarding image paths, please refer to the UHD manual.

I've already tried to follow the steps from ettus manual & uhd

LuxeZN commented 21 hours ago

Hi @pgawlowicz @LuxeZN Will you know how to solve this issue?

unam5g@unam5g-Precision-3630-Tower:~$ uhd_usrp_probe [INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.7.0.0-0ubuntu1~jammy1 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.20.2,type=n3xx,product=n310,serial=316CD0E,claimed=False,addr=192.168.20.2 [INFO] [MPM.main] Launching USRP/MPM, version: 3.13.0.2-gunknown [INFO] [MPM.main] Spawning RPC process... [INFO] [MPM.PeriphManager] Device serial number: 316CD0E [INFO] [MPM.PeriphManager] Initialized 2 daughterboard(s). [ERROR] [MPM.PeriphManager] Major compat number mismatch for component `FPGA': Expected: 5.2 Actual: 8.2 [ERROR] [MPM.PeriphManager] Failed to initialize motherboard: Major compat number mismatch for component `FPGA': Expected: 5.2 Actual: 8.2 [ERROR] [MPM.PeriphManager] Cannot run init(), device was never fully initialized! [INFO] [MPM.RPCServer] RPC server ready! [INFO] [MPM.RPCServer] Spawning watchdog task... Error: rpc::timeout: Timeout of 2000ms while calling RPC function 'set_device_id' unam5g@unam5g-Precision-3630-Tower:~$ uhd_image_loader --args="type=n3xx,addr=192.168.20.2" [INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.7.0.0-0ubuntu1~jammy1 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.20.2,type=n3xx,product=n310,serial=316CD0E,claimed=False,skip_init=1 [WARNING] [MPM.RPCServer] A timeout event occured! [WARNING] [MPM.PeriphManager] Cannot run deinit(), device was never fully initialized! [INFO] [MPMD] Claimed device without full initialization. Error: EnvironmentError: IOError: Could not find the image 'usrp_n310_fpga.bit' in the image directory /usr/share/uhd/images/ For more information regarding image paths, please refer to the UHD manual.

I've already tried to follow the steps from ettus manual & uhd

This isn't really a srsRAN question related to this issue, but are the UHD versions on the USRP and on the host computer? Did you power-cycle the USRP after running uhd_image_loader? UHD should be able to figure all of this out on it's own, I would post this on a UHD forum/mailing list somewhere and myself/others might be able to provide more guidance there.