Skip to content

s5uishida/build_srsran_5g_zmq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 

Repository files navigation

Build srsRAN_Project 5G RAN with ZeroMQ

srsRAN_Project software suite includes a virtual radio which uses the ZeroMQ networking library to transfer radio samples between applications. Therefore, in order to confirm the facilities of 5GC, I will describe the simple procedure for building the virtual gNodeB instead of the real device.

Please refer to the following for building srsRAN_Project 5G RAN with ZeroMQ.

The specification of the VM that have been confirmed to work is as follows.

OS CPU (Min) Memory (Min) HDD (Min)
Ubuntu 24.04 2 4GB 10GB

4GB or more memory is required to build. And 2 CPU cores or more are required to run.

Also, when connecting by 5G NR-UE with ZeroMQ, see here for how to build and configure this RF simulated UE.



Table of Contents


Install the required libraries including ZeroMQ

apt install cmake make gcc g++ pkg-config libfftw3-dev libmbedtls-dev libsctp-dev libyaml-cpp-dev libgtest-dev libzmq3-dev

Clone srsRAN_Project

git clone https://github.com/srsran/srsRAN_Project.git

Build srsRAN_Project 5G RAN

cd srsRAN_Project
mkdir build
cd build
cmake ../ -DENABLE_EXPORT=ON -DENABLE_ZEROMQ=ON
make -j`nproc`

According to this, when building with Virtualbox VM, if you don't worry about running it in real-time, you could add -DAUTO_DETECT_ISA=OFF to cmake options.

cmake ../ -DENABLE_EXPORT=ON -DENABLE_ZEROMQ=ON -DAUTO_DETECT_ISA=OFF

Create the configuration file of gNodeB

Get gNB config of ZeroMQ-based Setup as the original file.

cd srsRAN_Project/build/apps/gnb
wget <link of "gNB config">

For reference, gnb_zmq.yaml on 2024.10.14 is as follows.

# 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://127.0.0.1:2000,rx_port=tcp://127.0.0.1:2001,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

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

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.

Then, edit gnb_zmq.yaml with reference to this according to your environment.

Issues

If the latest main branch doesn't work, you may try the latest release version.

  1. If the gnb on Virtualbox VM fails to do NGSetup, this might help to solve it.
  2. According to here, there is an issue where downlink packets stop flowing between srsue and srsgnb via ZeroMQ. The hotfix is here.
  3. According to here, 2 CPU cores or more are required to run.
  4. According to here, UE(ue_zmq.conf) failed to connect to Open5GS via gNodeB of srsRAN_Project 23.10. This solved it.

Confirmed Version List

I simply confirmed the operation of the following versions.

Version Commit Date Issues
24.10 9d5dd742a70e82c0813c34f57982f9507f1b6d5d 2024.10.14 3
24.04+ 4ac5300d4927b5199af69e6bc2e55d061fc33652 2024.07.31 3
24.04+ c33cacba7d940e734ac7bad08935cbc35578fad9 2024.06.10 3
24.04+ 78238fd15e4cd82a6324d6dbbb612ac5584b13ea 2024.05.13 3
24.04 1483bda3091420cf7270eacdf31de932865c6294 2024.04.22 3
23.10.1+ 2f90c8b60e9396a7aed59645c98dbcbccda2bf7c 2024.03.25 3
23.10.1 374200deefd8e1b96fab7328525fd593a808a641 2023.10.23 3
23.10 e38e418bda8432397b2fa7dc399cb7afde3c3b95 2023.10.20 3, 4
23.5+ 5e6f50a202c6efa671d5b231d7c911dc6c3d86ed 2023.09.20 3
23.5+ 1afd7240f2b5e2061ab4158e8fcdacb15961813a 2023.08.07 1, 2

Sample Configurations

Changelog (summary)

  • [2024.10.16] Updated a list of confirmed versions.
  • [2024.08.31] Updated a list of confirmed versions.
  • [2024.05.14] Updated a list of confirmed versions. And changed the OS from Ubuntu 22.04 to 24.04.
  • [2024.05.02] Updated a list of confirmed versions.
  • [2024.03.29] Updated a list of confirmed versions.
  • [2023.12.02] Updated a list of confirmed versions.
  • [2023.11.02] Updated gnb_zmq.yaml.
  • [2023.10.21] Added the case of srsRAN_Project 23.10.
  • [2023.10.10] Added a list of confirmed versions.
  • [2023.08.10] Initial release.

About

Build srsRAN_Project 5G RAN with ZeroMQ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published