From 866a76dc4a3b4ac8a3bf7a30e9ad678a3bb94d09 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 18 Aug 2023 10:35:17 +0200 Subject: [PATCH 1/4] Correct READMEs of docker-compose files to reflect config mounting --- .../4g_rfsimulator_fdd_05MHz/README.md | 49 ++++++++++++++----- ci-scripts/yaml_files/5g_l2sim_tdd/README.md | 47 +++++++++++++++--- .../yaml_files/5g_rfsimulator/README.md | 31 +++++++----- 3 files changed, 96 insertions(+), 31 deletions(-) diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md index d47c4842de..3ac4962321 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md @@ -410,16 +410,33 @@ in HSS config: NB_USERS: 10 ``` -in UE config: +All UE parameter values will be taken from the mounted config file, so modify +the corresponding UE file to reflect the above changes ```yaml - MCC: '208' - MNC: '96' - SHORT_IMSI: '0100000001' - LTE_KEY: 'fec86ba6eb707ed08905757b1bb44b8f' - OPC: 'c42449363bbad02b66d16bc975d77cc1' - MSISDN: '001011234561010' - HPLMN: 20896 + oai_ue0: + [...] + volumes: + - ../../conf_files/lteue.usim-ci.conf:/opt/oai-lte-ue/etc/ue_usim.conf +``` + +and in the UE file, you should have +``` +PLMN: { + PLMN0: { + FULLNAME="OpenAirInterface"; + SHORTNAME="OAICN"; + MNC="96"; + MCC="208"; + }; +}; +[...] + SIM: { + MSIN="0100000001"; + USIM_API_K="fec86ba6eb707ed08905757b1bb44b8f"; + OPC="c42449363bbad02b66d16bc975d77cc1"; + MSISDN="001011234561010"; + }; ``` As you can see: `LTE_K` and `LTE_KEY` are the same value. And `OP_KEY` and `OPC` can be deduced from each other. Look in HSS logs. @@ -471,13 +488,19 @@ in SPGW-C/-U configs: REALM: openairinterface.org ``` -in eNB config: +In eNB, all the parameter values will be taken from the mounted config file. ```yaml - MCC: '208' - MNC: '96' - MNC_LENGTH: 2 - TAC: 1 +oai_enb0: + [...] + volumes: + - ../../conf_files/enb.band7.25prb.rfsim.conf:/opt/oai-enb/etc/enb.conf +``` + +with the eNB config reading: + +```libconfig + plmn_list = ( { mcc = 208; mnc = 96; mnc_length = 2; } ); ``` The values SHALL match, and `TAC` shall match `TAC_0` from MME. diff --git a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md index 48081e71dd..126951f1d0 100644 --- a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md +++ b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md @@ -321,19 +321,52 @@ In the `SMF` section, provide your own DNS IP address: DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 ``` -In the `gNB` section, provide your docker-host primary IP address and interface name: in our case `172.21.16.128` and `eno1`. +gNB section: + +All the parameter values will be taken from the mounted config file ```yaml - GNB_NGA_IF_NAME: eno1 - GNB_NGA_IP_ADDRESS: 172.21.16.128 - GNB_NGU_IF_NAME: eno1 - GNB_NGU_IP_ADDRESS: 172.21.16.128 +oai-gnb: + [...] + volumes: + - ../../conf_files/gnb.sa.band78.106prb.l2sim.conf:/opt/oai-gnb/etc/gnb.conf ``` -Same thing in the `nr-ue` section: +with the configuration file having something like: + +```libconfig + NETWORK_INTERFACES : + { + GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.128"; + GNB_INTERFACE_NAME_FOR_NGU = "eno1"; + GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.128"; + GNB_PORT_FOR_NGU = 2152; # Spec 2152 + }; +``` + +For the UE, all the parameter values will be taken from the mounted config +file. Example: ```yaml - NR_UE_NFAPI_IF_NAME: eno1 + oai-nr-ue0: + [...] + volumes: + - ../../conf_files/nrue.band78.106prb.l2sim.conf:/opt/oai-nr-ue/etc/nr-ue.conf + - ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results +``` + +where the UE configuration (mounted to `/opt/oai-nr-ue/etc/nr-ue.conf`) reads + +```libconfig +MACRLCs = ( + { + num_cc = 1; + tr_n_preference = "nfapi"; + local_n_if_name = "eno1"; + remote_n_address = "127.0.0.1"; //Proxy IP + local_n_address = "127.0.0.1"; + ... ``` This tutorial is a first draft. This nFAPI feature and the proxy are still under development. diff --git a/ci-scripts/yaml_files/5g_rfsimulator/README.md b/ci-scripts/yaml_files/5g_rfsimulator/README.md index a018c085d6..572a3c2470 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator/README.md +++ b/ci-scripts/yaml_files/5g_rfsimulator/README.md @@ -244,14 +244,11 @@ Create entry for Second UE in docker-compose.yaml file as follows: privileged: true container_name: rfsim5g-oai-nr-ue2 environment: - FULL_IMSI: '208990100001101' - FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f' - OPC: 'C42449363BBAD02B66D16BC975D77CC1' - DNN: oai - NSSAI_SST: 1 USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time depends_on: - oai-gnb + volumes: + - ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf networks: public_net: ipv4_address: 192.168.71.151 @@ -496,13 +493,25 @@ INSERT INTO `users` VALUES ('208990100001101','1','55000000000000',NULL,'PURGED' As you can see, 2 other values shall match in the NR-UE section of `docker-compose.yaml`: -OAI UE - 1 -* `FULL_IMSI: '208990100001100'` -* `FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'` +All the values such as IMSI and KEY are taken from the configuration file mounted into the container. -OAI UE - 2 -* `FULL_IMSI: '208990100001101'` -* `FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'` +```yaml + oai-nr-ue: + [...] + volumes: + - ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf +``` + +with the config having: +```libconfig +uicc0 = { + imsi = "208990100001100"; + key = "fec86ba6eb707ed08905757b1bb44b8f"; + opc= "C42449363BBAD02B66D16BC975D77CC1"; + dnn= "oai"; + nssai_sst=1; +} +``` We are also using a dedicated `oai-smf.conf` for the `SMF` container: the `oai` DNN shall match the one in the NR-UE section of `docker-compose.yaml` (`DNN: oai`). From 24f9f879413c3ed5471742bbf3add97d0f59337e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 18 Aug 2023 12:48:50 +0200 Subject: [PATCH 2/4] Improve 5G RFsim README; clarify how to overwrite the second UE's IMSI --- ci-scripts/yaml_files/5g_rfsimulator/README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ci-scripts/yaml_files/5g_rfsimulator/README.md b/ci-scripts/yaml_files/5g_rfsimulator/README.md index 572a3c2470..72756b1441 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator/README.md +++ b/ci-scripts/yaml_files/5g_rfsimulator/README.md @@ -234,11 +234,13 @@ oaitun_ue1: flags=4305 mtu 1500 ## 2.4. Deploy Second OAI NR-UE in RF simulator mode and in Standalone Mode ## -```bash -Create a entry for new IMSI (208990100001101) in oai_db.sql file -Refer Section - [Making the NR-UE connect to the core network](#51-making-the-nr-ue-connect-to-the-core-network) +Create a entry for new IMSI (208990100001101) in oai_db.sql file. +For this, refer to section [Making the NR-UE connect to the core +network](#51-making-the-nr-ue-connect-to-the-core-network) -Create entry for Second UE in docker-compose.yaml file as follows: +Create the entry for the second UE in `docker-compose.yaml` file as follows: + +```yaml oai-nr-ue2: image: oai-nr-ue:develop privileged: true @@ -493,7 +495,7 @@ INSERT INTO `users` VALUES ('208990100001101','1','55000000000000',NULL,'PURGED' As you can see, 2 other values shall match in the NR-UE section of `docker-compose.yaml`: -All the values such as IMSI and KEY are taken from the configuration file mounted into the container. +All the values such as IMSI and KEY are taken from the configuration file mounted into the container. For the first UE, provision as usual through the config file ```yaml oai-nr-ue: @@ -513,6 +515,12 @@ uicc0 = { } ``` +The second UE's IMSI might be changed by either having the second UEs +docker-compose entry mount another config, or add `--uicc0.imsi +208990100001101` in `USE_ADDITIONAL_OPTIONS` entry. Note that the latter is a +feature of the configuration module to overwrite any configuration option in +the config file on the command line. + We are also using a dedicated `oai-smf.conf` for the `SMF` container: the `oai` DNN shall match the one in the NR-UE section of `docker-compose.yaml` (`DNN: oai`). ## 5.2. Making the gNB connect to the core network ## From 336e4a5ef1098a9ceb3ef60318f2d1bf43a0ed64 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 18 Aug 2023 12:51:41 +0200 Subject: [PATCH 3/4] Link to LDPC doc from doc/README.md --- doc/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/README.md b/doc/README.md index d42bad0a72..5898c22ef4 100644 --- a/doc/README.md +++ b/doc/README.md @@ -81,6 +81,7 @@ Legacy unmaintained files: - The [logging module](../common/utils/LOG/DOC/log.md) - The [shared object loader](../common/utils/DOC/loader.md) - The [threadpool](../common/utils/threadPool/thread-pool.md) used in L1 +- The [LDPC implementation](../openair1/PHY/CODING/DOC/LDPCImplementation.md) is a shared library ## SDRs From ca96b9e9bf9647f99086bfe08ab1d5e927604a13 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 18 Aug 2023 13:02:18 +0200 Subject: [PATCH 4/4] Improve and reformat documentation of config module --- common/config/DOC/config/devusage.md | 4 +-- .../config/DOC/config/devusage/addparamset.md | 2 +- common/config/DOC/config/rtusage.md | 29 ++++++++++++++----- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/common/config/DOC/config/devusage.md b/common/config/DOC/config/devusage.md index 151ffeafa8..76227470af 100644 --- a/common/config/DOC/config/devusage.md +++ b/common/config/DOC/config/devusage.md @@ -1,7 +1,7 @@ The configuration module objectives are 1. Allow easy parameters management in oai, helping the development of a flexible, modularized and fully configurable softmodem. -1. Use a common configuration API in all oai modules -1. Allow development of alternative configuration sources without modifying the oai code. Today the only delivered configuration source is the libconfig format configuration file. +2. Use a common configuration API in all oai modules +3. Allow development of alternative configuration sources without modifying the oai code. Today the only delivered configuration source is the libconfig format configuration file. As a developer you may need to look at these sections: diff --git a/common/config/DOC/config/devusage/addparamset.md b/common/config/DOC/config/devusage/addparamset.md index 49448e11da..abf562fd42 100644 --- a/common/config/DOC/config/devusage/addparamset.md +++ b/common/config/DOC/config/devusage/addparamset.md @@ -1,7 +1,7 @@ The configuration module maps a configuration file section to a `paramdef_t` structure array. One `config_get` call can be used to return the values of all the parameters described in the `paramdef_t` array. Retrieving a single occurence of a parameter set ( a group in the libconfig terminology) is just a two steps task: 1. describe the parameters in a `paramdef_t` array -1. call the `config_get` function +2. call the `config_get` function [config_get example](../../config/devusage/addaparam.md) diff --git a/common/config/DOC/config/rtusage.md b/common/config/DOC/config/rtusage.md index 0dc0b6a2ce..6a092b340f 100644 --- a/common/config/DOC/config/rtusage.md +++ b/common/config/DOC/config/rtusage.md @@ -1,9 +1,16 @@ +[[_TOC_]] - -O is the only mandatory command line option to start the eNodeb softmodem (lte-softmodem executable), it is used to specify the configuration source with the associated parameters: +# General usage + +`-O` is the only mandatory command line option to start the softmodems (4G/5G xNB, UEs). It is used to specify the configuration source with the associated parameters: ```bash $ ./lte-softmodem -O :::... ``` - The configuration module can also be used without a configuration source, ie to only parse the command line. In this case the -O switch is optional. This mode is used in the ue-softmodem executable and by the phy_simulators executables (ulsim, dlsim) +The same applies for `nr-softmodem`, `lte-uesoftmodem`, `nr-uesoftmodem`. + +The configuration module can also be used without a configuration source, ie to only parse the command line. In this case the -O switch is optional. This mode is typically used in the `lte-uesoftmodem` executable and by the physical simulator executables (`ulsim`, `dlsim`). + +# Configuration sources Currently the available config sources are: @@ -13,6 +20,8 @@ $ ./lte-softmodem -O libconfig::dbgl ``` - **cmdlineonly**: command line only, the default mode for lte-uesoftmodem and the phy simiulators. In this case -O may be used to specify the config module debug level. +# Detailed configuration information and debugging + The debug level is a mask: * bit 1: print parameters values * bit 2: print memory allocation/free performed by the config module @@ -32,8 +41,8 @@ bit 5 (dbgl32) can be useful to detect unused parameters from a config file or t To get help on supported parameters you can use specific options: -* ---help: print help for command line only parameters and for parameters not defined in a specific section - * ---help_< prefix > : print help for parameters defined under the section < prefix > +* `--help`: print help for command line only parameters and for parameters not defined in a specific section + * `--help_` : print help for parameters defined under the section `` ``` ./lte-softmodem -O libconfig:/usr/local/oai/conf/enb.nbiot.band7.tm1.50PRB.usrpb210.conf --help @@ -84,15 +93,16 @@ Getting ENBSParams -------------------------------------------------------------------- /usr/local/oai/issue390_configmodule_cmdlinebug/openairinterface5g/common/config/config_cmdline.c:224 config_process_cmdline() Exiting OAI softmodem: [CONFIG] Exiting after displaying help - ``` -For the lte-softmodem (the eNodeB) The config source parameter defaults to libconfig, preserving the initial -O option format. In this case you cannot specify the debug level. +For the lte-softmodem (the eNodeB), the config source parameter defaults to libconfig, preserving the initial -O option format. In this case you cannot specify the debug level. ```bash $ ./lte-softmodem -O ``` +# Configuration of the configuration module + Configuration file parameters, except for the configuration file path, can be specified in a **config** section in the configuration file: ``` @@ -101,7 +111,12 @@ config: debugflags = 1; } ``` -Configuration files examples can be found in the targets/PROJECTS/GENERIC-LTE-EPC/CONF sub-directory of the oai source tree. To minimize the number of configuration file to maintain, any parameter can also be specified on the command line. For example to modify the lte bandwidth to 20 MHz where the configuration file specifies 10MHz you can enter: + +Configuration files examples can be found in the `targets/PROJECTS/GENERIC-LTE-EPC/CONF` sub-directory of the oai source tree. + +# Overwriting config options from the command line + +To minimize the number of configuration file to maintain, any parameter can also be specified on the command line. For example to modify the lte bandwidth to 20 MHz where the configuration file specifies 10MHz you can enter: ```bash $ ./lte-softmodem -O --eNBs.[0].component_carriers.[0].N_RB_DL 100