Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos
Commits
31b636fe
Commit
31b636fe
authored
Jan 10, 2023
by
Lu Xu
👀
Committed by
Joanne Hugé
Feb 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/ors-amarisoft: add support for lopcomm RRH
parent
7175d973
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
280 additions
and
7 deletions
+280
-7
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+7
-3
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+24
-2
software/ors-amarisoft/instance-enb-input-schema.json.jinja2
software/ors-amarisoft/instance-enb-input-schema.json.jinja2
+10
-0
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+38
-1
software/ors-amarisoft/instance-tdd1900-enb-epc-input-schema.json
.../ors-amarisoft/instance-tdd1900-enb-epc-input-schema.json
+10
-0
software/ors-amarisoft/instance-tdd1900-enb-input-schema.json
...ware/ors-amarisoft/instance-tdd1900-enb-input-schema.json
+10
-0
software/ors-amarisoft/instance-tdd2600-enb-epc-input-schema.json
.../ors-amarisoft/instance-tdd2600-enb-epc-input-schema.json
+10
-0
software/ors-amarisoft/instance-tdd2600-enb-input-schema.json
...ware/ors-amarisoft/instance-tdd2600-enb-input-schema.json
+10
-0
software/ors-amarisoft/instance-tdd3500-enb-epc-input-schema.json
.../ors-amarisoft/instance-tdd3500-enb-epc-input-schema.json
+10
-0
software/ors-amarisoft/instance-tdd3500-enb-input-schema.json
...ware/ors-amarisoft/instance-tdd3500-enb-input-schema.json
+10
-0
software/ors-amarisoft/instance-tdd3700-enb-epc-input-schema.json
.../ors-amarisoft/instance-tdd3700-enb-epc-input-schema.json
+10
-0
software/ors-amarisoft/instance-tdd3700-enb-input-schema.json
...ware/ors-amarisoft/instance-tdd3700-enb-input-schema.json
+10
-0
software/ors-amarisoft/instance.cfg
software/ors-amarisoft/instance.cfg
+3
-1
software/ors-amarisoft/lopcomm-rrh-stats.jinja2.py
software/ors-amarisoft/lopcomm-rrh-stats.jinja2.py
+95
-0
software/ors-amarisoft/software.cfg
software/ors-amarisoft/software.cfg
+23
-0
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
31b636fe
...
...
@@ -16,19 +16,23 @@
[template]
filename = instance.cfg
md5sum =
ed72fb7c36b0bc046df177e4d6f3bf12
md5sum =
3feff73b667736dabb394e415077d226
[amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py
md5sum = 6e0a052bd0ca08cc0c7b4880d3deffcc
[lopcomm-rrh-stats.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-stats.jinja2.py
md5sum = 39e191080722ac13ebc56b1e6350eb8f
[template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg
md5sum = 833667743c693b8d5f78a2527b275a9e
[template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum =
c4584b338d26f57d5c9384956be36677
md5sum =
6eba063433bb16942ed592be70eb959d
[template-lte-gnb-epc]
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg
...
...
@@ -60,7 +64,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum =
1d0bbfa1cd22740db4f1034588c946eb
md5sum =
0b2a37e6902fd5ad3d6b37e11eebec69
[sib23.asn]
filename = config/sib23.asn
...
...
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
31b636fe
...
...
@@ -6,6 +6,20 @@
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
log_filename: "{{ directory['log'] }}/enb.log",
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %}
rf_driver: {
name: "sdr",
args: "dev0=/dev/sdr0@0",
cpri_mapping: "hw",
cpri_mult: 16,
cpri_rx_delay: 0,
cpri_tx_delay: 0,
ifname: "{{ slap_configuration.get('tap-name', '') }}",
cpri_debug: 2,
},
tx_gain: 0,
rx_gain: 0,
{% else %}
rf_driver: {
name: "sdr",
args: "dev0=/dev/sdr0",
...
...
@@ -13,6 +27,7 @@
},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_lte_tx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_lte_rx_gain']) }},
{% endif %}
com_addr: "127.0.1.2:9001",
mme_list: [
...
...
@@ -76,10 +91,13 @@
cell_default: {
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: N_ANTENNA_UL,
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %}
// uldl_config: 2,
// sp_config: 7,
{% else %}
uldl_config: 2,
sp_config: 7,
{% endif %}
n_rb_dl: N_RB_DL,
cyclic_prefix: "normal",
...
...
@@ -134,7 +152,11 @@
pucch_dedicated: {
n1_pucch_sr_count: 11,
cqi_pucch_n_rb: 1,
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %}
// tdd_ack_nack_feedback_mode: "multiplexing",
{% else %}
tdd_ack_nack_feedback_mode: "multiplexing",
{% endif %}
},
pusch_dedicated: {
...
...
software/ors-amarisoft/instance-enb-input-schema.json.jinja2
View file @
31b636fe
...
...
@@ -23,6 +23,16 @@
"type": "boolean"
},
{%- endif %}
"rrh": {
"title": "RRH",
"description": "RRH",
"type": "string",
"default": "SDR",
"enum": [
"SDR",
"Lopcomm ORAN"
]
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
...
...
software/ors-amarisoft/instance-enb.jinja2.cfg
View file @
31b636fe
...
...
@@ -10,6 +10,10 @@ parts =
rx-saturated-promise
baseband-latency-promise
amarisoft-stats-log-promise
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %}
lopcomm-rrh-stats-service
vswr-promise
{% endif %}
{% if not slapparameter_dict.get("sub-instance", False) %}
cpu-temperature-promise
{% endif %}
...
...
@@ -122,7 +126,22 @@ mode = 0775
url = {{ amarisoft_stats_template }}
output = ${directory:bin}/amarisoft-stats.py
### eNodeB (enb)
[lopcomm-rrh-stats-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-stats.log
json-log-output = ${directory:var}/log/lopcomm-rrh-stats.json.log
context =
section directory directory
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key json_log_file :json-log-output
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
mode = 0775
url = {{ lopcomm_rrh_stats_template }}
output = ${directory:bin}/lopcomm-rrh-stats.py
[amarisoft-stats-service]
recipe = slapos.cookbook:wrapper
command-line = ${amarisoft-stats-template:output}
...
...
@@ -131,6 +150,14 @@ mode = 0775
hash-files =
${amarisoft-stats-template:output}
[lopcomm-rrh-stats-service]
recipe = slapos.cookbook:wrapper
command-line = ${lopcomm-rrh-stats-template:output}
wrapper-path = ${directory:service}/lopcomm-rrh-stats
mode = 0775
hash-files =
${lopcomm-rrh-stats-template:output}
[config-base]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
...
...
@@ -208,6 +235,16 @@ config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
config-min-txrx-delay = {{ slapparameter_dict.get("min_txrx_delay", 5) }}
config-avg-txrx-delay = {{ slapparameter_dict.get("avg_txrx_delay", 7) }}
[vswr-promise]
recipe = slapos.cookbook:promise.plugin
eggs =
slapos.core
python-dateutil
file = {{ vswr_promise }}
output = ${directory:plugins}/check-vswr.py
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-lopcomm-stats-log = ${lopcomm-rrh-stats-template:json-log-output}
[amarisoft-stats-log-promise]
recipe = slapos.cookbook:promise.plugin
eggs =
...
...
software/ors-amarisoft/instance-tdd1900-enb-epc-input-schema.json
View file @
31b636fe
...
...
@@ -21,6 +21,16 @@
"description"
:
"Activate iperf3 UDP server"
,
"type"
:
"boolean"
},
"rrh"
:
{
"title"
:
"RRH"
,
"description"
:
"RRH"
,
"type"
:
"string"
,
"default"
:
"SDR"
,
"enum"
:
[
"SDR"
,
"Lopcomm ORAN"
]
},
"tx_gain"
:
{
"title"
:
"Tx gain"
,
"description"
:
"Tx gain (in dB)"
,
...
...
software/ors-amarisoft/instance-tdd1900-enb-input-schema.json
View file @
31b636fe
...
...
@@ -3,6 +3,16 @@
"$schema"
:
"http://json-schema.org/draft-04/schema"
,
"title"
:
"Input Parameters"
,
"properties"
:
{
"rrh"
:
{
"title"
:
"RRH"
,
"description"
:
"RRH"
,
"type"
:
"string"
,
"default"
:
"SDR"
,
"enum"
:
[
"SDR"
,
"Lopcomm ORAN"
]
},
"tx_gain"
:
{
"title"
:
"Tx gain"
,
"description"
:
"Tx gain (in dB)"
,
...
...
software/ors-amarisoft/instance-tdd2600-enb-epc-input-schema.json
View file @
31b636fe
...
...
@@ -21,6 +21,16 @@
"description"
:
"Activate iperf3 UDP server"
,
"type"
:
"boolean"
},
"rrh"
:
{
"title"
:
"RRH"
,
"description"
:
"RRH"
,
"type"
:
"string"
,
"default"
:
"SDR"
,
"enum"
:
[
"SDR"
,
"Lopcomm ORAN"
]
},
"tx_gain"
:
{
"title"
:
"Tx gain"
,
"description"
:
"Tx gain (in dB)"
,
...
...
software/ors-amarisoft/instance-tdd2600-enb-input-schema.json
View file @
31b636fe
...
...
@@ -3,6 +3,16 @@
"$schema"
:
"http://json-schema.org/draft-04/schema"
,
"title"
:
"Input Parameters"
,
"properties"
:
{
"rrh"
:
{
"title"
:
"RRH"
,
"description"
:
"RRH"
,
"type"
:
"string"
,
"default"
:
"SDR"
,
"enum"
:
[
"SDR"
,
"Lopcomm ORAN"
]
},
"tx_gain"
:
{
"title"
:
"Tx gain"
,
"description"
:
"Tx gain (in dB)"
,
...
...
software/ors-amarisoft/instance-tdd3500-enb-epc-input-schema.json
View file @
31b636fe
...
...
@@ -21,6 +21,16 @@
"description"
:
"Activate iperf3 UDP server"
,
"type"
:
"boolean"
},
"rrh"
:
{
"title"
:
"RRH"
,
"description"
:
"RRH"
,
"type"
:
"string"
,
"default"
:
"SDR"
,
"enum"
:
[
"SDR"
,
"Lopcomm ORAN"
]
},
"tx_gain"
:
{
"title"
:
"Tx gain"
,
"description"
:
"Tx gain (in dB)"
,
...
...
software/ors-amarisoft/instance-tdd3500-enb-input-schema.json
View file @
31b636fe
...
...
@@ -3,6 +3,16 @@
"$schema"
:
"http://json-schema.org/draft-04/schema"
,
"title"
:
"Input Parameters"
,
"properties"
:
{
"rrh"
:
{
"title"
:
"RRH"
,
"description"
:
"RRH"
,
"type"
:
"string"
,
"default"
:
"SDR"
,
"enum"
:
[
"SDR"
,
"Lopcomm ORAN"
]
},
"tx_gain"
:
{
"title"
:
"Tx gain"
,
"description"
:
"Tx gain (in dB)"
,
...
...
software/ors-amarisoft/instance-tdd3700-enb-epc-input-schema.json
View file @
31b636fe
...
...
@@ -21,6 +21,16 @@
"description"
:
"Activate iperf3 UDP server"
,
"type"
:
"boolean"
},
"rrh"
:
{
"title"
:
"RRH"
,
"description"
:
"RRH"
,
"type"
:
"string"
,
"default"
:
"SDR"
,
"enum"
:
[
"SDR"
,
"Lopcomm ORAN"
]
},
"tx_gain"
:
{
"title"
:
"Tx gain"
,
"description"
:
"Tx gain (in dB)"
,
...
...
software/ors-amarisoft/instance-tdd3700-enb-input-schema.json
View file @
31b636fe
...
...
@@ -3,6 +3,16 @@
"$schema"
:
"http://json-schema.org/draft-04/schema"
,
"title"
:
"Input Parameters"
,
"properties"
:
{
"rrh"
:
{
"title"
:
"RRH"
,
"description"
:
"RRH"
,
"type"
:
"string"
,
"default"
:
"SDR"
,
"enum"
:
[
"SDR"
,
"Lopcomm ORAN"
]
},
"tx_gain"
:
{
"title"
:
"Tx gain"
,
"description"
:
"Tx gain (in dB)"
,
...
...
software/ors-amarisoft/instance.cfg
View file @
31b636fe
...
...
@@ -32,7 +32,7 @@ context =
recipe = slapos.recipe.build
init =
import os
lte_version = "202
1-09-18
"
lte_version = "202
2-10-27
"
path = "/opt/amarisoft/v" + lte_version
options['lte-version'] = lte_version
options['path'] = path
...
...
@@ -110,12 +110,14 @@ extra-context =
raw sib23 ${sib23.asn:target}
raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw amarisoft_stats_template ${amarisoft-stats.jinja2.py:target}
raw lopcomm_rrh_stats_template ${lopcomm-rrh-stats.jinja2.py:target}
raw sdr_busy_promise ${sdr-busy-promise:target}
raw cell_gain_saturated_promise ${cell-gain-saturated-promise:target}
raw rx_saturated_promise ${rx-saturated-promise:target}
raw baseband_latency_promise ${baseband-latency-promise:target}
raw amarisoft_stats_log_promise ${amarisoft-stats-log-promise:target}
raw cpu_temperature_promise ${cpu-temperature-promise:target}
raw vswr_promise ${vswr-promise:target}
raw openssl_location ${openssl:location}
raw default_dl_earfcn ${default-params:default-dl-earfcn}
raw default_lte_dl_freq ${default-params:default-lte-dl-freq}
...
...
software/ors-amarisoft/lopcomm-rrh-stats.jinja2.py
0 → 100644
View file @
31b636fe
#!{{ python_path }}
import
json
import
logging
import
time
import
xmltodict
from
logging.handlers
import
RotatingFileHandler
from
ncclient
import
manager
from
ncclient.xml_
import
*
from
ncclient.devices.default
import
DefaultDeviceHandler
class
LopcommNetconfClient
:
def
__init__
(
self
):
log_file
=
"{{ log_file }}"
json_log_file
=
"{{ json_log_file }}"
self
.
logger
=
logging
.
getLogger
(
'logger'
)
self
.
json_logger
=
logging
.
getLogger
(
'json_logger'
)
self
.
logger
.
setLevel
(
logging
.
DEBUG
)
self
.
json_logger
.
setLevel
(
logging
.
DEBUG
)
json_handler
=
RotatingFileHandler
(
json_log_file
,
maxBytes
=
100000
,
backupCount
=
5
)
json_formatter
=
logging
.
Formatter
(
'{"time": "%(asctime)s", "log_level": "%(levelname)s", "message": "%(message)s", "data": %(data)s}'
)
json_handler
.
setFormatter
(
json_formatter
)
self
.
json_logger
.
addHandler
(
json_handler
)
handler
=
RotatingFileHandler
(
log_file
,
maxBytes
=
100000
,
backupCount
=
5
)
self
.
logger
.
addHandler
(
handler
)
formatter
=
logging
.
Formatter
(
"%(asctime)s [%(levelname)s] %(message)s"
)
handler
.
setFormatter
(
formatter
)
if
{{
testing
}}:
return
def
connect
(
self
,
host
,
port
,
user
,
password
):
if
{{
testing
}}:
return
self
.
address
=
(
host
,
port
)
self
.
logger
.
info
(
'Connecting to %s, user %s...'
%
(
self
.
address
,
user
))
self
.
conn
=
manager
.
connect
(
host
=
host
,
port
=
port
,
username
=
user
,
password
=
password
,
timeout
=
1800
,
device_params
=
{
'name'
:
'huawei'
},
hostkey_verify
=
False
)
self
.
logger
.
info
(
'Connection to %s successful'
%
(
self
.
address
,))
def
subscribe
(
self
):
# Filter not compatible between ncclient and netconf server
#result = self.conn.create_subscription(filter=('xpath', '/o-ran-fm:*'))
sub
=
self
.
conn
.
create_subscription
()
self
.
logger
.
info
(
'Subscription to %s successful'
%
(
self
.
address
,))
def
get_notification
(
self
):
result
=
None
while
result
==
None
:
self
.
logger
.
debug
(
'Waiting for notification from %s...'
%
(
self
.
address
,))
result
=
self
.
conn
.
take_notification
(
block
=
True
)
if
result
:
self
.
logger
.
debug
(
'Got new notification from %s...'
%
(
self
.
address
,))
result_in_xml
=
result
.
_raw
data_dict
=
xmltodict
.
parse
(
result_in_xml
)
self
.
json_logger
.
info
(
''
,
extra
=
{
'data'
:
data_dict
})
def
close
(
self
):
# Close not compatible between ncclient and netconf server
#self.conn.close()
pass
if
__name__
==
'__main__'
:
nc
=
LopcommNetconfClient
()
while
True
:
try
:
nc
.
connect
(
"192.168.0.210"
,
830
,
"oranuser"
,
"oranpassword"
)
nc
.
subscribe
()
while
True
:
nc
.
get_notification
()
except
Exception
as
e
:
nc
.
logger
.
debug
(
'Got exception, waiting 10 seconds before reconnecting...'
)
nc
.
logger
.
debug
(
e
)
time
.
sleep
(
10
)
finally
:
nc
.
close
()
software/ors-amarisoft/software.cfg
View file @
31b636fe
...
...
@@ -40,6 +40,9 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
[amarisoft-stats.jinja2.py]
<= download-base
[lopcomm-rrh-stats.jinja2.py]
<= download-base
[template-lte-enb-epc]
<= download-base
...
...
@@ -78,6 +81,8 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
<= download-base
[interface-up-promise]
<= download-base
[vswr-promise]
<= download-base
[copy-to-instance]
recipe = slapos.recipe.build:download
...
...
@@ -115,11 +120,29 @@ filename = ue-lte.jinja2.cfg
<= copy-config-to-instance
filename = ue-nr.jinja2.cfg
[pynacl]
recipe = zc.recipe.egg:custom
egg = pynacl
setup-eggs =
cffi
[bcrypt]
recipe = zc.recipe.egg:custom
egg = bcrypt
setup-eggs =
cffi
[eggs]
recipe = zc.recipe.egg
eggs =
websocket-client
${pynacl:egg}
${bcrypt:egg}
xmltodict
ncclient
interpreter = pythonwitheggs
[versions]
websocket-client = 1.4.2
ncclient = 0.6.13
xmltodict = 0.13.0
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