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
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
Xavier Thompson
slapos
Commits
294191ed
Commit
294191ed
authored
Dec 04, 2024
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simpleran: generate unique IDs for each ORS
parent
05bd12e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
10 deletions
+57
-10
software/simpleran/buildout.hash.cfg
software/simpleran/buildout.hash.cfg
+2
-2
software/simpleran/instance-ors-enb.jinja2.cfg
software/simpleran/instance-ors-enb.jinja2.cfg
+19
-8
software/simpleran/instance.cfg
software/simpleran/instance.cfg
+36
-0
No files found.
software/simpleran/buildout.hash.cfg
View file @
294191ed
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
[template]
[template]
filename = instance.cfg
filename = instance.cfg
md5sum =
75057fd3fc8b1722b13163f020b196c0
md5sum =
176b84bde85d95a115a0cf2068912461
[template-ors]
[template-ors]
filename = instance-ors.cfg
filename = instance-ors.cfg
...
@@ -64,7 +64,7 @@ md5sum = e89ee67dcee89923aace67759b3a7867
...
@@ -64,7 +64,7 @@ md5sum = e89ee67dcee89923aace67759b3a7867
[template-ors-enb]
[template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg
_update_hash_filename_ = instance-ors-enb.jinja2.cfg
md5sum =
8ed4dcc068950078daadfa7dd63b67fe
md5sum =
bdc8ca95cad8374f24af7ab6a276b61c
[template-ors-ue]
[template-ors-ue]
_update_hash_filename_ = instance-ors-ue.jinja2.cfg
_update_hash_filename_ = instance-ors-ue.jinja2.cfg
...
...
software/simpleran/instance-ors-enb.jinja2.cfg
View file @
294191ed
...
@@ -12,11 +12,11 @@
...
@@ -12,11 +12,11 @@
"n_antenna_ul": 2,
"n_antenna_ul": 2,
"rf_mode": "tdd",
"rf_mode": "tdd",
"tdd_ul_dl_config": "[Configuration 2] 5ms 2UL 6DL (default)",
"tdd_ul_dl_config": "[Configuration 2] 5ms 2UL 6DL (default)",
"pci": 1,
"enb_id": ors_id['enb_id'],
"cell_id": "0x01",
"cell_id": ors_id['enb_cell_id'],
"pci": ors_id['enb_pci'],
"root_sequence_index": ors_id['root_sequence_index'],
"tac": "0x0001",
"tac": "0x0001",
"root_sequence_index": 204,
"enb_id": "0x1A2D0",
'mme_list': {
'mme_list': {
'Local Core Network': {
'Local Core Network': {
'mme_addr': '127.0.1.100'
'mme_addr': '127.0.1.100'
...
@@ -40,9 +40,10 @@
...
@@ -40,9 +40,10 @@
"rf_mode": "tdd",
"rf_mode": "tdd",
"tdd_ul_dl_config": "5ms 2UL 7DL 4/6 (default)",
"tdd_ul_dl_config": "5ms 2UL 7DL 4/6 (default)",
"ssb_pos_bitmap": "10000000",
"ssb_pos_bitmap": "10000000",
"pci": 500,
"gnb_id": ors_id['gnb_id'],
"cell_id": "0x01",
"cell_id": ors_id['gnb_cell_id'],
"gnb_id": "0x12345",
"pci": ors_id['gnb_pci'],
"root_sequence_index": ors_id['root_sequence_index'],
"gnb_id_bits": 28,
"gnb_id_bits": 28,
'amf_list': {
'amf_list': {
'Local Core Network': {
'Local Core Network': {
...
@@ -113,7 +114,7 @@
...
@@ -113,7 +114,7 @@
'nr_band': ors_version['current-nr-band'],
'nr_band': ors_version['current-nr-band'],
'bandwidth': slapparameter_dict.nr_bandwidth,
'bandwidth': slapparameter_dict.nr_bandwidth,
'ssb_pos_bitmap': slapparameter_dict.ssb_pos_bitmap,
'ssb_pos_bitmap': slapparameter_dict.ssb_pos_bitmap,
'root_sequence_index':
1
,
'root_sequence_index':
slapparameter_dict.root_sequence_index
,
}
}
%}
%}
{%- endif %}
{%- endif %}
...
@@ -219,6 +220,16 @@ frequency-range-rating = {{ ors_version['range'] }}
...
@@ -219,6 +220,16 @@ frequency-range-rating = {{ ors_version['range'] }}
current-tx-power-estimate = {{ ors_version['power-estimate'] }}
current-tx-power-estimate = {{ ors_version['power-estimate'] }}
current-tx-gain = {{ ors_version['current-tx-gain'] }}
current-tx-gain = {{ ors_version['current-tx-gain'] }}
current-rx-gain = {{ ors_version['current-rx-gain'] }}
current-rx-gain = {{ ors_version['current-rx-gain'] }}
cell-id = {{ slapparameter_dict['cell_id'] }}
physical-cell-id = {{ slapparameter_dict['pci'] }}
root-sequence-index = {{ slapparameter_dict['root_sequence_index'] }}
{%- if enb_mode == "enb" %}
enb-id = {{ slapparameter_dict['enb_id'] }}
eutra-cell-id = {{ ors_id['eutra_cell_id'] }}
{%- else %}
gnb-id = {{ slapparameter_dict['gnb_id'] }}
nr-cell-id = {{ ors_id['nr_cell_id'] }}
{%- endif %}
{%- if enb_mode == 'enb' %}
{%- if enb_mode == 'enb' %}
current-frequency = {{ xearfcn_module.frequency(ors_version['current-earfcn']) }} MHz
current-frequency = {{ xearfcn_module.frequency(ors_version['current-earfcn']) }} MHz
...
...
software/simpleran/instance.cfg
View file @
294191ed
...
@@ -164,6 +164,41 @@ init =
...
@@ -164,6 +164,41 @@ init =
except:
except:
options['mac'] = "00:00:00:00:00:00"
options['mac'] = "00:00:00:00:00:00"
[ors-id]
recipe = slapos.recipe.build
configuration = $${slap-configuration:configuration}
init =
import socket
try:
sn = int(socket.gethostname().split('ors')[1])
except (IndexError, ValueError):
sn = 0
options['serial_number'] = sn
options['enb_id'] = "0x{:05X}".format(sn % 2**20)
options['gnb_id'] = "0x{:05X}".format((sn + 2**19) % 2**20)
options['enb_pci'] = sn % 504
options['gnb_pci'] = sn % 1008
options['enb_cell_id'] = "0x{:02X}".format(sn % 2**8)
options['gnb_cell_id'] = "0x{:02X}".format((sn + 2**7) % 2**8)
options['root_sequence_index'] = sn % 834
def to_int(x):
try:
if '0x' in enb_id:
return int(x, 16)
return int(x)
except ValueError:
return 0
enb_id = options['configuration'].get('enb_id', options['enb_id'])
gnb_id = options['configuration'].get('enb_id', options['enb_id'])
cell_id = options['configuration'].get('cell_id', options['enb_cell_id'])
gnb_id_bits = options['configuration'].get('gnb_id_bits', 28)
options['eutra_cell_id'] = \
"0x{:07X}".format(to_int(enb_id) * 2**8 + to_int(cell_id))
options['nr_cell_id'] = \
"0x{:07X}".format(to_int(gnb_id) * 2**(36 - gnb_id_bits) + to_int(cell_id))
[comp-id]
[comp-id]
recipe = slapos.recipe.build
recipe = slapos.recipe.build
computer = $${slap-connection:computer-id}
computer = $${slap-connection:computer-id}
...
@@ -191,6 +226,7 @@ extra-context =
...
@@ -191,6 +226,7 @@ extra-context =
section comp_id comp-id
section comp_id comp-id
section slap_configuration slap-configuration
section slap_configuration slap-configuration
section amarisoft amarisoft
section amarisoft amarisoft
section ors_id ors-id
section sdr sdr
section sdr sdr
raw enb_template ${enb.jinja2.cfg:target}
raw enb_template ${enb.jinja2.cfg:target}
raw slaplte_template ${slaplte.jinja2:target}
raw slaplte_template ${slaplte.jinja2:target}
...
...
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