FPGA平台srsUE无法连接srsRAN的技术排查请求
问题分析:srsUE无法附着srsRAN的原因排查
环境概述
- srsUE运行环境:搭载2核CPU、1G内存的Buildroot系统FPGA平台
- srsRAN(gNB)运行环境:Ubuntu 22系统笔记本
- 5GC部署方式:Docker化版本
- 通信链路:srsUE与srsRAN通过ZMQ在本地网络通信
- 核心问题:srsUE无法完成到srsRAN的附着流程
日志信息
UE日志
UE日志截图显示,设备处于小区搜索阶段,但未成功完成后续的同步、附着流程。
gNB日志
2025-03-07T20:05:40.500739 [zmq:tx:0:0] [I] Waiting for request. 2025-03-07T20:05:41.195026 [zmq:rx:0:0] [I] Waiting for data. 2025-03-07T20:05:41.196508 [zmq:rx:0:0] [I] Waiting for reading samples. Completed 300 of 11520 samples. 2025-03-07T20:05:41.500739 [zmq:tx:0:0] [I] Waiting for request. 2025-03-07T20:05:42.195028 [zmq:rx:0:0] [I] Waiting for data. 2025-03-07T20:05:42.196532 [zmq:rx:0:0] [I] Waiting for reading samples. Completed 300 of 11520 samples. 2025-03-07T20:05:42.500741 [zmq:tx:0:0] [I] Waiting for request. 2025-03-07T20:05:43.195030 [zmq:rx:0:0] [I] Waiting for data. 2025-03-07T20:05:43.196586 [zmq:rx:0:0] [I] Waiting for reading samples. Completed 300 of 11520 samples.
配置文件
UE配置文件
[rf] freq_offset = 0 tx_gain = 50 rx_gain = 50 srate = 23.04e6 nof_antennas = 1 device_name = zmq device_args = tx_port=tcp://[ue ip]:2002,rx_port=tcp://[gnb ip]:2001,base_srate=23.04e6 [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 # Instead of info phy_lib_level = debug all_hex_limit = 32 filename = /usr/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
gNB配置文件
# This configuration file example shows how to configure the srsRAN Project gNB to allow srsUE to connect to it. # This specific example uses ZMQ in place of a USRP for the RF-frontend, and creates an FDD cell with 10 MHz bandwidth. # To run the srsRAN Project gNB with this config, use the following command: # sudo ./gnb -c gnb_zmq.yaml cu_cp: amf: addr: 10.53.1.2 # The address or hostname of the AMF. port: 38412 bind_addr: 10.53.1.1 # A local IP that the gNB binds to for traffic from the AMF. supported_tracking_areas: - tac: 7 plmn_list: - plmn: "00101" tai_slice_support_list: - sst: 1 inactivity_timer: 7200 # Sets the UE/PDU Session/DRB inactivity timer to 7200 seconds. Supported: [1 - 7200]. ru_sdr: device_driver: zmq # The RF driver name. device_args: tx_port=tcp://[gnb ip]:2001,rx_port=tcp://[ue ip]:2002,base_srate=23.04e6 # Optionally pass arguments to the selected RF driver. srate: 23.04 # RF sample rate might need to be adjusted according to selected bandwidth. tx_gain: 75 # Transmit gain of the RF might need to adjusted to the given situation. rx_gain: 75 # 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: 7 # Tracking area code (needs to match the core configuration). pdcch: 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 dedicated: ss2_type: common # Search Space type, has to be set to common dci_format_0_1_and_1_1: false # Set correct DCI format (fallback) prach: prach_config_index: 1 # Sets PRACH config to match what is expected by srsUE # Sets PDSCH MCS to 64 QAM # Sets PUSCH MCS to 64 QAM pdsch: mcs_table: qam64 pusch: mcs_table: qam64 log: filename: /tmp/gnb.log # Path of the log file. all_level: debug # Logging level applied to all layers. rrc_level: debug f1ap_level: debug f1ap_json_enabled: true hex_max_size: 0 # Logging level applied to all layers pcap: mac_enable: false # Set to true to enable MAC-layer PCAPs. mac_filename: /tmp/gnb_mac.pcap # Path where the MAC PCAP is stored. ngap_enable: false # Set to true to enable NGAP PCAPs. ngap_filename: /tmp/gnb_ngap.pcap # Path where the NGAP PCAP is stored.
诊断结论
1. 带宽与采样率配置验证
gNB配置20MHz带宽、15kHz子载波间隔,理论所需采样率为20MHz × 1.12(过采样因子)=22.4MHz,当前配置的23.04e6采样率符合要求,且UE与gNB的采样率、base_srate参数完全一致,因此带宽与采样率不匹配的可能性可以排除。
2. 资源限制分析
从gNB日志可见,ZMQ接收端仅收到部分采样数据(300/11520),说明UE无法生成或发送完整的基带样本。srsUE的PHY层对CPU计算能力要求较高,尤其是NR模式下,2核1G内存的FPGA平台资源严重不足,无法及时处理基带信号的编码、解码及ZMQ数据传输任务,导致UE无法完成小区同步、附着的关键流程。
3. 补充验证建议
- 查看UE端系统负载:执行
top或sar -u 1命令,若CPU持续处于100%使用率,可明确资源不足的问题 - 检查ZMQ端口映射:当前UE与gNB的端口配置是对应的(UE rx_port对应gNB tx_port,UE tx_port对应gNB rx_port),链路配置无问题
解决方案建议
- 降低UE配置负载:将带宽调整为10MHz,对应采样率改为11.52e6,减少PHY层计算量
- 优化系统资源:关闭Buildroot系统中不必要的后台服务,释放内存和CPU资源
- 调整进程优先级:给srsUE进程分配更高的CPU调度优先级,确保关键任务的执行资源
内容的提问来源于stack exchange,提问作者Shirin Ebadi
相关产品推荐
相关产品推荐

