Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
ecd900be
Commit
ecd900be
authored
Sep 29, 2023
by
Ejaz Ahmed
Committed by
Deokseong "David" Kim
Sep 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added network JSON configuration and its parsing function in python script
parent
d9355406
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
137 additions
and
212 deletions
+137
-212
ci-scripts/run_sl_test.py
ci-scripts/run_sl_test.py
+34
-79
ci-scripts/sl_cmds.txt
ci-scripts/sl_cmds.txt
+0
-132
ci-scripts/sl_net_config.json
ci-scripts/sl_net_config.json
+102
-0
ci-scripts/sl_rx_agent.py
ci-scripts/sl_rx_agent.py
+1
-1
No files found.
ci-scripts/run_sl_test.py
View file @
ecd900be
...
...
@@ -16,7 +16,7 @@
#
# python3 run_sl_test.py -l nearby --user account --host 10.1.1.68 -r 2 --test usrp
#
# To run usrp test in the net 1 spe
ficifed in sl_cmds.txt
, the following will be used.
# To run usrp test in the net 1 spe
cified in sl_net_config.json
, the following will be used.
#
# python3 run_sl_test.py --test usrp --net 1
#
...
...
@@ -30,6 +30,7 @@ import logging
import
time
import
re
import
glob
import
json
import
subprocess
,
shlex
from
subprocess
import
Popen
from
subprocess
import
check_output
...
...
@@ -76,8 +77,8 @@ parser.add_argument('--basic', '-b', action='store_true', help="""
Basic test with basic shell commands
"""
)
parser
.
add_argument
(
'--co
mmands'
,
default
=
'sl_cmds.txt
'
,
help
=
"""
The
USRP Commands .txt
file (default: %(default)s)
parser
.
add_argument
(
'--co
nfig'
,
default
=
'sl_net_config.json
'
,
help
=
"""
The
network configurations .json
file (default: %(default)s)
"""
)
parser
.
add_argument
(
'--compress'
,
action
=
'store_true'
,
help
=
"""
...
...
@@ -166,14 +167,15 @@ def thread_delay(delay: int) -> None:
time
.
sleep
(
delay
)
count
+=
1
class
Co
mmand
:
class
Co
nfig
:
"""
Parsing
USRP commands
file
Parsing
config
file
"""
def
__init__
(
self
,
filename
)
->
None
:
self
.
check_user
()
self
.
filename
=
self
.
check_file
(
filename
)
self
.
parse_commands
()
self
.
test
=
OPTS
.
test
.
lower
()
self
.
parse_config_json
()
def
check_user
(
self
)
->
None
:
if
'usrp'
!=
OPTS
.
test
:
...
...
@@ -189,77 +191,30 @@ class Command:
LOGGER
.
error
(
'The file %s does not exist!'
,
filename
)
sys
.
exit
(
1
)
def
parse_co
mmands
(
self
)
->
None
:
def
parse_co
nfig_json
(
self
)
->
None
:
"""
Scan the provided commands file.
Parse configurations from the json file
"""
if
OPTS
.
test
.
lower
()
==
'usrp'
:
launch_cmds_re
=
re
.
compile
(
r'^\s*(\S*)_usrp_\S+_(\S*)_cmd\s*=\s*((\S+\s*)*)'
)
elif
OPTS
.
test
.
lower
()
==
'rfsim'
:
launch_cmds_re
=
re
.
compile
(
r'^\s*(\S*)_rfsim_(\S*)_cmd\s*=\s*((\S+\s*)*)'
)
elif
OPTS
.
test
.
lower
()
==
'psbchsim'
:
launch_cmds_re
=
re
.
compile
(
r'^\s*(\S*)_psbchsim_(\S*)_cmd\s*=\s*((\S+\s*)*)'
)
elif
OPTS
.
test
.
lower
()
==
'psschsim'
:
launch_cmds_re
=
re
.
compile
(
r'^\s*(\S*)_psschsim_(\S*)_cmd\s*=\s*((\S+\s*)*)'
)
else
:
LOGGER
.
error
(
"Provided test option not valid! %s"
,
OPTS
.
test
)
sys
.
exit
(
1
)
nearby_host_re
=
re
.
compile
(
r'^\s*(\S*)_usrp_\S*_(\S*)_hostIP\s*=\s*((\S+\s*)*)'
)
self
.
launch_cmds
=
defaultdict
(
list
)
self
.
hosts
=
defaultdict
(
list
)
with
open
(
self
.
filename
,
'rt'
)
as
in_fh
:
nearby_cmd_continued
=
False
syncref_cmd_continued
=
False
target_netid
=
f'net
{
OPTS
.
net
}
'
for
line
in
in_fh
:
if
line
==
'
\n
'
:
continue
match
=
launch_cmds_re
.
match
(
line
)
if
match
:
host_role
=
match
.
group
(
1
)
netid
=
match
.
group
(
2
)
matched_cmd
=
match
.
group
(
3
)
match
=
match
and
(
netid
==
target_netid
)
if
match
:
if
host_role
.
lower
()
==
'nearby'
:
nearby_cmd_continued
=
True
continue
if
host_role
.
lower
()
==
'syncref'
:
syncref_cmd_continued
=
True
continue
elif
nearby_cmd_continued
:
matched_cmd
+=
line
if
not
line
.
strip
().
endswith
(
'
\\
'
):
self
.
launch_cmds
[
'nearby'
].
append
(
matched_cmd
)
LOGGER
.
debug
(
'Nearby cmd is %s'
,
matched_cmd
)
nearby_cmd_continued
=
False
continue
elif
syncref_cmd_continued
:
matched_cmd
+=
line
if
not
line
.
strip
().
endswith
(
'
\\
'
):
self
.
launch_cmds
[
'syncref'
].
append
(
matched_cmd
)
LOGGER
.
debug
(
'Syncref cmd is %s'
,
matched_cmd
)
syncref_cmd_continued
=
False
continue
else
:
host_match
=
nearby_host_re
.
match
(
line
)
if
host_match
:
host_role
=
host_match
.
group
(
1
)
netid
=
host_match
.
group
(
2
)
matched_host_ip
=
host_match
.
group
(
3
)
if
host_role
.
lower
()
==
'nearby'
and
netid
==
target_netid
:
self
.
hosts
[
'nearby'
].
append
(
matched_host_ip
.
strip
())
LOGGER
.
debug
(
'Nearby host is %s
\n
'
,
matched_host_ip
.
strip
())
continue
else
:
LOGGER
.
debug
(
'Unmatched line %r'
,
line
)
continue
with
open
(
self
.
filename
)
as
in_fh
:
json_data
=
json
.
load
(
in_fh
)
if
f"net_
{
OPTS
.
net
}
"
in
json_data
[
self
.
test
].
keys
():
net_config
=
json_data
[
self
.
test
][
f"net_
{
OPTS
.
net
}
"
]
else
:
LOGGER
.
error
(
'net %d configuration does not exist.'
,
OPTS
.
net
)
sys
.
exit
(
1
)
for
net
in
net_config
:
role
=
net
[
'role'
]
self
.
launch_cmds
[
role
].
append
(
net
[
"cmd"
])
self
.
hosts
[
role
].
append
(
net
[
"ip"
])
if
not
self
.
launch_cmds
:
LOGGER
.
error
(
'
usrp commands are not found in file: %s'
,
self
.
filename
)
LOGGER
.
error
(
'
%s commands are not found in file: %s'
,
self
.
test
,
self
.
filename
)
sys
.
exit
(
1
)
if
OPTS
.
test
.
lower
()
==
'usrp'
and
not
self
.
hosts
[
'nearby'
]:
LOGGER
.
error
(
f'Nearby host IP is expected. Add nearby host IP to
{
OPTS
.
co
mmands
}
'
)
LOGGER
.
error
(
f'Nearby host IP is expected. Add nearby host IP to
{
OPTS
.
co
nfig
}
'
)
sys
.
exit
(
1
)
class
Node
:
...
...
@@ -299,15 +254,15 @@ class Node:
dest
=
''
if
'--dest'
in
cmd
or
OPTS
.
dest
==
''
else
f' --dest
{
OPTS
.
dest
}
'
tx_msg
=
f' --message "
{
OPTS
.
message
}
"'
if
len
(
OPTS
.
message
)
>
0
else
''
if
role
==
'syncref'
:
cmd
=
cmd
[:
-
1
]
+
tx_msg
+
f' --mcs
{
OPTS
.
mcs
}
'
+
dest
cmd
=
cmd
+
tx_msg
+
f' --mcs
{
OPTS
.
mcs
}
'
+
dest
if
'rfsim'
==
OPTS
.
test
:
cmd
+=
f' --snr
{
OPTS
.
snr
}
'
if
role
==
'nearby'
:
if
'usrp'
==
OPTS
.
test
:
cmd
=
cmd
[:
-
2
]
+
tx_msg
+
f' --mcs
{
OPTS
.
mcs
}
'
+
cmd
[
-
2
]
# cmd[-2] is '
(end of cmd)
cmd
=
cmd
[:
-
1
]
+
tx_msg
+
f' --mcs
{
OPTS
.
mcs
}
'
+
cmd
[
-
1
]
# -1 is ' index
(end of cmd)
cmd
=
cmd
+
f' -d
{
OPTS
.
duration
}
--nid1
{
OPTS
.
nid1
}
--nid2
{
OPTS
.
nid2
}
'
else
:
cmd
=
cmd
[:
-
1
]
+
tx_msg
+
f' --mcs
{
OPTS
.
mcs
}
'
cmd
=
cmd
+
tx_msg
+
f' --mcs
{
OPTS
.
mcs
}
'
if
'rfsim'
==
OPTS
.
test
:
cmd
+=
f' --snr
{
OPTS
.
snr
}
'
return
cmd
...
...
@@ -486,15 +441,15 @@ def set_attenuation(attenuation: int, atten_host: str, user: str) -> None:
LOGGER
.
info
(
f"attenuation value
{
attenuation
}
among:
{
out
}
"
)
time
.
sleep
(
1
)
def
generate_jobs
(
co
mmands
:
Command
)
->
list
:
def
generate_jobs
(
co
nfig
:
Config
)
->
list
:
jobs
,
node_id
,
host
=
[],
''
,
OPTS
.
host
if
co
mmands
.
launch_cmds
is
not
None
:
for
role
,
cmd_list
in
co
mmands
.
launch_cmds
.
items
():
if
co
nfig
.
launch_cmds
is
not
None
:
for
role
,
cmd_list
in
co
nfig
.
launch_cmds
.
items
():
for
cmd
in
cmd_list
:
if
'node-number'
in
cmd
:
node_id
=
cmd
.
split
(
'node-number'
,
1
)[
-
1
].
split
(
maxsplit
=
1
)[
0
]
if
role
==
'nearby'
and
OPTS
.
host
==
''
:
host
=
co
mmands
.
hosts
[
role
].
pop
(
0
)
host
=
co
nfig
.
hosts
[
role
].
pop
(
0
)
if
OPTS
.
launch
==
'all'
:
jobs
.
append
(
Node
(
node_id
,
role
,
host
,
cmd
))
elif
role
==
OPTS
.
launch
:
...
...
@@ -508,10 +463,10 @@ def main() -> int:
"""
Main function to run sidelink test repeatedly for a given attenuation value.
"""
co
mmands
=
Command
(
OPTS
.
commands
)
co
nfig
=
Config
(
OPTS
.
config
)
log_agent
=
LogChecker
(
OPTS
,
LOGGER
)
LOGGER
.
debug
(
f'Number of iterations
{
OPTS
.
repeat
}
'
)
jobs
=
generate_jobs
(
co
mmands
)
jobs
=
generate_jobs
(
co
nfig
)
if
'usrp'
==
OPTS
.
test
:
set_attenuation
(
OPTS
.
att
,
OPTS
.
att_host
,
OPTS
.
att_user
)
for
i
in
range
(
OPTS
.
repeat
):
...
...
ci-scripts/sl_cmds.txt
deleted
100644 → 0
View file @
d9355406
# The lines containing 'usrp' and starts with 'syncref' or 'nearby' will be valid until it does not contain backspace.
################################################################
#### USRP B210 --- USRP B210 ####
################################################################
### TX SyncRef UE ###
syncref_usrp_b210_net0_cmd = \
sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sl-mode 2 --sync-ref --rbsl 52 --numerology 1 --band 38 --SLC 2600000000 --ue-txgain 0 \
--usrp-args "type=b200,serial=3150384,clock_source=external" \
--log_config.global_log_options time,nocolor \
> ~/syncref.log 2>&1
### RX Nearby UE ###
nearby_usrp_b210_net0_hostIP = 10.1.1.61
nearby_usrp_b210_net0_cmd = cd $HOME/openairinterface5g/ci-scripts; \
python3 sl_rx_agent.py --cmd \
'sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sl-mode 2 --rbsl 52 --numerology 1 --band 38 --SLC 2600000000 --ue-rxgain 90 \
--usrp-args "type=b200,serial=3150361,clock_source=external" \
--log_config.global_log_options time,nocolor \
> ~/nearby.log 2>&1'
################################################################
#### USRP N310 --- USRP N310 ####
################################################################
### TX SyncRef UE ###
syncref_usrp_n310_net1_cmd = \
sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sl-mode 2 --sync-ref --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-txgain 0 \
--usrp-args "type=n3xx,addr=192.168.10.2,subdev=A:0,master_clock_rate=122.88e6" \
--log_config.global_log_options time,nocolor \
> ~/syncref.log 2>&1
### RX Nearby UE ###
nearby_usrp_n310_net1_hostIP = 10.1.1.80
nearby_usrp_n310_net1_cmd = cd $HOME/openairinterface5g/ci-scripts; \
python3 sl_rx_agent.py --cmd \
'sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sl-mode 2 --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-rxgain 75 \
--usrp-args "type=n3xx,addr=192.168.10.2,subdev=A:0,master_clock_rate=122.88e6" \
--log_config.global_log_options time,nocolor \
> ~/nearby.log 2>&1'
################################################################
#### Multi-hop: USRP N310 --- USRP N310 --- USRP B210 ####
################################################################
### TX SyncRef UE ###
syncref_usrp_n310_net2_cmd = \
sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sl-mode 2 --sync-ref --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-txgain 0 \
--usrp-args "type=n3xx,addr=192.168.10.2,subdev=A:0,master_clock_rate=122.88e6" \
--log_config.global_log_options time,nocolor --node-number 1 \
> ~/syncref1.log 2>&1
### Relay UE ###
nearby_usrp_n310_net2_hostIP = 10.1.1.80
nearby_usrp_n310_net2_cmd = cd $HOME/openairinterface5g/ci-scripts; \
python3 sl_rx_agent.py --cmd \
'sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sl-mode 2 --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-txgain 0 --ue-rxgain 75 \
--usrp-args "type=n3xx,addr=192.168.10.2,subdev=A:0,master_clock_rate=122.88e6" \
--log_config.global_log_options time,nocolor --node-number 2 \
> ~/nearby2.log 2>&1'
### RX Nearby UE ###
nearby_usrp_b210_net2_hostIP = 10.1.1.63
nearby_usrp_b210_net2_cmd = cd $HOME/openairinterface5g/ci-scripts; \
python3 sl_rx_agent.py --cmd \
'sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sl-mode 2 --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-rxgain 100 \
--usrp-args "type=b200,serial=3150384,clock_source=external" \
--log_config.global_log_options time,nocolor --node-number 3 \
> ~/nearby3.log 2>&1'
################################################################
#### RFSIMULATOR : SyncRef UE --- Nearby UE ####
################################################################
### TX SyncRef UE ###
syncref_rfsim_net1_cmd = \
sudo -E RFSIMULATOR=server \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sync-ref --rfsim --sl-mode 2 --rbsl 106 --SLC 3300000000 --ue-txgain 0 \
--rfsimulator.serverport 4048 --log_config.global_log_options time,nocolor \
> ~/syncref.log 2>&1
### RX Nearby UE ###
nearby_rfsim_net1_cmd = \
sudo -E RFSIMULATOR=127.0.0.1 \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--rfsim --sl-mode 2 --rbsl 106 --SLC 3300000000 --ue-rxgain 90 \
--rfsimulator.serverport 4048 --log_config.global_log_options time,nocolor \
> ~/nearby.log 2>&1
################################################################
#### RFSIMULATOR : SyncRef UE --- Relay UE --- Nearby UE ####
################################################################
### TX SyncRef UE ###
syncref_rfsim_net2_cmd = \
sudo -E RFSIMULATOR=127.0.0.1 \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sync-ref --rfsim --sl-mode 2 --rbsl 52 --SLC 2600000000 --ue-txgain 0 --node-number 1 \
--rfsimulator.serverport 4048 --log_config.global_log_options time,nocolor \
> ~/syncref1.log 2>&1
### Relay UE ###
nearby_rfsim_net2_cmd = \
sudo -E RFSIMULATOR=server \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--rfsim --sl-mode 2 --rbsl 52 --SLC 2600000000 --ue-txgain 0 --ue-rxgain 90 --node-number 2 \
--rfsimulator.serverport 4048 --log_config.global_log_options time,nocolor \
> ~/nearby2.log 2>&1
### RX Nearby UE ###
nearby_rfsim_net2_cmd = \
sudo -E RFSIMULATOR=127.0.0.1 \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--rfsim --sl-mode 2 --rbsl 52 --SLC 2600000000 --ue-rxgain 90 --node-number 3 \
--rfsimulator.serverport 4048 --log_config.global_log_options time,nocolor \
> ~/nearby3.log 2>&1
ci-scripts/sl_net_config.json
0 → 100644
View file @
ecd900be
{
"usrp"
:
{
"net_0"
:
[
{
"id"
:
""
,
"role"
:
"syncref"
,
"ip"
:
""
,
"cmd"
:
"sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sl-mode 2 --sync-ref --rbsl 52 --numerology 1 --band 38 --SLC 2600000000 --ue-txgain 0 --usrp-args type=b200,serial=3150384,clock_source=external --log_config.global_log_options time,nocolor > ~/syncref.log 2>&1"
},
{
"role"
:
"nearby"
,
"id"
:
""
,
"ip"
:
"10.1.1.61"
,
"cmd"
:
"cd $HOME/openairinterface5g/ci-scripts; python3 sl_rx_agent.py --cmd
\"
sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sl-mode 2 --rbsl 52 --numerology 1 --band 38 --SLC 2600000000 --ue-rxgain 90 --usrp-args type=b200,serial=3150361,clock_source=external --log_config.global_log_options time,nocolor > ~/nearby.log 2>&1
\"
"
}
],
"net_1"
:
[
{
"role"
:
"syncref"
,
"id"
:
""
,
"ip"
:
""
,
"cmd"
:
"sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sl-mode 2 --sync-ref --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-txgain 0 --usrp-args type=n3xx,addr=192.168.10.2,subdev=A:0,master_clock_rate=122.88e6 --log_config.global_log_options time,nocolor > ~/syncref.log 2>&1"
},
{
"role"
:
"nearby"
,
"id"
:
""
,
"ip"
:
"10.1.1.80"
,
"cmd"
:
"cd $HOME/openairinterface5g/ci-scripts; python3 sl_rx_agent.py --cmd
\"
sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sl-mode 2 --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-rxgain 75 --usrp-args type=n3xx,addr=192.168.10.2,subdev=A:0,master_clock_rate=122.88e6 --log_config.global_log_options time,nocolor > ~/nearby.log 2>&1
\"
"
}
],
"net_2"
:
[
{
"role"
:
"syncref"
,
"id"
:
"1"
,
"ip"
:
""
,
"cmd"
:
"sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sl-mode 2 --sync-ref --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-txgain 0 --usrp-args type=n3xx,addr=192.168.10.2,subdev=A:0,master_clock_rate=122.88e6 --log_config.global_log_options time,nocolor --node-number 1 > ~/syncref1.log 2>&1"
},
{
"role"
:
"nearby"
,
"id"
:
"2"
,
"ip"
:
"10.1.1.80"
,
"cmd"
:
"cd $HOME/openairinterface5g/ci-scripts; python3 sl_rx_agent.py --cmd
\"
sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sl-mode 2 --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-txgain 0 --ue-rxgain 75 --usrp-args type=n3xx,addr=192.168.10.2,subdev=A:0,master_clock_rate=122.88e6 --log_config.global_log_options time,nocolor --node-number 2 > ~/nearby2.log 2>&1
\"
"
},
{
"role"
:
"nearby"
,
"id"
:
"3"
,
"ip"
:
"10.1.1.63"
,
"cmd"
:
"cd $HOME/openairinterface5g/ci-scripts; python3 sl_rx_agent.py --cmd
\"
sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sl-mode 2 --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-rxgain 100 --usrp-args type=b200,serial=3150384,clock_source=external --log_config.global_log_options time,nocolor --node-number 3 > ~/nearby3.log 2>&1
\"
"
}
],
"net_3"
:
[
{
"role"
:
"syncref"
,
"id"
:
"1"
,
"ip"
:
""
,
"cmd"
:
"sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sl-mode 2 --sync-ref --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-txgain 0 --usrp-args type=n3xx,addr=192.168.10.2,subdev=A:0,master_clock_rate=122.88e6 --log_config.global_log_options time,nocolor > ~/syncref.log 2>&1"
},
{
"role"
:
"nearby"
,
"id"
:
"3"
,
"ip"
:
"10.1.1.63"
,
"cmd"
:
"cd $HOME/openairinterface5g/ci-scripts; python3 sl_rx_agent.py --cmd
\"
sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sl-mode 2 --rbsl 52 --numerology 1 --band 78 --SLC 3600000000 --ue-rxgain 100 --usrp-args type=b200,serial=3150384,clock_source=external --log_config.global_log_options time,nocolor > ~/nearby.log 2>&1
\"
"
}
]
},
"rfsim"
:
{
"net_1"
:
[
{
"role"
:
"syncref"
,
"id"
:
""
,
"ip"
:
""
,
"cmd"
:
"sudo -E RFSIMULATOR=server $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sync-ref --rfsim --sl-mode 2 --rbsl 106 --SLC 3300000000 --ue-txgain 0 --rfsimulator.serverport 4048 --log_config.global_log_options time,nocolor > ~/syncref.log 2>&1"
},
{
"role"
:
"nearby"
,
"id"
:
""
,
"ip"
:
""
,
"cmd"
:
"sudo -E RFSIMULATOR=127.0.0.1 $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --rfsim --sl-mode 2 --rbsl 106 --SLC 3300000000 --ue-rxgain 90 --rfsimulator.serverport 4048 --log_config.global_log_options time,nocolor > ~/nearby.log 2>&1"
}
],
"net_2"
:
[
{
"role"
:
"syncref"
,
"id"
:
"1"
,
"ip"
:
""
,
"cmd"
:
"sudo -E RFSIMULATOR=127.0.0.1 $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --sync-ref --rfsim --sl-mode 2 --rbsl 52 --SLC 2600000000 --ue-txgain 0 --node-number 1 --rfsimulator.serverport 4048 --log_config.global_log_options time,nocolor > ~/syncref1.log 2>&1"
},
{
"role"
:
"nearby"
,
"id"
:
"2"
,
"ip"
:
""
,
"cmd"
:
"sudo -E RFSIMULATOR=server $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --rfsim --sl-mode 2 --rbsl 52 --SLC 2600000000 --ue-txgain 0 --ue-rxgain 90 --node-number 2 --rfsimulator.serverport 4048 --log_config.global_log_options time,nocolor > ~/nearby2.log 2>&1"
},
{
"role"
:
"nearby"
,
"id"
:
"3"
,
"ip"
:
""
,
"cmd"
:
"sudo -E RFSIMULATOR=127.0.0.1 $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem --rfsim --sl-mode 2 --rbsl 52 --SLC 2600000000 --ue-rxgain 90 --node-number 3 --rfsimulator.serverport 4048 --log_config.global_log_options time,nocolor > ~/nearby3.log 2>&1"
}
]
}
}
ci-scripts/sl_rx_agent.py
View file @
ecd900be
...
...
@@ -160,7 +160,7 @@ class TestNearby():
def
__init__
(
self
,
cmd
:
str
):
self
.
cmd
=
cmd
self
.
delay
=
0
# seconds
self
.
id
=
self
.
_get_id
(
cmd
)
self
.
id
=
self
.
_get_id
()
self
.
role
=
"nearby"
self
.
log_file_path
=
os
.
path
.
join
(
OPTS
.
log_dir
,
f'
{
self
.
role
}{
self
.
id
}
.log'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment