Hyper Open Edge Cloud

HowTo Use SlapOS Client to Configure Your BBU and RUs

Set up Rapid.Space BBU With Lopcomm RU
  • Last Update:2024-02-14
  • Version:001
  • Language:en

How To Use SlapOS Client to Configure Your BBU and RUs

This tutorial teaches you how to use SlapOS Client to configure your BBU and RUs with ors-amarisoft.

Agenda

  1. Preparation
  2. Supply and request ors-amarisoft
  3. SSH to RRH via CPRI
 
 

Preparation

You need a Linux computer or VM (client-vm) installed with SlapOS to allow you to use slapos client.

To install SlapOS: 

Then you can set up SlapOS client on your client-vm:

Amarisoft necessities: 

  • CPRI card
    • Please refer Amarisoft's doc to configure the CRRI card. 
  • Amarisoft installation and license

Re6st verification: 

$ systemctl status re6stnet.service 
● re6stnet.service - Resilient, Scalable, IPv6 Network application
     Loaded: loaded (/usr/lib/systemd/system/re6stnet.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2022-12-21 11:35:46 CET; 1 months 25 days ago
   Main PID: 1288 (re6stnet)
      Tasks: 5 (limit: 38103)
     Memory: 62.4M
        CPU: 54min 23.294s
     CGroup: /system.slice/re6stnet.service
             ├─   1288 /opt/re6st/parts/python2.7/bin/python2.7 /usr/sbin/re6stnet @re6stnet.conf
             ├─   1958 openvpn --dev-type tap --dev re6stnet-tcp --persist-tun --persist-key --script-security 2 --up /opt/re6st/eggs/re6stnet-0.583-py2.7.egg/re6st/ovpn-client --tls-server --mode server ->
             ├─   1966 babeld -h 15 -H 15 -L /var/log/re6stnet/babeld.log -S /var/lib/re6stnet/babeld.state -I /var/run/re6stnet/babeld.pid -s -C ipv6-subtrees true -C redistribute local deny -C redistribu>
             ├─2140311 openvpn --dev-type tap --dev re6stnet6 --persist-tun --persist-key --script-security 2 --up /opt/re6st/eggs/re6stnet-0.583-py2.7.egg/re6st/ovpn-client --nobind --client --remote 195.>
             └─2197267 openvpn --dev-type tap --dev re6stnet2 --persist-tun --persist-key --script-security 2 --up /opt/re6st/eggs/re6stnet-0.583-py2.7.egg/re6st/ovpn-client --nobind --client --remote 178.>

Make sure you have re6st installed to install SlapOS. Here is the verification of slapos:

$ slapos

usage: slapos [--version] [-v | -q] [--debug] [--log-file LOG_FILE] [--log-color] [--log-time] [-h]

 

SlapOS client 1.7.13

optional arguments:
  --version             show program's version number and exit
  -v, --verbose         Increase verbosity of output. Can be repeated.
  -q, --quiet           Suppress output except warnings and errors.
  --debug               Show tracebacks on errors.
  --log-file LOG_FILE, --logfile LOG_FILE, --log_file LOG_FILE
                        Specify a file to log output (default: console only)
  --log-color           Colored log output in console (stripped if redirected)
  --log-time            Include timestamp in console log
  -h, --help            show this help message and exit

Verification of slapos client

$ ls ~/.slapos/
client.crt  client.key  slapos-client.cfg


 

Request script on client-vm

On your client-vm, download kslap.py: 

$ wget https://lab.nexedi.com/nexedi/slapos/-/raw/xy/lte-multiru/software/ors-amarisoft/k/kslap.py

download kslap.py and add a python script for requesting in the same directory: 
$ ls
kslap.py  request-stand1.py

 

 

Request script on client-vm

Copy the example request-stand1.py and modify accordingly.

The key parameters: 

According to your physical setup, you can request multiple RUs and related cells. 

Most of the parameters can be updated on the panel with GUI. 

Read more: How To Use SlapOS Client And Console

Example request-stand1.py

#!/usr/bin/env -S slapos console
"""request mme/enb and configure radio units and cells"""

# XXX workaround for `slapos console` not setting up sys.path the same way as std python does
import sys
from os.path import dirname
sys.path.insert(0, dirname(__file__))
import kslap
kslap.init(slap)

import json, copy

kamari = "https://lab.nexedi.com/nexedi/slapos/raw/xy/lte-multiru/software/ors-amarisoft/software.cfg"
stand1 = "COMP-3909"

supply(kamari, computer_guid=stand1)


# eNB
ienb = kslap.request(kamari,
        software_type="enb",
        partition_reference="stand1-ENB",
        filter_kw={"computer_guid": stand1},
        partition_parameter_kw={"_": json.dumps({
        "enb_id": "6217",
        "gtp_addr": "11.131.225.38",
        "mme_list": {"TOP CN": {"mme_addr": "10.224.212.241"}},
        "plmn_list": {"TOP PLMN": {"plmn": "25001","reserved": True}},
        "log_phy_debug": False,
        "gps_sync": False,
        "use_ipv4": True,
        "enb_stats_fetch_period": 60
        })})


# eref returns full reference for ienb's shared instance with given ref.
def eref(ref):
    enb_ref = kslap.ref_of_instance(ienb)
    return '%s.%s' % (enb_ref, ref)

# iENB is shorthand to request shared instance on ienb.
def iENB(ref, kw):
    return kslap.iSHARED(ienb, ref, kw)


# Radio Units
RU1 = {
    'ru_type':      'lopcomm',
    'ru_link_type': 'cpri',
    'cpri_link':    {
        'sdr_dev':  0,
        'sfp_port': 1,
        'mult':     4,
        'mapping':  'hw',
        'rx_delay': 25.11,
        'tx_delay': 14.71,
        'tx_dbm':   63
    },
    'mac_addr':     '00:0A:45:00:00:00',
    'n_antenna_dl': 1,
    'n_antenna_ul': 1,
    'tx_gain':      -20,
    'rx_gain':      -20,
    'txrx_active':  'INACTIVE',
}

RU2 = copy.deepcopy(RU1)
RU2['cpri_link']['sfp_port'] = 2
RU2['mac_addr'] = '90:A9:F7:C0:00:03'

iru1 = iENB(eref('RU1'), RU1)
iru2 = iENB(eref('RU2'), RU2)


# Cells
CELL1 = {
    'cell_type':    'lte',
    'cell_kind':    'enb',
    'rf_mode':      'fdd',
    'bandwidth':    20,
    'dl_earfcn':    100,        # 2120 @ B1
    'pci':          1,
    'cell_id':      '0x01',
    'tac':          '0x1234',
    'ru':           {
        'ru_type':  'ru_ref',
        'ru_ref':   eref('RU1')
    }
}

CELL2 = copy.deepcopy(CELL1)
#CELL2['dl_earfcn'] = 500       # 2160 @ B1
CELL2['dl_earfcn'] = 2850       # 2630 @ B7
CELL2['pci'] = 2
CELL2['cell_id'] = '0x02'
CELL2['ru']['ru_ref'] = eref('RU2')

icell1 = iENB(eref('CELL1'), CELL1)
icell2 = iENB(eref('CELL2'), CELL2)

 

 

SlapOS Console

Launch your request script by

$ slapos console request-stand1.py

You will see the output without an error. Sometime, network error occurs, try launch the command multiple times. 

$ slapos console request-stand1.py

/opt/slapos/eggs/urllib3-1.26.12-py3.7.egg/urllib3/connectionpool.py:1052: InsecureRequestWarning: Unverified HTTPS request is being made to host 'slap.vifib.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,
/opt/slapos/eggs/urllib3-1.26.12-py3.7.egg/urllib3/connectionpool.py:1052: InsecureRequestWarning: Unverified HTTPS request is being made to host 'slap.vifib.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,
/opt/slapos/eggs/urllib3-1.26.12-py3.7.egg/urllib3/connectionpool.py:1052: InsecureRequestWarning: Unverified HTTPS request is being made to host 'slap.vifib.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,
/opt/slapos/eggs/urllib3-1.26.12-py3.7.egg/urllib3/connectionpool.py:1052: InsecureRequestWarning: Unverified HTTPS request is being made to host 'slap.vifib.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,
/opt/slapos/eggs/urllib3-1.26.12-py3.7.egg/urllib3/connectionpool.py:1052: InsecureRequestWarning: Unverified HTTPS request is being made to host 'slap.vifib.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,
/opt/slapos/eggs/urllib3-1.26.12-py3.7.egg/urllib3/connectionpool.py:1052: InsecureRequestWarning: Unverified HTTPS request is being made to host 'slap.vifib.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,

 

 

Panel view


The instances you requested with the request script above will be listed on your service list. You can modify the parameters in every instances.

However, if you want to add more services/instances, updating request script to request will be necessary.

Note: after you launch the request script, the parameters of the instance will be overwritten by the parameters in the script.