-
Notifications
You must be signed in to change notification settings - Fork 314
My UEs are not attatching when running the multi UE scenario in different machines. #1354
Replies: 14 comments · 20 replies
-
|
@JoaoGabrielTN in your flowgraph you send DL to UEs at 192.168.0.206, but UEs receive at 192.168.0.108. Please review all IPs. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I made an error while editing the answer, It's actually just |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
ah ok. Does the setup run correctly (i.e., all UE get IP and can ping) when executed on a single host? |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Yes, the setup run correctly when executed on a single host. The UEs get their IP and can ping. Configsue1[rf]
freq_offset = 0
tx_gain = 50
rx_gain = 40
srate = 11.52e6
nof_antennas = 1
device_name = zmq
device_args = tx_port=tcp://127.0.0.1:2101,rx_port=tcp://127.0.0.1:2100,base_srate=11.52e6
[rat.eutra]
dl_earfcn = 2850
nof_carriers = 0
[rat.nr]
bands = 3
nof_carriers = 1
max_nof_prb = 52
nof_prb = 52
[pcap]
enable = none
mac_filename = /tmp/ue1_mac.pcap
mac_nr_filename = /tmp/ue1_mac_nr.pcap
nas_filename = /tmp/ue1_nas.pcap
[log]
all_level = info
phy_lib_level = none
all_hex_limit = 32
filename = /tmp/ue1.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 = falseue2[rf]
freq_offset = 0
tx_gain = 50
rx_gain = 40
srate = 11.52e6
nof_antennas = 1
device_name = zmq
device_args = tx_port=tcp://127.0.0.1:2201,rx_port=tcp://127.0.0.1:2200,base_srate=11.52e6
[rat.eutra]
dl_earfcn = 2850
nof_carriers = 0
[rat.nr]
bands = 3
nof_carriers = 1
max_nof_prb = 52
nof_prb = 52
[pcap]
enable = none
mac_filename = /tmp/ue2_mac.pcap
mac_nr_filename = /tmp/ue2_mac_nr.pcap
nas_filename = /tmp/ue2_nas.pcap
[log]
all_level = info
phy_lib_level = none
all_hex_limit = 32
filename = /tmp/ue2.log
file_max_size = -1
[usim]
mode = soft
algo = milenage
opc = 63bfa50ee6523365ff14c1f45f88737d
k = 00112233445566778899aabbccddef00
imsi = 001010123456790
imei = 353490069873318
[rrc]
release = 15
ue_category = 4
[nas]
apn = srsapn
apn_protocol = ipv4
[gw]
netns = ue2
ip_devname = tun_srsue
ip_netmask = 255.255.255.0
[gui]
enable = falseue3[rf]
freq_offset = 0
tx_gain = 50
rx_gain = 40
srate = 11.52e6
nof_antennas = 1
device_name = zmq
device_args = tx_port=tcp://127.0.0.1:2301,rx_port=tcp://127.0.0.1:2300,base_srate=11.52e6
[rat.eutra]
dl_earfcn = 2850
nof_carriers = 0
[rat.nr]
bands = 3
nof_carriers = 1
max_nof_prb = 52
nof_prb = 52
[pcap]
enable = none
mac_filename = /tmp/ue3_mac.pcap
mac_nr_filename = /tmp/ue3_mac_nr.pcap
nas_filename = /tmp/ue3_nas.pcap
[log]
all_level = info
phy_lib_level = none
all_hex_limit = 32
filename = /tmp/ue3.log
file_max_size = -1
[usim]
mode = soft
algo = milenage
opc = 63bfa50ee6523365ff14c1f45f88737d
k = 00112233445566778899aabbccddef01
imsi = 001010123456791
imei = 353490069873312
[rrc]
release = 15
ue_category = 4
[nas]
apn = srsapn
apn_protocol = ipv4
[gw]
netns = ue3
ip_devname = tun_srsue
ip_netmask = 255.255.255.0
[gui]
enable = falsegNB# 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=11.52e6 # Optionally pass arguments to the selected RF driver.
srate: 11.52 # 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: 10 # 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: 6 # 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
total_nof_ra_preambles: 64 # Sets number of available PRACH preambles. J
nof_ssb_per_ro: 1 # Sets the number of SSBs per RACH occasion. J
nof_cb_preambles_per_ssb: 64 # Sets the number of contention based preambles per SSB. J
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.
hex_max_size: 0
tracing_filename: /tmp/gnb_trace.log
pcap:
mac_enable: true # Set to true to enable MAC-layer PCAPs.
mac_filename: /tmp/gnb_mac.pcap # Path where the MAC PCAP is stored.
ngap_enable: true # Set to true to enable NGAP PCAPs.
ngap_filename: /tmp/gnb_ngap.pcap # Path where the NGAP PCAP is stored.
# e2ap_enable: true # Set to true to enable E2AP PCAPs.
# e2ap_du_filename: /tmp/gnb_du_e2ap.pcap # Path where the DU E2AP PCAP is stored.
# e2ap_cu_cp_filename: /tmp/gnb_cu_cp_e2ap.pcap # Path where the CU-CP E2AP PCAP is stored.
# e2ap_cu_up_filename: /tmp/gnb_cu_up_e2ap.pcap # Path where the CU-UP E2AP PCAP is stored.
#e2:
# enable_du_e2: true # Enable DU E2 agent (one for each DU instance)
# enable_cu_cp_e2: true # Enables the CU E2 agent for CU-CP
# enable_cu_up_e2: true # Enables the CU E2 agent for CU-UP
# e2sm_kpm_enabled: true # Enable KPM service module
# e2sm_rc_enabled: true # Enable RC service module
# addr: 10.0.2.10 # RIC IP address
# bind_addr: 10.0.2.1 # A local IP that the E2 agent binds to for traffic from the RIC. ONLY required if running the RIC on a separate machine.
# port: 36421 # RIC port
metrics:
autostart_stdout_metrics: true
# enable_log: false
enable_json_metrics: true
#periodicity:
# du_report_period: 1000
# cu_up_report_period: 1000
# cu_cp_report_period: 1000
#layers:
# enable_ru: false
# enable_sched: true
# enable_rlc: true
# enable_mac: true
# enable_pdcp: false
# enable_du_low: falsemulti_ue_scenario.py#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: GPL-3.0
#
# GNU Radio Python Flow Graph
# Title: srsRAN_multi_UE
# GNU Radio version: 3.10.1.1
from packaging.version import Version as StrictVersion
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.startswith('linux'):
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()
except:
print("Warning: failed to XInitThreads()")
from gnuradio import blocks
from gnuradio import gr
from gnuradio.filter import firdes
from gnuradio.fft import window
import sys
import signal
from PyQt5 import Qt
from argparse import ArgumentParser
from gnuradio.eng_arg import eng_float, intx
from gnuradio import eng_notation
from gnuradio import zeromq
from gnuradio.qtgui import Range, RangeWidget
from PyQt5 import QtCore
from gnuradio import qtgui
class multi_ue_scenario(gr.top_block, Qt.QWidget):
def __init__(self):
gr.top_block.__init__(self, "srsRAN_multi_UE", catch_exceptions=True)
Qt.QWidget.__init__(self)
self.setWindowTitle("srsRAN_multi_UE")
qtgui.util.check_set_qss()
try:
self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
except:
pass
self.top_scroll_layout = Qt.QVBoxLayout()
self.setLayout(self.top_scroll_layout)
self.top_scroll = Qt.QScrollArea()
self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
self.top_scroll_layout.addWidget(self.top_scroll)
self.top_scroll.setWidgetResizable(True)
self.top_widget = Qt.QWidget()
self.top_scroll.setWidget(self.top_widget)
self.top_layout = Qt.QVBoxLayout(self.top_widget)
self.top_grid_layout = Qt.QGridLayout()
self.top_layout.addLayout(self.top_grid_layout)
self.settings = Qt.QSettings("GNU Radio", "multi_ue_scenario")
try:
if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
self.restoreGeometry(self.settings.value("geometry").toByteArray())
else:
self.restoreGeometry(self.settings.value("geometry"))
except:
pass
##################################################
# Variables
##################################################
self.zmq_timeout = zmq_timeout = 100
self.zmq_hwm = zmq_hwm = -1
self.ue3_path_loss_db = ue3_path_loss_db = 20
self.ue2_path_loss_db = ue2_path_loss_db = 10
self.ue1_path_loss_db = ue1_path_loss_db = 0
self.slow_down_ratio = slow_down_ratio = 4
self.samp_rate = samp_rate = 11520000
##################################################
# Blocks
##################################################
self._ue3_path_loss_db_range = Range(0, 100, 1, 20, 200)
self._ue3_path_loss_db_win = RangeWidget(self._ue3_path_loss_db_range, self.set_ue3_path_loss_db, "UE3 Pathloss [dB]", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._ue3_path_loss_db_win)
self._ue2_path_loss_db_range = Range(0, 100, 1, 10, 200)
self._ue2_path_loss_db_win = RangeWidget(self._ue2_path_loss_db_range, self.set_ue2_path_loss_db, "UE2 Pathloss [dB]", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._ue2_path_loss_db_win)
self._ue1_path_loss_db_range = Range(0, 100, 1, 0, 200)
self._ue1_path_loss_db_win = RangeWidget(self._ue1_path_loss_db_range, self.set_ue1_path_loss_db, "UE1 Pathloss [dB]", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._ue1_path_loss_db_win)
self._slow_down_ratio_range = Range(1, 32, 1, 4, 200)
self._slow_down_ratio_win = RangeWidget(self._slow_down_ratio_range, self.set_slow_down_ratio, "Time Slow Down Ratio", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._slow_down_ratio_win)
self.zeromq_req_source_1_0 = zeromq.req_source(gr.sizeof_gr_complex, 1, 'tcp://127.0.0.1:2201', zmq_timeout, False, zmq_hwm)
self.zeromq_req_source_1 = zeromq.req_source(gr.sizeof_gr_complex, 1, 'tcp://127.0.0.1:2101', zmq_timeout, False, zmq_hwm)
self.zeromq_req_source_0_0 = zeromq.req_source(gr.sizeof_gr_complex, 1, 'tcp://127.0.0.1:2301', zmq_timeout, False, zmq_hwm)
self.zeromq_req_source_0 = zeromq.req_source(gr.sizeof_gr_complex, 1, 'tcp://0.0.0.0:2000', zmq_timeout, False, zmq_hwm)
self.zeromq_rep_sink_0_2 = zeromq.rep_sink(gr.sizeof_gr_complex, 1, 'tcp://127.0.0.1:2300', 100, False, zmq_hwm)
self.zeromq_rep_sink_0_1 = zeromq.rep_sink(gr.sizeof_gr_complex, 1, 'tcp://0.0.0.0:2001', zmq_timeout, False, zmq_hwm)
self.zeromq_rep_sink_0_0 = zeromq.rep_sink(gr.sizeof_gr_complex, 1, 'tcp://127.0.0.1:2200', zmq_timeout, False, zmq_hwm)
self.zeromq_rep_sink_0 = zeromq.rep_sink(gr.sizeof_gr_complex, 1, 'tcp://127.0.0.1:2100', zmq_timeout, False, zmq_hwm)
self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*1, 1.0*samp_rate/(1.0*slow_down_ratio),True)
self.blocks_multiply_const_vxx_0_1_1 = blocks.multiply_const_cc(10**(-1.0*ue2_path_loss_db/20.0))
self.blocks_multiply_const_vxx_0_1_0 = blocks.multiply_const_cc(10**(-1.0*ue3_path_loss_db/20.0))
self.blocks_multiply_const_vxx_0_1 = blocks.multiply_const_cc(10**(-1.0*ue1_path_loss_db/20.0))
self.blocks_multiply_const_vxx_0_0_0 = blocks.multiply_const_cc(10**(-1.0*ue3_path_loss_db/20.0))
self.blocks_multiply_const_vxx_0_0 = blocks.multiply_const_cc(10**(-1.0*ue2_path_loss_db/20.0))
self.blocks_multiply_const_vxx_0 = blocks.multiply_const_cc(10**(-1.0*ue1_path_loss_db/20.0))
self.blocks_add_xx_0 = blocks.add_vcc(1)
##################################################
# Connections
##################################################
self.connect((self.blocks_add_xx_0, 0), (self.zeromq_rep_sink_0_1, 0))
self.connect((self.blocks_multiply_const_vxx_0, 0), (self.blocks_add_xx_0, 0))
self.connect((self.blocks_multiply_const_vxx_0_0, 0), (self.blocks_add_xx_0, 1))
self.connect((self.blocks_multiply_const_vxx_0_0_0, 0), (self.blocks_add_xx_0, 2))
self.connect((self.blocks_multiply_const_vxx_0_1, 0), (self.zeromq_rep_sink_0, 0))
self.connect((self.blocks_multiply_const_vxx_0_1_0, 0), (self.zeromq_rep_sink_0_2, 0))
self.connect((self.blocks_multiply_const_vxx_0_1_1, 0), (self.zeromq_rep_sink_0_0, 0))
self.connect((self.blocks_throttle_0, 0), (self.blocks_multiply_const_vxx_0_1, 0))
self.connect((self.blocks_throttle_0, 0), (self.blocks_multiply_const_vxx_0_1_0, 0))
self.connect((self.blocks_throttle_0, 0), (self.blocks_multiply_const_vxx_0_1_1, 0))
self.connect((self.zeromq_req_source_0, 0), (self.blocks_throttle_0, 0))
self.connect((self.zeromq_req_source_0_0, 0), (self.blocks_multiply_const_vxx_0_0_0, 0))
self.connect((self.zeromq_req_source_1, 0), (self.blocks_multiply_const_vxx_0, 0))
self.connect((self.zeromq_req_source_1_0, 0), (self.blocks_multiply_const_vxx_0_0, 0))
def closeEvent(self, event):
self.settings = Qt.QSettings("GNU Radio", "multi_ue_scenario")
self.settings.setValue("geometry", self.saveGeometry())
self.stop()
self.wait()
event.accept()
def get_zmq_timeout(self):
return self.zmq_timeout
def set_zmq_timeout(self, zmq_timeout):
self.zmq_timeout = zmq_timeout
def get_zmq_hwm(self):
return self.zmq_hwm
def set_zmq_hwm(self, zmq_hwm):
self.zmq_hwm = zmq_hwm
def get_ue3_path_loss_db(self):
return self.ue3_path_loss_db
def set_ue3_path_loss_db(self, ue3_path_loss_db):
self.ue3_path_loss_db = ue3_path_loss_db
self.blocks_multiply_const_vxx_0_0_0.set_k(10**(-1.0*self.ue3_path_loss_db/20.0))
self.blocks_multiply_const_vxx_0_1_0.set_k(10**(-1.0*self.ue3_path_loss_db/20.0))
def get_ue2_path_loss_db(self):
return self.ue2_path_loss_db
def set_ue2_path_loss_db(self, ue2_path_loss_db):
self.ue2_path_loss_db = ue2_path_loss_db
self.blocks_multiply_const_vxx_0_0.set_k(10**(-1.0*self.ue2_path_loss_db/20.0))
self.blocks_multiply_const_vxx_0_1_1.set_k(10**(-1.0*self.ue2_path_loss_db/20.0))
def get_ue1_path_loss_db(self):
return self.ue1_path_loss_db
def set_ue1_path_loss_db(self, ue1_path_loss_db):
self.ue1_path_loss_db = ue1_path_loss_db
self.blocks_multiply_const_vxx_0.set_k(10**(-1.0*self.ue1_path_loss_db/20.0))
self.blocks_multiply_const_vxx_0_1.set_k(10**(-1.0*self.ue1_path_loss_db/20.0))
def get_slow_down_ratio(self):
return self.slow_down_ratio
def set_slow_down_ratio(self, slow_down_ratio):
self.slow_down_ratio = slow_down_ratio
self.blocks_throttle_0.set_sample_rate(1.0*self.samp_rate/(1.0*self.slow_down_ratio))
def get_samp_rate(self):
return self.samp_rate
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.blocks_throttle_0.set_sample_rate(1.0*self.samp_rate/(1.0*self.slow_down_ratio))
def main(top_block_cls=multi_ue_scenario, options=None):
if StrictVersion("4.5.0") <= StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
tb.start()
tb.show()
def sig_handler(sig=None, frame=None):
tb.stop()
tb.wait()
Qt.QApplication.quit()
signal.signal(signal.SIGINT, sig_handler)
signal.signal(signal.SIGTERM, sig_handler)
timer = Qt.QTimer()
timer.start(500)
timer.timeout.connect(lambda: None)
qapp.exec_()
if __name__ == '__main__':
main()subscribers.db#
# .csv to store UE's information in HSS
# Kept in the following format: "Name,IMSI,Key,OP_Type,OP/OPc,AMF,QCI,IP_alloc"
#
# Name: Human readable name to help distinguish UE's. Ignored by the HSS
# IMSI: UE's IMSI value
# Key: UE's key, where other keys are derived from. Stored in hexadecimal
# OP_Type: Operator's code type, either OP or OPc
# OP/OPc: Operator Code/Cyphered Operator Code, stored in hexadecimal
# AMF: Authentication management field, stored in hexadecimal
# QCI: QoS Class Identifier for the UE's default bearer.
# IP_alloc: Statically assigned IP for the UE.
#
# Note: Lines starting by '#' are ignored and will be overwritten
# List of UEs with IMSI, and key increasing by one for each new UE. Useful for testing with AmariUE simulator and ue_count option
ue00,001010123456780,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,8000,9,10.45.1.2
ue02,001010123456790,00112233445566778899aabbccddef00,opc,63bfa50ee6523365ff14c1f45f88737d,9001,9,10.45.1.4
ue03,001010123456791,00112233445566778899aabbccddef01,opc,63bfa50ee6523365ff14c1f45f88737d,9001,9,10.45.1.5
ue04,001010123456789,11111111111111111111111111111111,opc,11111111111111111111111111111111,9001,9,10.45.1.6 |
Beta Was this translation helpful? Give feedback.
All reactions
-
And I tried to run the experiment with a single UE using the separate brokers strategy. And it also works. ue1_zmq.conf[rf]
freq_offset = 0
tx_gain = 50
rx_gain = 40
srate = 11.52e6
nof_antennas = 1
device_name = zmq
device_args = tx_port=tcp://0.0.0.0:2101,rx_port=tcp://192.168.0.206:2100,base_srate=11.52e6
[rat.eutra]
dl_earfcn = 2850
nof_carriers = 0
[rat.nr]
bands = 3
nof_carriers = 1
max_nof_prb = 52
nof_prb = 52
dl_nr_arfcn = 368500
ssb_nr_arfcn = 368410
[pcap]
enable = none
mac_filename = /tmp/ue1_mac.pcap
mac_nr_filename = /tmp/ue1_mac_nr.pcap
nas_filename = /tmp/ue1_nas.pcap
[log]
all_level = info
phy_lib_level = none
all_hex_limit = 32
filename = /tmp/ue1.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 = falsegnb_zmq.conf# 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://192.168.0.108:2000,rx_port=tcp://192.168.0.108:2001,base_srate=11.52e6 # Optionally pass arguments to the selected RF driver.
srate: 11.52 # 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: 10 # 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: 6 # 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
total_nof_ra_preambles: 64 # Sets number of available PRACH preambles. J
nof_ssb_per_ro: 1 # Sets the number of SSBs per RACH occasion. J
nof_cb_preambles_per_ssb: 64 # Sets the number of contention based preambles per SSB. J
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.
hex_max_size: 0
tracing_filename: /tmp/gnb_trace.log
pcap:
mac_enable: true # Set to true to enable MAC-layer PCAPs.
mac_filename: /tmp/gnb_mac.pcap # Path where the MAC PCAP is stored.
ngap_enable: true # Set to true to enable NGAP PCAPs.
ngap_filename: /tmp/gnb_ngap.pcap # Path where the NGAP PCAP is stored.
# e2ap_enable: true # Set to true to enable E2AP PCAPs.
# e2ap_du_filename: /tmp/gnb_du_e2ap.pcap # Path where the DU E2AP PCAP is stored.
# e2ap_cu_cp_filename: /tmp/gnb_cu_cp_e2ap.pcap # Path where the CU-CP E2AP PCAP is stored.
# e2ap_cu_up_filename: /tmp/gnb_cu_up_e2ap.pcap # Path where the CU-UP E2AP PCAP is stored.
#e2:
# enable_du_e2: true # Enable DU E2 agent (one for each DU instance)
# enable_cu_cp_e2: true # Enables the CU E2 agent for CU-CP
# enable_cu_up_e2: true # Enables the CU E2 agent for CU-UP
# e2sm_kpm_enabled: true # Enable KPM service module
# e2sm_rc_enabled: true # Enable RC service module
# addr: 10.0.2.10 # RIC IP address
# bind_addr: 10.0.2.1 # A local IP that the E2 agent binds to for traffic from the RIC. ONLY required if running the RIC on a separate machine.
# port: 36421 # RIC port
metrics:
autostart_stdout_metrics: true
# enable_log: false
enable_json_metrics: true
#periodicity:
# du_report_period: 1000
# cu_up_report_period: 1000
# cu_cp_report_period: 1000
#layers:
# enable_ru: false
# enable_sched: true
# enable_rlc: true
# enable_mac: true
# enable_pdcp: false
# enable_du_low: falsesingle_ue_scenario.py (ue side)#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: GPL-3.0
#
# GNU Radio Python Flow Graph
# Title: srsRAN_multi_UE
# GNU Radio version: 3.10.1.1
from packaging.version import Version as StrictVersion
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.startswith('linux'):
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()
except:
print("Warning: failed to XInitThreads()")
from gnuradio import blocks
from gnuradio import gr
from gnuradio.filter import firdes
from gnuradio.fft import window
import sys
import signal
from PyQt5 import Qt
from argparse import ArgumentParser
from gnuradio.eng_arg import eng_float, intx
from gnuradio import eng_notation
from gnuradio import zeromq
from gnuradio.qtgui import Range, RangeWidget
from PyQt5 import QtCore
from gnuradio import qtgui
class multi_ue_scenario(gr.top_block, Qt.QWidget):
def __init__(self):
gr.top_block.__init__(self, "srsRAN_multi_UE", catch_exceptions=True)
Qt.QWidget.__init__(self)
self.setWindowTitle("srsRAN_multi_UE")
qtgui.util.check_set_qss()
try:
self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
except:
pass
self.top_scroll_layout = Qt.QVBoxLayout()
self.setLayout(self.top_scroll_layout)
self.top_scroll = Qt.QScrollArea()
self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
self.top_scroll_layout.addWidget(self.top_scroll)
self.top_scroll.setWidgetResizable(True)
self.top_widget = Qt.QWidget()
self.top_scroll.setWidget(self.top_widget)
self.top_layout = Qt.QVBoxLayout(self.top_widget)
self.top_grid_layout = Qt.QGridLayout()
self.top_layout.addLayout(self.top_grid_layout)
self.settings = Qt.QSettings("GNU Radio", "multi_ue_scenario")
try:
if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
self.restoreGeometry(self.settings.value("geometry").toByteArray())
else:
self.restoreGeometry(self.settings.value("geometry"))
except:
pass
##################################################
# Variables
##################################################
self.zmq_timeout = zmq_timeout = 100
self.zmq_hwm = zmq_hwm = -1
self.ue3_path_loss_db = ue3_path_loss_db = 20
self.ue2_path_loss_db = ue2_path_loss_db = 10
self.ue1_path_loss_db = ue1_path_loss_db = 0
self.slow_down_ratio = slow_down_ratio = 4
self.samp_rate = samp_rate = 11520000
##################################################
# Blocks
##################################################
self._ue1_path_loss_db_range = Range(0, 100, 1, 0, 200)
self._ue1_path_loss_db_win = RangeWidget(self._ue1_path_loss_db_range, self.set_ue1_path_loss_db, "UE1 Pathloss [dB]", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._ue1_path_loss_db_win)
self._slow_down_ratio_range = Range(1, 32, 1, 4, 200)
self._slow_down_ratio_win = RangeWidget(self._slow_down_ratio_range, self.set_slow_down_ratio, "Time Slow Down Ratio", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._slow_down_ratio_win)
self.zeromq_req_source_0 = zeromq.req_source(gr.sizeof_gr_complex, 1, 'tcp://192.168.0.108:2000', zmq_timeout, False, zmq_hwm)
self.zeromq_rep_sink_0 = zeromq.rep_sink(gr.sizeof_gr_complex, 1, 'tcp://192.168.0.206:2100', zmq_timeout, False, zmq_hwm)
self._ue3_path_loss_db_range = Range(0, 100, 1, 20, 200)
self._ue3_path_loss_db_win = RangeWidget(self._ue3_path_loss_db_range, self.set_ue3_path_loss_db, "UE3 Pathloss [dB]", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._ue3_path_loss_db_win)
self._ue2_path_loss_db_range = Range(0, 100, 1, 10, 200)
self._ue2_path_loss_db_win = RangeWidget(self._ue2_path_loss_db_range, self.set_ue2_path_loss_db, "UE2 Pathloss [dB]", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._ue2_path_loss_db_win)
self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*1, 1.0*samp_rate/(1.0*slow_down_ratio),True)
self.blocks_multiply_const_vxx_0_1 = blocks.multiply_const_cc(10**(-1.0*ue1_path_loss_db/20.0))
##################################################
# Connections
##################################################
self.connect((self.blocks_multiply_const_vxx_0_1, 0), (self.zeromq_rep_sink_0, 0))
self.connect((self.blocks_throttle_0, 0), (self.blocks_multiply_const_vxx_0_1, 0))
self.connect((self.zeromq_req_source_0, 0), (self.blocks_throttle_0, 0))
def closeEvent(self, event):
self.settings = Qt.QSettings("GNU Radio", "multi_ue_scenario")
self.settings.setValue("geometry", self.saveGeometry())
self.stop()
self.wait()
event.accept()
def get_zmq_timeout(self):
return self.zmq_timeout
def set_zmq_timeout(self, zmq_timeout):
self.zmq_timeout = zmq_timeout
def get_zmq_hwm(self):
return self.zmq_hwm
def set_zmq_hwm(self, zmq_hwm):
self.zmq_hwm = zmq_hwm
def get_ue3_path_loss_db(self):
return self.ue3_path_loss_db
def set_ue3_path_loss_db(self, ue3_path_loss_db):
self.ue3_path_loss_db = ue3_path_loss_db
def get_ue2_path_loss_db(self):
return self.ue2_path_loss_db
def set_ue2_path_loss_db(self, ue2_path_loss_db):
self.ue2_path_loss_db = ue2_path_loss_db
def get_ue1_path_loss_db(self):
return self.ue1_path_loss_db
def set_ue1_path_loss_db(self, ue1_path_loss_db):
self.ue1_path_loss_db = ue1_path_loss_db
self.blocks_multiply_const_vxx_0_1.set_k(10**(-1.0*self.ue1_path_loss_db/20.0))
def get_slow_down_ratio(self):
return self.slow_down_ratio
def set_slow_down_ratio(self, slow_down_ratio):
self.slow_down_ratio = slow_down_ratio
self.blocks_throttle_0.set_sample_rate(1.0*self.samp_rate/(1.0*self.slow_down_ratio))
def get_samp_rate(self):
return self.samp_rate
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.blocks_throttle_0.set_sample_rate(1.0*self.samp_rate/(1.0*self.slow_down_ratio))
def main(top_block_cls=multi_ue_scenario, options=None):
if StrictVersion("4.5.0") <= StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
tb.start()
tb.show()
def sig_handler(sig=None, frame=None):
tb.stop()
tb.wait()
Qt.QApplication.quit()
signal.signal(signal.SIGINT, sig_handler)
signal.signal(signal.SIGTERM, sig_handler)
timer = Qt.QTimer()
timer.start(500)
timer.timeout.connect(lambda: None)
qapp.exec_()
if __name__ == '__main__':
main()single_ue_scenario.py (gnb side)#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: GPL-3.0
#
# GNU Radio Python Flow Graph
# Title: srsRAN_multi_UE
# GNU Radio version: 3.10.1.1
from packaging.version import Version as StrictVersion
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.startswith('linux'):
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()
except:
print("Warning: failed to XInitThreads()")
from gnuradio import blocks
from gnuradio import gr
from gnuradio.filter import firdes
from gnuradio.fft import window
import sys
import signal
from PyQt5 import Qt
from argparse import ArgumentParser
from gnuradio.eng_arg import eng_float, intx
from gnuradio import eng_notation
from gnuradio import zeromq
from gnuradio.qtgui import Range, RangeWidget
from PyQt5 import QtCore
from gnuradio import qtgui
class multi_ue_scenario(gr.top_block, Qt.QWidget):
def __init__(self):
gr.top_block.__init__(self, "srsRAN_multi_UE", catch_exceptions=True)
Qt.QWidget.__init__(self)
self.setWindowTitle("srsRAN_multi_UE")
qtgui.util.check_set_qss()
try:
self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
except:
pass
self.top_scroll_layout = Qt.QVBoxLayout()
self.setLayout(self.top_scroll_layout)
self.top_scroll = Qt.QScrollArea()
self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
self.top_scroll_layout.addWidget(self.top_scroll)
self.top_scroll.setWidgetResizable(True)
self.top_widget = Qt.QWidget()
self.top_scroll.setWidget(self.top_widget)
self.top_layout = Qt.QVBoxLayout(self.top_widget)
self.top_grid_layout = Qt.QGridLayout()
self.top_layout.addLayout(self.top_grid_layout)
self.settings = Qt.QSettings("GNU Radio", "multi_ue_scenario")
try:
if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
self.restoreGeometry(self.settings.value("geometry").toByteArray())
else:
self.restoreGeometry(self.settings.value("geometry"))
except:
pass
##################################################
# Variables
##################################################
self.zmq_timeout = zmq_timeout = 100
self.zmq_hwm = zmq_hwm = -1
self.ue3_path_loss_db = ue3_path_loss_db = 20
self.ue2_path_loss_db = ue2_path_loss_db = 10
self.ue1_path_loss_db = ue1_path_loss_db = 0
self.slow_down_ratio = slow_down_ratio = 4
self.samp_rate = samp_rate = 11520000
##################################################
# Blocks
##################################################
self._ue1_path_loss_db_range = Range(0, 100, 1, 0, 200)
self._ue1_path_loss_db_win = RangeWidget(self._ue1_path_loss_db_range, self.set_ue1_path_loss_db, "UE1 Pathloss [dB]", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._ue1_path_loss_db_win)
self.zeromq_req_source_1 = zeromq.req_source(gr.sizeof_gr_complex, 1, 'tcp://192.168.0.206:2101', zmq_timeout, False, zmq_hwm)
self.zeromq_rep_sink_0_1 = zeromq.rep_sink(gr.sizeof_gr_complex, 1, 'tcp://192.168.0.108:2001', zmq_timeout, False, zmq_hwm)
self._ue3_path_loss_db_range = Range(0, 100, 1, 20, 200)
self._ue3_path_loss_db_win = RangeWidget(self._ue3_path_loss_db_range, self.set_ue3_path_loss_db, "UE3 Pathloss [dB]", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._ue3_path_loss_db_win)
self._ue2_path_loss_db_range = Range(0, 100, 1, 10, 200)
self._ue2_path_loss_db_win = RangeWidget(self._ue2_path_loss_db_range, self.set_ue2_path_loss_db, "UE2 Pathloss [dB]", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._ue2_path_loss_db_win)
self._slow_down_ratio_range = Range(1, 32, 1, 4, 200)
self._slow_down_ratio_win = RangeWidget(self._slow_down_ratio_range, self.set_slow_down_ratio, "Time Slow Down Ratio", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._slow_down_ratio_win)
self.blocks_multiply_const_vxx_0 = blocks.multiply_const_cc(10**(-1.0*ue1_path_loss_db/20.0))
##################################################
# Connections
##################################################
self.connect((self.blocks_multiply_const_vxx_0, 0), (self.zeromq_rep_sink_0_1, 0))
self.connect((self.zeromq_req_source_1, 0), (self.blocks_multiply_const_vxx_0, 0))
def closeEvent(self, event):
self.settings = Qt.QSettings("GNU Radio", "multi_ue_scenario")
self.settings.setValue("geometry", self.saveGeometry())
self.stop()
self.wait()
event.accept()
def get_zmq_timeout(self):
return self.zmq_timeout
def set_zmq_timeout(self, zmq_timeout):
self.zmq_timeout = zmq_timeout
def get_zmq_hwm(self):
return self.zmq_hwm
def set_zmq_hwm(self, zmq_hwm):
self.zmq_hwm = zmq_hwm
def get_ue3_path_loss_db(self):
return self.ue3_path_loss_db
def set_ue3_path_loss_db(self, ue3_path_loss_db):
self.ue3_path_loss_db = ue3_path_loss_db
def get_ue2_path_loss_db(self):
return self.ue2_path_loss_db
def set_ue2_path_loss_db(self, ue2_path_loss_db):
self.ue2_path_loss_db = ue2_path_loss_db
def get_ue1_path_loss_db(self):
return self.ue1_path_loss_db
def set_ue1_path_loss_db(self, ue1_path_loss_db):
self.ue1_path_loss_db = ue1_path_loss_db
self.blocks_multiply_const_vxx_0.set_k(10**(-1.0*self.ue1_path_loss_db/20.0))
def get_slow_down_ratio(self):
return self.slow_down_ratio
def set_slow_down_ratio(self, slow_down_ratio):
self.slow_down_ratio = slow_down_ratio
def get_samp_rate(self):
return self.samp_rate
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
def main(top_block_cls=multi_ue_scenario, options=None):
if StrictVersion("4.5.0") <= StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
tb.start()
tb.show()
def sig_handler(sig=None, frame=None):
tb.stop()
tb.wait()
Qt.QApplication.quit()
signal.signal(signal.SIGINT, sig_handler)
signal.signal(signal.SIGTERM, sig_handler)
timer = Qt.QTimer()
timer.start(500)
timer.timeout.connect(lambda: None)
qapp.exec_()
if __name__ == '__main__':
main() |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Hi @JoaoGabrielTN, could you try to enable IP forwarding on all PCs? Best, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
I'm following this tutorial: https://docs.srsran.com/projects/project/en/latest/tutorials/source/srsUE/source/index.html
When I get to the part where I have to execute the flow graph, the gnuradio terminal gives me this error:
The only thing I'm doing different from the tutorial is that I'm not running everthing on localhost. I'm trying to replicate the tutorial using two different machines (one for the core and gNB (IP 192.168.0.108), the other for the UEs (IP 192.168.0.206)). I'm running the gnuradio command on the same host that is running the gNB.
My UEs run o a docker with Ubuntu 22.04 as the base image. Communication between the UE and Core works when I follow the tutorial with a single UE.
Configs
All configs files I'm using are the defaults files from the srsRAN Project and the files provided on the tutorial, so I will share only the parts I've changed.
open5gs.env
gNB config:
UE1 config:
UE2 config
UE3 config
multi_ue_scenario.py
Image of the graph
I run my container with the following arguments:
docker run --rm -it --network host --name ue --privileged srsran:latest bash
Questions
Why it doesn't connect? Did I miss something/did something wrong with the configs? If so, what should I fix? Or how can I tackle (debug) this problem?
Further info
Each host can ping the other
Beta Was this translation helpful? Give feedback.
All reactions