Commit a76c76f4 authored by Joanne Hugé's avatar Joanne Hugé

simpleran/ors-enb: publish SSB NR ARFCN for ORS

Publish SSB NR ARFCN value so that user doesn't have
to go look in the gNB log themselves to find the SSB value.
In order to publish the SSB NR ARFCN, we start lteenb
with a dummy gNB configuration and parse the gNB log to get
the SSB NR ARFCN computed by Amarisoft (if user has set the
SSB NR ARFCN we just use their value).
parent bd26baa5
......@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum = 109828c2a97c09b0976d266aaba00328
md5sum = b9c9613a1ed4fe82239625408d3ec209
[template-ors]
filename = instance-ors.cfg
......@@ -60,11 +60,11 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 22c399fc3a84aeec0f6545fe72fbf2f3
md5sum = 48860c28523a4cf99677ef8aa7658fcc
[template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg
md5sum = 514adcd282fd14369ebc4cbfba452c2e
md5sum = aeba26863ad7743ae9cc5a02251151a5
[template-ors-ue]
_update_hash_filename_ = instance-ors-ue.jinja2.cfg
......@@ -90,6 +90,10 @@ md5sum = dd50b4e4780830ddbde28b84af118f18
filename = config/enb.jinja2.cfg
md5sum = fdd8c9d920987a3e832c07a59a3d0ace
[gnb-dummy.jinja2.cfg]
filename = config/gnb-dummy.jinja2.cfg
md5sum = 5d6208c174e701282494f5f70dad7c16
[drb_lte.jinja2.cfg]
filename = config/drb_lte.jinja2.cfg
md5sum = 01eb971e2ff580da52291138495a81ca
......
{
log_options: "all.level=none",
log_filename: "{{ log_file }}",
rf_driver: {
name: "dummy",
},
tx_gain: 0,
rx_gain: 0,
amf_list: [
{
amf_addr: "127.0.1.100",
},
],
gtp_addr: "127.0.1.1",
gnb_id_bits: 28,
gnb_id: 0x12345,
en_dc_support: true,
cell_list: [],
nr_cell_list: [
{%- for cell_ref, icell in icell_dict|dictsort %}
{%- set cell = icell['_'] %}
{
rf_port: 0,
n_antenna_dl: 1,
n_antenna_ul: 1,
cell_id: 0x12,
n_id_cell: 123,
band: {{ cell.nr_band }},
dl_nr_arfcn: {{ cell.dl_nr_arfcn }},
bandwidth: {{ cell.bandwidth }},
{%- if cell.rf_mode == 'tdd' %}
subcarrier_spacing: 30,
ssb_pos_bitmap: "10000000",
{%- else %}
subcarrier_spacing: 15,
ssb_pos_bitmap: "1000",
{%- endif %}
root_sequence_index: 123,
inactivity_timer: 10000,
tdd_ul_dl_config: {
pattern1: {
period: 5,
dl_slots: 7,
dl_symbols: 6,
ul_slots: 2,
ul_symbols: 4,
},
},
prach: {
{%- if cell.rf_mode == 'tdd' %}
ra_response_window: 20,
{%- else %}
ra_response_window: 10,
{%- endif %}
},
pdcch: {
uss: {
n_candidates: [ 0, 2, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
},
drb_config: [
{
qci: 9,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 13,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 7,
},
},
]
},
{%- endfor %}
],
nr_cell_default: {
ssb_period: 20,
plmn_list: [
{
plmn: "00101",
tac: 100,
reserved: false,
},
],
si_window_length: 40,
cell_barred: false,
intra_freq_reselection: true,
q_rx_lev_min: -70,
q_qual_min: -20,
sr_period: 40,
dmrs_type_a_pos: 2,
prach: {
prach_config_index: 160,
msg1_subcarrier_spacing: 30,
msg1_fdm: 1,
msg1_frequency_start: -1,
zero_correlation_zone_config: 15,
preamble_received_target_power: -110,
preamble_trans_max: 7,
power_ramping_step: 4,
restricted_set_config: "unrestricted_set",
ra_contention_resolution_timer: 64,
ssb_per_prach_occasion: 1,
cb_preambles_per_ssb: 8,
},
pdcch: {
search_space0_index: 0,
dedicated_coreset: {
rb_start: -1,
l_crb: -1,
duration: 0,
precoder_granularity: "sameAsREG_bundle",
},
css: {
n_candidates: [ 0, 0, 4, 0, 0 ],
},
rar_al_index: 2,
si_al_index: 2,
al_index: 1,
},
pdsch: {
mapping_type: "typeA",
dmrs_add_pos: 1,
dmrs_type: 1,
dmrs_max_len: 1,
mcs_table: "qam256",
rar_mcs: 2,
si_mcs: 6,
},
csi_rs: {
resource_auto: {
nzp_csi_rs_period: 80,
},
csi_report_config: [
{
report_config_type: "periodic",
period: 80,
},
],
},
pucch: {
dpc_snr_target: 25,
pucch_group_hopping: "neither",
hopping_id: -1,
p0_nominal: -90,
pucch1: {
n_cs: 3,
n_occ: 3,
freq_hopping: true,
},
pucch2: {
n_symb: 2,
n_prb: 1,
freq_hopping: true,
simultaneous_harq_ack_csi: false,
max_code_rate: 0.25,
},
},
pusch: {
dpc_snr_target: 25,
mapping_type: "typeA",
n_symb: 14,
dmrs_add_pos: 1,
dmrs_type: 1,
dmrs_max_len: 1,
tf_precoding: false,
mcs_table: "qam256",
mcs_table_tp: "qam256",
ldpc_max_its: 5,
p0_nominal_with_grant: -84,
msg3_mcs: 4,
msg3_delta_power: 0,
beta_offset_ack_index: 9,
},
mac_config: {
msg3_max_harq_tx: 5,
ul_max_harq_tx: 5,
dl_max_harq_tx: 5,
ul_max_consecutive_retx: 30,
dl_max_consecutive_retx: 30,
periodic_bsr_timer: 20,
retx_bsr_timer: 320,
periodic_phr_timer: 500,
prohibit_phr_timer: 200,
phr_tx_power_factor_change: "dB3",
sr_prohibit_timer: 0,
sr_trans_max: 64,
},
cipher_algo_pref: [],
integ_algo_pref: [2, 1],
},
}
......@@ -130,9 +130,51 @@ promise = ${:etc}/promise
log = ${:var}/log
xlog-fluentbit = ${:var}/xlog-fluentbit
# Used in [ssb-nr-arfcn]
[gnb-dummy-config]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
url = {{ gnb_dummy_template }}
log-file = ${directory:log}/gnb-dummy.log
output = ${directory:etc}/gnb-dummy.cfg
context =
key log_file :log-file
key icell_dict :icell_dict
icell_dict = {{ dumps(rulib.icell_dict) }}
# For ORS only, to publish SSB NR ARFCN:
# Launch lteenb with a dummy gNB configuration (dummy SDR driver
# is used) in order to get the SSB NR ARFCN computed by Amarisoft
# (unless user has set SSB NR ARFCN in the input parameters)
[ssb-nr-arfcn]
recipe = slapos.recipe.build
lteenb-path = {{ amarisoft['enb_dir'] }}/lteenb
license-dir = {{ amarisoft['license_dir'] }}
enb-conf-path = ${gnb-dummy-config:output}
lteenb-log = ${directory:log}/gnb-dummy.log
init =
{%- if slapparameter_dict.get('ssb_nr_arfcn', False) %}
options['ssb-nr-arfcn'] = {{ slapparameter_dict['ssb_nr_arfcn'] }}
{%- else %}
import os, subprocess
env = os.environ.copy()
env['AMARISOFT_PATH'] = options['license-dir']
subprocess.run(['sudo', '-n', '{{ amarisoft['dir'] }}/rm-tmp-lte'])
subprocess.run([options['lteenb-path'], options['enb-conf-path']],
input='quit\n', text=True, env=env)
try:
with open(options['lteenb-log'], 'r') as f:
for l in f:
if 'ssb_arfcn=' in l:
x = l.split('ssb_arfcn=')[1]
options['ssb-nr-arfcn'] = x.split(' ')[0]
except Exception as e:
options['ssb-nr-arfcn'] = 'Unknown'
{%- endif %}
[enb-sh-wrapper]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
wait-for-ssb-nr-arfcn = ${ssb-nr-arfcn:ssb-nr-arfcn}
enb-info-log = ${directory:log}/enb-info.log
enb-info-archive-log = ${directory:log}/enb-info.log
enb-radio-log = ${directory:log}/enb.log
......
......@@ -77,8 +77,6 @@
{%- endif %}
{%- endfor %}
{%- set ssb_nr_arfcn = slapparameter_dict.get('ssb_nr_arfcn', 0) %}
{#- inject ru+cell synthesized from ORS-specific parameters #}
{%- macro iref(name) %}
{{- '%s.%s' % (slap_configuration['instance-title'], name) -}}
......@@ -112,6 +110,7 @@
{%- set cell = {
'cell_type': 'nr',
'dl_nr_arfcn': ors_version['current-nr-arfcn'],
'ssb_nr_arfcn': slapparameter_dict.get('ssb_nr_arfcn', 0),
'nr_band': ors_version['current-nr-band'],
'bandwidth': slapparameter_dict.nr_bandwidth,
'ssb_pos_bitmap': slapparameter_dict.ssb_pos_bitmap,
......@@ -240,9 +239,9 @@ current-earfcn = {{ ors_version['current-earfcn'] }}
current-frequency = {{ xnrarfcn_module.frequency(ors_version['current-nr-arfcn']) }} MHz
current-nr-band = {{ ors_version['current-nr-band'] }}
current-nr-arfcn = {{ ors_version['current-nr-arfcn'] }}
current-ssb-nr-arfcn = ${ssb-nr-arfcn:ssb-nr-arfcn}
{%- endif %}
# hide ru-list, cell-list, peer-list and peer-cell-list from published information
[publish-connection-information]
depends += ${publish-connection-information-ors-cleanup:recipe}
......
......@@ -229,6 +229,7 @@ extra-context =
section ors_id ors-id
section sdr sdr
raw enb_template ${enb.jinja2.cfg:target}
raw gnb_dummy_template ${gnb-dummy.jinja2.cfg:target}
raw slaplte_template ${slaplte.jinja2:target}
raw drb_lte_template ${drb_lte.jinja2.cfg:target}
raw drb_nr_template ${drb_nr.jinja2.cfg:target}
......
......@@ -32,6 +32,7 @@ parts +=
dnsmasq-core-network.jinja2.cfg
ims.jinja2.cfg
enb.jinja2.cfg
gnb-dummy.jinja2.cfg
ue_db.jinja2.cfg
ue.jinja2.cfg
drb_lte.jinja2.cfg
......@@ -111,6 +112,9 @@ destination = ${buildout:directory}/gadget/${:_buildout_section_name_}
[enb.jinja2.cfg]
<= copy-config-to-instance
filename = enb.jinja2.cfg
[gnb-dummy.jinja2.cfg]
<= copy-config-to-instance
filename = gnb-dummy.jinja2.cfg
[drb_lte.jinja2.cfg]
<= copy-config-to-instance
[drb_nr.jinja2.cfg]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment