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
522 stars 178 forks source link

srsUE is unable to connect to gNB (Error "Proc Cell Selection" - Unsupported SCS 15KHz) #477

Closed ESab00 closed 7 months ago

ESab00 commented 9 months ago

Issue Description

UE Error "Proc Cell Selection" - Unsupported SCS 15KHz after following the tutorial.

Setup Details

Laptop 1 (Open5GS + srsRAN_Project gNB): Lenovo Thinkpad T14 Gen 3 (Intel i7-1260P, 32GB RAM, Ubuntu 22.04.3 LTS

Laptop 2 (srsRAN_4G srsue): Lenovo Thinkpad T15G Gen 1 (Intel i7-10850H, 32GB RAM, Ubuntu 22.04.03 LTS

2x USRP B210

Both Ubuntus are freshly installed, nothing else on it.

Expected Behavior

UE connects to the gNB.

Actual Behaviour

Open5GS and gNB are running successfully. UE tries to connect, fails during Cell Selection. Error Message: "[E] Proc "Cell Selection" - Unsupported SCS 15KHz" (Logs and configs below)

Steps to reproduce the problem

I followed the tutorial, just changed the clock from external to internal (as I am not using an external clock). UE is registered in the core.

gNB config:

amf:
  addr: 127.0.0.5                                                 # The address or hostname of the AMF.
  bind_addr: 127.0.0.1                                            # A local IP that the gNB binds to for>

ru_sdr:
  device_driver: uhd                                              # The RF driver name.
  device_args: type=b200                                          # Optionally pass arguments to the selected RF driver.
  sync: internal                                                  # Set sync to external. This set-up uses a LEO BODNAR GPDSO providing a 10 MHz ref.
  srate: 23.04                                                    # RF sample rate might need to be adjusted according to selected bandwidth.
  tx_gain: 80                                                     # Transmit gain of the RF might need to adjusted to the given situation.
  rx_gain: 40                                                     # Receive gain of the RF might need to adjusted to the given situation.

cell_cfg:
  dl_arfcn: 368500                                                # ARFCN of the downlink carrier (center frequency).
  band: 3                                                         # The NR band.
  channel_bandwidth_MHz: 20                                       # Bandwith in MHz. Number of PRBs will be automatically derived.
  common_scs: 15                                                  # Subcarrier spacing in kHz used for data.
  plmn: "00101"                                                   # PLMN broadcasted by the gNB.
  tac: 1                                                          # Tracking area code (needs to match the core configuration). 
  pdcch:
    dedicated:
      ss2_type: common                                            # Set search space to common to match capabilities
      dci_format_0_1_and_1_1: false                               # Use fallback DCI to match srsUE capabilities
    common:
      ss0_index: 0                                                # Set search space zero index to match srsUE capabilities
      coreset0_index: 12                                          # Set search CORESET Zero index to match srsUE capabilities
  prach:
    prach_config_index: 1                                         # Set PRACH config index to match srsUE expectation 

log:
  filename: /tmp/gnb.log                                          # Path of the log file.
  all_level: info                                                 # Logging level applied to all layers.

pcap:
  mac_enable: enable                                              # Set to true to enable MAC-layer PCAP>
  mac_filename: /tmp/gnb_mac.pcap                                 # Path where the MAC PCAP is stored.
  ngap_enable: enable                                             # Set to true to enable NGAP PCAPs.
  ngap_filename: /tmp/gnb_ngap.pcap                               # Path where the NGAP PCAP is stored.

UE config:

[rf]
freq_offset = 0
tx_gain = 50
rx_gain = 40
srate = 23.04e06
nof_antennas = 1

device_name = uhd
device_args = clock=internal
time_adv_nsamples = 300

[rat.eutra]
dl_earfcn = 2850
nof_carriers = 0

[rat.nr]
bands = 3
nof_carriers = 1
max_nof_prb = 106
nof_prb = 106

[pcap]
enable = none
mac_filename = /tmp/ue_mac.pcap
mac_nr_filename = /tmp/ue_mac_nr.pcap
nas_filename = /tmp/ue_nas.pcap

[log]
all_level = debug
phy_lib_level = none
all_hex_limit = 32
filename = /tmp/ue.log
file_max_size = -1

[usim]
mode = soft
algo = milenage
opc  = 63BFA50EE6523365FF14C1F45F88737D
k    = 00112233445566778899aabbccddeeff
imsi = 001010123456780
imei = 353490069873319

[rrc]
release = 15
ue_category = 4

[nas]
apn = srsapn
apn_protocol = ipv4

[gw]
#netns = ue1
#ip_devname = tun_srsue
#ip_netmask = 255.255.255.0

[gui]
enable = false

UE log:

2024-02-15T15:46:22.823203 [UE     ] [I] Using binary srsue with arguments: ue_rf.conf 
2024-02-15T15:46:22.844420 [UE     ] [I] Built in Release mode using commit fa56836b1 on branch master.
2024-02-15T15:46:22.875968 [RF     ] [I] Configuring physical DL channel 0 with band-pass filter (0.0, 0.0)
2024-02-15T15:46:22.875968 [RF     ] [I] Configuring physical UL channel 0 with band-pass filter (0.0, 0.0)
2024-02-15T15:46:24.394097 [MAC    ] [I] [    0] Resetting MAC
2024-02-15T15:46:24.394101 [MAC    ] [I] [    0] Logical Channel Setup: LCID=0, LCG=0, priority=0, PBR=-1, BSD=50ms, bucket_size=0
2024-02-15T15:46:24.394103 [MAC    ] [I] [    0] Logical Channel Setup: LCID=1, LCG=0, priority=1, PBR=-1, BSD=50ms, bucket_size=0
2024-02-15T15:46:24.394109 [MAC    ] [I] [    0] Setting configuration
2024-02-15T15:46:24.394110 [MAC    ] [I] [    0] BSR:   Configured timer reTX 2560 ms
2024-02-15T15:46:24.394115 [RLC    ] [I] Added LTE radio bearer with LCID 0 in Transparent Mode
2024-02-15T15:46:24.394122 [USIM   ] [I] Read Home PLMN Id=00101
2024-02-15T15:46:24.397195 [RLC-NR ] [I] Added LTE radio bearer with LCID 0 in Transparent Mode
2024-02-15T15:46:24.397199 [MAC-NR ] [I] [    0] Logical Channel Setup: LCID=0, LCG=0, priority=0, PBR=0, BSD=0ms, bucket_size=0
2024-02-15T15:46:24.397219 [RRC    ] [I] using srand seed of 397219
2024-02-15T15:46:24.427110 [STCK   ] [I] Triggering NAS switch on
2024-02-15T15:46:24.427191 [NAS5G  ] [I] Switching on
2024-02-15T15:46:24.491349 [USIM   ] [I] Read Home PLMN Id=00101
2024-02-15T15:46:24.491350 [NAS5G  ] [I] Requesting IMSI attach (IMSI=001010123456780)
2024-02-15T15:46:24.491355 [NAS5G  ] [I] Sending Registration Request
2024-02-15T15:46:24.491356 [RRC-NR ] [I] Proc "Setup Request" - Initiation of Setup request procedure
2024-02-15T15:46:24.491356 [RRC-NR ] [I] Proc "Cell Selection" - Starting...
2024-02-15T15:46:24.491363 [PHY-SA ] [I] [    0] Cell Search: Going to IDLE
2024-02-15T15:46:24.491364 [PHY-SA ] [I] [    0] Tuning Rx channel 0 to 1842.50 MHz
2024-02-15T15:46:24.491368 [RF     ] [I] Mapping RF channel 0 (device=0, channel=0) to logical carrier 0 on f_rx=1842.5 MHz
2024-02-15T15:46:24.664250 [PHY-SA ] [I] [    0] Cell search: Setting SSB configuration srate=23.04 MHz; c-freq=1842.500 MHz; ss-freq=1842.050 MHz; scs=15kHz; pattern=A; duplex=fdd;
2024-02-15T15:46:24.664486 [PHY-SA ] [I] [    0] Cell Search: Running Cell search state
2024-02-15T15:46:24.690971 [RRC-NR ] [E] Proc "Cell Selection" - Unsupported SCS 15kHz
2024-02-15T15:46:24.690971 [RRC-NR ] [I] Proc "Cell Selection" - Completed with failure.
2024-02-15T15:46:24.690976 [RRC-NR ] [W] Could not finish setup request. Deallocating dedicatedInfoNAS PDU
2024-02-15T15:46:25.489912 [MAC    ] [I] [    0] BSR:   triggered_bsr_type=none, LCID QUEUE status: 0: 0 1: 0 
2024-02-15T15:46:25.526947 [STCK   ] [I] tti_tprof: {mean, max, min} = {0.00, 0, 0} msec
2024-02-15T15:46:26.488923 [MAC    ] [I] [    0] BSR:   triggered_bsr_type=none, LCID QUEUE status: 0: 0 1: 0 
2024-02-15T15:46:26.550966 [STCK   ] [I] tti_tprof: {mean, max, min} = {0.00, 0, 0} msec
2024-02-15T15:46:27.488004 [MAC    ] [I] [    0] BSR:   triggered_bsr_type=none, LCID QUEUE status: 0: 0 1: 0 
2024-02-15T15:46:27.574945 [STCK   ] [I] tti_tprof: {mean, max, min} = {0.00, 0, 0} msec
2024-02-15T15:46:28.486951 [MAC    ] [I] [    0] BSR:   triggered_bsr_type=none, LCID QUEUE status: 0: 0 1: 0 
2024-02-15T15:46:28.598985 [STCK   ] [I] tti_tprof: {mean, max, min} = {0.00, 0, 0} msec
2024-02-15T15:46:29.485963 [MAC    ] [I] [    0] BSR:   triggered_bsr_type=none, LCID QUEUE status: 0: 0 1: 0 
2024-02-15T15:46:29.623006 [STCK   ] [I] tti_tprof: {mean, max, min} = {0.00, 0, 0} msec
2024-02-15T15:46:30.484999 [MAC    ] [I] [    0] BSR:   triggered_bsr_type=none, LCID QUEUE status: 0: 0 1: 0 
2024-02-15T15:46:30.646993 [STCK   ] [I] tti_tprof: {mean, max, min} = {0.00, 0, 0} msec
2024-02-15T15:46:31.110532 [NAS    ] [I] Switching off

UE log with log level debug: ue_Debug.log

gNB log: gnb.log

dhiaboujebha commented 9 months ago

@ESab00 Could you share the console output of your gnb, ue and AMF?

ESab00 commented 9 months ago

@dhiaboujebha Sorry for the late reply, didn't have access to the SDRs the last couple of days.

AMF and gNB are looking fine to me, the gNB is attaching correctly without issues. Sometimes there is an occasional Underflow (maybe once per minute), but as i've read this shouldn't be an issue.

The UE console output also looks normal, but it gets stuck in the "Attaching UE"-phase. I also tried letting it run for about 15 minutes like this, nothing else shows up after that.

Here are the console outputs:

gNB console:

--== srsRAN gNB (commit 0b2702cca) ==--

Connecting to AMF on 127.0.0.5:38412
Available radio types: uhd and zmq.
[INFO] [UHD] linux; GNU C++ version 11.2.0; Boost_107400; UHD_4.1.0.5-3
Making USRP object with args 'type=b200'
[INFO] [LOGGING] Fastpath logging disabled at runtime.
[INFO] [B200] Loading firmware image: /usr/share/uhd/images/usrp_b200_fw.hex...
[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] Setting master clock rate selection to 'automatic'.
[INFO] [B200] Asking for clock rate 16.000000 MHz... 
[INFO] [B200] Actually got clock rate 16.000000 MHz.
[INFO] [MULTI_USRP] Setting master clock rate selection to 'manual'.
[INFO] [B200] Asking for clock rate 23.040000 MHz... 
[INFO] [B200] Actually got clock rate 23.040000 MHz.
Cell pci=1, bw=20 MHz, dl_arfcn=368500 (n3), dl_freq=1842.5 MHz, dl_ssb_arfcn=368410, ul_freq=1747.5 MHz

==== gNodeB started ===
Type <t> to view trace
Late: 0; Underflow: 1; Overflow: 0;

AMF console:

02/21 10:49:59.355: [sbi] INFO: (NRF-notify) NF registered [938204d6-d09e-41ee-9d3b-a9ced6d31884:1] (../lib/sbi/nnrf-handler.c:924)
02/21 10:49:59.355: [sbi] INFO: [SMF] (NRF-notify) NF Profile updated [938204d6-d09e-41ee-9d3b-a9ced6d31884:1] (../lib/sbi/nnrf-handler.c:938)
02/21 10:50:00.003: [sbi] INFO: (NRF-notify) NF registered [93e9599c-d09e-41ee-b4fa-378a54e68cb1:1] (../lib/sbi/nnrf-handler.c:924)
02/21 10:50:00.004: [sbi] INFO: [PCF] (NRF-notify) NF Profile updated [93e9599c-d09e-41ee-b4fa-378a54e68cb1:1] (../lib/sbi/nnrf-handler.c:938)
02/21 10:58:25.875: [amf] INFO: gNB-N2 accepted[127.0.0.1]:33144 in ng-path module (../src/amf/ngap-sctp.c:113)
02/21 10:58:25.875: [amf] INFO: gNB-N2 accepted[127.0.0.1] in master_sm module (../src/amf/amf-sm.c:741)
02/21 10:58:25.879: [amf] INFO: [Added] Number of gNBs is now 1 (../src/amf/context.c:1231)
02/21 10:58:25.879: [amf] INFO: gNB-N2[127.0.0.1] max_num_of_ostreams : 30 (../src/amf/amf-sm.c:780)

UE console:

Active RF plugins: libsrsran_rf_uhd.so
Inactive RF plugins: 
Reading configuration file ue_rf.conf...

Built in Release mode using commit fa56836b1 on branch master.

Opening 1 channels in RF device=uhd with args=clock=internal
Supported RF device list: UHD file
[INFO] [UHD] linux; GNU C++ version 11.3.0; Boost_107400; UHD_4.4.0.0-0ubuntu1~jammy1
[INFO] [LOGGING] Fastpath logging disabled at runtime.
[INFO] [B200] Loading firmware image: /usr/share/uhd/images/usrp_b200_fw.hex...
Opening USRP channels=1, args: type=b200,master_clock_rate=23.04e6
[INFO] [UHD RF] RF UHD Generic instance constructed
[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 23.040000 MHz... 
[INFO] [B200] Actually got clock rate 23.040000 MHz.
Setting manual TX/RX offset to 300 samples
Waiting PHY to initialize ... done!
Attaching UE...
RF status: O=5, U=0, L=0
pgawlowicz commented 8 months ago

could you try to replace the RU config part to zmq-based RF-devices and check whether it works? if it works, then we at least know the issue is related to the RF setup. Also could you connect external clock to both b210s?

pgawlowicz commented 7 months ago

@ESab00 any update on this issue?