diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index ffb8f0a..f67e9a8 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -64,7 +64,7 @@ jobs: - name: Start OAI Core Network run: | - cd demo_containerized/oai_setup + cd core_network_setup/oai docker compose up -d ./wait_for_core_network.sh @@ -115,6 +115,6 @@ jobs: docker compose -f docker-compose-test-simulation.yml down || true docker stop ue_turtlebot oai-gNB1 2>/dev/null || true docker rm ue_turtlebot oai-gNB1 2>/dev/null || true - cd "${{ github.workspace }}/demo_containerized/oai_setup" + cd "${{ github.workspace }}/core_network_setup/oai" docker compose down || true docker network rm ros_gz_net 2>/dev/null || true diff --git a/.gitignore b/.gitignore index b9db6e7..965b750 100644 --- a/.gitignore +++ b/.gitignore @@ -59,5 +59,6 @@ demo/images/ue_amr/nav_stack .DS_Store -demo/open5gs_setup/db_data/* -demo_containerized/open5gs_setup/db_data/* +core_network_setup/open5gs/db_data/* +core_network_setup/open5gs/db_data/* +demo_containerized/open5gs_setup/db_data/* \ No newline at end of file diff --git a/README.md b/README.md index cc5166d..1e6b92c 100644 --- a/README.md +++ b/README.md @@ -81,30 +81,30 @@ RoboSim5G supports **multiple 5G Core Network implementations**. You can choose 📖 **See [doc/5G_CORE_NETWORKS.md](doc/5G_CORE_NETWORKS.md) for a detailed comparison and guidance on choosing the right core network.** -Each core network has its own README with setup instructions in the respective `demo/_setup/` folder. +Each core network has its own setup folder under `core_network_setup/`: +- **OAI**: `core_network_setup/oai/` +- **free5GC**: `core_network_setup/free5gc/` +- **Open5GS**: `core_network_setup/open5gs/` ## Core Network Setup (Example: OAI) -The following example uses **OAI**, but similar steps apply to other core networks. Refer to the specific README for each: -- **OAI**: `demo/oai_setup/README.md` -- **free5GC**: `demo/free5gc_setup/README.md` -- **Open5GS**: `demo/open5gs_setup/README.md` *(coming soon)* +The following example uses **OAI**, but similar steps apply to other core networks. -Considering `path` the absolute path to the repository, the OAI files can be found in `path/demo/oai_setup`. Inside this folder there are 3 docker-compose file: +Considering `path` the absolute path to the repository, the OAI core network files can be found in `path/core_network_setup/oai`. Inside this folder there is a `docker-compose.yml` for launching the OAI Core Network containers. -- docker-compose.yml for launching the OAI Core Network containers +The gNB and UE docker-compose files are located in the demo folders under `oai/`: -- docker-compose-gNB.yml for launching the OAI gNB container +- `demo/oai/docker-compose-gNB.yml` for launching the OAI gNB container (used by all core networks, since the RAN components come from OAI v2026.w04) -- docker-compose-ue.yml for launching the OAI UE container (and also other containers related to the demo) +- `demo/oai/docker-compose-ue.yml` for launching the OAI UE container (and also other containers related to the demo) -Other folders are present inside `oai-setup`, containing configuration files useful for these containers. It is possible to verify that the OAI modules work, by following this pipeline: +Other folders are present inside `core_network_setup/oai`, containing configuration files useful for these containers. It is possible to verify that the OAI modules work, by following this pipeline: - In one terminal run the core network: ``` -cd path/demo/oai_setup +cd path/core_network_setup/oai docker compose up -d @@ -156,11 +156,12 @@ If everything went correctly, in the logs you should see: ``` -- in the same terminal run the gNB container: +- in the same terminal run the gNB container (from the demo folder): ```bash -docker compose -f docker-compose-ran.yml up -d +cd path/demo/oai +docker compose -f docker-compose-gNB.yml up -d ``` @@ -186,11 +187,11 @@ If everything goes well you should see in the logs a table with the list of the ``` -- in the same terminal run the UE container : +- in the same terminal run the UE container: ```bash -docker compose -f docker-compose-ue.yml up oai-nr-ue -d +docker compose -f docker-compose-ue.yml up -d ``` @@ -220,11 +221,12 @@ To stop and remove all the containers: ```bash +cd path/demo/oai docker compose -f docker-compose-gNB.yml down - docker compose -f docker-compose-ue.yml down -docker compose down -d +cd path/core_network_setup/oai +docker compose down ``` @@ -276,7 +278,7 @@ _Some warning messages may appear during the build — they can usually be ignor - `docker-compose-gNB.yml` - - `gnb.sa.bandn78.fr1.106PRB.rfsim.conf` + - `gNB_config.yaml` Changes include: @@ -305,10 +307,12 @@ _Some warning messages may appear during the build — they can usually be ignor Before launching the world, make sure the following environment variables are exported: ```bash -export PROJECT_PATH= # Must contain oai_setup/ +export PROJECT_PATH= # Must contain oai/ export IGN_GAZEBO_SYSTEM_PLUGIN_PATH= # Contains libgNB-plugin.so export IGN_GAZEBO_RESOURCE_PATH= # Contains phine_gNB model` ``` + +**Note:** The world file is now automatically selected based on the `CORE_NETWORK` environment variable (defaults to `oai`). The launch file reads `CORE_NETWORK` and loads `world_only_{core_network}.sdf` — no manual editing of the launch file is needed. ### 📝 gNB World File Declaration Add the following to your `world-file.sdf` to include the gNB: @@ -343,7 +347,7 @@ Add the following to your `world-file.sdf` to include the gNB: | `link_name` | Link whose pose is streamed over ROS 2 (keep as `phine_cell` unless model changes) | | `net_name` | Name of the Docker network to attach the gNB container | | `IP_GNB` | Static IP address of the gNB container | -| `IP_AMF` | IP address of the AMF container
(Must match value in `oai_setup/conf/config.yaml`) | +| `IP_AMF` | IP address of the AMF container
(Must match value in `core_network_setup/oai/conf/config.yaml`) | | `debug` | Set to `true` to enable plugin debug output | | `mobile_country_code` | MCC used for registration, must match value in AMF config | | `mobile_network_code` | MNC used for registration, must match value in AMF config | @@ -464,7 +468,7 @@ The system relies on three main networks: - Used for communication between the remote control center and the robot - - Subnet is configurable in `path/demo/oai-setuo/conf/config.yaml` + - Subnet is configurable in `path/core_network_setup/oai/conf/config.yaml` --- @@ -575,11 +579,11 @@ The Discovery Server IP must match the value in both the UE plugin `.conf` + - `oai/conf/UE_config.yaml` - **Copies the user robot workspace** inside the `$PROJECT_PATH/images/ue_amr` folder, which should contain: - robot logic launch file @@ -593,7 +597,7 @@ When the plugin is loaded, it performs the following steps: - The `ros_gz_bridge` -- **Launches the robot-UE container**, using the `robot_` service defined in `$PROJECT_PATH/oai_setup/docker-compose-ue.yml` +- **Launches the robot-UE container**, using the `robot_` service defined in `$PROJECT_PATH/oai/docker-compose-ue.yml` _(Currently, only `=1` is tested.)_ - **Automatically launches the ROS-Gazebo bridge** inside the container @@ -610,7 +614,7 @@ When the plugin is loaded, it performs the following steps: Set the following environment variables on the host system: ```sh -export PROJECT_PATH= # Must contain oai_setup/ +export PROJECT_PATH= # Must contain oai/ export IGN_GAZEBO_SYSTEM_PLUGIN_PATH= # Contains libUE-plugin.so and libgNB-plugin.so export IGN_GAZEBO_RESOURCE_PATH= # Contains phine-gNB model export ROS_DOMAIN_ID= # Shared by host and robot-UE container @@ -653,14 +657,14 @@ Refer to `path/demo/gazebo_launch` for an example. #### ✅ Required Folder Structure and Images - The plugin expects the folder: - `$PROJECT_PATH/oai_setup/images/ue_amr` + `$PROJECT_PATH/oai/images/ue_amr` It must contain the files from: - `path/demo/oai_setup/images/ue_amr` + `path/demo/images/ue_amr` - This directory must contain a `Dockerfile` used to build the `ue_amr` image. You can **customize the Dockerfile** to install additional robot dependencies or ROS packages. -- The folder `$PROJECT_PATH/oai_setup` must also contain: +- The folder `$PROJECT_PATH/oai` must also contain: - All configuration files for the 5G OAI components @@ -668,7 +672,7 @@ Refer to `path/demo/gazebo_launch` for an example. Specifically, the plugin will launch the **`robot_` service** defined in: - `$PROJECT_PATH/oai_setup/docker-compose-ue.yml` + `$PROJECT_PATH/oai/docker-compose-ue.yml` You may extend `docker-compose-ue.yml` to include services for: @@ -723,7 +727,6 @@ To add the UE plugin to your SDF world file, include: C42449363BBAD02B66D16BC975D77CC1 oai 1 - no ${PROJECT_PATH}/nav_stack nav_stack true @@ -741,7 +744,7 @@ To add the UE plugin to your SDF world file, include: | --------------------------- | --------------------------------------------------------------------------- | | `cn_type` | Core Network type (`oai`, `free5gc`, or `open5gs`) | | `robot_container_name` | Name of the UE container to be launched (e.g., `ue_turtlebot`) | -| `robot_id` | Unique ID for the robot, used to select `UE.conf` | +| `robot_id` | Unique ID for the robot | | `ip_robotUE` | Static IP assigned to the robot UE container | | `net_name` | Name of the Docker network to attach the UE container | | `ip_gnb` | IP address of the gNB container | @@ -752,7 +755,7 @@ To add the UE plugin to your SDF world file, include: | `opc` | Operator-specific key used in authentication | | `dnn` | Data network name (e.g., `oai`, `internet`, `ims`) | | `nssai_sst` | Network slice type (e.g., `1` for eMBB, URLLC, etc.) | -| `nssai_sd` | Slice differentiator. If set to `no`, it will not be assigned | +| `nssai_sd` | Slice differentiator. Optional (defaults to `no`); if omitted or `no`, not written to UE config | | `robot_project_path` | Path to the ROS 2 workspace with robot logic | | `robot_project_name` | Name of the ROS 2 workspace with robot logic | | `execute_robot_launch_file` | Whether to launch robot logic inside the container (`true` or `false`) | @@ -765,16 +768,16 @@ To add the UE plugin to your SDF world file, include: ### ⚠️ Notes -- Files such as `UE.conf` should be located in: - `path/demo/oai_setup/conf/UE.conf` +- UE credential files are located in: + `path/demo/oai/conf/UE_config.yaml` - All credentials (`imsi`, `key`, `opc`, `dnn`, `nssai_sst`, `nssai_sd`) **must match** the configuration of the 5G core network. -- If `nssai_sd` is set to `"no"`, the `nssai_sd` won't be assigned . +- The `nssai_sd` parameter is **optional** (defaults to `"no"`). If omitted or set to `"no"`, it won't be written to the UE config. - The `` must match the value defined in the core network's configuration file: ```sh - path/demo/oai_setup/conf/config.yaml + path/core_network_setup/oai/conf/config.yaml ``` - Be sure to follow the same network and workspace structure as the demo for compatibility. @@ -891,14 +894,12 @@ The **gNB Power Plugin** and **UE Power Plugin** are Ignition Gazebo GUI plugins Both plugins provide a graphical interface to: - 🟢 **Start/Stop** the radio process (`nr-softmodem` for gNB, `nr-uesoftmodem` for UE) inside the container -- 🔄 **Toggle between OAI versions** (v24 and v26) which use different configuration file formats -- 📊 **Monitor process state** (running/stopped) with visual indicators -- 🔧 **Configure runtime parameters** like container names, IP addresses, and OAI version +- � **Monitor process state** (running/stopped) with visual indicators +- 🔧 **Configure runtime parameters** like container names and IP addresses This is particularly useful during simulation development and testing, where you may need to: - Verify 5G connectivity by restarting the UE or gNB - Test failure scenarios by stopping the radio link -- Switch between OAI versions without rebuilding containers - Observe how your robot application handles connection loss --- @@ -908,15 +909,12 @@ This is particularly useful during simulation development and testing, where you #### gNB Power Plugin 1. **First Click** (Connect): Checks if the `nr-softmodem` process is running in the specified gNB container -2. **Subsequent Clicks** (Toggle): Starts or stops the gNB radio process using the appropriate command for the selected version: - - **v24**: Launches with `.conf` configuration file and `--sa` flag - - **v26**: Launches with `.yaml` configuration file (no `--sa` flag) +2. **Subsequent Clicks** (Toggle): Starts or stops the gNB radio process using `.yaml` configuration (no `--sa` flag) #### UE Power Plugin Works similarly to the gNB plugin, but controls the `nr-uesoftmodem` process in the UE container: -- **v24**: Uses `.conf` file with frequency `3619200000` Hz -- **v26**: Uses `.yaml` file with frequency `3319680000` Hz +- Uses `.yaml` file with frequency `3319680000` Hz - Requires the **gNB IP address** to establish the RF simulator connection --- @@ -935,7 +933,6 @@ Add the following blocks inside the `` section of your world file: oai-gNB1 - v24 ``` @@ -946,7 +943,6 @@ Add the following blocks inside the `` section of your world file: ue_turtlebot - v24 192.168.70.160 @@ -972,7 +968,6 @@ If set, this overrides the default value. A value provided in the SDF `&2 + echo " add {imsi key opc}: adds a user to the database with default values" + echo " add {imsi ip key opc}: adds a user to the database with default values and a IPv4 address for the UE" + echo " addT1 {imsi key opc}: adds a user to the database with 3 differents apns" + echo " addT1 {imsi ip key opc}: adds a user to the database with 3 differents apns and the same IPv4 address for the each apn" + echo " remove {imsi}: removes a user from the database" + echo " reset: WIPES OUT the database and restores it to an empty default" + echo " static_ip {imsi ip4}: adds a static IP assignment to an already-existing user" + echo " static_ip6 {imsi ip6}: adds a static IPv6 assignment to an already-existing user" + echo " type {imsi type}: changes the PDN-Type of the first PDN: 1 = IPv4, 2 = IPv6, 3 = IPv4v6" + echo " help: displays this message and exits" + echo " default values are as follows: APN \"internet\", dl_bw/ul_bw 1 Gbps, PGW address is 127.0.0.3, IPv4 only" + echo " add_ue_with_apn {imsi key opc apn}: adds a user to the database with a specific apn," + echo " add_ue_with_slice {imsi key opc apn sst sd}: adds a user to the database with a specific apn, sst and sd" + echo " update_apn {imsi apn slice_num}: adds an APN to the slice number slice_num of an existent UE" + echo " update_slice {imsi apn sst sd}: adds an slice to an existent UE" + echo " showall: shows the list of subscriber in the db" + echo " showpretty: shows the list of subscriber in the db in a pretty json tree format" + echo " showfiltered: shows {imsi key opc apn ip} information of subscriber" + echo " ambr_speed {imsi dl_value dl_unit ul_value ul_unit}: Change AMBR speed from a specific user and the unit values are \"[0=bps 1=Kbps 2=Mbps 3=Gbps 4=Tbps ]\"" + echo " subscriber_status {imsi subscriber_status_val={0,1} operator_determined_barring={0..8}}: Change TS 29.272 values for Subscriber-Status (7.3.29) and Operator-Determined-Barring (7.3.30)" + echo " lbo_roaming_allowed {imsi lbo_roaming_allowed={0,1}}: Change roaming type for a specific subscriber: 0 = LBO roaming (default), 1 = HR roaming" + +} + +while test $# -gt 0; do + case "$1" in + --db_uri*) + DB_URI=`echo $1 | sed -e 's/^[^=]*=//g'` + shift + ;; + *) + break + ;; + esac +done + +DB_URI="${DB_URI:-mongodb://localhost/open5gs}" + +if [ "$#" -lt 1 ]; then + display_help + exit 1 +fi + +if [ "$1" = "help" ]; then + display_help + exit 1 +fi + +if [ "$1" = "add" ]; then + if [ "$#" -eq 4 ]; then + IMSI=$2 + KI=$3 + OPC=$4 + + mongosh --eval "db.subscribers.insertOne( + { + \"_id\": new ObjectId(), + \"schema_version\": NumberInt(1), + \"imsi\": \"$IMSI\", + \"msisdn\": [], + \"imeisv\": [], + \"mme_host\": [], + \"mm_realm\": [], + \"purge_flag\": [], + \"slice\":[ + { + \"sst\": NumberInt(1), + \"default_indicator\": true, + \"session\": [ + { + \"name\" : \"internet\", + \"type\" : NumberInt(3), + \"qos\" : + { \"index\": NumberInt(9), + \"arp\": + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\": NumberInt(1), + \"pre_emption_vulnerability\": NumberInt(2) + } + }, + \"ambr\": + { + \"downlink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + }, + \"uplink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + } + }, + \"pcc_rule\": [], + \"_id\": new ObjectId(), + }], + \"_id\": new ObjectId(), + }], + \"security\": + { + \"k\" : \"$KI\", + \"op\" : null, + \"opc\" : \"$OPC\", + \"amf\" : \"8000\", + }, + \"ambr\" : + { + \"downlink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)}, + \"uplink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)} + }, + \"access_restriction_data\": 32, + \"network_access_mode\": 0, + \"subscriber_status\": 0, + \"operator_determined_barring\": 0, + \"subscribed_rau_tau_timer\": 12, + \"__v\": 0 + } + );" $DB_URI + exit $? + fi + + if [ "$#" -eq 5 ]; then + IMSI=$2 + IP=$3 + KI=$4 + OPC=$5 + + mongosh --eval "db.subscribers.insertOne( + { + \"_id\": new ObjectId(), + \"schema_version\": NumberInt(1), + \"imsi\": \"$IMSI\", + \"msisdn\": [], + \"imeisv\": [], + \"mme_host\": [], + \"mm_realm\": [], + \"purge_flag\": [], + \"slice\":[ + { + \"sst\": NumberInt(1), + \"default_indicator\": true, + \"session\": [ + { + \"name\" : \"internet\", + \"type\" : NumberInt(3), + \"qos\" : + { \"index\": NumberInt(9), + \"arp\": + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\": NumberInt(1), + \"pre_emption_vulnerability\": NumberInt(2) + } + }, + \"ambr\": + { + \"downlink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + }, + \"uplink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + } + }, + \"ue\": + { + \"ipv4\": \"$IP\" + }, + \"pcc_rule\": [], + \"_id\": new ObjectId(), + }], + \"_id\": new ObjectId(), + }], + \"security\": + { + \"k\" : \"$KI\", + \"op\" : null, + \"opc\" : \"$OPC\", + \"amf\" : \"8000\", + }, + \"ambr\" : + { + \"downlink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)}, + \"uplink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)} + }, + \"access_restriction_data\": 32, + \"network_access_mode\": 0, + \"subscriber_status\": 0, + \"operator_determined_barring\": 0, + \"subscribed_rau_tau_timer\": 12, + \"__v\": 0 + } + );" $DB_URI + exit $? + fi + + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl add imsi key opc\"" + exit 1 +fi + +if [ "$1" = "addT1" ]; then + if [ "$#" -eq 4 ]; then + IMSI=$2 + KI=$3 + OPC=$4 + + mongosh --eval "db.subscribers.insertOne( + { + \"_id\": new ObjectId(), + \"schema_version\": NumberInt(1), + \"imsi\": \"$IMSI\", + \"msisdn\": [], + \"imeisv\": [], + \"mme_host\": [], + \"mm_realm\": [], + \"purge_flag\": [], + \"slice\":[ + { + \"sst\": NumberInt(1), + \"default_indicator\": true, + \"session\": [ + { + \"name\" : \"internet\", + \"type\" : NumberInt(3), + \"qos\" : + { \"index\": NumberInt(9), + \"arp\": + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\": NumberInt(1), + \"pre_emption_vulnerability\": NumberInt(2) + } + }, + \"ambr\": + { + \"downlink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + }, + \"uplink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + } + }, + \"pcc_rule\": [], + \"_id\": new ObjectId(), + },{ + \"name\" : \"internet1\", + \"type\" : NumberInt(3), + \"qos\" : + { \"index\": NumberInt(9), + \"arp\": + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\": NumberInt(1), + \"pre_emption_vulnerability\": NumberInt(2) + } + }, + \"ambr\": + { + \"downlink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + }, + \"uplink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + } + }, + \"pcc_rule\": [], + \"_id\": new ObjectId(), + },{ + \"name\" : \"internet2\", + \"type\" : NumberInt(3), + \"qos\" : + { \"index\": NumberInt(9), + \"arp\": + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\": NumberInt(1), + \"pre_emption_vulnerability\": NumberInt(2) + } + }, + \"ambr\": + { + \"downlink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + }, + \"uplink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + } + }, + \"pcc_rule\": [], + \"_id\": new ObjectId(), + } + ], + \"_id\": new ObjectId(), + }], + \"security\": + { + \"k\" : \"$KI\", + \"op\" : null, + \"opc\" : \"$OPC\", + \"amf\" : \"8000\", + }, + \"ambr\" : + { + \"downlink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)}, + \"uplink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)} + }, + \"access_restriction_data\": 32, + \"network_access_mode\": 0, + \"subscriber_status\": 0, + \"operator_determined_barring\": 0, + \"subscribed_rau_tau_timer\": 12, + \"__v\": 0 + } + );" $DB_URI + exit $? + fi + + if [ "$#" -eq 5 ]; then + IMSI=$2 + IP=$3 + KI=$4 + OPC=$5 + + mongosh --eval "db.subscribers.insertOne( + { + \"_id\": new ObjectId(), + \"schema_version\": NumberInt(1), + \"imsi\": \"$IMSI\", + \"msisdn\": [], + \"imeisv\": [], + \"mme_host\": [], + \"mm_realm\": [], + \"purge_flag\": [], + \"slice\":[ + { + \"sst\": NumberInt(1), + \"default_indicator\": true, + \"session\": [ + { + \"name\" : \"internet\", + \"type\" : NumberInt(3), + \"qos\" : + { \"index\": NumberInt(9), + \"arp\": + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\": NumberInt(1), + \"pre_emption_vulnerability\": NumberInt(2) + } + }, + \"ambr\": + { + \"downlink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + }, + \"uplink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + } + }, + \"ue\": + { + \"ipv4\": \"$IP\" + }, + \"pcc_rule\": [], + \"_id\": new ObjectId(), + },{ + \"name\" : \"internet1\", + \"type\" : NumberInt(3), + \"qos\" : + { \"index\": NumberInt(9), + \"arp\": + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\": NumberInt(1), + \"pre_emption_vulnerability\": NumberInt(2) + } + }, + \"ambr\": + { + \"downlink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + }, + \"uplink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + } + }, + \"ue\": + { + \"ipv4\": \"$IP\" + }, + \"pcc_rule\": [], + \"_id\": new ObjectId(), + },{ + \"name\" : \"internet2\", + \"type\" : NumberInt(3), + \"qos\" : + { \"index\": NumberInt(9), + \"arp\": + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\": NumberInt(1), + \"pre_emption_vulnerability\": NumberInt(2) + } + }, + \"ambr\": + { + \"downlink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + }, + \"uplink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + } + }, + \"ue\": + { + \"ipv4\": \"$IP\" + }, + \"pcc_rule\": [], + \"_id\": new ObjectId(), + } + ], + \"_id\": new ObjectId(), + }], + \"security\": + { + \"k\" : \"$KI\", + \"op\" : null, + \"opc\" : \"$OPC\", + \"amf\" : \"8000\", + }, + \"ambr\" : + { + \"downlink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)}, + \"uplink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)} + }, + \"access_restriction_data\": 32, + \"network_access_mode\": 0, + \"subscriber_status\": 0, + \"operator_determined_barring\": 0, + \"subscribed_rau_tau_timer\": 12, + \"__v\": 0 + } + );" $DB_URI + exit $? + fi + + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl add imsi key opc\"" + exit 1 +fi + +if [ "$1" = "remove" ]; then + if [ "$#" -ne 2 ]; then + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl remove imsi\"" + exit 1 + fi + + IMSI=$2 + mongosh --eval "db.subscribers.deleteOne({\"imsi\": \"$IMSI\"});" $DB_URI + exit $? +fi + +if [ "$1" = "reset" ]; then + if [ "$#" -ne 1 ]; then + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl reset\"" + exit 1 + fi + + mongosh --eval "db.subscribers.deleteMany({});" $DB_URI + exit $? +fi + +if [ "$1" = "static_ip" ]; then + if [ "$#" -ne 3 ]; then + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl static_ip imsi ip\"" + exit 1 + fi + IMSI=$2 + IP=$3 + + mongosh --eval "db.subscribers.updateOne({\"imsi\": \"$IMSI\"},{\$set: { \"slice.0.session.0.ue.ipv4\": \"$IP\" }});" $DB_URI + exit $? +fi + +if [ "$1" = "static_ip6" ]; then + if [ "$#" -ne 3 ]; then + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl static_ip6 imsi ip\"" + exit 1 + fi + IMSI=$2 + IP=$3 + + mongosh --eval "db.subscribers.updateOne({\"imsi\": \"$IMSI\"},{\$set: { \"slice.0.session.0.ue.ipv6\": \"$IP\" }});" $DB_URI + exit $? +fi + +if [ "$1" = "type" ]; then + if [ "$#" -ne 3 ]; then + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl type imsi type\"" + exit 1 + fi + IMSI=$2 + TYPE=$3 + + mongosh --eval "db.subscribers.updateOne({\"imsi\": \"$IMSI\"},{\$set: { \"slice.0.session.0.type\": NumberInt($TYPE) }});" $DB_URI + exit $? +fi + +if [ "$1" = "add_ue_with_apn" ]; then + if [ "$#" -eq 5 ]; then + IMSI=$2 + KI=$3 + OPC=$4 + APN=$5 + + mongosh --eval "db.subscribers.insertOne( + { + \"_id\": new ObjectId(), + \"schema_version\": NumberInt(1), + \"imsi\": \"$IMSI\", + \"msisdn\": [], + \"imeisv\": [], + \"mme_host\": [], + \"mm_realm\": [], + \"purge_flag\": [], + \"slice\":[ + { + \"sst\": NumberInt(1), + \"default_indicator\": true, + \"session\": [ + { + \"name\" : \"$APN\", + \"type\" : NumberInt(3), + \"qos\" : + { \"index\": NumberInt(9), + \"arp\": + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\": NumberInt(1), + \"pre_emption_vulnerability\": NumberInt(2) + } + }, + \"ambr\": + { + \"downlink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + }, + \"uplink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + } + }, + \"pcc_rule\": [], + \"_id\": new ObjectId(), + }], + \"_id\": new ObjectId(), + }], + \"security\": + { + \"k\" : \"$KI\", + \"op\" : null, + \"opc\" : \"$OPC\", + \"amf\" : \"8000\", + }, + \"ambr\" : + { + \"downlink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)}, + \"uplink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)} + }, + \"access_restriction_data\": 32, + \"network_access_mode\": 0, + \"subscriber_status\": 0, + \"operator_determined_barring\": 0, + \"subscribed_rau_tau_timer\": 12, + \"__v\": 0 + } + );" $DB_URI + exit $? + fi + + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl add_ue_with_apn imsi key opc apn\"" + exit 1 +fi + +if [ "$1" = "add_ue_with_slice" ]; then + if [ "$#" -eq 7 ]; then + IMSI=$2 + KI=$3 + OPC=$4 + APN=$5 + SST=$6 + SD=$7 + + mongosh --eval "db.subscribers.insertOne( + { + \"_id\": new ObjectId(), + \"schema_version\": NumberInt(1), + \"imsi\": \"$IMSI\", + \"msisdn\": [], + \"imeisv\": [], + \"mme_host\": [], + \"mm_realm\": [], + \"purge_flag\": [], + \"slice\":[ + { + \"sst\": NumberInt($SST), + \"sd\": \"$SD\", + \"default_indicator\": true, + \"session\": [ + { + \"name\" : \"$APN\", + \"type\" : NumberInt(3), + \"qos\" : + { \"index\": NumberInt(9), + \"arp\": + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\": NumberInt(1), + \"pre_emption_vulnerability\": NumberInt(2) + } + }, + \"ambr\": + { + \"downlink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + }, + \"uplink\": + { + \"value\": NumberInt(1000000000), + \"unit\": NumberInt(0) + } + }, + \"pcc_rule\": [], + \"_id\": new ObjectId(), + }], + \"_id\": new ObjectId(), + }], + \"security\": + { + \"k\" : \"$KI\", + \"op\" : null, + \"opc\" : \"$OPC\", + \"amf\" : \"8000\", + }, + \"ambr\" : + { + \"downlink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)}, + \"uplink\" : { \"value\": NumberInt(1000000000), \"unit\": NumberInt(0)} + }, + \"access_restriction_data\": 32, + \"network_access_mode\": 0, + \"subscriber_status\": 0, + \"operator_determined_barring\": 0, + \"subscribed_rau_tau_timer\": 12, + \"__v\": 0 + } + );" $DB_URI + exit $? + fi + + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl add_ue_with_slice imsi key opc apn sst sd\"" + exit 1 +fi + +if [ "$1" = "update_apn" ]; then + if [ "$#" -eq 4 ]; then + IMSI=$2 + APN=$3 + SLICE_NUM=$4 + + mongosh --eval "db.subscribers.updateOne({ \"imsi\": \"$IMSI\"}, + {\$push: { \"slice.$SLICE_NUM.session\": + { + \"name\" : \"$APN\", + \"type\" : NumberInt(3), + \"_id\" : new ObjectId(), + \"pcc_rule\" : [], + \"ambr\" : + { + \"uplink\" : { \"value\": NumberInt(1), \"unit\" : NumberInt(3) }, + \"downlink\" : { \"value\": NumberInt(1), \"unit\" : NumberInt(3) }, + }, + \"qos\" : + { + \"index\" : NumberInt(9), + \"arp\" : + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\" : NumberInt(1), + \"pre_emption_vulnerability\" : NumberInt(1), + }, + }, + } + } + });" $DB_URI + exit $? + fi + + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl update_apn imsi apn num_slice\"" + exit 1 +fi + +if [ "$1" = "update_slice" ]; then + if [ "$#" -eq 5 ]; then + IMSI=$2 + APN=$3 + SST=$4 + SD=$5 + + mongosh --eval "db.subscribers.updateOne({ \"imsi\": \"$IMSI\"}, + {\$push: { \"slice\": + + { + \"sst\" : NumberInt($SST), + \"sd\" : \"$SD\", + \"default_indicator\" : false, + \"_id\" : new ObjectId(), + \"session\" : + [{ + \"name\" : \"$APN\", + \"type\" : NumberInt(3), + \"_id\" : new ObjectId(), + \"pcc_rule\" : [], + \"ambr\" : + { + \"uplink\" : { \"value\": NumberInt(1), \"unit\" : NumberInt(3) }, + \"downlink\" : { \"value\": NumberInt(1), \"unit\" : NumberInt(3) }, + }, + \"qos\" : + { + \"index\" : NumberInt(9), + \"arp\" : + { + \"priority_level\" : NumberInt(8), + \"pre_emption_capability\" : NumberInt(1), + \"pre_emption_vulnerability\" : NumberInt(1), + }, + }, + }] + } + } + });" $DB_URI + exit $? + fi + + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl update_slice imsi apn sst sd\"" + exit 1 +fi +if [ "$1" = "subscriber_status" ]; then + if [ "$#" -eq 4 ]; then + IMSI=$2 + SUB_STATUS=$3 + OP_DET_BARRING=$4 + mongosh --eval "db.subscribers.updateOne({ \"imsi\": \"$IMSI\"}, + {\$set: { \"subscriber_status\": $SUB_STATUS, + \"operator_determined_barring\": $OP_DET_BARRING + } + });" $DB_URI + exit $? + fi + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl subscriber_status imsi subscriber_status_val={0,1} operator_determined_barring={0..8}" + exit 1 +fi +if [ "$1" = "lbo_roaming_allowed" ]; then + if [ "$#" -eq 3 ]; then + IMSI=$2 + LBO_ALLOWED=$3 + if [ $LBO_ALLOWED = "1" ]; then + LBO_ALLOWED_BOOL=true + else + LBO_ALLOWED_BOOL=false + fi + mongosh --eval "db.subscribers.updateOne({ \"imsi\": \"$IMSI\"}, + {\$set: { \"slice.0.session.0.lbo_roaming_allowed\": $LBO_ALLOWED_BOOL + } + });" $DB_URI + exit $? + fi + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl lbo_roaming_allowed imsi lbo_roaming_allowed={0,1}" + exit 1 +fi +if [ "$1" = "showall" ]; then + mongosh --eval "db.subscribers.find()" $DB_URI + exit $? +fi +if [ "$1" = "showpretty" ]; then + mongosh --eval "db.subscribers.find().pretty()" $DB_URI + exit $? +fi +if [ "$1" = "showfiltered" ]; then + mongosh --eval "db.subscribers.find({},{'_id':0,'imsi':1,'security.k':1, 'security.opc':1,'slice.session.name':1,'slice.session.ue.ipv4':1})" $DB_URI + exit $? +fi + +if [ "$1" = "ambr_speed" ]; then + if [ "$#" -eq 6 ]; then + IMSI=$2 + DL_VALUE=$3 + DL_UNIT=$4 + UL_VALUE=$5 + UL_UNIT=$6 + mongosh --eval "db.subscribers.updateOne({\"imsi\": \"$IMSI\"}, + {\$set: { + \"ambr\" : { + \"downlink\" : { + \"value\" : NumberInt($DL_VALUE), + \"unit\" : NumberInt($DL_UNIT) + }, + \"uplink\" :{ + \"value\": NumberInt($UL_VALUE), + \"unit\" : NumberInt($UL_UNIT) + } + }, + \"slice.0.session.0.ambr\": { + \"downlink\" : { + \"value\" : NumberInt($DL_VALUE), + \"unit\" : NumberInt($DL_UNIT) + }, + \"uplink\" :{ + \"value\": NumberInt($UL_VALUE), + \"unit\" : NumberInt($UL_UNIT) + } + } + } + });" $DB_URI + + + exit $? + fi + echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl ambr_speed imsi dl_value dl_unit ul_value ul_unit dl is for download and ul is for upload and the unit values are[0=bps 1=Kbps 2=Mbps 3=Gbps 4=Tbps ] \"" + exit 1 +fi + + +display_help diff --git a/demo/open5gs_setup/wait_for_core_network.sh b/core_network_setup/open5gs/wait_for_core_network.sh similarity index 100% rename from demo/open5gs_setup/wait_for_core_network.sh rename to core_network_setup/open5gs/wait_for_core_network.sh diff --git a/demo/README.md b/demo/README.md index 62b17e9..a15ea53 100644 --- a/demo/README.md +++ b/demo/README.md @@ -8,128 +8,105 @@ - ros-gz pkg +- `mongodb-mongosh` (required only for Open5GS core network — install with `sudo apt install mongodb-mongosh`) + ## Choosing a Core Network -RoboSim5G supports **three 5G Core Network implementations**. Each has its own launch and kill scripts: +RoboSim5G supports **three 5G Core Network implementations**: OAI, free5GC, and Open5GS. + +A single `launch.sh` and `kill.sh` script is provided. You select the core network using the `CORE_NETWORK` environment variable (defaults to `oai`): -| Core Network | Launch Script | Kill Script | -|--------------|--------------|-------------| -| **OAI** (OpenAirInterface) | `launch_robot_5G.sh` | `kill_all.sh` | -| **free5GC** | `launch_robot_5G_free5gc.sh` | `kill_all_free5gc.sh` | -| **Open5GS** | `launch_robot_5G_open5gs.sh` | `kill_all_open5gs.sh` | +```bash +CORE_NETWORK=oai ./launch.sh # OpenAirInterface (default) +CORE_NETWORK=free5gc ./launch.sh # free5GC +CORE_NETWORK=open5gs ./launch.sh # Open5GS +``` -**Important:** When you choose a core network, you must also **configure the corresponding Gazebo world file** (see [Configuring Gazebo World for Your CN](#configuring-gazebo-world-for-your-cn) section below). +The core network containers are launched from the `core_network_setup/` folder at the root of the repository. Each CN has its own subfolder (`core_network_setup/oai/`, `core_network_setup/free5gc/`, `core_network_setup/open5gs/`) containing the docker-compose file and related configuration. -**Key Difference - free5GC N3 Interface:** +**Key Difference — free5GC N3 Interface:** free5GC uses a **separate N3 network** (`demo-n3` bridge) for the gNB ↔ UPF GTP-U tunnel, while OAI and Open5GS use the main `phine-net` for all communication. 📖 **For detailed comparison and guidance on choosing:** See [doc/5G_CORE_NETWORKS.md](../doc/5G_CORE_NETWORKS.md) -## Changing Plugin path +### Open5GS: UE Subscriber Registration -In `launch_robot_5G` at line 4 you have to change the path to Gazebo Plugin to your own (sometimes it can be in /usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins ) -## Builiding Images ad building ROS2 pkgs -On a terminal in the main repo directory: +When using Open5GS, the launch script automatically calls `core_network_setup/open5gs/scripts/add_ue_subscriber.sh` to register the UE in the Open5GS MongoDB database. This script uses the `open5gs-dbctl` tool (included in the repo) which requires `mongosh` to be installed on the host. -``` -./build_images.sh -``` -## Running simulation - -1. On a terminal, launch the script for your chosen core network: - -**For OAI:** +Install the prerequisite: ```bash -source launch_robot_5G.sh +sudo apt install mongodb-mongosh ``` -**For free5GC:** -```bash -source launch_robot_5G_free5gc.sh -``` +### Automatic World Selection -**For Open5GS:** -```bash -source launch_robot_5G_open5gs.sh -``` +The Gazebo world file is **automatically selected** based on the `CORE_NETWORK` environment variable. The launch file (`gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py`) reads the `CORE_NETWORK` variable and loads the corresponding world file (`world_only_oai.sdf`, `world_only_free5gc.sdf`, or `world_only_open5gs.sdf`). No manual editing of the launch file or rebuilding is required when switching between core networks. -Insert your password when required. +### RAN Docker Compose Structure -These commands will launch the CN container, the Gazebo Simulation with the gNB embedded (visualization + container), the robot-UE container, and the RCC container. It will take 40 seconds to start everything, finishing when Rviz opens. -The first time you launch the simulation, it might fail since the UE plugin will build the robot-UE plugin for a long time. +The `oai/` folder in this demo contains the docker-compose files for the Radio Access Network components. The folder is named `oai/` because the gNB and UE are from **OAI v2026.w04** (`oaisoftwarealliance/oai-gnb:2026.w04`), used with all three core networks: -2. On Rviz click on "Nav2 goal" and then select a feasible location. +- `docker-compose-gNB.yml` — Base gNB compose file, used for **all** core networks +- `docker-compose-gNB.free5gc.yml` — Docker Compose **extension** for free5GC only (adds the N3 network interface to the gNB) +- `docker-compose-ue.yml` — UE, RCC, and DDS Discovery Server containers +- `conf/gNB_config.yaml` — gNB configuration (modified at runtime by the Gazebo gNB plugin) +- `conf/UE_config.yaml` — UE configuration (modified at runtime by the Gazebo UE plugin) -3. Whenever you want, look for the three vertical dot on the top right of Gazebo GUI, click it and in the search box of Gazebo search "UE_Power_Plugin" and "gNB_Power_Plugin". In the Gazebo GUI two buttons will pop up, that will switch on or off the UE and gNB of the robot. +## Changing Plugin path -4. Press the gNB button, that will switch both gNB and UE off. +In `launch.sh` you can change the `IGN_GAZEBO_SYSTEM_PLUGIN_PATH` variable to point to your Gazebo plugin path (sometimes it can be in /usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins). -5. The robot will continue its path (or it will stay still if he does not have one), you can try to give another goal but the communication won't be enabled +## Building Images and ROS2 pkgs +On a terminal in the demo directory: -6. Switch on the UE and gNB from the buttons +``` +./build_images.sh +``` -7. Give another Nav2 Goal or wait for the robot to finish its path +This will build the `gazebo_launch` ROS2 workspace (colcon build), and the `dds_discovery_server` and `rcc` Docker images. The `ue_amr` Docker image is built automatically by the UE plugin at simulation runtime. -## Remove all the container and kill gazebo +## Running simulation -In the main folder, use the kill script for your chosen core network: +1. On a terminal, launch the simulation with your chosen core network: -**For OAI:** ```bash -./kill_all.sh +CORE_NETWORK=oai source launch.sh ``` -**For free5GC:** -```bash -./kill_all_free5gc.sh -``` +(Replace `oai` with `free5gc` or `open5gs` as needed. If `CORE_NETWORK` is not set, it defaults to `oai`.) -**For Open5GS:** -```bash -./kill_all_open5gs.sh -``` +Insert your password when required. -## Configuring Gazebo World for Your CN +This command will launch the CN containers (from `core_network_setup/`), the Gazebo Simulation with the gNB embedded (visualization + container), the robot-UE container, and the RCC container. It will take 40 seconds to start everything, finishing when Rviz opens. +The first time you launch the simulation, it might fail since the UE plugin will build the robot-UE image for a long time. -**IMPORTANT:** The Gazebo world file must match your chosen core network. Each CN requires different configurations (IMSI, DNN, network addresses, etc.). +2. On Rviz click on "Nav2 goal" and then select a feasible location. -### Available World Files +3. Whenever you want, look for the three vertical dots on the top right of Gazebo GUI, click it and in the search box of Gazebo search "UE_Power_Plugin" and "gNB_Power_Plugin". In the Gazebo GUI two buttons will pop up, that will switch on or off the UE and gNB of the robot. -Three world files are provided in `gazebo_launch/src/ign_turtlebot/worlds/`: +4. Press the gNB button, that will switch both gNB and UE off. -- `world_only.sdf` - **For OAI** -- `world_only_free5gc.sdf` - **For free5GC** -- `world_only_open5gs.sdf` - **For Open5GS** +5. The robot will continue its path (or it will stay still if it does not have one), you can try to give another goal but the communication won't be enabled. -### Configure the Launch File +6. Switch on the UE and gNB from the buttons. -Edit `gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py` at **line 68**: +7. Give another Nav2 Goal or wait for the robot to finish its path. -```python -# Change this line to match your chosen CN: -world = os.path.join(get_package_share_directory('ign_turtlebot'), - "worlds", "world_only_free5gc.sdf") # Change filename here -``` +## Remove all the containers and kill Gazebo -**Examples:** -- For OAI: `"world_only.sdf"` -- For free5GC: `"world_only_free5gc.sdf"` -- For Open5GS: `"world_only_open5gs.sdf"` +In the demo folder, run the kill script with the same `CORE_NETWORK` value: -After changing the world file, rebuild the workspace: ```bash -cd gazebo_launch -colcon build -source install/setup.bash +CORE_NETWORK=oai ./kill.sh ``` ## Modify gNB parameters -Inside the world file for your chosen CN (see [Configuring Gazebo World for Your CN](#configuring-gazebo-world-for-your-cn)), change the parameters at line 106. +Inside the world file for your chosen CN, change the gNB parameters. The world files are located in `gazebo_launch/src/ign_turtlebot/worlds/`: -**For OAI:** `gazebo_launch/src/ign_turtlebot/worlds/world_only.sdf` -**For free5GC:** `gazebo_launch/src/ign_turtlebot/worlds/world_only_free5gc.sdf` -**For Open5GS:** `gazebo_launch/src/ign_turtlebot/worlds/world_only_open5gs.sdf` +- `world_only_oai.sdf` — For OAI +- `world_only_free5gc.sdf` — For free5GC +- `world_only_open5gs.sdf` — For Open5GS ```xml @@ -150,13 +127,18 @@ Inside the world file for your chosen CN (see [Configuring Gazebo World for Your ``` **Note:** The `cn_type` parameter specifies which 5G Core Network the plugin should connect to. + +After modifying world files, rebuild the workspace: +```bash +cd gazebo_launch +colcon build +source install/setup.bash +``` + ## Modify UE parameters -Inside the world file for your chosen CN (see [Configuring Gazebo World for Your CN](#configuring-gazebo-world-for-your-cn)), change the parameters at line 56. +Inside the world file for your chosen CN (same files as above), change the UE parameters: -**For OAI:** `gazebo_launch/src/ign_turtlebot/worlds/world_only.sdf` -**For free5GC:** `gazebo_launch/src/ign_turtlebot/worlds/world_only_free5gc.sdf` -**For Open5GS:** `gazebo_launch/src/ign_turtlebot/worlds/world_only_open5gs.sdf` ```xml oai @@ -172,7 +154,6 @@ Inside the world file for your chosen CN (see [Configuring Gazebo World for Your C42449363BBAD02B66D16BC975D77CC1 oai 1 - no ${PROJECT_PATH}/nav_stack nav_stack true @@ -187,57 +168,37 @@ Inside the world file for your chosen CN (see [Configuring Gazebo World for Your ## Remove CN from launch file -If you want to manage the CN containers separately, you can comment out the CN launch section in your chosen launch script. - -**Example for OAI** (`launch_robot_5G.sh`): -```sh -# cd oai_setup -# docker compose up -d -# cd .. -``` - -**Example for free5GC** (`launch_robot_5G_free5gc.sh`): -```sh -# cd free5gc_setup -# docker compose up -d -# cd .. -``` +If you want to manage the CN containers separately, you can comment out the CN launch section in `launch.sh`: -**Example for Open5GS** (`launch_robot_5G_open5gs.sh`): ```sh -# cd open5gs_setup +# cd "$CN_DIR" # docker compose up -d -# cd .. ``` ## Changing ROS DOMAIN (avoiding multi-user bugs) -In `launch_robot_5G.sh` modify with the ID that you want(each PC should have its own): - -``` - -export ROS_DOMAIN_ID=ID +Set the `ROS_DOMAIN_ID` environment variable before launching (each PC should have its own): +```bash +ROS_DOMAIN_ID=42 CORE_NETWORK=oai source launch.sh ``` -## Changing GZ partion(avoiding multi-user bugs) +## Changing GZ partition (avoiding multi-user bugs) -In `launch_robot_5G.sh` modify with the partion that you want(each PC should have its own): - -``` - -export IGN_PARTITION=partition_name +Set the `IGN_PARTITION` environment variable before launching (each PC should have its own): +```bash +IGN_PARTITION=my_partition CORE_NETWORK=oai source launch.sh ``` ## Using the Button UE and gNB plugin -If you change the container name in the gNB and UE declarations, you should match the same container names for the two environment variable in `launch_robot_5G.sh`: `GNB_NAME_FOR_BUTTON` , `UE_NAME_FOR_BUTTON`. +If you change the container name in the gNB and UE declarations, you should match the same container names for the two environment variables `GNB_NAME_FOR_BUTTON` and `UE_NAME_FOR_BUTTON` (set before launching or export them). -## Scripts in `launch-robot_5G.sh` +## Scripts in `launch.sh` ### `wait_for_core_network.sh` -This script ensures that the OAI core network is fully operational before proceeding with the simulation. It waits for the MySQL database container to become healthy and checks that all critical OAI services (`oai-nrf`, `oai-amf`, `oai-smf`, `oai-upf`) are running. The script is called automatically during the simulation launch process to avoid race conditions and ensure a reliable startup sequence. +Located in `core_network_setup/oai/`, this script ensures that the OAI core network is fully operational before proceeding with the simulation. It waits for the MySQL database container to become healthy and checks that all critical OAI services (`oai-nrf`, `oai-amf`, `oai-smf`, `oai-upf`) are running. The script is called automatically during the simulation launch process to avoid race conditions and ensure a reliable startup sequence. -### `create_physical_bridge.sh` -This script creates a custom Docker bridge network (`ros_gz_net`) with a specified subnet. It is used to enable communication between simulation containers (such as Gazebo, robot-UE, and network components) on a dedicated network, ensuring proper connectivity and isolation for the simulation environment. The script is executed as part of the launch process and typically does not require manual intervention. \ No newline at end of file +### `ros_gz_net` bridge creation +The `launch.sh` script creates a custom Docker bridge network (`ros_gz_net`) with a specified subnet. It is used to enable communication between simulation containers (such as Gazebo, robot-UE, and network components) on a dedicated network, ensuring proper connectivity and isolation for the simulation environment. This is executed as part of the launch process and typically does not require manual intervention. \ No newline at end of file diff --git a/demo/build_images.sh b/demo/build_images.sh index 5b4c627..4bdcce6 100755 --- a/demo/build_images.sh +++ b/demo/build_images.sh @@ -1,5 +1,5 @@ cd gazebo_launch/ -colcon build +colcon build --cmake-clean-cache cd .. cd images/dds_discovery_server docker build -t dds_discovery_server . diff --git a/demo/free5gc_setup/README.md b/demo/free5gc_setup/README.md deleted file mode 100644 index 42ac7c2..0000000 --- a/demo/free5gc_setup/README.md +++ /dev/null @@ -1,429 +0,0 @@ -# free5GC Core Network Deployment for RoboSim5G - -This deployment provides a free5GC 5G Core Network that integrates with RoboSim5G. - -## About free5GC - -free5GC is an open-source implementation of 5G Core Network (5GC) compliant with 3GPP Release 15 and beyond. Key features: -- **Web-based management interface** for subscriber configuration -- **Full 5G Core implementation** with all network functions (AMF, SMF, UPF, etc.) -- **MongoDB-based persistence** for subscriber and network data -- **Flexible architecture** supporting network slicing and multiple DNNs -- **Hybrid UPF support** - uses OAI UPF for better performance and eBPF data plane - -## Architecture - -This deployment uses a **hybrid approach**: -- **Control Plane**: free5GC network functions (AMF, SMF, UDM, UDR, etc.) -- **User Plane**: OAI UPF (User Plane Function) with eBPF-based data plane - -This combination leverages free5GC's user-friendly WebUI while benefiting from OAI UPF's performance optimizations. - -## Quick Start - -### 1. Start the Core Network -```bash -docker compose up -d -``` - -Wait for all services to become healthy (this may take 10-20 seconds): -```bash -docker compose ps -``` - -All services should show "running" status. - -### 2. Configure Subscribers via WebUI - -Open http://localhost:5000 in your browser. - -**Default credentials:** -- Username: `admin` -- Password: `free5gc` - -**Add a subscriber:** -1. Navigate to "Subscribers" in the left menu -2. Click the "+ NEW SUBSCRIBER" button -3. Enter the following details: - - **SUPI (IMSI)**: `imsi-208930000000001` - - **Operator Key (K)**: `8baf473f2f8fd09487cccbd7097c6862` - - **OPc Type**: Select `OPc` - - **OPc**: `8e27b6af0e692e750f32667a3b14605d` -4. Scroll down to **S-NSSAI Configuration**: - - Click "+ Add S-NSSAI" - - **SST**: `1` - - **SD**: `66051` (hex: `010203`) - - **Default S-NSSAI**: ✓ (check this box) -5. Under **Data Network Name**: - - Click the "+ DNN" button - - **DNN**: `internet` - - **Default DNN**: ✓ (check this box) -6. Click "CREATE" at the bottom - -> **Note:** The first subscriber (`imsi-208930000000001`) with the credentials above should be pre-configured in the MongoDB dump. You can add additional subscribers for multiple robots by incrementing the IMSI (e.g., `imsi-208930000000002`, `imsi-208930000000003`). - -### 3. Start gNB and UE - -Follow the RoboSim5G demo instructions to start your Gazebo simulation with the robot. The gNB and UE will automatically connect to this core network. - -Alternatively, for standalone testing: -```bash -# Start gNB -docker compose -f docker-compose-gNB.yml up -d - -# Start UE -docker compose -f docker-compose-ue.yml up -d -``` - -## Managing the Core Network - -### Check Service Status -```bash -docker compose ps -``` - -All services should show "running" status. The UPF runs in `host` network mode for performance reasons. - -### View Logs -```bash -# View all services -docker compose logs -f - -# View specific service -docker compose logs -f amf -docker compose logs -f smf -docker compose logs -f upf -``` - -### Verify Network Functions Registration -Check that all NFs have registered with NRF: -```bash -docker logs nrf -``` - -You should see registration messages from AMF, SMF, UDM, UDR, AUSF, PCF, and other network functions. - -### Stop the Core Network -```bash -docker compose down -``` - -> **Important:** Do NOT use `docker compose down -v` as this will delete the MongoDB database with all subscriber configurations. - -### Restart Services -```bash -# Restart all services -docker compose restart - -# Restart specific service -docker compose restart amf -docker compose restart upf -``` - -## Subscriber Data Persistence - -Subscriber data is stored in the MongoDB container and persists across container restarts. The database is initialized from the dump files in `./free5gc/dump/` on first startup. - -To backup subscriber data: -```bash -docker exec mongodb mongodump --db=free5gc --out=/data/backup -docker cp mongodb:/data/backup ./backup_$(date +%Y%m%d) -``` - -To restore subscriber data: -```bash -docker cp ./backup_folder mongodb:/data/restore -docker exec mongodb mongorestore --db=free5gc /data/restore/free5gc -``` - -## Network Configuration - -The deployment uses three Docker networks: - -### Control Plane Network (public_net) -- **Subnet**: `192.168.70.128/26` -- **Bridge name**: `phine-net` -- All core network functions communicate on this network - -### N3 Network (User Plane - gNB to UPF) -- **Subnet**: `192.168.71.128/26` -- **Bridge name**: `demo-n3` -- GTP-U tunnel between gNB and UPF - -### N6 Network (Data Network) -- **Subnet**: `192.168.72.128/26` -- **Bridge name**: `demo-n6` -- Connection from UPF to external data network (internet) - -### UE IP Address Pool -- **UE Data Network**: `10.0.0.0/24` -- IP addresses assigned to UE tunnel interfaces - -### Key Service Endpoints -- **AMF (N2 interface)**: `192.168.70.132:38412` (SCTP) -- **UPF (N3 interface)**: Host network mode, GTP-U on port `2152` -- **SMF**: `192.168.70.133:8000` -- **NRF**: `192.168.70.130:8000` -- **WebUI**: `http://localhost:5000` -- **External Data Network**: `192.168.72.135` (traffic server container) - -## Configuration Files - -Configuration files are located in the following directories: - -### free5GC Network Functions -All free5GC NF configs are in `./free5gc/config/`: -- `amfcfg.yaml` - Access and Mobility Management Function -- `smfcfg.yaml` - Session Management Function -- `uerouting.yaml` - UE routing information for SMF -- `ausfcfg.yaml` - Authentication Server Function -- `udmcfg.yaml` - Unified Data Management -- `udrcfg.yaml` - Unified Data Repository -- `nrfcfg.yaml` - Network Repository Function -- `pcfcfg.yaml` - Policy Control Function -- `nssfcfg.yaml` - Network Slice Selection Function -- `chfcfg.yaml` - Charging Function -- `nefcfg.yaml` - Network Exposure Function -- `webuicfg.yaml` - Web User Interface configuration - -### OAI UPF Configuration -- `./oai/oai_upf_config.yaml` - OAI UPF configuration with eBPF data plane - -### Radio Access Network -- `./oai/gNB_config.yaml` - gNB configuration -- `./oai/UE_config.yaml` - UE configuration with subscriber credentials - -### Database Initialization -- `./free5gc/dump/` - MongoDB dump files for subscriber data initialization -- `./free5gc/mongorestore.sh` - Script to restore MongoDB data on startup - -## Default Network Parameters - -The deployment is pre-configured with the following network identifiers: - -- **MCC (Mobile Country Code)**: `208` (France) -- **MNC (Mobile Network Code)**: `93` -- **PLMN ID**: `20893` -- **TAC (Tracking Area Code)**: `000001` -- **AMF ID**: `cafe00` - -### Network Slices (S-NSSAI) -Two network slices are configured by default: -1. **SST**: `1`, **SD**: `010203` - Default slice for robot communication -2. **SST**: `1`, **SD**: `112233` - Alternative slice - -### Data Networks (DNN) -- **internet** - Main data network for robot connectivity - -## Troubleshooting - -### UE Not Attaching -1. **Check subscriber exists in WebUI:** - - Log into http://localhost:5000 - - Verify IMSI is configured with correct credentials - - Ensure S-NSSAI and DNN match UE configuration - -2. **Verify subscriber credentials match:** - - IMSI, K, OPc in WebUI must match `./oai/UE_config.yaml` - - Check that DNN (`internet`) is configured - - Verify S-NSSAI (SST=1, SD=66051) is set - -3. **Check AMF logs:** - ```bash - docker compose logs -f amf - ``` - Look for: - - Registration Request/Accept messages - - Authentication success/failure - - N2 connection from gNB - -4. **Check authentication in AUSF logs:** - ```bash - docker compose logs -f ausf - ``` - -### gNB Not Connecting to AMF -1. **Verify network connectivity:** - ```bash - docker exec oai-gNB1 ping -c 3 192.168.70.132 - ``` - -2. **Check AMF logs for NG Setup:** - ```bash - docker compose logs -f amf - ``` - Look for "Handling NG Setup Request" messages - -3. **Verify PLMN configuration:** - - gNB PLMN (in `gNB_config.yaml`) must match AMF PLMN (208/93) - - Check `./oai/gNB_config.yaml` and `./free5gc/config/amfcfg.yaml` - -### No Internet Access from UE -1. **Check UE has tunnel interface:** - ```bash - docker exec ip addr show - ``` - Should see `oaitun_ue1` with IP in `10.0.0.0/24` range - -2. **Verify UPF routing:** - ```bash - docker logs upf - ``` - Look for session establishment and GTP-U tunnel creation - -3. **Check external data network:** - ```bash - docker exec oai-ext-dn ip route - ``` - Should show route to `10.0.0.0/16` via UPF - -4. **Test connectivity from UE:** - ```bash - docker exec ping -I oaitun_ue1 8.8.8.8 - docker exec ping -I oaitun_ue1 192.168.72.135 - ``` - -### UPF Not Connecting to SMF -The UPF runs in host network mode and must be able to reach the SMF: - -1. **Check UPF logs:** - ```bash - docker logs upf - ``` - Look for PFCP association with SMF - -2. **Verify SMF configuration:** - Check `./free5gc/config/smfcfg.yaml` for correct UPF endpoint - -3. **Check UPF can reach SMF:** - ```bash - docker exec upf ping -c 3 192.168.70.133 - ``` - -### WebUI Connection Issues -If WebUI cannot connect to MongoDB: -```bash -docker compose restart mongodb webui -``` - -Wait 10 seconds for MongoDB to fully start, then restart WebUI. - -### Database Initialization Failed -If subscriber data is not loaded on first startup: - -1. **Check MongoDB logs:** - ```bash - docker compose logs mongodb - ``` - -2. **Manually restore the database:** - ```bash - docker exec mongodb /docker-entrypoint-initdb.d/mongorestore.sh - ``` - -## Advanced Configuration - -### Adding Multiple Subscribers -For multi-robot simulations, add subscribers with incrementing IMSIs: - -| Robot | IMSI | Use in UE config | -|-------|------|------------------| -| Robot 1 | `imsi-208930000000001` | `208930000000001` | -| Robot 2 | `imsi-208930000000002` | `208930000000002` | -| Robot 3 | `imsi-208930000000003` | `208930000000003` | - -Use the WebUI to add each subscriber with the same K and OPc values. - -### Changing Network Slice Configuration -To modify S-NSSAI values: - -1. Update `./free5gc/config/amfcfg.yaml` (AMF supported slices) -2. Update `./free5gc/config/nssfcfg.yaml` (NSSF slice selection) -3. Update subscriber configuration in WebUI -4. Update UE configuration in `./oai/UE_config.yaml` -5. Restart affected services - -### Customizing UE IP Pool -To change the UE IP address range: - -1. Edit `./free5gc/config/smfcfg.yaml`: - ```yaml - userplaneInformation: - upfInfo: - ueIPPools: - - cidr: 10.0.0.0/24 # Change this - ``` - -2. Edit `./oai/oai_upf_config.yaml`: - ```yaml - upf: - ue_ip_pools: - - network: 10.0.0.0/24 # Change this - ``` - -3. Update the external data network container environment: - ```yaml - oai-ext-dn: - environment: - - UE_IP_ADDRESS_POOL=10.0.0.0/24 # Change this - ``` - -4. Restart services: - ```bash - docker compose restart smf upf - docker compose restart oai-ext-dn - ``` - -## Integration with RoboSim5G - -When using this CN with RoboSim5G: - -1. **Start the core network first:** - ```bash - cd demo/free5gc_setup - docker compose up -d - ``` - -2. **Configure subscribers** for your robots via WebUI at http://localhost:5000 - -3. **Launch your Gazebo simulation** with RoboSim5G plugins: - - The gNB plugin will automatically connect to the AMF - - The UE plugin will register with credentials from the plugin configuration - -4. **Verify connectivity:** - - Check AMF logs for successful UE registration - - Verify UE has established PDU session - - Test data connectivity through the 5G network - -Each robot in your simulation can have its own IMSI, network slice, and DNN configuration, enabling realistic multi-robot 5G scenarios with network slicing and QoS differentiation. - - -## Performance Considerations - -### UPF in Host Mode -The OAI UPF runs in host network mode for best performance: -- Reduces network stack overhead -- Enables eBPF-based fast path -- Requires proper host routing configuration - -### eBPF Data Plane -The UPF uses eBPF for high-performance packet processing: -- Requires kernel >= 5.4 -- Needs `SYS_ADMIN` and `NET_ADMIN` capabilities -- Check `/sys/fs/bpf` is mounted - -## Additional Resources - -- [free5GC Official Website](https://free5gc.org/) -- [free5GC Documentation](https://free5gc.org/guide/) -- [free5GC GitHub](https://github.com/free5gc/free5gc) -- [OAI UPF Documentation](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf) -- [RoboSim5G Project](https://github.com/phinetech/RoboSim5G) - -## Support - -For issues specific to: -- **free5GC**: Check [free5GC forum](https://forum.free5gc.org/) -- **OAI UPF**: Check [OAI GitLab issues](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf/-/issues) -- **RoboSim5G integration**: Use the [RoboSim5G Slack chat](https://join.slack.com/t/robosimworkspace/shared_invite/zt-38i7sbsit-FpsT6d7PU241~nGz0fcUig) - diff --git a/demo/free5gc_setup/create_physical_bridge.sh b/demo/free5gc_setup/create_physical_bridge.sh deleted file mode 100755 index ebb9d59..0000000 --- a/demo/free5gc_setup/create_physical_bridge.sh +++ /dev/null @@ -1,5 +0,0 @@ -docker network create \ - --driver bridge \ - --subnet=192.168.73.128/26 \ - --opt com.docker.network.bridge.name="ros_gz_net" \ - ros_gz_net \ No newline at end of file diff --git a/demo/free5gc_setup/docker-compose-gNB.yml b/demo/free5gc_setup/docker-compose-gNB.yml deleted file mode 100644 index b8bdffb..0000000 --- a/demo/free5gc_setup/docker-compose-gNB.yml +++ /dev/null @@ -1,43 +0,0 @@ -services: - gNB : - image: oaisoftwarealliance/oai-gnb:2026.w04 - privileged: true - container_name : oai-gNB1 - environment: - USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time - ASAN_OPTIONS: detect_leaks=0 - ports: - - 2021:2021 - cap_add: - - SYS_NICE - cap_drop: - - ALL - volumes: - - ./oai/gNB_config.yaml:/opt/oai-gnb/etc/gnb.yaml - healthcheck: - test: /bin/bash -c "pgrep nr-softmodem" - interval: 10s - timeout: 5s - retries: 5 - networks: - public_net: - ipv4_address : 192.168.70.160 - n3_net: - ipv4_address : 192.168.71.160 - entrypoint: - - /bin/bash - - -c - - | - /opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.yaml -E --rfsim --log_config.global_log_options level,nocolor,time & - tail -f /dev/null - -networks: - public_net: - external: true - name : phine-net - n3_net: - external: true - name : demo-oai-n3-net - ros_gz_net: - external: - name : ros_gz_net diff --git a/demo/free5gc_setup/docker-compose-ue.yml b/demo/free5gc_setup/docker-compose-ue.yml deleted file mode 100644 index eee25a1..0000000 --- a/demo/free5gc_setup/docker-compose-ue.yml +++ /dev/null @@ -1,96 +0,0 @@ -services: - robot_1: - image: ue_amr - privileged: true - container_name: ${NAME_ROBOT_1} - environment: - USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 361-90°9200000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - IGN_PARTITION: ${IGN_PARTITION} - networks: - public_net: - ipv4_address: ${IP_ROBOT_1} - ros_gz_net: - ipv4_address: 192.168.73.150 - volumes: - - ./oai/UE_config.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/robot_logic/install/setup.bash - export ROS_DISCOVERY_SERVER="${ROS_DISCOVERY_SERVER}" - export IGN_IP=192.168.73.150 - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.yaml -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} & - sleep 10 - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROS_GZ_BRIDGE_NAME_1} - ) & - if [ "${EXECUTE_ROBOT_LAUNCH_FILE_1}" = "true" ]; then - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROBOT_LAUNCH_FILE_NAME_1} - ) & - fi - tail -f /dev/null - - rcc: - image: rcc - privileged: true - container_name: rcc - environment: - - DISPLAY=${DISPLAY} - - QT_X11_NO_MITSHM=1 - - ROS_DOMAIN_ID=${ROS_DOMAIN_ID} - volumes: - - /tmp/.X11-unix:/tmp/.X11-unix:rw - stdin_open: true - tty: true - networks: - public_net: - ipv4_address: 192.168.70.151 - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/rviz_rcc/install/setup.bash - export ROS_DISCOVERY_SERVER="192.168.70.159:11811" - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - ip route add 10.0.0.0/24 via 192.168.70.135 dev eth0 - sleep 20 - ros2 launch rviz_launch rviz_launch.launch.py & - tail -f /dev/null - - - dds_discovery_server: - image: dds_discovery_server - privileged: true - environment: - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - container_name: discovery-server - networks: - public_net: - ipv4_address: 192.168.70.159 - ports: - - "11811:11811" - entrypoint: - - /bin/bash - - -c - - | - ip route add 10.0.0.0/24 via 192.168.70.135 dev eth0 - source /opt/ros/humble/setup.bash - fastdds discovery -i 0 -l 192.168.70.159 -p 11811 - - -networks: - public_net: - external: true - name : phine-net - n6_net: - external: true - name: demo-oai-n6-net - ros_gz_net: - external: - name: ros_gz_net diff --git a/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libNetworkMonitor.so b/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libNetworkMonitor.so old mode 100755 new mode 100644 index 669b704..3e2afd7 Binary files a/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libNetworkMonitor.so and b/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libNetworkMonitor.so differ diff --git a/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libUePowerPlugin.so b/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libUePowerPlugin.so old mode 100755 new mode 100644 index f616df7..60e0362 Binary files a/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libUePowerPlugin.so and b/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libUePowerPlugin.so differ diff --git a/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libgNBPowerPlugin.so b/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libgNBPowerPlugin.so old mode 100755 new mode 100644 index 5f0ab46..2ef93d1 Binary files a/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libgNBPowerPlugin.so and b/demo/gazebo_launch/src/ign_turtlebot/gui_plugins/libgNBPowerPlugin.so differ diff --git a/demo/gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py b/demo/gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py index 6135372..cd1e374 100644 --- a/demo/gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py +++ b/demo/gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py @@ -65,7 +65,8 @@ def generate_launch_description(): parameters=[{'use_sim_time': use_sim_time, 'robot_description': doc.toxml()}]) - world = os.path.join(get_package_share_directory('ign_turtlebot'), "worlds", "world_only_open5gs.sdf") + core_network = os.environ.get('CORE_NETWORK', 'oai') + world = os.path.join(get_package_share_directory('ign_turtlebot'), "worlds", f"world_only_{core_network}.sdf") return LaunchDescription([ ign_resource_path, diff --git a/demo/gazebo_launch/src/ign_turtlebot/phine_plugins/libUE_plugin.so b/demo/gazebo_launch/src/ign_turtlebot/phine_plugins/libUE_plugin.so index 31f60b5..caad8f7 100755 Binary files a/demo/gazebo_launch/src/ign_turtlebot/phine_plugins/libUE_plugin.so and b/demo/gazebo_launch/src/ign_turtlebot/phine_plugins/libUE_plugin.so differ diff --git a/demo/gazebo_launch/src/ign_turtlebot/phine_plugins/libgNB_plugin.so b/demo/gazebo_launch/src/ign_turtlebot/phine_plugins/libgNB_plugin.so index 37b1ea1..86a1488 100755 Binary files a/demo/gazebo_launch/src/ign_turtlebot/phine_plugins/libgNB_plugin.so and b/demo/gazebo_launch/src/ign_turtlebot/phine_plugins/libgNB_plugin.so differ diff --git a/demo/gazebo_launch/src/ign_turtlebot/worlds/world_only.sdf b/demo/gazebo_launch/src/ign_turtlebot/worlds/world_only_oai.sdf similarity index 100% rename from demo/gazebo_launch/src/ign_turtlebot/worlds/world_only.sdf rename to demo/gazebo_launch/src/ign_turtlebot/worlds/world_only_oai.sdf diff --git a/demo/images/dds_discovery_server/Dockerfile b/demo/images/dds_discovery_server/Dockerfile index 20a4575..702babf 100644 --- a/demo/images/dds_discovery_server/Dockerfile +++ b/demo/images/dds_discovery_server/Dockerfile @@ -8,12 +8,17 @@ RUN apt update RUN apt install -y ros-dev-tools RUN apt install -y iputils-ping iproute2 # Required packages for building -# Install system dependencies -RUN apt update && apt install -y \ +# Install system dependencies with retry logic for mirror sync issues +RUN apt-get clean && \ + for i in 1 2 3; do \ + apt-get update && break || sleep 10; \ + done && \ + apt-get install -y \ git cmake build-essential \ libasio-dev libtinyxml2-dev \ libfoonathan-memory-dev \ - iputils-ping iproute2 + iputils-ping iproute2 && \ + rm -rf /var/lib/apt/lists/* # --- Install Fast-CDR --- WORKDIR /opt diff --git a/demo/images/ue_amr_oai/Dockerfile b/demo/images/ue_amr_oai/Dockerfile deleted file mode 100644 index fcbfc05..0000000 --- a/demo/images/ue_amr_oai/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -# Use the OAI NR UE base image as the starting point -FROM oaisoftwarealliance/oai-nr-ue:2024.w44 - -ARG ROBOT_PROJECT_NAME ROS_DISCOVERY_SERVER -# Set environment variables for ROS 2 installation -ENV DEBIAN_FRONTEND=noninteractive -ENV ROS_DISTRO=humble - -# Update package list and install dependencies -RUN apt-get update && \ - apt-get install -y \ - sudo \ - curl \ - gnupg2 \ - lsb-release \ - locales \ - build-essential \ - git \ - wget \ - software-properties-common \ - && rm -rf /var/lib/apt/lists/* - -# Set up locale -RUN sudo locale-gen en_US.UTF-8 && \ - sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 - -ENV LANG=en_US.UTF-8 \ - LC_ALL=en_US.UTF-8 - -RUN add-apt-repository universe && \ - curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" |sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null -RUN curl -fsSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" \ - > /etc/apt/sources.list.d/ros2.list -# Install ROS 2 and other dependencies -RUN apt-get update && \ - apt upgrade -y && \ - apt-get install -y \ - ros-${ROS_DISTRO}-desktop \ - ros-dev-tools \ - ros-humble-navigation2 \ - ros-humble-nav2-bringup && \ - rm -rf /var/lib/apt/lists/* - -RUN apt-get update --fix-missing -RUN apt-get install -y libignition-msgs5-dev -RUN apt-get install -y libignition-transport8-dev -RUN apt-get install -y libignition-tools-dev -RUN apt-get install -y ros-humble-ros-ign-bridge -RUN apt-get install -y iptables - -WORKDIR /app - -COPY ./dds.xml . - -COPY ./wait_for_ue_connected.sh /app/wait_for_ue_connected.sh -RUN chmod +x /app/wait_for_ue_connected.sh - -COPY $ROBOT_PROJECT_NAME robot_logic - -RUN /bin/bash -c "source /opt/ros/humble/setup.bash && \ - cd /app/robot_logic && \ - colcon build" -# Source the ROS setup file -RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc -RUN echo "export RMW_IMPLEMENTATION=rmw_fastrtps_cpp" >> ~/.bashrc -RUN echo "export ROS_DISCOVERY_SERVER="$ROS_DISCOVERY_SERVER"" >> ~/.bashrc -RUN echo "export IGN_IP=192.168.73.150" >> ~/.bashrc -RUN echo "source /app/robot_logic/install/setup.bash" >> ~/.bashrc -RUN echo "export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml" >> ~/.bashrc - - diff --git a/demo/images/ue_amr_oai/dds.xml b/demo/images/ue_amr_oai/dds.xml deleted file mode 100644 index 5e5fc38..0000000 --- a/demo/images/ue_amr_oai/dds.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - UDP_5G_Only - UDPv4 - 1400 - 1048576 - 1048576 - true - -
10.0.0.1
-
10.0.0.10
-
10.0.0.11
-
10.0.0.12
-
10.0.0.13
-
10.0.0.14
-
10.0.0.2
-
10.0.0.3
-
10.0.0.4
-
10.0.0.5
-
10.0.0.6
-
10.0.0.7
-
10.0.0.8
-
10.0.0.9
-
127.0.0.1
-
-
-
- - - - - - UDP_5G_Only - - false - - true - - - -
\ No newline at end of file diff --git a/demo/images/ue_amr_oai/wait_for_ue_connected.sh b/demo/images/ue_amr_oai/wait_for_ue_connected.sh deleted file mode 100644 index 1f24bf4..0000000 --- a/demo/images/ue_amr_oai/wait_for_ue_connected.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# Wait until oaitun_ue1 is up and has an IP address -INTERFACE="oaitun_ue1" -TIMEOUT=120 # seconds, set to 0 for infinite wait -INTERVAL=2 # seconds between checks -ELAPSED=0 - -echo "[INFO] Waiting for UE to connect (interface $INTERFACE with IP)..." - -while true; do - if ip addr show "$INTERFACE" 2>/dev/null | grep -q "inet "; then - echo "[SUCCESS] UE is connected. Interface $INTERFACE is up with IP." - exit 0 - fi - - sleep $INTERVAL - ((ELAPSED+=INTERVAL)) - - if [ $TIMEOUT -gt 0 ] && [ $ELAPSED -ge $TIMEOUT ]; then - echo "[ERROR] Timeout reached: UE did not connect within $TIMEOUT seconds." - exit 1 - fi -done diff --git a/demo/kill.sh b/demo/kill.sh new file mode 100755 index 0000000..0417521 --- /dev/null +++ b/demo/kill.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Unified kill script for RoboSim5G native demo +# Usage: CORE_NETWORK=oai|free5gc|open5gs ./kill.sh + +CORE_NETWORK=${CORE_NETWORK:-oai} +REPO_ROOT=$(cd "$(dirname "$0")/.." && pwd) +DEMO_DIR=$(cd "$(dirname "$0")" && pwd) +CN_DIR="$REPO_ROOT/core_network_setup/$CORE_NETWORK" +export NAME_ROBOT_1=${NAME_ROBOT_1:-"ue_turtlebot"} + +echo "=== Stopping RoboSim5G native demo ($CORE_NETWORK) ===" + +# Stop Gazebo +pkill -f "ign gazebo" 2>/dev/null || true + +# Stop UE services (robot, rcc, dds) +cd "$DEMO_DIR" +docker compose -f oai/docker-compose-ue.yml down + +# Stop gNB containers +docker ps -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -r -I {} docker stop {} +docker ps -a -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -r -I {} docker rm {} + +# Stop core network +cd "$CN_DIR" +docker compose down 2>/dev/null || true + +# Remove networks +docker network rm ros_gz_net 2>/dev/null || true + +# Revoke X11 access +xhost -local:docker 2>/dev/null || true + +echo "=== RoboSim5G native demo stopped ===" diff --git a/demo/kill_all.sh b/demo/kill_all.sh deleted file mode 100755 index 649a8e3..0000000 --- a/demo/kill_all.sh +++ /dev/null @@ -1,8 +0,0 @@ -pkill -f ign\ gazebo -cd oai_setup -docker compose -f docker-compose-ue.yml down -docker ps -q --filter ancestor=oaisoftwarealliance/oai-gnb:2024.w44 | xargs -I {} docker stop {} && docker ps -a -q --filter ancestor=oaisoftwarealliance/oai-gnb:2024.w44 | xargs -I {} docker rm {} -docker compose down -docker network rm ros_gz_net -xhost -local:docker -cd .. diff --git a/demo/kill_all_free5gc.sh b/demo/kill_all_free5gc.sh deleted file mode 100755 index e98df11..0000000 --- a/demo/kill_all_free5gc.sh +++ /dev/null @@ -1,8 +0,0 @@ -pkill -f ign\ gazebo -cd free5gc_setup -docker compose -f docker-compose-ue.yml down -docker ps -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -I {} docker stop {} && docker ps -a -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -I {} docker rm {} -docker compose down -docker network rm ros_gz_net -xhost -local:docker -cd .. diff --git a/demo/kill_all_open5gs.sh b/demo/kill_all_open5gs.sh deleted file mode 100755 index 1d2e57d..0000000 --- a/demo/kill_all_open5gs.sh +++ /dev/null @@ -1,8 +0,0 @@ -pkill -f ign\ gazebo -cd open5gs_setup -docker compose -f docker-compose-ue.yml down -docker ps -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -I {} docker stop {} && docker ps -a -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -I {} docker rm {} -docker compose down -docker network rm ros_gz_net -xhost -local:docker -cd .. diff --git a/demo/launch.sh b/demo/launch.sh new file mode 100755 index 0000000..a3f82af --- /dev/null +++ b/demo/launch.sh @@ -0,0 +1,100 @@ +#!/bin/bash +# Unified launch script for RoboSim5G native demo +# Usage: CORE_NETWORK=oai|free5gc|open5gs ./launch.sh + +set -e + +CORE_NETWORK=${CORE_NETWORK:-oai} +REPO_ROOT=$(cd "$(dirname "$0")/.." && pwd) +DEMO_DIR=$(cd "$(dirname "$0")" && pwd) +CN_DIR="$REPO_ROOT/core_network_setup/$CORE_NETWORK" + +# Validate CORE_NETWORK +if [[ ! "$CORE_NETWORK" =~ ^(oai|free5gc|open5gs)$ ]]; then + echo "ERROR: CORE_NETWORK must be one of: oai, free5gc, open5gs (got: $CORE_NETWORK)" + exit 1 +fi + +echo "=== Starting RoboSim5G native demo with $CORE_NETWORK core network ===" + +# Set CN-specific environment variables +case $CORE_NETWORK in + oai) + export UE_ROUTE_SUBNET="10.0.0.0/24" + export UE_ROUTE_GW="192.168.70.134" + export UE_CARRIER_FREQ="3619200000" + HOST_ROUTE_SUBNET="10.0.0.0/24" + HOST_ROUTE_GW="192.168.70.134" + ;; + free5gc) + export UE_ROUTE_SUBNET="10.0.0.0/24" + export UE_ROUTE_GW="192.168.70.135" + export UE_CARRIER_FREQ="3319680000" + HOST_ROUTE_SUBNET="10.0.0.0/24" + HOST_ROUTE_GW="192.168.70.135" + ;; + open5gs) + export UE_ROUTE_SUBNET="10.0.0.0/24" + export UE_ROUTE_GW="192.168.70.134" + export UE_CARRIER_FREQ="3319680000" + HOST_ROUTE_SUBNET="10.0.0.0/24" + HOST_ROUTE_GW="192.168.70.134" + ;; +esac + +# Set common environment variables +export PROJECT_PATH="$DEMO_DIR" +export ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-10} +export IGN_PARTITION=${IGN_PARTITION:-domain1} +export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=~/workspace/install/lib +export ROS_DISCOVERY_SERVER="192.168.70.159:11811" +export GNB_NAME_FOR_BUTTON=${GNB_NAME_FOR_BUTTON:-"gNB1"} +export UE_NAME_FOR_BUTTON=${UE_NAME_FOR_BUTTON:-"ue_turtlebot"} +source "$DEMO_DIR/gazebo_launch/install/setup.bash" +export FASTRTPS_DEFAULT_PROFILES_FILE="$DEMO_DIR/dds.xml" +export NAME_ROBOT_1=${NAME_ROBOT_1:-"ue_turtlebot"} + +# 1. Start the core network +echo "Starting $CORE_NETWORK core network..." +cd "$CN_DIR" +docker compose up -d + +# 2. Wait for core network readiness +if [ "$CORE_NETWORK" = "oai" ]; then + ./wait_for_core_network.sh +else + sleep 10 +fi + +# 3. Add UE subscriber (open5gs only, after DB is ready) +if [ "$CORE_NETWORK" = "open5gs" ]; then + echo "Adding UE subscriber to Open5GS database..." + cd "$CN_DIR/scripts" + ./add_ue_subscriber.sh + cd "$CN_DIR" +fi + +# 3. Add host route (ignore if it already exists) +sudo ip route add "$HOST_ROUTE_SUBNET" via "$HOST_ROUTE_GW" dev phine-net 2>/dev/null || true + +# 4. Create ros_gz_net bridge +docker network create \ + --driver bridge \ + --subnet=192.168.73.128/26 \ + --opt com.docker.network.bridge.name="ros_gz_net" \ + ros_gz_net 2>/dev/null || true + +# 5. Start DDS discovery server +cd "$DEMO_DIR" +docker compose -f oai/docker-compose-ue.yml up dds_discovery_server -d + +# 6. Launch Gazebo simulation +export IGN_IP=192.168.73.129 +ros2 launch ign_turtlebot gazebo_launch.launch.py & + +# 7. Start RCC +cd "$DEMO_DIR" +xhost +local:docker +docker compose -f oai/docker-compose-ue.yml up rcc -d + +echo "=== RoboSim5G native demo launched with $CORE_NETWORK ===" diff --git a/demo/launch_robot_5G.sh b/demo/launch_robot_5G.sh deleted file mode 100755 index 7606c32..0000000 --- a/demo/launch_robot_5G.sh +++ /dev/null @@ -1,24 +0,0 @@ -export PROJECT_PATH=$(pwd) -export ROS_DOMAIN_ID=10 -export IGN_PARTITION=domain1 -export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=~/workspace/install/lib -export ROS_DISCOVERY_SERVER="192.168.70.159:11811" -export GNB_NAME_FOR_BUTTON="gNB1" -export UE_NAME_FOR_BUTTON="ue_turtlebot" -source $PROJECT_PATH/gazebo_launch/install/setup.bash - - -cd oai_setup -docker compose up -d -./wait_for_core_network.sh -sudo ip route add 10.0.0.0/16 via 192.168.70.134 dev phine-net -docker compose -f docker-compose-ue.yml up dds_discovery_server -d -./create_physical_bridge.sh -cd .. - -export IGN_IP=192.168.73.129 -ros2 launch ign_turtlebot gazebo_launch.launch.py & -cd oai_setup -xhost +local:docker -docker compose -f docker-compose-ue.yml up rcc -d -cd .. diff --git a/demo/launch_robot_5G_free5gc.sh b/demo/launch_robot_5G_free5gc.sh deleted file mode 100755 index 5f1d5e1..0000000 --- a/demo/launch_robot_5G_free5gc.sh +++ /dev/null @@ -1,25 +0,0 @@ -export PROJECT_PATH=$(pwd) -export ROS_DOMAIN_ID=10 -export IGN_PARTITION=domain1 -export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=~/workspace/install/lib -export ROS_DISCOVERY_SERVER="192.168.70.159:11811" -export GNB_NAME_FOR_BUTTON="gNB1" -export UE_NAME_FOR_BUTTON="ue_turtlebot" -source $PROJECT_PATH/gazebo_launch/install/setup.bash -export FASTRTPS_DEFAULT_PROFILES_FILE=$PROJECT_PATH/dds.xml - -cd free5gc_setup -docker compose up -d -sleep 10 - -sudo ip route add 10.0.0.0/24 via 192.168.70.135 dev phine-net -docker compose -f docker-compose-ue.yml up dds_discovery_server -d -./create_physical_bridge.sh -cd .. - -export IGN_IP=192.168.73.129 -ros2 launch ign_turtlebot gazebo_launch.launch.py & -cd free5gc_setup -xhost +local:docker -docker compose -f docker-compose-ue.yml up rcc -d -cd .. diff --git a/demo/launch_robot_5G_open5gs.sh b/demo/launch_robot_5G_open5gs.sh deleted file mode 100755 index 948f028..0000000 --- a/demo/launch_robot_5G_open5gs.sh +++ /dev/null @@ -1,25 +0,0 @@ -export PROJECT_PATH=$(pwd) -export ROS_DOMAIN_ID=10 -export IGN_PARTITION=domain1 -export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=~/workspace/install/lib -export ROS_DISCOVERY_SERVER="192.168.70.159:11811" -export GNB_NAME_FOR_BUTTON="gNB1" -export UE_NAME_FOR_BUTTON="ue_turtlebot" -source $PROJECT_PATH/gazebo_launch/install/setup.bash -export FASTRTPS_DEFAULT_PROFILES_FILE=$PROJECT_PATH/dds.xml - - -cd open5gs_setup -docker compose up -d -sleep 10 -sudo ip route add 10.0.0.0/24 via 192.168.70.134 dev phine-net -docker compose -f docker-compose-ue.yml up dds_discovery_server -d -./create_physical_bridge.sh -cd .. - -export IGN_IP=192.168.73.129 -ros2 launch ign_turtlebot gazebo_launch.launch.py & -cd open5gs_setup -xhost +local:docker -docker compose -f docker-compose-ue.yml up rcc -d -cd .. diff --git a/demo/open5gs_setup/oai/conf/UE_config.yaml b/demo/oai/conf/UE_config.yaml similarity index 100% rename from demo/open5gs_setup/oai/conf/UE_config.yaml rename to demo/oai/conf/UE_config.yaml diff --git a/demo/open5gs_setup/oai/conf/gNB_config.yaml b/demo/oai/conf/gNB_config.yaml similarity index 98% rename from demo/open5gs_setup/oai/conf/gNB_config.yaml rename to demo/oai/conf/gNB_config.yaml index 16a238d..6db29b7 100644 --- a/demo/open5gs_setup/oai/conf/gNB_config.yaml +++ b/demo/oai/conf/gNB_config.yaml @@ -13,7 +13,9 @@ gNBs: mnc_length: 2 snssaiList: - sst: 1 - sd: 000001 + sd: 0xffffff + - sst: 1 + sd: 0x1 nr_cellid: 12345678 ##### Physical parameters: min_rxtxtime: 6 diff --git a/demo/oai/docker-compose-gNB.free5gc.yml b/demo/oai/docker-compose-gNB.free5gc.yml new file mode 100644 index 0000000..9e41ae4 --- /dev/null +++ b/demo/oai/docker-compose-gNB.free5gc.yml @@ -0,0 +1,13 @@ +services: + gNB : + cap_add: + - SYS_NICE + cap_drop: + - ALL + networks: + n3_net: + ipv4_address : 192.168.71.160 +networks: + n3_net: + external: true + name : demo-oai-n3-net diff --git a/demo/open5gs_setup/docker-compose-gNB.yml b/demo/oai/docker-compose-gNB.yml similarity index 89% rename from demo/open5gs_setup/docker-compose-gNB.yml rename to demo/oai/docker-compose-gNB.yml index 91a2bcf..b1e8574 100644 --- a/demo/open5gs_setup/docker-compose-gNB.yml +++ b/demo/oai/docker-compose-gNB.yml @@ -6,8 +6,10 @@ services: environment: USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time ASAN_OPTIONS: detect_leaks=0 + ports: + - "2021:2021" volumes: - - ./oai/conf/gNB_config.yaml:/opt/oai-gnb/etc/gnb.yaml + - ./conf/gNB_config.yaml:/opt/oai-gnb/etc/gnb.yaml networks: public_net: ipv4_address : 192.168.70.160 @@ -22,7 +24,6 @@ services: - | /opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.yaml -E --rfsim --log_config.global_log_options level,nocolor,time & tail -f /dev/null - networks: public_net: external: true diff --git a/demo/open5gs_setup/docker-compose-ue.yml b/demo/oai/docker-compose-ue.yml similarity index 75% rename from demo/open5gs_setup/docker-compose-ue.yml rename to demo/oai/docker-compose-ue.yml index 374abcb..9ccda4a 100644 --- a/demo/open5gs_setup/docker-compose-ue.yml +++ b/demo/oai/docker-compose-ue.yml @@ -4,7 +4,7 @@ services: privileged: true container_name: ${NAME_ROBOT_1} environment: - USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 -C ${UE_CARRIER_FREQ:-3619200000} --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} IGN_PARTITION: ${IGN_PARTITION} networks: @@ -13,7 +13,7 @@ services: ros_gz_net: ipv4_address: 192.168.73.150 volumes: - - ./oai/conf/UE_config.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml + - ./conf/UE_config.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml entrypoint: - /bin/bash - -c @@ -23,17 +23,17 @@ services: export ROS_DISCOVERY_SERVER="${ROS_DISCOVERY_SERVER}" export IGN_IP=192.168.73.150 export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.yaml -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} & - sleep 10 + /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.yaml -E --rfsim -r 106 --numerology 1 -C ${UE_CARRIER_FREQ:-3619200000} --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time & + ./wait_for_ue_connected.sh ( ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROS_GZ_BRIDGE_NAME_1} ) & if [ "${EXECUTE_ROBOT_LAUNCH_FILE_1}" = "true" ]; then - ( + ( ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROBOT_LAUNCH_FILE_NAME_1} ) & fi - tail -f /dev/null + tail -f /dev/null healthcheck: test: /bin/bash -c "pgrep nr-uesoftmodem" @@ -62,11 +62,12 @@ services: - | source /opt/ros/humble/setup.bash source /app/rviz_rcc/install/setup.bash + export ROS_DISCOVERY_SERVER="192.168.70.159:11811" export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - ip route add 10.0.0.0/24 via 192.168.70.134 dev eth0 - sleep 20 + ip route add ${UE_ROUTE_SUBNET:-10.0.0.0/16} via ${UE_ROUTE_GW:-192.168.70.134} dev eth0 + sleep 35 ros2 launch rviz_launch rviz_launch.launch.py & - tail -f /dev/null + tail -f /dev/null dds_discovery_server: @@ -84,15 +85,15 @@ services: - /bin/bash - -c - | - ip route add 10.0.0.0/24 via 192.168.70.134 dev eth0 + ip route add ${UE_ROUTE_SUBNET:-10.0.0.0/16} via ${UE_ROUTE_GW:-192.168.70.134} dev eth0 source /opt/ros/humble/setup.bash - fastdds discovery -i 0 -l 192.168.70.159 -p 11811 + fastdds discovery -i 0 -l 192.168.70.159 -p 11811 networks: public_net: - external: true - name: phine-net + external: + name: phine-net ros_gz_net: external: name: ros_gz_net diff --git a/demo/oai_setup/README.md b/demo/oai_setup/README.md deleted file mode 100644 index 58a52ba..0000000 --- a/demo/oai_setup/README.md +++ /dev/null @@ -1,581 +0,0 @@ -# OAI Core Network Deployment for RoboSim5G - -This deployment provides an OpenAirInterface (OAI) 5G Core Network that integrates with RoboSim5G. - -## About OAI (OpenAirInterface) - -OpenAirInterface is a leading open-source implementation of 5G Core Network (5GC) and Radio Access Network (RAN) developed by EURECOM. Key features: -- **Full 3GPP compliance** with 5G Core specifications -- **High performance** C++-based network functions -- **Modular architecture** with independent containerized NFs -- **Advanced features** including network slicing, QoS policies, and eBPF data plane -- **Active development** backed by research and industry collaboration -- **Database-driven** subscriber management using MySQL - -## Architecture - -This deployment includes: -- **Control Plane NFs**: AMF, SMF, UDM, UDR, AUSF, NRF, PCF -- **User Plane**: OAI UPF with eBPF-based high-performance data plane -- **Database**: MySQL for subscriber and network configuration -- **Traffic Server**: External data network for internet access simulation - -## Quick Start - -### 1. Start the Core Network -```bash -docker compose up -d -``` - -Wait for all services to become healthy (this may take 15-30 seconds): -```bash -docker compose ps -``` - -All services should show "healthy" status. - -### 2. Verify Core Network is Running - -Check that the UDR has completed initialization: -```bash -docker logs oai-udr -``` - -You should see at the end: -``` -[udr_app] [debug] Status: REGISTERED -[udr_app] [debug] HeartBeat timer: 50 -[udr_app] [debug] Priority: 1 -[udr_app] [debug] Capacity: 100 -``` - -### 3. Configure Subscribers - -Subscribers are configured via the MySQL database. The default subscriber is already configured: - -**Default subscriber credentials:** -- **IMSI**: `001010000000101` -- **K (Permanent Key)**: `fec86ba6eb707ed08905757b1bb44b8f` -- **OPc (Operator Key)**: `C42449363BBAD02B66D16BC975D77CC1` -- **DNN**: `oai` -- **S-NSSAI**: SST=`1`, SD=`FFFFFF` (no slice differentiator) - -#### Adding Additional Subscribers - -To add more subscribers for multi-robot scenarios, connect to the MySQL database: - -```bash -docker exec -it mysql mysql -u root -plinux oai_db -``` - -Then run SQL commands (example for second robot): - -```sql --- Add authentication data -INSERT INTO AuthenticationSubscription (ueid, authenticationMethod, encPermanentKey, protectionParameterId, sequenceNumber, authenticationManagementField, algorithmId, encOpcKey, encTopcKey, vectorGenerationInHss, n5gcAuthMethod, rgAuthenticationInd, supi) -VALUES ('001010000000102', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{"sqn": "000000000020", "sqnScheme": "NON_TIME_BASED", "lastIndexes": {"ausf": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000102'); - --- Add session management subscription data -INSERT INTO SessionManagementSubscriptionData (ueid, servingPlmnid, singleNssai, dnnConfigurations) -VALUES ('001010000000102', '00101', '{"sst": 1, "sd": "FFFFFF"}', -'{"oai":{"pduSessionTypes":{"defaultSessionType": "IPV4"},"sscModes": {"defaultSscMode": "SSC_MODE_1"},"5gQosProfile": {"5qi": 6,"arp":{"priorityLevel": 15,"preemptCap": "NOT_PREEMPT","preemptVuln":"PREEMPTABLE"},"priorityLevel":1},"sessionAmbr":{"uplink":"1000Mbps", "downlink":"1000Mbps"}}}'); - --- Exit MySQL -exit; -``` - -> **Note:** Increment the IMSI for each additional robot: `001010000000102`, `001010000000103`, etc. - -### 4. Start gNB and UE - -Follow the RoboSim5G demo instructions to start your Gazebo simulation with the robot. The gNB and UE will automatically connect to this core network. - -Alternatively, for standalone testing: -```bash -# Start gNB -docker compose -f docker-compose-gNB.yml up -d - -# Verify gNB connected to AMF (wait 5-10 seconds) -docker logs oai-amf -``` - -Expected output showing gNB registration: -``` -|------------------------------gNBs' Information-------------------------| -| Index | gNB Name | Status | PLMN | Global Id | -| 1 | gnb-rfsim | Connected | 001,01 | 0x0E00 | -``` - -```bash -# Start UE -docker compose -f docker-compose-ue.yml up oai-nr-ue -d - -# Verify UE registered (wait 5-10 seconds) -docker logs oai-amf -``` - -Expected output showing UE registration: -``` -|----------------------UEs' Information-----------------------------------------| -| Index | 5GMM State | IMSI | GUTI | -| 1 | 5GMM-REGISTERED | 001010000000101 | 00101010041631377652 | -``` - -## Managing the Core Network - -### Check Service Status -```bash -docker compose ps -``` - -All services should show "healthy" status. - -### View Logs -```bash -# View all services -docker compose logs -f - -# View specific service -docker compose logs -f amf -docker compose logs -f smf -docker compose logs -f upf -docker compose logs -f mysql -``` - -### Verify Network Functions Registration -Check the NRF to see registered network functions: -```bash -docker logs oai-nrf -``` - -You should see heartbeat messages from AMF, SMF, UDM, UDR, AUSF, PCF, and UPF. - -### Stop the Core Network -```bash -# Stop gNB and UE first (if running) -docker compose -f docker-compose-gNB.yml down -docker compose -f docker-compose-ue.yml down - -# Stop core network -docker compose down -``` - -> **Important:** Do NOT use `docker compose down -v` as this will delete the MySQL database with all subscriber configurations. - -### Restart Services -```bash -# Restart all services -docker compose restart - -# Restart specific service -docker compose restart amf -docker compose restart upf -``` - -## Subscriber Data Persistence - -Subscriber data is stored in the MySQL database container. The database is initialized from `./database/oai_db.sql` on first startup. - -### Backup Database -```bash -docker exec mysql mysqldump -u root -plinux oai_db > backup_$(date +%Y%m%d).sql -``` - -### Restore Database -```bash -docker exec -i mysql mysql -u root -plinux oai_db < backup_file.sql -``` - -### View Current Subscribers -```bash -docker exec mysql mysql -u root -plinux oai_db -e "SELECT ueid, authenticationMethod, encPermanentKey, encOpcKey FROM AuthenticationSubscription;" -``` - -## Network Configuration - -The deployment uses a single Docker network for all components: - -### Control and User Plane Network (public_net) -- **Subnet**: `192.168.70.128/26` -- **Bridge name**: `phine-net` -- All core network functions and RAN communicate on this network - -### UE IP Address Pool -- **UE Data Network**: `10.0.0.0/16` -- IP addresses assigned to UE tunnel interfaces (e.g., `10.0.0.2`, `10.0.0.3`) - -### Key Service Endpoints - -| Service | IP Address | Port | Protocol | Purpose | -|---------|------------|------|----------|---------| -| **MySQL** | 192.168.70.131 | 3306 | TCP | Subscriber database | -| **NRF** | 192.168.70.130 | 8080 | HTTP | NF discovery | -| **AMF** | 192.168.70.132 | 38412 | SCTP | N2 interface (gNB) | -| **AMF** | 192.168.70.132 | 8080 | HTTP | SBI interface | -| **SMF** | 192.168.70.133 | 8080 | HTTP | SBI interface | -| **SMF** | 192.168.70.133 | 8805 | UDP | PFCP (N4) | -| **UPF** | 192.168.70.134 | 2152 | UDP | GTP-U (N3) | -| **UPF** | 192.168.70.134 | 8805 | UDP | PFCP (N4) | -| **UDR** | 192.168.70.136 | 8080 | HTTP | SBI interface | -| **UDM** | 192.168.70.137 | 8080 | HTTP | SBI interface | -| **AUSF** | 192.168.70.138 | 8080 | HTTP | SBI interface | -| **PCF** | 192.168.70.139 | 8080 | HTTP | SBI interface | -| **Ext DN** | 192.168.70.135 | - | - | External data network | - -## Configuration Files - -All OAI network functions share a single unified configuration file: - -### Main Configuration -- `./conf/config.yaml` - **Unified configuration for all OAI NFs** - - Contains SBI interfaces for all network functions - - Defines PLMN, TAC, and slice configurations - - Configures UPF user plane parameters - - Sets up MySQL database connection - -### Database -- `./database/oai_db.sql` - Initial MySQL database schema and subscriber data - -### Health Scripts -- `./healthscripts/mysql-healthcheck.sh` - MySQL container health check - -### QoS Policies -- `./policies/qos/pcc_rules/pcc_rules.yaml` - PCC (Policy and Charging Control) rules -- `./policies/qos/policy_decisions/policy_decision.yaml` - Policy decisions -- `./policies/qos/qos_data/qos_data.yaml` - QoS flow configuration - -### Radio Access Network (for testing) -- `./conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf` - gNB configuration (rfsimulator mode) -- `./conf/ue1.conf` - UE configuration with subscriber credentials - -## Default Network Parameters - -The deployment is pre-configured with the following network identifiers: - -- **MCC (Mobile Country Code)**: `001` (Test network) -- **MNC (Mobile Network Code)**: `01` -- **PLMN ID**: `00101` -- **TAC (Tracking Area Code)**: `1` - -### Network Slices (S-NSSAI) -One network slice is configured by default: -- **SST**: `1` (eMBB - Enhanced Mobile Broadband) -- **SD**: `FFFFFF` (no slice differentiator) - -### Data Networks (DNN) -- **oai** - Main data network for robot connectivity -- **ims** - IP Multimedia Subsystem (available but not used by default) - -## Troubleshooting - -### UE Not Attaching - -1. **Check subscriber exists in database:** - ```bash - docker exec mysql mysql -u root -plinux oai_db -e \ - "SELECT ueid FROM AuthenticationSubscription WHERE ueid='001010000000101';" - ``` - -2. **Verify UE credentials match database:** - - Check `./conf/ue1.conf` for IMSI, K, OPc - - Ensure DNN (`oai`) matches database configuration - - Verify S-NSSAI (SST=1) is configured - -3. **Check AMF logs:** - ```bash - docker compose logs -f amf - ``` - Look for: - - "Receive Registration Request" messages - - Authentication success/failure - - "Send Registration Accept" confirmation - -4. **Check AUSF logs for authentication:** - ```bash - docker compose logs -f oai-ausf - ``` - -5. **Verify MySQL is accessible:** - ```bash - docker compose logs mysql - ``` - -### gNB Not Connecting to AMF - -1. **Verify network connectivity:** - ```bash - docker exec oai-gNB1 ping -c 3 192.168.70.132 - ``` - -2. **Check AMF logs for NG Setup:** - ```bash - docker compose logs -f amf - ``` - Look for "Received NG SETUP REQUEST" and "Sending NG SETUP RESPONSE" - -3. **Verify PLMN configuration:** - - gNB PLMN must match AMF PLMN (001/01) - - Check `./conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf` - - Verify in `./conf/config.yaml` under AMF section - -4. **Check gNB logs:** - ```bash - docker logs oai-gNB1 - ``` - Look for "Received NG Setup Response" - -### No Internet Access from UE - -1. **Check UE has tunnel interface:** - ```bash - docker exec ip addr show - ``` - Should see `oaitun_ue1` with IP in `10.0.0.0/16` range - -2. **Verify PDU Session established:** - ```bash - docker compose logs -f smf - ``` - Look for "PDU Session Establishment Accept" messages - -3. **Check UPF logs:** - ```bash - docker compose logs -f upf - ``` - Look for: - - PFCP association with SMF - - Session creation messages - - GTP-U tunnel establishment - -4. **Verify external data network routing:** - ```bash - docker exec oai-ext-dn ip route | grep 10.0.0 - ``` - Should show route to `10.0.0.0/16` via UPF (192.168.70.134) - -5. **Test connectivity from UE:** - ```bash - docker exec ping -I oaitun_ue1 192.168.70.135 - ``` - -### UPF Not Connecting to SMF - -1. **Check UPF logs for PFCP association:** - ```bash - docker compose logs -f upf - ``` - Look for "Received PFCP Association Setup Request" - -2. **Verify SMF configuration:** - Check `./conf/config.yaml` under `nfs.upf` section for correct IP and ports - -3. **Check network connectivity:** - ```bash - docker exec oai-upf ping -c 3 192.168.70.133 - ``` - -### MySQL Connection Issues - -1. **Check MySQL health:** - ```bash - docker compose ps mysql - ``` - Should show "healthy" status - -2. **Test database connection:** - ```bash - docker exec mysql mysql -u test -ptest oai_db -e "SELECT 1;" - ``` - -3. **Check which NFs are connected:** - ```bash - docker compose logs mysql | grep "Connect" - ``` - -4. **Restart MySQL and dependent services:** - ```bash - docker compose restart mysql - sleep 10 - docker compose restart oai-udr oai-udm - ``` - -### Services Not Registering with NRF - -1. **Check NRF is running:** - ```bash - docker compose logs -f oai-nrf - ``` - -2. **Verify NRF address in config:** - Check `./conf/config.yaml` - ensure `register_nf.general` is set to `yes` - -3. **Restart NRF and other services:** - ```bash - docker compose restart oai-nrf - sleep 5 - docker compose restart oai-amf oai-smf oai-udm oai-udr oai-ausf oai-pcf oai-upf - ``` - -## Advanced Configuration - -### Modifying Network Slices - -To add or modify network slices, edit `./conf/config.yaml`: - -```yaml -amf: - supported_slices: - - sst: 1 - sd: 0xFFFFFF # Default slice - - sst: 2 # New slice for URLLC - sd: 0x000002 -``` - -Update the MySQL database with matching slice configurations for subscribers. - -### Changing UE IP Pool - -Edit `./conf/config.yaml` under the SMF/UPF section: - -```yaml -upf: - ue_ip_pools: - - network: 10.0.0.0/16 # Change this - ranges: - - start: 10.0.0.2 - end: 10.0.255.254 -``` - -Also update the external data network container: -```yaml -oai-traffic-server: - entrypoint: /bin/bash -c \ - "ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0; ip route; sleep infinity" -``` - -### Adjusting QoS Policies - -Modify the policy files in `./policies/qos/`: -- `pcc_rules.yaml` - Define PCC rules (policy enforcement) -- `qos_data.yaml` - Set 5QI, bitrates, and packet delays -- `policy_decision.yaml` - Map policies to subscribers - -Restart PCF after changes: -```bash -docker compose restart oai-pcf -``` - -### Enabling HTTP/2 for SBI - -In `./conf/config.yaml`, change: -```yaml -http_version: 2 -``` - -HTTP/2 provides better performance for service-based interfaces. - -### Changing PLMN Configuration - -Update all occurrences in `./conf/config.yaml`: - -```yaml -# In AMF section -amf: - guami: - mcc: 208 # Change MCC - mnc: 95 # Change MNC - plmn_support_list: - - mcc: 208 - mnc: 95 - tac: 0x0001 -``` - -Also update: -- gNB configuration (`gnb.sa.bandn78.fr1.106PRB.rfsim.conf`) -- Subscriber IMSIs in the database (must start with new MCC/MNC) - -## Integration with RoboSim5G - -When using this CN with RoboSim5G: - -1. **Start the core network first:** - ```bash - cd demo/oai_setup - docker compose up -d - ./wait_for_core_network.sh - ``` - -2. **Configure subscribers** for your robots in the MySQL database - -3. **Launch your Gazebo simulation** with RoboSim5G plugins: - - The gNB plugin will automatically connect to the AMF at `192.168.70.132` - - The UE plugin will register with credentials from the plugin configuration - - Ensure plugin configuration matches subscriber data in MySQL - -4. **Verify connectivity:** - - Check AMF logs for successful UE registration - - Verify PDU session establishment in SMF logs - - Test data connectivity through the 5G network - -### Multi-Robot Configuration - -For multiple robots, add subscribers with sequential IMSIs: - -| Robot | IMSI | K (same for all) | OPc (same for all) | -|-------|------|------------------|-------------------| -| Robot 1 | `001010000000101` | `fec86ba6eb707ed08905757b1bb44b8f` | `C42449363BBAD02B66D16BC975D77CC1` | -| Robot 2 | `001010000000102` | `fec86ba6eb707ed08905757b1bb44b8f` | `C42449363BBAD02B66D16BC975D77CC1` | -| Robot 3 | `001010000000103` | `fec86ba6eb707ed08905757b1bb44b8f` | `C42449363BBAD02B66D16BC975D77CC1` | - -Each robot can use different network slices and QoS profiles for realistic 5G scenarios. - -## Performance Considerations - -### OAI Network Functions -- Written in C++ for high performance -- Multi-threaded architecture -- Optimized for low latency - -### eBPF-based UPF -The OAI UPF uses Extended Berkeley Packet Filter (eBPF) for fast packet processing: -- Requires kernel >= 4.18 (5.4+ recommended) -- Needs `NET_ADMIN` and `SYS_ADMIN` capabilities -- Provides near line-rate throughput - -### Resource Requirements -Minimum recommended resources for the full deployment: -- **CPU**: 4 cores -- **RAM**: 8 GB -- **Storage**: 10 GB -- **Network**: Bridge networking with kernel routing support - - -## Utility Scripts - -### Wait for Core Network -```bash -./wait_for_core_network.sh -``` -This script waits for all core network services to become healthy before proceeding. - -### Create Physical Bridge -```bash -./create_physical_bridge.sh -``` -Creates network bridges and sets up routing for the 5G network (if needed for host integration). - -## Additional Resources - -- [OAI GitLab Repository](https://gitlab.eurecom.fr/oai/cn5g) -- [OAI 5G Core Network Documentation](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/docs/DEPLOY_HOME.md) -- [OAI Tutorials](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/docs/TUTORIALS) -- [3GPP 5G Specifications](https://www.3gpp.org/specifications-technologies/specifications-by-series) -- [RoboSim5G Project](https://github.com/phinetech/RoboSim5G) - -## Support - -For issues specific to: -- **OAI Core Network**: Check [OAI GitLab issues](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/issues) -- **OAI Community**: Join the [OAI Slack workspace](https://openairinterface.slack.com/) -- **RoboSim5G integration**: Use the [RoboSim5G Slack chat](https://join.slack.com/t/robosimworkspace/shared_invite/zt-38i7sbsit-FpsT6d7PU241~nGz0fcUig) - diff --git a/demo/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf b/demo/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf deleted file mode 100644 index 3b411b7..0000000 --- a/demo/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf +++ /dev/null @@ -1,289 +0,0 @@ -Active_gNBs = ("gNB1"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0x1; - -# cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB1"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({ mcc = 001; - mnc = 01; - mnc_length = 2; - snssaiList = ({ sst = 1, sd = 0xffffff }, { sst = 1, sd = 0x1 }) }); - - nr_cellid = 12345678L - -# tr_s_preference = "local_mac" - - ////////// Physical parameters: - - #pusch_TargetSNRx10 = 200; - #pucch_TargetSNRx10 = 200; - min_rxtxtime = 6; - - servingCellConfigCommon = ( - { - #spCellConfigCommon - - physCellId = 0; - -# downlinkConfigCommon - #frequencyInfoDL - # this is 3301.68 MHz + 22*12*30e-3 MHz = 3309.6 - #absoluteFrequencySSB = 620640; - # this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68 - absoluteFrequencySSB = 621312; - # this is 3503.28 MHz + 22*12*30e-3 MHz = 3511.2 - #absoluteFrequencySSB = 634080; - # this is 3600.48 MHz - #absoluteFrequencySSB = 640032; - #dl_frequencyBand = 78; - # this is 3301.68 MHz - #dl_absoluteFrequencyPointA = 620112; - # this is 3300.60 MHz - dl_absoluteFrequencyPointA = 620040; - # this is 3502.56 MHz - #dl_absoluteFrequencyPointA = 633552; - # this is 3600.48 MHz - #dl_absoluteFrequencyPointA = 640032; - #scs-SpecificCarrierList - dl_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing = 1; - dl_carrierBandwidth = 106; - #initialDownlinkBWP - #genericParameters - # this is RBstart=0,L=106 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 28875; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 11; - initialDLBWPsearchSpaceZero = 0; - - - - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand = 78; - #scs-SpecificCarrierList - ul_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing = 1; - ul_carrierBandwidth = 106; - pMax = 20; - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth = 28875; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialULBWPsubcarrierSpacing = 1; - #rach-ConfigCommon - #rach-ConfigGeneric - prach_ConfigurationIndex = 98; -#prach_msg1_FDM -#0 = one, 1=two, 2=four, 3=eight - prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; - zeroCorrelationZoneConfig = 12; - preambleReceivedTargetPower = -104; -#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 6; -#powerRampingStep -# 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; -#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; -#ra_ContentionResolutionTimer -#(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer = 7; - rsrp_ThresholdSSB = 19; -#prach-RootSequenceIndex_PR -#1 = 839, 2 = 139 - prach_RootSequenceIndex_PR = 2; - prach_RootSequenceIndex = 1; - # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex - # - msg1_SubcarrierSpacing = 1, -# restrictedSetConfig -# 0=unrestricted, 1=restricted type A, 2=restricted type B - restrictedSetConfig = 0, - - msg3_DeltaPreamble = 1; - p0_NominalWithGrant =-90; - -# pucch-ConfigCommon setup : -# pucchGroupHopping -# 0 = neither, 1= group hopping, 2=sequence hopping - pucchGroupHopping = 0; - hoppingId = 40; - p0_nominal = -90; -# ssb_PositionsInBurs_BitmapPR -# 1=short, 2=medium, 3=long - ssb_PositionsInBurst_PR = 2; - ssb_PositionsInBurst_Bitmap = 1; - -# ssb_periodicityServingCell -# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 - ssb_periodicityServingCell = 2; - -# dmrs_TypeA_position -# 0 = pos2, 1 = pos3 - dmrs_TypeA_Position = 0; - -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - subcarrierSpacing = 1; - - - #tdd-UL-DL-ConfigurationCommon -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - referenceSubcarrierSpacing = 1; - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity = 6; - nrofDownlinkSlots = 7; - nrofDownlinkSymbols = 6; - nrofUplinkSlots = 2; - nrofUplinkSymbols = 4; - - ssPBCH_BlockPower = -25; - } - - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - ////////// AMF parameters: - ##modify - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - - NETWORK_INTERFACES : - { - ## modify - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.160"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.160"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - }; - - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - pusch_TargetSNRx10 = 200; - pucch_TargetSNRx10 = 200; - } -); - -L1s = ( -{ - num_cc = 1; - tr_n_preference = "local_mac"; - prach_dtx_threshold = 200; -# pucch0_dtx_threshold = 150; -} -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [78]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 75; - eNB_instances = [0]; - ##beamforming 1x2 matrix: 1 layer x 2 antennas - bf_weights = [0x00007fff, 0x0000]; - ##beamforming 1x4 matrix: 1 layer x 4 antennas - #bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000]; - ## beamforming 2x2 matrix: - # bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff]; - ## beamforming 4x4 matrix: - #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; - sf_extension = 0 - sdr_addrs = "serial=XXXXXXX" - } -); - -THREAD_STRUCT = ( - { - #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" - parallel_config = "PARALLEL_SINGLE_THREAD"; - #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" - worker_config = "WORKER_ENABLE"; - } -); - -rfsimulator: { - serveraddr = "server"; -}; - -security = { - # preferred ciphering algorithms - # the first one of the list that an UE supports in chosen - # valid values: nea0, nea1, nea2, nea3 - ciphering_algorithms = ( "nea0" ); - - # preferred integrity algorithms - # the first one of the list that an UE supports in chosen - # valid values: nia0, nia1, nia2, nia3 - integrity_algorithms = ( "nia2", "nia0" ); - - # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter - # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' - drb_ciphering = "yes"; - drb_integrity = "no"; -}; - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - f1ap_log_level ="info"; - }; diff --git a/demo/oai_setup/conf/ue1.conf b/demo/oai_setup/conf/ue1.conf deleted file mode 100644 index 8168379..0000000 --- a/demo/oai_setup/conf/ue1.conf +++ /dev/null @@ -1,8 +0,0 @@ -uicc0 = { -imsi = "001010000000101"; -key = "fec86ba6eb707ed08905757b1bb44b8f"; -opc = "C42449363BBAD02B66D16BC975D77CC1"; -dnn = "oai"; -nssai_sst = "1"; -#nssai_sd = "no"; -} diff --git a/demo/oai_setup/create_physical_bridge.sh b/demo/oai_setup/create_physical_bridge.sh deleted file mode 100755 index ebb9d59..0000000 --- a/demo/oai_setup/create_physical_bridge.sh +++ /dev/null @@ -1,5 +0,0 @@ -docker network create \ - --driver bridge \ - --subnet=192.168.73.128/26 \ - --opt com.docker.network.bridge.name="ros_gz_net" \ - ros_gz_net \ No newline at end of file diff --git a/demo/oai_setup/docker-compose-gNB.yml b/demo/oai_setup/docker-compose-gNB.yml deleted file mode 100644 index 4f76159..0000000 --- a/demo/oai_setup/docker-compose-gNB.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: '3.8' -services: - oai-gnb: - image: oaisoftwarealliance/oai-gnb:2024.w44 - privileged: true - container_name : oai-gNB1 - environment: - USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time - ports: - - "2021:2021" - networks: - public_net: - ipv4_address : 192.168.70.160 - volumes: - - ./conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf:/opt/oai-gnb/etc/gnb.conf - healthcheck: - test: /bin/bash -c "pgrep nr-softmodem" - interval: 10s - timeout: 5s - retries: 5 - entrypoint: - - /bin/bash - - -c - - | - /opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.conf --sa -E --rfsim --log_config.global_log_options level,nocolor,time & - tail -f /dev/null -networks: - public_net: - external: - name : phine-net diff --git a/demo/oai_setup/docker-compose-ue.yml b/demo/oai_setup/docker-compose-ue.yml deleted file mode 100644 index c468307..0000000 --- a/demo/oai_setup/docker-compose-ue.yml +++ /dev/null @@ -1,100 +0,0 @@ -version: '3.8' -services: - robot_1: - image: ue_amr_oai - privileged: true - container_name: ${NAME_ROBOT_1} - environment: - USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - IGN_PARTITION: ${IGN_PARTITION} - networks: - public_net: - ipv4_address: ${IP_ROBOT_1} - ros_gz_net: - ipv4_address: 192.168.73.150 - volumes: - - ./conf/ue1.conf:/opt/oai-nr-ue/etc/nr-ue.conf - - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/robot_logic/install/setup.bash - export ROS_DISCOVERY_SERVER="${ROS_DISCOVERY_SERVER}" - export IGN_IP=192.168.73.150 - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.conf -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time & - ./wait_for_ue_connected.sh - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROS_GZ_BRIDGE_NAME_1} - ) & - if [ "${EXECUTE_ROBOT_LAUNCH_FILE_1}" = "true" ]; then - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROBOT_LAUNCH_FILE_NAME_1} - ) & - fi - tail -f /dev/null - - healthcheck: - test: /bin/bash -c "pgrep nr-uesoftmodem" - interval: 10s - timeout: 5s - retries: 5 - - rcc: - image: rcc - privileged: true - container_name: rcc - environment: - - DISPLAY=${DISPLAY} - - QT_X11_NO_MITSHM=1 - - ROS_DOMAIN_ID=${ROS_DOMAIN_ID} - volumes: - - /tmp/.X11-unix:/tmp/.X11-unix:rw - stdin_open: true - tty: true - networks: - public_net: - ipv4_address: 192.168.70.151 - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/rviz_rcc/install/setup.bash - export ROS_DISCOVERY_SERVER="192.168.70.159:11811" - ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0 - sleep 35 - ros2 launch rviz_launch rviz_launch.launch.py & - tail -f /dev/null - - - dds_discovery_server: - image: dds_discovery_server - privileged: true - environment: - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - container_name: discovery-server - networks: - public_net: - ipv4_address: 192.168.70.159 - ports: - - "11811:11811" - entrypoint: - - /bin/bash - - -c - - | - ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0 - source /opt/ros/humble/setup.bash - fastdds discovery -i 0 -l 192.168.70.159 -p 11811 - - -networks: - public_net: - external: - name: phine-net - ros_gz_net: - external: - name: ros_gz_net \ No newline at end of file diff --git a/demo/open5gs_setup/README.md b/demo/open5gs_setup/README.md deleted file mode 100644 index 382f147..0000000 --- a/demo/open5gs_setup/README.md +++ /dev/null @@ -1,174 +0,0 @@ -# Open5GS Core Network Deployment for RoboSim5G - -This deployment provides an Open5GS 5G Core Network that integrates with RoboSim5G. - -## About Open5GS - -Open5GS is an open-source implementation of 5G Core and EPC (Evolved Packet Core). Key features: -- **User-friendly WebUI** for subscriber management -- **Modular architecture** with independent network functions -- **Persistent storage** using MongoDB for subscriber data -- **Active community** and good documentation - -## Quick Start - -### 1. Start the Core Network -```bash -docker compose up -d -``` - -Wait for all services to become healthy: -```bash -docker compose ps -``` - -### 2. Configure Subscribers via WebUI - -Open http://localhost:9999 in your browser. - -**Default credentials:** -- Username: `admin` -- Password: `1423` - -**Add a subscriber:** -1. Navigate to "Subscribers" → "New Subscriber" -2. Enter the following details: - - **IMSI**: `001010000000101` (must match UE configuration) - - **Security:** - - K: `8baf473f2f8fd09487cccbd7097c6862` - - OPc: `8e27b6af0e692e750f32667a3b14605d` - - AMF: `8000` - - **S-NSSAI (Network Slice):** - - SST: `1` - - SD: `1` (or `000001`) - - **DNN/APN**: `internet` -3. Click "Save" - -> **Note:** First user (001010000000101) is already configured. You can pre-configure multiple additional subscribers for different robots by incrementing the IMSI (e.g., `001010000000102`, `001010000000103`). - -### 3. Start gNB and UE - -Follow the RoboSim5G demo instructions to start your Gazebo simulation with the robot. The gNB and UE will automatically connect to this core network. - -Alternatively, for standalone testing: -```bash -# Start gNB -docker compose -f docker-compose-gNB.yml up -d - -# Start UE -docker compose -f docker-compose-ue.yml up -d -``` - -## Managing the Core Network - -### Check Service Status -```bash -docker compose ps -``` - -All services should show "healthy" or "running" status. - -### View Logs -```bash -# View all services -docker compose logs -f - -# View specific service -docker compose logs -f amf -docker compose logs -f upf -``` - -### Stop the Core Network -```bash -docker compose down -``` - -> **Important:** Do NOT use `docker compose down -v` as this will delete subscriber data. - -### Restart Services -```bash -docker compose restart -``` - -## Subscriber Data Persistence - -Subscriber data is stored in the local `./db_data` directory and persists across container restarts. This makes the deployment portable: -- Copy the entire folder to another machine -- Subscriber configurations remain intact -- No need to reconfigure subscribers after restart - -## Network Configuration - -The core network uses the following subnet: -- **Open5GS CN**: `10.33.33.0/24` -- **UE Data Network (DN)**: `10.45.0.0/24` (assigned via UPF) - -### Key Service Endpoints -- **AMF (N2 interface)**: `10.33.33.5:38412` (SCTP) -- **UPF (N3 interface)**: `10.33.33.10:2152` (GTP-U) -- **WebUI**: `http://localhost:9999` - -## Troubleshooting - -### UE Not Attaching -1. **Check subscriber exists:** Log into WebUI and verify IMSI is configured -2. **Verify credentials match:** K, OPc values in WebUI must match UE config -3. **Check AMF logs:** - ```bash - docker compose logs -f amf - ``` - Look for authentication failures or registration issues - -### gNB Not Connecting to AMF -1. **Check network connectivity:** - ```bash - docker exec amf ping -c 3 oai-gNB - ``` -2. **Verify AMF logs:** - ```bash - docker compose logs -f amf - ``` - Look for NG Setup Request/Response messages - -### No Internet Access from UE -1. **Check UPF logs:** - ```bash - docker compose logs -f upf - ``` -2. **Verify UE has tunnel interface:** - ```bash - docker exec oai-nr-ue1 ip addr show - ``` - Should see `oaitun_ue1` with IP in `10.45.0.0/24` range - -### WebUI Connection Issues -If WebUI cannot connect to MongoDB: -```bash -docker compose restart db webui -``` - -## Configuration Files - -All Open5GS network function configs are in `./configs/`: -- `amf.yaml` - Access and Mobility Management Function -- `smf.yaml` - Session Management Function -- `upf.yaml` - User Plane Function -- `ausf.yaml`, `udm.yaml`, `udr.yaml` - Authentication functions -- `nrf.yaml` - Network Repository Function -- `pcf.yaml` - Policy Control Function - -## Integration with RoboSim5G - -When using this CN with RoboSim5G: -1. Start this core network first -2. Configure subscribers for your robots via WebUI -3. Launch your Gazebo simulation with the RoboSim5G plugins -4. The robot's OAI UE will automatically attach to the network - -Each robot in your simulation can have its own IMSI and network slice configuration, enabling realistic multi-robot 5G scenarios. - -## Additional Resources - -- [Open5GS Documentation](https://open5gs.org/open5gs/docs/) -- [Open5GS GitHub](https://github.com/open5gs/open5gs) -- [RoboSim5G Project](https://github.com/phinetech/RoboSim5G) diff --git a/demo/open5gs_setup/create_physical_bridge.sh b/demo/open5gs_setup/create_physical_bridge.sh deleted file mode 100755 index ebb9d59..0000000 --- a/demo/open5gs_setup/create_physical_bridge.sh +++ /dev/null @@ -1,5 +0,0 @@ -docker network create \ - --driver bridge \ - --subnet=192.168.73.128/26 \ - --opt com.docker.network.bridge.name="ros_gz_net" \ - ros_gz_net \ No newline at end of file diff --git a/demo_containerized/README.md b/demo_containerized/README.md index 739a163..9d905ab 100644 --- a/demo_containerized/README.md +++ b/demo_containerized/README.md @@ -4,126 +4,128 @@ - Docker Compose version v2.33.1 +- `mongodb-mongosh` (required only for Open5GS core network — install with `sudo apt install mongodb-mongosh`) + +- `nvidia-container-toolkit` (required only if you want to use GPU acceleration for the Gazebo simulation — install following the [NVIDIA Container Toolkit install guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)) + ## Choosing a Core Network -RoboSim5G supports **three 5G Core Network implementations**. Each has its own launch and kill scripts: +RoboSim5G supports **three 5G Core Network implementations**: OAI, free5GC, and Open5GS. + +A single `launch.sh` and `kill.sh` script is provided. You select the core network using the `CORE_NETWORK` environment variable (defaults to `oai`): -| Core Network | Launch Script | Kill Script | -|--------------|--------------|-------------| -| **OAI** (OpenAirInterface) | `launch_robot_5G_docker.sh` | `kill_all.sh` | -| **free5GC** | `launch_robot_5G_docker_free5gc.sh` | `kill_all_free5gc.sh` | -| **Open5GS** | `launch_robot_5G_docker_open5gs.sh` | `kill_all_open5gs.sh` | +```bash +CORE_NETWORK=oai ./launch.sh # OpenAirInterface (default) +CORE_NETWORK=free5gc ./launch.sh # free5GC +CORE_NETWORK=open5gs ./launch.sh # Open5GS +``` -**Important:** When you choose a core network, you must also **configure the corresponding Gazebo world file** in the simulation container (see [Configuring Gazebo World for Your CN](#configuring-gazebo-world-for-your-cn) section below). +The core network containers are launched from the `core_network_setup/` folder at the root of the repository. Each CN has its own subfolder (`core_network_setup/oai/`, `core_network_setup/free5gc/`, `core_network_setup/open5gs/`) containing the docker-compose file and related configuration. -**Key Difference - free5GC N3 Interface:** +**Key Difference — free5GC N3 Interface:** free5GC uses a **separate N3 network** (`demo-n3` bridge) for the gNB ↔ UPF GTP-U tunnel, while OAI and Open5GS use the main `phine-net` for all communication. 📖 **For detailed comparison and guidance on choosing:** See [doc/5G_CORE_NETWORKS.md](../doc/5G_CORE_NETWORKS.md) -## Changing Plugin path +### Open5GS: UE Subscriber Registration -In `launch_robot_5G` at line 4 you have to change the path to Gazebo Plugin to your own (sometimes it can be in /usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins) -## Builiding Images ad building ROS2 pkgs -On a terminal in the main repo directory: +When using Open5GS, the launch script automatically calls `core_network_setup/open5gs/scripts/add_ue_subscriber.sh` to register the UE in the Open5GS MongoDB database. This script uses the `open5gs-dbctl` tool (included in the repo) which requires `mongosh` to be installed on the host. +Install the prerequisite: +```bash +sudo apt install mongodb-mongosh ``` -./build_images.sh -``` -## Running simulation -1. On a terminal, launch the script for your chosen core network: +### Automatic World Selection -**For OAI:** -```bash -source launch_robot_5G_docker.sh -``` +The Gazebo world file is **automatically selected** based on the `CORE_NETWORK` environment variable. The launch file (`gazebo_launch.launch.py`) inside the simulation container reads the `CORE_NETWORK` variable and loads the corresponding world file (`world_only_oai.sdf`, `world_only_free5gc.sdf`, or `world_only_open5gs.sdf`). No manual editing of the launch file or rebuilding of the simulation image is required when switching between core networks. -**For free5GC:** -```bash -source launch_robot_5G_docker_free5gc.sh -``` +### RAN Docker Compose Structure -**For Open5GS:** -```bash -source launch_robot_5G_docker_open5gs.sh -``` +The `oai/` folder in this demo contains the docker-compose files for the Radio Access Network components. The folder is named `oai/` because the gNB and UE are from **OAI v2026.w04** (`oaisoftwarealliance/oai-gnb:2026.w04`), used with all three core networks: -Insert your password when required. +- `docker-compose-gNB.yml` — Base gNB compose file, used for **all** core networks +- `docker-compose-gNB.free5gc.yml` — Docker Compose **extension** for free5GC only (adds the N3 network interface to the gNB) +- `docker-compose-ue.yml` — UE, RCC, DDS Discovery Server, and **simulation** containers +- `conf/gNB_config.yaml` — gNB configuration (modified at runtime by the Gazebo gNB plugin) +- `conf/UE_config.yaml` — UE configuration (modified at runtime by the Gazebo UE plugin) -These commands will launch the CN container, the Gazebo Simulation with the gNB embedded (visualization + container), the robot-UE container, and the RCC container. It will take 40 seconds to start everything, finishing when Rviz opens. -The first time you launch the simulation, it might fail since the UE plugin will build the robot-UE plugin for a long time. +## Configuration via Volumes and `DEMO_PROJECT_PATH` -2. On Rviz click on "Nav2 goal" and then select a feasible location. +In the containerized demo, configuration files are **not baked into the Docker images**. Instead, they are mounted as volumes from the host, allowing the Gazebo plugins running inside the simulation container to modify them at runtime. -3. Whenever you want, look for the three vertical dot on the top right of Gazebo GUI, click it and in the search box of Gazebo search "UE_Power_Plugin" and "gNB_Power_Plugin". In the Gazebo GUI two buttons will pop up, that will switch on or off the UE and gNB of the robot. +### The `DEMO_PROJECT_PATH` Environment Variable -4. Press the gNB button, that will switch both gNB and UE off. +`DEMO_PROJECT_PATH` is set by `launch.sh` to the absolute path of the `demo_containerized/` directory on the host. It is critical for all volume mounts in the docker-compose files to resolve correctly. The docker-compose files use it to mount: -5. The robot will continue its path (or it will stay still if he does not have one), you can try to give another goal but the communication won't be enabled +- **UE config**: `${DEMO_PROJECT_PATH}/oai/conf/UE_config.yaml` → `/opt/oai-nr-ue/etc/nr-ue.yaml` (inside the UE container) +- **gNB config**: `${DEMO_PROJECT_PATH}/oai/conf/gNB_config.yaml` → `/opt/oai-gnb/etc/gnb.yaml` (inside the gNB container) +- **OAI folder**: `${DEMO_PROJECT_PATH}/oai` → `/app/oai` (inside the simulation container) -6. Switch on the UE and gNB from the buttons +### How Plugin Configuration Works Inside the Container -7. Give another Nav2 Goal or wait for the robot to finish its path +The simulation container has `PROJECT_PATH=/app` set internally. The Gazebo plugins (gNB_plugin and UE_plugin) read `PROJECT_PATH` and modify files under `$PROJECT_PATH/oai/` — i.e., `/app/oai/conf/gNB_config.yaml` and `/app/oai/docker-compose-gNB.yml`. Because `/app/oai` is a volume mount from the host (`${DEMO_PROJECT_PATH}/oai`), these modifications are reflected on the host filesystem. -## Remove all the container and kill gazebo +### Docker Socket Volume -In the main folder, use the kill script for your chosen core network: +The simulation container mounts the host Docker socket (`/var/run/docker.sock:/var/run/docker.sock`). This allows the Gazebo plugins, which run inside the simulation container, to execute `docker compose` commands that actually run on the **host** Docker daemon. This is how the gNB and UE containers are launched by the plugins — the plugin calls `docker compose -f docker-compose-gNB.yml up -d` from inside the simulation container, but the container is created on the host. -**For OAI:** -```bash -./kill_all.sh -``` +**This means:** +- The gNB and UE containers are **sibling containers** (not nested), running directly on the host Docker daemon +- The plugins modify the config files through the volume mount, then launch sibling containers using those modified configs +- `DEMO_PROJECT_PATH` must be set correctly, otherwise the volume mounts will fail and the plugins won't be able to find the configuration files or launch containers + +## Building Images +On a terminal in the demo_containerized directory: -**For free5GC:** -```bash -./kill_all_free5gc.sh +``` +./build_images.sh ``` -**For Open5GS:** +This will build the `simulation`, `rcc`, and `dds_discovery_server` Docker images. The `ue_amr` Docker image is built automatically by the UE plugin at simulation runtime. + +## Running simulation + +1. On a terminal, launch the simulation with your chosen core network: + ```bash -./kill_all_open5gs.sh +CORE_NETWORK=oai source launch.sh ``` -## Configuring Gazebo World for Your CN +(Replace `oai` with `free5gc` or `open5gs` as needed. If `CORE_NETWORK` is not set, it defaults to `oai`.) + +Insert your password when required. + +This command will launch the CN containers (from `core_network_setup/`), the Gazebo Simulation container with the gNB embedded, the robot-UE container, and the RCC container. It will take 40 seconds to start everything, finishing when Rviz opens. +The first time you launch the simulation, it might fail since the UE plugin will build the robot-UE image for a long time. -**IMPORTANT:** The Gazebo world file in the simulation container must match your chosen core network. Each CN requires different configurations (IMSI, DNN, network addresses, etc.). +2. On Rviz click on "Nav2 goal" and then select a feasible location. -### Available World Files +3. Whenever you want, look for the three vertical dots on the top right of Gazebo GUI, click it and in the search box of Gazebo search "UE_Power_Plugin" and "gNB_Power_Plugin". In the Gazebo GUI two buttons will pop up, that will switch on or off the UE and gNB of the robot. -Three world files are provided in `images/simulation/gazebo_launch/src/ign_turtlebot/worlds/`: +4. Press the gNB button, that will switch both gNB and UE off. -- `world_only.sdf` - **For OAI** -- `world_only_free5gc.sdf` - **For free5GC** -- `world_only_open5gs.sdf` - **For Open5GS** +5. The robot will continue its path (or it will stay still if it does not have one), you can try to give another goal but the communication won't be enabled. -### Configure the Launch File +6. Switch on the UE and gNB from the buttons. -Edit `images/simulation/gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py` at **line 68**: +7. Give another Nav2 Goal or wait for the robot to finish its path. -```python -# Change this line to match your chosen CN: -world = os.path.join(get_package_share_directory('ign_turtlebot'), - "worlds", "world_only_free5gc.sdf") # Change filename here -``` +## Remove all the containers -**Examples:** -- For OAI: `"world_only.sdf"` -- For free5GC: `"world_only_free5gc.sdf"` -- For Open5GS: `"world_only_open5gs.sdf"` +In the demo_containerized folder, run the kill script with the same `CORE_NETWORK` value: -After changing the world file, rebuild the simulation container: ```bash -./build_images.sh +CORE_NETWORK=oai ./kill.sh ``` ## Modify gNB parameters -Inside the world file for your chosen CN (see [Configuring Gazebo World for Your CN](#configuring-gazebo-world-for-your-cn)), change the parameters at line 106. +Inside the world file for your chosen CN, change the gNB parameters. The world files are located in `images/simulation/gazebo_launch/src/ign_turtlebot/worlds/`: -**For OAI:** `images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only.sdf` -**For free5GC:** `images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only_free5gc.sdf` -**For Open5GS:** `images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only_open5gs.sdf` +- `world_only_oai.sdf` — For OAI +- `world_only_free5gc.sdf` — For free5GC +- `world_only_open5gs.sdf` — For Open5GS ```xml @@ -144,13 +146,16 @@ Inside the world file for your chosen CN (see [Configuring Gazebo World for Your ``` **Note:** The `cn_type` parameter specifies which 5G Core Network the plugin should connect to. + +After modifying world files, rebuild the simulation image: +```bash +./build_images.sh +``` + ## Modify UE parameters -Inside the world file for your chosen CN (see [Configuring Gazebo World for Your CN](#configuring-gazebo-world-for-your-cn)), change the parameters at line 56. +Inside the world file for your chosen CN (same files as above), change the UE parameters: -**For OAI:** `images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only.sdf` -**For free5GC:** `images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only_free5gc.sdf` -**For Open5GS:** `images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only_open5gs.sdf` ```xml oai @@ -166,7 +171,6 @@ Inside the world file for your chosen CN (see [Configuring Gazebo World for Your C42449363BBAD02B66D16BC975D77CC1 oai 1 - no ${PROJECT_PATH}/nav_stack nav_stack true @@ -181,52 +185,32 @@ Inside the world file for your chosen CN (see [Configuring Gazebo World for Your ## Remove CN from launch file -If you want to manage the CN containers separately, you can comment out the CN launch section in your chosen launch script. +If you want to manage the CN containers separately, you can comment out the CN launch section in `launch.sh`: -**Example for OAI** (`launch_robot_5G_docker.sh`): ```sh -# cd oai_setup +# cd "$CN_DIR" # docker compose up -d -# cd .. -``` - -**Example for free5GC** (`launch_robot_5G_docker_free5gc.sh`): -```sh -# cd free5gc_setup -# docker compose up -d -# cd .. -``` - -**Example for Open5GS** (`launch_robot_5G_docker_open5gs.sh`): -```sh -# cd open5gs_setup -# docker compose up -d -# cd .. ``` ## Changing ROS DOMAIN (avoiding multi-user bugs) -In `launch_robot_5G.sh` modify with the ID that you want(each PC should have its own): - -``` - -export ROS_DOMAIN_ID=ID +Set the `ROS_DOMAIN_ID` environment variable before launching (each PC should have its own): +```bash +ROS_DOMAIN_ID=42 CORE_NETWORK=oai source launch.sh ``` -## Changing GZ partion(avoiding multi-user bugs) - -In `launch_robot_5G.sh` modify with the partion that you want(each PC should have its own): - -``` +## Changing GZ partition (avoiding multi-user bugs) -export IGN_PARTITION=partition_name +Set the `IGN_PARTITION` environment variable before launching (each PC should have its own): +```bash +IGN_PARTITION=my_partition CORE_NETWORK=oai source launch.sh ``` ## Using the Button UE and gNB plugin -If you change the container name in the gNB and UE declarations, you should match the same container names for the two environment variable in `launch_robot_5G.sh`: `GNB_NAME_FOR_BUTTON` , `UE_NAME_FOR_BUTTON`. +If you change the container name in the gNB and UE declarations, you should match the same container names for the two environment variables `GNB_NAME_FOR_BUTTON` and `UE_NAME_FOR_BUTTON` (set before launching or export them). ## NVIDIA GPU Acceleration (Optional) @@ -236,16 +220,18 @@ To enable hardware acceleration for the Gazebo simulation, you need an NVIDIA GP Follow the official [NVIDIA Container Toolkit Installation Guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) to set up the repository and install the `nvidia-container-toolkit` package. ### 2. Configure the Launch Script -The simulation container is designed to switch between the standard Linux runtime and the NVIDIA runtime dynamically. Open `launch_robot_5G_docker.sh` and ensure the `GPU_RUNTIME` variable is set correctly: +The simulation container is designed to switch between the standard Linux runtime and the NVIDIA runtime dynamically. Set the `GPU_RUNTIME` variable before launching: ```bash -# Set to "nvidia" to use your GPU, or "runc" for standard CPU execution -export GPU_RUNTIME="nvidia" +GPU_RUNTIME=nvidia CORE_NETWORK=oai source launch.sh ``` + +Set `GPU_RUNTIME` to `"nvidia"` to use your GPU, or leave it unset / set to `"runc"` for standard CPU execution. + ## Configuring Containerized Simulation To develop and deploy custom robotic logic within the existing containerized environment, follow these steps to integrate your ROS 2 workspaces and launch scripts. -To add custom code, it should be consider that the images have installed: +To add custom code, it should be considered that the images have installed: - Ubuntu 22.04 @@ -253,6 +239,30 @@ To add custom code, it should be consider that the images have installed: - gazebo ignition fortress 2.6.9 +### Directory Layout for Customization + +The key directories for customization are all under `images/simulation/`: + +| Directory | Purpose | +|-----------|---------| +| `images/simulation/images/ue_amr/` | Contains the Dockerfile and files for the **robot-UE container** image. Place additional ROS 2 packages or dependencies here. The UE plugin will copy your robot logic into this folder, build the image, and launch it. | +| `images/simulation/nav_stack/` | Contains the **robot logic** ROS 2 workspace (navigation stack, ros_gz_bridge, etc.). The UE plugin copies this workspace into the robot-UE container at runtime and builds it inside the container. Modify this to change what the robot does. | +| `images/simulation/gazebo_launch/` | Contains the **Gazebo world** workspace with world files, plugin declarations, and the launch file. Modify world files here to change gNB/UE parameters, add models, etc. | + +The `oai/` folder (at `demo_containerized/oai/`, mounted into the simulation container as `/app/oai`) contains: +- `docker-compose-gNB.yml` / `docker-compose-ue.yml` — Control how the gNB and UE containers are launched, their networks, volumes, and entrypoints. Modify these to change container behavior (e.g., add environment variables, change network settings). +- `conf/gNB_config.yaml` / `conf/UE_config.yaml` — 5G configuration files modified at runtime by the plugins. + +### Minimal Customization (Let the Plugins Handle Everything) + +If your changes are limited to the robot logic and world parameters, you can simply: + +1. Place your robot ROS 2 workspace in `images/simulation/nav_stack/` +2. Update the UE plugin parameters in the world file (``, ``, ``) to match your workspace +3. Rebuild the simulation image with `./build_images.sh` + +The Gazebo plugins will handle the rest — copying the robot workspace into the UE container, building it, modifying the docker-compose and config files, and launching the gNB and UE containers automatically. + ## 1. Integrate Your Workspaces @@ -271,15 +281,15 @@ Then, update the `images/simulation/Dockerfile` (typically around lines 66–67) The UE Plugin in your `.sdf` world file acts as the bridge between the 5G simulation and your ROS 2 logic. You must modify the `` parameter to match the package name within your custom workspace and `` has to match the name of your robot workspace. -Locate: +Locate the world file for your chosen CN in: - images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only.sdf + images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only_.sdf Modify: ... - our_custom_workspace + your_custom_workspace your_custom_package_name your_robot_logic.launch.py ... @@ -289,13 +299,11 @@ Modify: ## 3. Update the Launch Orchestration -To ensure the simulation container starts with your specific world and configurations, modify the `docker-compose-ue.yml` file located in: - - images/simulation/oai_setup/docker-compose-ue.yml +To ensure the simulation container starts with your specific world and configurations, modify the `oai/docker-compose-ue.yml` file. -At approximately line 145, update the `entrypoint` or the `command` associated with the simulation service to call your custom launch file: +Update the `entrypoint` associated with the simulation service to call your custom launch file: - # Inside images/simulation/oai_setup/docker-compose-ue.yml + # Inside oai/docker-compose-ue.yml services: simulation: ... @@ -308,16 +316,16 @@ At approximately line 145, update the `entrypoint` or the `command` associated w --- -## Scripts in `launch-robot_5G_docker.sh` +## Scripts in `launch.sh` ### `wait_for_core_network.sh` -This script ensures that the OAI core network is fully operational before proceeding with the simulation. It waits for the MySQL database container to become healthy and checks that all critical OAI services (`oai-nrf`, `oai-amf`, `oai-smf`, `oai-upf`) are running. The script is called automatically during the simulation launch process to avoid race conditions and ensure a reliable startup sequence. +Located in `core_network_setup/oai/`, this script ensures that the OAI core network is fully operational before proceeding with the simulation. It waits for the MySQL database container to become healthy and checks that all critical OAI services (`oai-nrf`, `oai-amf`, `oai-smf`, `oai-upf`) are running. The script is called automatically during the simulation launch process to avoid race conditions and ensure a reliable startup sequence. -### `create_physical_bridge.sh` -This script creates a custom Docker bridge network (`ros_gz_net`) with a specified subnet. It is used to enable communication between simulation containers (such as Gazebo, robot-UE, and network components) on a dedicated network, ensuring proper connectivity and isolation for the simulation environment. The script is executed as part of the launch process and typically does not require manual intervention. +### `ros_gz_net` bridge creation +The `launch.sh` script creates a custom Docker bridge network (`ros_gz_net`) with a specified subnet. It is used to enable communication between simulation containers (such as Gazebo, robot-UE, and network components) on a dedicated network, ensuring proper connectivity and isolation for the simulation environment. This is executed as part of the launch process and typically does not require manual intervention. ## Important -After making these changes, remember to rebuild your images to apply the updates to the container layers: +After making changes to the world files or the Dockerfile, remember to rebuild your images to apply the updates to the container layers: ./build_images.sh diff --git a/demo_containerized/free5gc_setup/create_physical_bridge.sh b/demo_containerized/free5gc_setup/create_physical_bridge.sh deleted file mode 100755 index a37d298..0000000 --- a/demo_containerized/free5gc_setup/create_physical_bridge.sh +++ /dev/null @@ -1,5 +0,0 @@ -docker network create \ - --driver bridge \ - --subnet=192.168.73.128/26 \ - --opt com.docker.network.bridge.name="ros_gz_net" \ - ros_gz_net diff --git a/demo_containerized/free5gc_setup/docker-compose-gNB.yml b/demo_containerized/free5gc_setup/docker-compose-gNB.yml deleted file mode 100644 index d0c061c..0000000 --- a/demo_containerized/free5gc_setup/docker-compose-gNB.yml +++ /dev/null @@ -1,43 +0,0 @@ -services: - gNB: - image: oaisoftwarealliance/oai-gnb:2026.w04 - privileged: true - container_name : oai-gNB1 - environment: - USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time - ASAN_OPTIONS: detect_leaks=0 - ports: - - 2021:2021 - cap_add: - - SYS_NICE - cap_drop: - - ALL - volumes: - - ./oai/gNB_config.yaml:/opt/oai-gnb/etc/gnb.yaml - healthcheck: - test: /bin/bash -c "pgrep nr-softmodem" - interval: 10s - timeout: 5s - retries: 5 - networks: - public_net: - ipv4_address : 192.168.70.160 - n3_net: - ipv4_address : 192.168.71.160 - entrypoint: - - /bin/bash - - -c - - | - /opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.yaml -E --rfsim --log_config.global_log_options level,nocolor,time & - tail -f /dev/null - -networks: - public_net: - external: true - name : phine-net - n3_net: - external: true - name : demo-oai-n3-net - ros_gz_net: - external: - name : ros_gz_net diff --git a/demo_containerized/free5gc_setup/docker-compose.yml b/demo_containerized/free5gc_setup/docker-compose.yml deleted file mode 100644 index f374aca..0000000 --- a/demo_containerized/free5gc_setup/docker-compose.yml +++ /dev/null @@ -1,309 +0,0 @@ -services: - oai-upf: - container_name: "upf" - image: phinetech/oai-upf:f5gc-patch - expose: - - 2152/udp - - 8805/udp - - 8080/tcp - volumes: - - ./oai/oai_upf_config.yaml:/openair-upf/etc/config.yaml - - /sys/fs/bpf:/sys/fs/bpf - - /sys/kernel/debug:/sys/kernel/debug:rw - environment: - - TZ=Europe/Paris - depends_on: - - free5gc-nrf - cap_add: - - NET_ADMIN - - SYS_ADMIN - cap_drop: - - ALL - privileged: true - network_mode: host - extra_hosts: - - "oai-ext-dn:192.168.72.135" - - "oai-nrf:192.168.70.130" - - db: - container_name: mongodb - image: mongo:4.4 - command: mongod --port 27017 - expose: - - "27017" - volumes: - - ./free5gc/dump:/data/dump - - ./free5gc/mongorestore.sh:/docker-entrypoint-initdb.d/mongorestore.sh - networks: - public_net: - ipv4_address: 192.168.70.131 - aliases: - - db - - free5gc-nrf: - container_name: nrf - image: free5gc/nrf:v4.1.0 - command: ./nrf -c ./config/nrfcfg.yaml - expose: - - "8000" - volumes: - - ./free5gc/config/nrfcfg.yaml:/free5gc/config/nrfcfg.yaml - environment: - DB_URI: mongodb://db/free5gc - GIN_MODE: release - networks: - public_net: - aliases: - - nrf.free5gc.org - ipv4_address: 192.168.70.130 - depends_on: - - db - - free5gc-amf: - container_name: amf - image: free5gc/amf:v4.1.0 - command: ./amf -c ./config/amfcfg.yaml - expose: - - "8000" - volumes: - - ./free5gc/config/amfcfg.yaml:/free5gc/config/amfcfg.yaml - environment: - GIN_MODE: release - networks: - public_net: - ipv4_address: 192.168.70.132 - aliases: - - amf.free5gc.org - depends_on: - - free5gc-nrf - - free5gc-ausf: - container_name: ausf - image: free5gc/ausf:v4.1.0 - command: ./ausf -c ./config/ausfcfg.yaml - expose: - - "8000" - volumes: - - ./free5gc/config/ausfcfg.yaml:/free5gc/config/ausfcfg.yaml - environment: - GIN_MODE: release - networks: - public_net: - ipv4_address: 192.168.70.138 - aliases: - - ausf.free5gc.org - depends_on: - - free5gc-nrf - - free5gc-nssf: - container_name: nssf - image: free5gc/nssf:v4.1.0 - command: ./nssf -c ./config/nssfcfg.yaml - expose: - - "8000" - volumes: - - ./free5gc/config/nssfcfg.yaml:/free5gc/config/nssfcfg.yaml - environment: - GIN_MODE: release - networks: - public_net: - ipv4_address: 192.168.70.146 - aliases: - - nssf.free5gc.org - depends_on: - - free5gc-nrf - - free5gc-pcf: - container_name: pcf - image: free5gc/pcf:v4.1.0 - command: ./pcf -c ./config/pcfcfg.yaml - expose: - - "8000" - volumes: - - ./free5gc/config/pcfcfg.yaml:/free5gc/config/pcfcfg.yaml - environment: - GIN_MODE: release - networks: - public_net: - ipv4_address: 192.168.70.139 - aliases: - - pcf.free5gc.org - depends_on: - - free5gc-nrf - - free5gc-smf: - container_name: smf - image: free5gc/smf:v4.1.0 - command: ./smf -c ./config/smfcfg.yaml -u ./config/uerouting.yaml - expose: - - "8000" - volumes: - - ./free5gc/config/smfcfg.yaml:/free5gc/config/smfcfg.yaml - - ./free5gc/config/uerouting.yaml:/free5gc/config/uerouting.yaml - environment: - GIN_MODE: release - networks: - public_net: - ipv4_address: 192.168.70.133 - aliases: - - smf.free5gc.org - depends_on: - - free5gc-nrf - - oai-upf - - free5gc-udm: - container_name: udm - image: free5gc/udm:v4.1.0 - command: ./udm -c ./config/udmcfg.yaml - expose: - - "8000" - volumes: - - ./free5gc/config/udmcfg.yaml:/free5gc/config/udmcfg.yaml - environment: - GIN_MODE: release - networks: - public_net: - ipv4_address: 192.168.70.137 - aliases: - - udm.free5gc.org - depends_on: - - db - - free5gc-nrf - - free5gc-udr: - container_name: udr - image: free5gc/udr:v4.1.0 - command: ./udr -c ./config/udrcfg.yaml - expose: - - "8000" - volumes: - - ./free5gc/config/udrcfg.yaml:/free5gc/config/udrcfg.yaml - environment: - DB_URI: mongodb://db/free5gc - GIN_MODE: release - networks: - public_net: - ipv4_address: 192.168.70.136 - aliases: - - udr.free5gc.org - depends_on: - - db - - free5gc-nrf - - free5gc-chf: - container_name: chf - image: free5gc/chf:v4.1.0 - command: ./chf -c ./config/chfcfg.yaml - expose: - - "8000" - volumes: - - ./free5gc/config/chfcfg.yaml:/free5gc/config/chfcfg.yaml - - ./free5gc/cert:/free5gc/cert - environment: - DB_URI: mongodb://db/free5gc - GIN_MODE: release - networks: - public_net: - ipv4_address: 192.168.70.154 - aliases: - - chf.free5gc.org - depends_on: - - db - - free5gc-nrf - - free5gc-webui - - free5gc-nef: - container_name: nef - image: free5gc/nef:v4.1.0 - command: ./nef -c ./config/nefcfg.yaml - expose: - - "8000" - volumes: - - ./free5gc/config/nefcfg.yaml:/free5gc/config/nefcfg.yaml - environment: - GIN_MODE: release - networks: - public_net: - ipv4_address: 192.168.70.142 - aliases: - - nef.free5gc.org - depends_on: - - db - - free5gc-nrf - - free5gc-webui: - # user: admin - # password: free5gc - container_name: webui - image: free5gc/webui:v4.1.0 - command: ./webui -c ./config/webuicfg.yaml - expose: - - "2121" - volumes: - - ./free5gc/config/webuicfg.yaml:/free5gc/config/webuicfg.yaml - environment: - - GIN_MODE=release - networks: - public_net: - ipv4_address: 192.168.70.161 - aliases: - - webui - ports: - - "5000:5000" - - "2122:2122" - - "2121:2121" - depends_on: - - db - - free5gc-nrf - - oai-ext-dn: - privileged: true - init: true - container_name: oai-ext-dn - image: oaisoftwarealliance/trf-gen-cn5g:latest - environment: - - EBPF_GW_SETUP=yes - - EBPF_GW_N6_IP_ADDR=192.168.72.135 - - GW_SGI_IP_ADDR=192.168.70.135 - - GW_N3_IP_ADDR=192.168.71.135 - - UE_IP_ADDRESS_POOL=10.0.0.0/24 - - N6_UPF_IP_ADDR=192.168.72.129 - - SGI_DEMO_OAI_ADDR=192.168.70.129 - healthcheck: - test: /bin/bash -c "ip r | grep 10.0.0" - interval: 10s - timeout: 5s - retries: 5 - networks: - public_net: - ipv4_address: 192.168.70.135 - n3_net: - ipv4_address: 192.168.71.135 - n6_net: - ipv4_address: 192.168.72.135 - -networks: - public_net: - driver: bridge - name: phine-net - ipam: - config: - - subnet: 192.168.70.128/26 - driver_opts: - com.docker.network.bridge.name: "phine-net" - n3_net: - driver: bridge - name: demo-oai-n3-net - ipam: - config: - - subnet: 192.168.71.128/26 - driver_opts: - com.docker.network.bridge.name: "demo-n3" - n6_net: - driver: bridge - name: demo-oai-n6-net - ipam: - config: - - subnet: 192.168.72.128/26 - driver_opts: - com.docker.network.bridge.name: "demo-n6" diff --git a/demo_containerized/free5gc_setup/free5gc/README.md b/demo_containerized/free5gc_setup/free5gc/README.md deleted file mode 100644 index 42ac7c2..0000000 --- a/demo_containerized/free5gc_setup/free5gc/README.md +++ /dev/null @@ -1,429 +0,0 @@ -# free5GC Core Network Deployment for RoboSim5G - -This deployment provides a free5GC 5G Core Network that integrates with RoboSim5G. - -## About free5GC - -free5GC is an open-source implementation of 5G Core Network (5GC) compliant with 3GPP Release 15 and beyond. Key features: -- **Web-based management interface** for subscriber configuration -- **Full 5G Core implementation** with all network functions (AMF, SMF, UPF, etc.) -- **MongoDB-based persistence** for subscriber and network data -- **Flexible architecture** supporting network slicing and multiple DNNs -- **Hybrid UPF support** - uses OAI UPF for better performance and eBPF data plane - -## Architecture - -This deployment uses a **hybrid approach**: -- **Control Plane**: free5GC network functions (AMF, SMF, UDM, UDR, etc.) -- **User Plane**: OAI UPF (User Plane Function) with eBPF-based data plane - -This combination leverages free5GC's user-friendly WebUI while benefiting from OAI UPF's performance optimizations. - -## Quick Start - -### 1. Start the Core Network -```bash -docker compose up -d -``` - -Wait for all services to become healthy (this may take 10-20 seconds): -```bash -docker compose ps -``` - -All services should show "running" status. - -### 2. Configure Subscribers via WebUI - -Open http://localhost:5000 in your browser. - -**Default credentials:** -- Username: `admin` -- Password: `free5gc` - -**Add a subscriber:** -1. Navigate to "Subscribers" in the left menu -2. Click the "+ NEW SUBSCRIBER" button -3. Enter the following details: - - **SUPI (IMSI)**: `imsi-208930000000001` - - **Operator Key (K)**: `8baf473f2f8fd09487cccbd7097c6862` - - **OPc Type**: Select `OPc` - - **OPc**: `8e27b6af0e692e750f32667a3b14605d` -4. Scroll down to **S-NSSAI Configuration**: - - Click "+ Add S-NSSAI" - - **SST**: `1` - - **SD**: `66051` (hex: `010203`) - - **Default S-NSSAI**: ✓ (check this box) -5. Under **Data Network Name**: - - Click the "+ DNN" button - - **DNN**: `internet` - - **Default DNN**: ✓ (check this box) -6. Click "CREATE" at the bottom - -> **Note:** The first subscriber (`imsi-208930000000001`) with the credentials above should be pre-configured in the MongoDB dump. You can add additional subscribers for multiple robots by incrementing the IMSI (e.g., `imsi-208930000000002`, `imsi-208930000000003`). - -### 3. Start gNB and UE - -Follow the RoboSim5G demo instructions to start your Gazebo simulation with the robot. The gNB and UE will automatically connect to this core network. - -Alternatively, for standalone testing: -```bash -# Start gNB -docker compose -f docker-compose-gNB.yml up -d - -# Start UE -docker compose -f docker-compose-ue.yml up -d -``` - -## Managing the Core Network - -### Check Service Status -```bash -docker compose ps -``` - -All services should show "running" status. The UPF runs in `host` network mode for performance reasons. - -### View Logs -```bash -# View all services -docker compose logs -f - -# View specific service -docker compose logs -f amf -docker compose logs -f smf -docker compose logs -f upf -``` - -### Verify Network Functions Registration -Check that all NFs have registered with NRF: -```bash -docker logs nrf -``` - -You should see registration messages from AMF, SMF, UDM, UDR, AUSF, PCF, and other network functions. - -### Stop the Core Network -```bash -docker compose down -``` - -> **Important:** Do NOT use `docker compose down -v` as this will delete the MongoDB database with all subscriber configurations. - -### Restart Services -```bash -# Restart all services -docker compose restart - -# Restart specific service -docker compose restart amf -docker compose restart upf -``` - -## Subscriber Data Persistence - -Subscriber data is stored in the MongoDB container and persists across container restarts. The database is initialized from the dump files in `./free5gc/dump/` on first startup. - -To backup subscriber data: -```bash -docker exec mongodb mongodump --db=free5gc --out=/data/backup -docker cp mongodb:/data/backup ./backup_$(date +%Y%m%d) -``` - -To restore subscriber data: -```bash -docker cp ./backup_folder mongodb:/data/restore -docker exec mongodb mongorestore --db=free5gc /data/restore/free5gc -``` - -## Network Configuration - -The deployment uses three Docker networks: - -### Control Plane Network (public_net) -- **Subnet**: `192.168.70.128/26` -- **Bridge name**: `phine-net` -- All core network functions communicate on this network - -### N3 Network (User Plane - gNB to UPF) -- **Subnet**: `192.168.71.128/26` -- **Bridge name**: `demo-n3` -- GTP-U tunnel between gNB and UPF - -### N6 Network (Data Network) -- **Subnet**: `192.168.72.128/26` -- **Bridge name**: `demo-n6` -- Connection from UPF to external data network (internet) - -### UE IP Address Pool -- **UE Data Network**: `10.0.0.0/24` -- IP addresses assigned to UE tunnel interfaces - -### Key Service Endpoints -- **AMF (N2 interface)**: `192.168.70.132:38412` (SCTP) -- **UPF (N3 interface)**: Host network mode, GTP-U on port `2152` -- **SMF**: `192.168.70.133:8000` -- **NRF**: `192.168.70.130:8000` -- **WebUI**: `http://localhost:5000` -- **External Data Network**: `192.168.72.135` (traffic server container) - -## Configuration Files - -Configuration files are located in the following directories: - -### free5GC Network Functions -All free5GC NF configs are in `./free5gc/config/`: -- `amfcfg.yaml` - Access and Mobility Management Function -- `smfcfg.yaml` - Session Management Function -- `uerouting.yaml` - UE routing information for SMF -- `ausfcfg.yaml` - Authentication Server Function -- `udmcfg.yaml` - Unified Data Management -- `udrcfg.yaml` - Unified Data Repository -- `nrfcfg.yaml` - Network Repository Function -- `pcfcfg.yaml` - Policy Control Function -- `nssfcfg.yaml` - Network Slice Selection Function -- `chfcfg.yaml` - Charging Function -- `nefcfg.yaml` - Network Exposure Function -- `webuicfg.yaml` - Web User Interface configuration - -### OAI UPF Configuration -- `./oai/oai_upf_config.yaml` - OAI UPF configuration with eBPF data plane - -### Radio Access Network -- `./oai/gNB_config.yaml` - gNB configuration -- `./oai/UE_config.yaml` - UE configuration with subscriber credentials - -### Database Initialization -- `./free5gc/dump/` - MongoDB dump files for subscriber data initialization -- `./free5gc/mongorestore.sh` - Script to restore MongoDB data on startup - -## Default Network Parameters - -The deployment is pre-configured with the following network identifiers: - -- **MCC (Mobile Country Code)**: `208` (France) -- **MNC (Mobile Network Code)**: `93` -- **PLMN ID**: `20893` -- **TAC (Tracking Area Code)**: `000001` -- **AMF ID**: `cafe00` - -### Network Slices (S-NSSAI) -Two network slices are configured by default: -1. **SST**: `1`, **SD**: `010203` - Default slice for robot communication -2. **SST**: `1`, **SD**: `112233` - Alternative slice - -### Data Networks (DNN) -- **internet** - Main data network for robot connectivity - -## Troubleshooting - -### UE Not Attaching -1. **Check subscriber exists in WebUI:** - - Log into http://localhost:5000 - - Verify IMSI is configured with correct credentials - - Ensure S-NSSAI and DNN match UE configuration - -2. **Verify subscriber credentials match:** - - IMSI, K, OPc in WebUI must match `./oai/UE_config.yaml` - - Check that DNN (`internet`) is configured - - Verify S-NSSAI (SST=1, SD=66051) is set - -3. **Check AMF logs:** - ```bash - docker compose logs -f amf - ``` - Look for: - - Registration Request/Accept messages - - Authentication success/failure - - N2 connection from gNB - -4. **Check authentication in AUSF logs:** - ```bash - docker compose logs -f ausf - ``` - -### gNB Not Connecting to AMF -1. **Verify network connectivity:** - ```bash - docker exec oai-gNB1 ping -c 3 192.168.70.132 - ``` - -2. **Check AMF logs for NG Setup:** - ```bash - docker compose logs -f amf - ``` - Look for "Handling NG Setup Request" messages - -3. **Verify PLMN configuration:** - - gNB PLMN (in `gNB_config.yaml`) must match AMF PLMN (208/93) - - Check `./oai/gNB_config.yaml` and `./free5gc/config/amfcfg.yaml` - -### No Internet Access from UE -1. **Check UE has tunnel interface:** - ```bash - docker exec ip addr show - ``` - Should see `oaitun_ue1` with IP in `10.0.0.0/24` range - -2. **Verify UPF routing:** - ```bash - docker logs upf - ``` - Look for session establishment and GTP-U tunnel creation - -3. **Check external data network:** - ```bash - docker exec oai-ext-dn ip route - ``` - Should show route to `10.0.0.0/16` via UPF - -4. **Test connectivity from UE:** - ```bash - docker exec ping -I oaitun_ue1 8.8.8.8 - docker exec ping -I oaitun_ue1 192.168.72.135 - ``` - -### UPF Not Connecting to SMF -The UPF runs in host network mode and must be able to reach the SMF: - -1. **Check UPF logs:** - ```bash - docker logs upf - ``` - Look for PFCP association with SMF - -2. **Verify SMF configuration:** - Check `./free5gc/config/smfcfg.yaml` for correct UPF endpoint - -3. **Check UPF can reach SMF:** - ```bash - docker exec upf ping -c 3 192.168.70.133 - ``` - -### WebUI Connection Issues -If WebUI cannot connect to MongoDB: -```bash -docker compose restart mongodb webui -``` - -Wait 10 seconds for MongoDB to fully start, then restart WebUI. - -### Database Initialization Failed -If subscriber data is not loaded on first startup: - -1. **Check MongoDB logs:** - ```bash - docker compose logs mongodb - ``` - -2. **Manually restore the database:** - ```bash - docker exec mongodb /docker-entrypoint-initdb.d/mongorestore.sh - ``` - -## Advanced Configuration - -### Adding Multiple Subscribers -For multi-robot simulations, add subscribers with incrementing IMSIs: - -| Robot | IMSI | Use in UE config | -|-------|------|------------------| -| Robot 1 | `imsi-208930000000001` | `208930000000001` | -| Robot 2 | `imsi-208930000000002` | `208930000000002` | -| Robot 3 | `imsi-208930000000003` | `208930000000003` | - -Use the WebUI to add each subscriber with the same K and OPc values. - -### Changing Network Slice Configuration -To modify S-NSSAI values: - -1. Update `./free5gc/config/amfcfg.yaml` (AMF supported slices) -2. Update `./free5gc/config/nssfcfg.yaml` (NSSF slice selection) -3. Update subscriber configuration in WebUI -4. Update UE configuration in `./oai/UE_config.yaml` -5. Restart affected services - -### Customizing UE IP Pool -To change the UE IP address range: - -1. Edit `./free5gc/config/smfcfg.yaml`: - ```yaml - userplaneInformation: - upfInfo: - ueIPPools: - - cidr: 10.0.0.0/24 # Change this - ``` - -2. Edit `./oai/oai_upf_config.yaml`: - ```yaml - upf: - ue_ip_pools: - - network: 10.0.0.0/24 # Change this - ``` - -3. Update the external data network container environment: - ```yaml - oai-ext-dn: - environment: - - UE_IP_ADDRESS_POOL=10.0.0.0/24 # Change this - ``` - -4. Restart services: - ```bash - docker compose restart smf upf - docker compose restart oai-ext-dn - ``` - -## Integration with RoboSim5G - -When using this CN with RoboSim5G: - -1. **Start the core network first:** - ```bash - cd demo/free5gc_setup - docker compose up -d - ``` - -2. **Configure subscribers** for your robots via WebUI at http://localhost:5000 - -3. **Launch your Gazebo simulation** with RoboSim5G plugins: - - The gNB plugin will automatically connect to the AMF - - The UE plugin will register with credentials from the plugin configuration - -4. **Verify connectivity:** - - Check AMF logs for successful UE registration - - Verify UE has established PDU session - - Test data connectivity through the 5G network - -Each robot in your simulation can have its own IMSI, network slice, and DNN configuration, enabling realistic multi-robot 5G scenarios with network slicing and QoS differentiation. - - -## Performance Considerations - -### UPF in Host Mode -The OAI UPF runs in host network mode for best performance: -- Reduces network stack overhead -- Enables eBPF-based fast path -- Requires proper host routing configuration - -### eBPF Data Plane -The UPF uses eBPF for high-performance packet processing: -- Requires kernel >= 5.4 -- Needs `SYS_ADMIN` and `NET_ADMIN` capabilities -- Check `/sys/fs/bpf` is mounted - -## Additional Resources - -- [free5GC Official Website](https://free5gc.org/) -- [free5GC Documentation](https://free5gc.org/guide/) -- [free5GC GitHub](https://github.com/free5gc/free5gc) -- [OAI UPF Documentation](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf) -- [RoboSim5G Project](https://github.com/phinetech/RoboSim5G) - -## Support - -For issues specific to: -- **free5GC**: Check [free5GC forum](https://forum.free5gc.org/) -- **OAI UPF**: Check [OAI GitLab issues](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf/-/issues) -- **RoboSim5G integration**: Use the [RoboSim5G Slack chat](https://join.slack.com/t/robosimworkspace/shared_invite/zt-38i7sbsit-FpsT6d7PU241~nGz0fcUig) - diff --git a/demo_containerized/free5gc_setup/free5gc/cert/chf.key b/demo_containerized/free5gc_setup/free5gc/cert/chf.key deleted file mode 100644 index 5728b62..0000000 --- a/demo_containerized/free5gc_setup/free5gc/cert/chf.key +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6iTvZu1HXW+vU -TrbTERb+WEuNk8GrrkYEEeJdnjPsA5bLGSN6gwJM9aWhiBHggwhtmpx6E6iIa65S -NFHughyPB6IF8rpMeYY9q9Wnbsjk7SuXxdtj0NOHC4KkZe9Xj/MiDhm0mirG6aXR -9gy3ay14mz+1b2LwmW97PD2+CX/fOHotEk32mnvYffNJvSL+TZrsbst0sfvcV6Pk -u8EziUlo1wMoKYHhss8PI1ucKCnZ2HNK9Kn8oJyXZiXY41lBQao3cSS+HDKASaEZ -N+1WLKgJ39hgkNui5IUK2cMHC/RiiCtSlTAPMhzQ3PoTSCaMFr6zUtZ+zY+BgrC4 -HQ93fr5TAgMBAAECggEBALiAQJiNdNekbdAiwyZlQu7z+lbgjLD4wPwJjHK4pfaN -XjsodDUbG81vMxJgef4s3Ms8IAWHKC03BMb+RQO54fF+xT1I5gf6M1MQgVUIeOAl -zfZilytVQ8PRGLjushtToFJQzBAcZK82LvNLgSxycBlYxVz5/UypFuE3poIu9zGb -AwYDBIk9Wdl0XPbv5pspMUIyzaUohZk4PtUTwdBa7DIYgOtbCpEJTlI8qnisegBj -oLQQdKX/VAskCSGcjpwJJU53AsZjp3TjcLn+GiiOLy8vwaIcJ1MlfzLKZJnVUqK4 -MCKS24xHVXFP8rYNgEHZ7+n2ERhJ+NAhBGnEXwHFlKECgYEA7weeV4cNaM/7vUvK -GMGyyeFpi7GpyiwWTwvMaE5F1A3nrNycAKPdZdsTCC16fKaXP+KUeo6LxA3xxJxZ -iSopfQjlSZJQAwr2z00WHpR8UihPDyuqU7/wYL5J1Sc8ClN8CJPD8Ce9CUGWujGA -g3a2+N5xHqDFUfCQ5+DdN8h+i8sCgYEAx8eJ/VKAKe+UeIAlTN9lDKnqWujJU5cR -PKgkrLz+aDdFKqoA+V7NfcHYx83oVBvodM0R3klQUmDO74fB6le4q3cmB+8+33u5 -x1eJyp+ApSE5ZKSOJ/giZPSbBWtA5revp/WZCwTSF0Lz/nFDnIvJ1+djWl7onkSM -4uMcI1PVVpkCgYBIe1XvkrtlOhRLLY1F/o6ZmynnO2OSM9Y7+Abu5jVUfTbweyEv -LIF5Xnoh87B91gJtU+bUVx9YvyW+Ce84oblc+fKVYbGzioKXD/gSI9KjEygOIJ6Q -sNZSb8FxymjxdKla7Hvw+gvfn6z2HwaqVrhbNRC2Segr1bgLKGvMe5asCwKBgQCK -gfhUjmdXK8h3BvlVY6iOcBuQLcavUpRbxoOu01Va8b7dhoIoYib8InJmjIagEb1H -hYn24EN06bNu9GNoUqsxDelrJN8lWIWEBFf/CDjLw84jzcbVRT6rWb9EsYiMrRt2 -ylrx/cSe5gd+CA8FMRGew8jpNdX3LLW09BplD9FgOQKBgG3kUcJJpf5EiQJuniSJ -sLJGAznDtS8m8E67bBK//5uHmWHNfFpjZLkB1Zr//AbjAqYqibxSGk5kUucNFZ9f -XYwUHSB8LvwYhZhzlRR9b5yiDMtZFWAZl3YCxyR8+kkcsG8U3jA/bqeL2Ke1lQrU -7WsjhKn3x8+McmXaZIb2Q4tQ ------END PRIVATE KEY----- diff --git a/demo_containerized/free5gc_setup/free5gc/cert/chf.pem b/demo_containerized/free5gc_setup/free5gc/cert/chf.pem deleted file mode 100644 index 8333c58..0000000 --- a/demo_containerized/free5gc_setup/free5gc/cert/chf.pem +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDazCCAlOgAwIBAgIUeAP9uOZCMS0mlbnaNegzQcIwnNwwDQYJKoZIhvcNAQEL -BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM -GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMzA5MDgwNTEyNTZaFw0yMzEw -MDgwNTEyNTZaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw -HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB -AQUAA4IBDwAwggEKAoIBAQC6iTvZu1HXW+vUTrbTERb+WEuNk8GrrkYEEeJdnjPs -A5bLGSN6gwJM9aWhiBHggwhtmpx6E6iIa65SNFHughyPB6IF8rpMeYY9q9Wnbsjk -7SuXxdtj0NOHC4KkZe9Xj/MiDhm0mirG6aXR9gy3ay14mz+1b2LwmW97PD2+CX/f -OHotEk32mnvYffNJvSL+TZrsbst0sfvcV6Pku8EziUlo1wMoKYHhss8PI1ucKCnZ -2HNK9Kn8oJyXZiXY41lBQao3cSS+HDKASaEZN+1WLKgJ39hgkNui5IUK2cMHC/Ri -iCtSlTAPMhzQ3PoTSCaMFr6zUtZ+zY+BgrC4HQ93fr5TAgMBAAGjUzBRMB0GA1Ud -DgQWBBRVzQKLH7rtZPKPbbEQZllA0WhhHzAfBgNVHSMEGDAWgBRVzQKLH7rtZPKP -bbEQZllA0WhhHzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBW -GZ+5c5oKBz5oIQDkt/r2VJ82NceBEnEXUntkkK8N0xBPKMC5qoq2rF5PdwkSj3gY -qGBv1AQMD4xE7X275UAxmzDKaD/B8XrgcVqv32kSkjJmAqoQdP2iQP4ZjYh2Aikt -aG0WaD/ltIOETl/8It7WJ22qrm2NTE5Q0jY5w2L+HoxVum7vHmH6if25ppVuhlJE -UU7elyMxEqezf44JmZRGbKMarY4ALKXSoKXUjELNE0L2tJiRT3wKzg0p/9LA0Eq/ -3vhV6595ptADqzoaSVwtoLhyY+4l/DqdTLtgv6GIw3MZL6Hs0Sy0RDjvKHySjZkA -7jUQa9wARB3zRMgkPo0y ------END CERTIFICATE----- diff --git a/demo_containerized/free5gc_setup/free5gc/config/amfcfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/amfcfg.yaml deleted file mode 100644 index 085c49b..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/amfcfg.yaml +++ /dev/null @@ -1,130 +0,0 @@ -info: - version: 1.0.9 - description: AMF initial local configuration - -configuration: - amfName: AMF # the name of this AMF - ngapIpList: # the IP list of N2 interfaces on this AMF - - amf.free5gc.org - ngapPort: 38412 # the SCTP port listened by NGAP - sbi: # Service-based interface information - scheme: http # the protocol for sbi (http or https) - registerIPv4: amf.free5gc.org # IP used to register to NRF - bindingIPv4: amf.free5gc.org # IP used to bind the service - port: 8000 # port used to bind the service - serviceNameList: # the SBI services provided by this AMF, refer to TS 29.518 - - namf-comm # Namf_Communication service - - namf-evts # Namf_EventExposure service - - namf-mt # Namf_MT service - - namf-loc # Namf_Location service - - namf-oam # OAM service - servedGuamiList: # Guami (Globally Unique AMF ID) list supported by this AMF - # = - - plmnId: # Public Land Mobile Network ID, = - mcc: 208 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - amfId: cafe00 # AMF identifier (3 bytes hex string, range: 000000~FFFFFF) - supportTaiList: # the TAI (Tracking Area Identifier) list supported by this AMF - - plmnId: # Public Land Mobile Network ID, = - mcc: 208 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 000001 # Tracking Area Code (3 bytes hex string, range: 000000~FFFFFF) - plmnSupportList: # the PLMNs (Public land mobile network) list supported by this AMF - - plmnId: # Public Land Mobile Network ID, = - mcc: 208 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - snssaiList: # the S-NSSAI (Single Network Slice Selection Assistance Information) list supported by this AMF - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 010203 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - supportDnnList: # the DNN (Data Network Name) list supported by this AMF - - internet - nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF - security: # NAS security parameters - integrityOrder: # the priority of integrity algorithms - - NIA2 - # - NIA0 - cipheringOrder: # the priority of ciphering algorithms - - NEA0 - # - NEA2 - networkName: # the name of this core network - full: free5GC - short: free - ngapIE: # Optional NGAP IEs - mobilityRestrictionList: # Mobility Restriction List IE, refer to TS 38.413 - enable: true # append this IE in related message or not - maskedIMEISV: # Masked IMEISV IE, refer to TS 38.413 - enable: true # append this IE in related message or not - redirectionVoiceFallback: # Redirection Voice Fallback IE, refer to TS 38.413 - enable: false # append this IE in related message or not - nasIE: # Optional NAS IEs - networkFeatureSupport5GS: # 5gs Network Feature Support IE, refer to TS 24.501 - enable: true # append this IE in Registration accept or not - length: 1 # IE content length (uinteger, range: 1~3) - imsVoPS: 0 # IMS voice over PS session indicator (uinteger, range: 0~1) - emc: 0 # Emergency service support indicator for 3GPP access (uinteger, range: 0~3) - emf: 0 # Emergency service fallback indicator for 3GPP access (uinteger, range: 0~3) - iwkN26: 0 # Interworking without N26 interface indicator (uinteger, range: 0~1) - mpsi: 0 # MPS indicator (uinteger, range: 0~1) - emcN3: 0 # Emergency service support indicator for Non-3GPP access (uinteger, range: 0~1) - mcsi: 0 # MCS indicator (uinteger, range: 0~1) - t3502Value: 720 # timer value (seconds) at UE side - t3512Value: 3600 # timer value (seconds) at UE side - non3gppDeregTimerValue: 3240 # timer value (seconds) at UE side - # retransmission timer for paging message - t3513: - enable: true # true or false - expireTime: 6s # default is 6 seconds - maxRetryTimes: 4 # the max number of retransmission - # retransmission timer for NAS Deregistration Request message - t3522: - enable: true # true or false - expireTime: 6s # default is 6 seconds - maxRetryTimes: 4 # the max number of retransmission - # retransmission timer for NAS Registration Accept message - t3550: - enable: true # true or false - expireTime: 6s # default is 6 seconds - maxRetryTimes: 4 # the max number of retransmission - # retransmission timer for NAS Configuration Update Command message - t3555: - enable: true # true or false - expireTime: 6s # default is 6 seconds - maxRetryTimes: 4 # the max number of retransmission - # retransmission timer for NAS Authentication Request/Security Mode Command message - t3560: - enable: true # true or false - expireTime: 6s # default is 6 seconds - maxRetryTimes: 4 # the max number of retransmission - # retransmission timer for NAS Notification message - t3565: - enable: true # true or false - expireTime: 6s # default is 6 seconds - maxRetryTimes: 4 # the max number of retransmission - # retransmission timer for NAS Identity Request message - t3570: - enable: true # true or false - expireTime: 6s # default is 6 seconds - maxRetryTimes: 4 # the max number of retransmission - locality: area1 # Name of the location where a set of AMF, SMF, PCF and UPFs are located - sctp: # set the sctp server setting , once this field is set, please also add maxInputStream, maxOsStream, maxAttempts, maxInitTimeOut - numOstreams: 3 # the maximum out streams of each sctp connection - maxInstreams: 5 # the maximum in streams of each sctp connection - maxAttempts: 2 # the maximum attempts of each sctp connection - maxInitTimeout: 2 # the maximum init timeout of each sctp connection - defaultUECtxReq: false # the default value of UE Context Request to decide when triggering Initial Context Setup procedure - - # Metrics configuration - # If using the same bindingIPv4 as the sbi server, make sure that the ports are different - metrics: - enable: false # (Optional, default false) - scheme: http # (Required) the protocol for metrics (http or https, default https) - bindingIPv4: amf.free5gc.org # (Required) IP used to bind the metrics endpoint (default 0.0.0.0) - port: 9091 # (Optional, default 9091) port used to bind the service - namespace: free5gc # (Optional, default free5gc) - -logger: # log output setting - enable: true # true or false - level: info # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/config/ausfcfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/ausfcfg.yaml deleted file mode 100644 index 9775456..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/ausfcfg.yaml +++ /dev/null @@ -1,34 +0,0 @@ -info: - version: 1.0.3 - description: AUSF initial local configuration - -configuration: - sbi: # Service-based interface information - scheme: http # the protocol for sbi (http or https) - registerIPv4: ausf.free5gc.org # IP used to register to NRF - bindingIPv4: ausf.free5gc.org # IP used to bind the service - port: 8000 # Port used to bind the service - serviceNameList: # the SBI services provided by this AUSF, refer to TS 29.509 - - nausf-auth # Nausf_UEAuthentication service - nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF - plmnSupportList: # the PLMNs (Public Land Mobile Network) list supported by this AUSF - - mcc: 208 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - - mcc: 123 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 45 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - groupId: ausfGroup001 # ID for the group of the AUSF - eapAkaSupiImsiPrefix: false # including "imsi-" prefix or not when using the SUPI to do EAP-AKA' authentication - - # Metrics configuration - # If using the same bindingIPv4 as the sbi server, make sure that the ports are different - metrics: - enable: false # (Optional, default false) - scheme: http # (Required) the protocol for metrics (http or https, default https) - bindingIPv4: ausf.free5gc.org # (Required) IP used to bind the metrics endpoint (default 0.0.0.0) - port: 9091 # (Optional, default 9091) port used to bind the service - namespace: free5gc # (Optional, default free5gc) - -logger: # log output setting - enable: true # true or false - level: info # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/config/chfcfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/chfcfg.yaml deleted file mode 100644 index bff20bb..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/chfcfg.yaml +++ /dev/null @@ -1,61 +0,0 @@ -info: - version: 1.0.3 - description: CHF initial local configuration - -configuration: - chfName: CHF # the name of this CHF - sbi: # Service-based interface information - scheme: http # the protocol for sbi (http or https) - registerIPv4: chf.free5gc.org # IP used to register to NRF - bindingIPv4: chf.free5gc.org # IP used to bind the service - port: 8000 # port used to bind the service - nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF - serviceNameList: # the SBI services provided by this CHF, refer to TS 32.291 - - nchf-convergedcharging # Nchf_AMPolicyControl service - mongodb: # the mongodb connected by this CHF - name: free5gc # name of the mongodb - url: mongodb://db:27017 # a valid URL of the mongodb - quotaValidityTime: 10000 - volumeLimit: 50000 - volumeLimitPDU: 10000 - volumeThresholdRate: 0.8 - cgf: - enable: true - hostIPv4: webui - port: 2121 - listenPort: 2122 - passiveTransferPortRange: - start: 2123 - end: 2130 - tls: - pem: cert/chf.pem - key: cert/chf.key - cdrFilePath: /tmp - abmfDiameter: - protocol: tcp - hostIPv4: chf.free5gc.org - port: 3868 - tls: - pem: cert/chf.pem - key: cert/chf.key - rfDiameter: - protocol: tcp - hostIPv4: chf.free5gc.org - port: 3869 - tls: - pem: cert/chf.pem # CHF TLS Certificate - key: cert/chf.key # CHF TLS Private key - - # Metrics configuration - # If using the same bindingIPv4 as the sbi server, make sure that the ports are different - metrics: - enable: false # (Optional, default false) - scheme: http # (Required) the protocol for metrics (http or https, default https) - bindingIPv4: chf.free5gc.org # (Required) IP used to bind the metrics endpoint (default 0.0.0.0) - port: 9091 # (Optional, default 9091) port used to bind the service - namespace: free5gc # (Optional, default free5gc) - -logger: # log output setting - enable: true # true or false - level: info # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/config/nefcfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/nefcfg.yaml deleted file mode 100644 index dd48a95..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/nefcfg.yaml +++ /dev/null @@ -1,19 +0,0 @@ -info: - version: 1.0.1 - description: NEF initial local configuration - -configuration: - sbi: - scheme: http # The protocol for sbi (http or https) - registerIPv4: nef.free5gc.org # IP used to register to NRF - bindingIPv4: nef.free5gc.org # IP used to bind the service - port: 8000 # port used to bind the service - nrfUri: http://nrf.free5gc.org:8000 # A valid URI of NRF - serviceList: # the SBI services provided by this NEF - - serviceName: nnef-pfdmanagement # Nnef_PFDManagement Service - - serviceName: nnef-oam # OAM service - -logger: # log output setting - enable: true # true or false - level: info # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/config/nrfcfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/nrfcfg.yaml deleted file mode 100644 index 649f23b..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/nrfcfg.yaml +++ /dev/null @@ -1,33 +0,0 @@ -info: - version: 1.0.2 - description: NRF initial local configuration - -configuration: - MongoDBName: free5gc # database name in MongoDB - MongoDBUrl: mongodb://db:27017 # a valid URL of the mongodb - sbi: # Service-based interface information - scheme: http # the protocol for sbi (http or https) - registerIPv4: nrf.free5gc.org # IP used to serve NFs or register to another NRF - bindingIPv4: nrf.free5gc.org # IP used to bind the service - port: 8000 # port used to bind the service - oauth: false - DefaultPlmnId: - mcc: 208 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - serviceNameList: # the SBI services provided by this NRF, refer to TS 29.510 - - nnrf-nfm # Nnrf_NFManagement service - - nnrf-disc # Nnrf_NFDiscovery service - - # Metrics configuration - # If using the same bindingIPv4 as the sbi server, make sure that the ports are different - metrics: - enable: false # (Optional, default false) - scheme: http # (Required) the protocol for metrics (http or https, default https) - bindingIPv4: nrf.free5gc.org # (Required) IP used to bind the metrics endpoint (default 0.0.0.0) - port: 9091 # (Optional, default 9091) port used to bind the service - namespace: free5gc # (Optional, default free5gc) - -logger: # log output setting - enable: true # true or false - level: info # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/config/nssfcfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/nssfcfg.yaml deleted file mode 100644 index ee1dc14..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/nssfcfg.yaml +++ /dev/null @@ -1,358 +0,0 @@ -info: - version: 1.0.2 - description: NSSF initial local configuration - -configuration: - nssfName: NSSF # the name of this NSSF - sbi: # Service-based interface information - scheme: http # the protocol for sbi (http or https) - registerIPv4: nssf.free5gc.org # IP used to register to NRF - bindingIPv4: nssf.free5gc.org # IP used to bind the service - port: 8000 # Port used to bind the service - serviceNameList: # the SBI services provided by this SMF, refer to TS 29.531 - - nnssf-nsselection # Nnssf_NSSelection service - - nnssf-nssaiavailability # Nnssf_NSSAIAvailability service - nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF - supportedPlmnList: # the PLMNs (Public land mobile network) list supported by this NSSF - - mcc: 208 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - supportedNssaiInPlmnList: # Supported S-NSSAI List for each PLMN - - plmnId: # Public Land Mobile Network ID, = - mcc: 208 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - supportedSnssaiList: # Supported S-NSSAIs of the PLMN - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 010203 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000003 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - nsiList: # List of available Network Slice Instance (NSI) - - snssai: # S-NSSAI of this NSI - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - nsiInformationList: # Information list of this NSI - # the NRF to be used to select the NFs/services within the selected NSI, and an optonal ID - - nrfId: http://nrf.free5gc.org:8000/nnrf-nfm/v1/nf-instances - nsiId: 10 - - snssai: # S-NSSAI of this NSI - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - nsiInformationList: # Information list of this NSI - # the NRF to be used to select the NFs/services within the selected NSI, and an optonal ID - - nrfId: http://nrf.free5gc.org:8000/nnrf-nfm/v1/nf-instances - nsiId: 11 - - snssai: # S-NSSAI of this NSI - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - nsiInformationList: # Information list of this NSI - # the NRF to be used to select the NFs/services within the selected NSI, and an optonal ID - - nrfId: http://nrf.free5gc.org:8000/nnrf-nfm/v1/nf-instances - nsiId: 12 - - nrfId: http://nrf.free5gc.org:8000/nnrf-nfm/v1/nf-instances - nsiId: 12 - - snssai: # S-NSSAI of this NSI - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000003 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - nsiInformationList: # Information list of this NSI - # the NRF to be used to select the NFs/services within the selected NSI, and an optonal ID - - nrfId: http://nrf.free5gc.org:8000/nnrf-nfm/v1/nf-instances - nsiId: 13 - - snssai: # S-NSSAI of this NSI - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - nsiInformationList: # Information list of this NSI - # the NRF to be used to select the NFs/services within the selected NSI, and an optonal ID - - nrfId: http://nrf.free5gc.org:8000/nnrf-nfm/v1/nf-instances - nsiId: 20 - - snssai: # S-NSSAI of this NSI - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - nsiInformationList: # Information list of this NSI - # the NRF to be used to select the NFs/services within the selected NSI, and an optonal ID - - nrfId: http://nrf.free5gc.org:8000/nnrf-nfm/v1/nf-instances - nsiId: 21 - - snssai: # S-NSSAI of this NSI - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 010203 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - nsiInformationList: # Information list of this NSI - # the NRF to be used to select the NFs/services within the selected NSI, and an optonal ID - - nrfId: http://nrf.free5gc.org:8000/nnrf-nfm/v1/nf-instances - nsiId: 22 - - snssai: # S-NSSAI of this NSI - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - nsiInformationList: # Information list of this NSI - # the NRF to be used to select the NFs/services within the selected NSI, and an optonal ID - - nrfId: http://nrf.free5gc.org:8000/nnrf-nfm/v1/nf-instances - nsiId: 23 - amfSetList: # List of AMF Sets that my be assigned by this NSSF - - amfSetId: 1 # the AMF Set identifier - amfList: # Instance ID of the AMFs in this set - - ffa2e8d7-3275-49c7-8631-6af1df1d9d26 - - 0e8831c3-6286-4689-ab27-1e2161e15cb1 - - a1fba9ba-2e39-4e22-9c74-f749da571d0d - # URI of the NRF used to determine the list of candidate AMF(s) from the AMF Set - nrfAmfSet: http://nrf.free5gc.org:8000/nnrf-nfm/v1/nf-instances - # the Nssai availability data information per TA supported by the AMF - supportedNssaiAvailabilityData: - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33456 # Tracking Area Code (uinteger, range: 0~16777215) - supportedSnssaiList: # Supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33457 # Tracking Area Code (uinteger, range: 0~16777215) - supportedSnssaiList: # Supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - amfSetId: 2 # the AMF Set identifier - # URI of the NRF used to determine the list of candidate AMF(s) from the AMF Set - nrfAmfSet: http://nrf.free5gc.org:8084/nnrf-nfm/v1/nf-instances - # the Nssai availability data information per TA supported by the AMF - supportedNssaiAvailabilityData: - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33456 # Tracking Area Code (uinteger, range: 0~16777215) - supportedSnssaiList: # Supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000003 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33458 # Tracking Area Code (uinteger, range: 0~16777215) - supportedSnssaiList: # Supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - amfList: # List of AMFs that may be assigned by this NSSF - - nfId: 469de254-2fe5-4ca0-8381-af3f500af77c # ID of this AMF - # The NSSAI availability data information per TA supported by the AMF - supportedNssaiAvailabilityData: - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33456 # Tracking Area Code (uinteger, range: 0~16777215) - supportedSnssaiList: # Supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33457 # Tracking Area Code (uinteger, range: 0~16777215) - supportedSnssaiList: # Supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - nfId: fbe604a8-27b2-417e-bd7c-8a7be2691f8d # ID of this AMF - # The NSSAI availability data information per TA supported by the AMF - supportedNssaiAvailabilityData: - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33458 # Tracking Area Code (uinteger, range: 0~16777215) - supportedSnssaiList: # Supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000003 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33459 # Tracking Area Code (uinteger, range: 0~16777215) - supportedSnssaiList: # Supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - nfId: b9e6e2cb-5ce8-4cb6-9173-a266dd9a2f0c # ID of this AMF - # The NSSAI availability data information per TA supported by the AMF - supportedNssaiAvailabilityData: - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33456 # Tracking Area Code (uinteger, range: 0~16777215) - supportedSnssaiList: # Supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33458 # Tracking Area Code (uinteger, range: 0~16777215) - supportedSnssaiList: # Supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - taList: # List of supported tracking area and their related information of this NSSF instance - - tai: # Tracking Area Identity - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33456 # Tracking Area Code (uinteger, range: 0~16777215) - accessType: 3GPP_ACCESS # Access type of the tracking area - supportedSnssaiList: # List of supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - - tai: # Tracking Area Identity - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33457 # Tracking Area Code (uinteger, range: 0~16777215) - accessType: 3GPP_ACCESS # Access type of the tracking area - supportedSnssaiList: # List of supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33458 # Tracking Area Code (uinteger, range: 0~16777215) - accessType: 3GPP_ACCESS # Access type of the tracking area - supportedSnssaiList: # List of supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000003 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - restrictedSnssaiList: # List of restricted S-NSSAIs of the tracking area - - homePlmnId: # Home PLMN identifier - mcc: 310 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 560 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - sNssaiList: # the S-NSSAIs List - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000003 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - tai: # Tracking Area Identifier - plmnId: # Public Land Mobile Network ID, = - mcc: 466 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 92 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - tac: 33459 # Tracking Area Code (uinteger, range: 0~16777215) - accessType: 3GPP_ACCESS # Access type of the tracking area - supportedSnssaiList: # List of supported S-NSSAIs of the tracking area - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - restrictedSnssaiList: # List of restricted S-NSSAIs of the tracking area - - homePlmnId: # Home PLMN identifier - mcc: 310 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 560 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - sNssaiList: # the S-NSSAIs List - - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - # List of mappings of S-NSSAI in the serving network and the value of the home network - mappingListFromPlmn: - - operatorName: NTT Docomo # Home PLMN name - homePlmnId: # Home PLMN identifier - mcc: 440 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 10 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - mappingOfSnssai: # List of S-NSSAIs mapping - - servingSnssai: # S-NSSAI in the serving network - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - homeSnssai: # S-NSSAI in the home network - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 1 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - servingSnssai: # S-NSSAI in the serving network - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - homeSnssai: # S-NSSAI in the home network - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000003 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - servingSnssai: # S-NSSAI in the serving network - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000003 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - homeSnssai: # S-NSSAI in the home network - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000004 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - servingSnssai: # S-NSSAI in the serving network - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - homeSnssai: # S-NSSAI in the home network - sst: 2 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - operatorName: AT&T Mobility # Home PLMN name - homePlmnId: # Home PLMN identifier - mcc: 310 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 560 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - mappingOfSnssai: - - servingSnssai: # S-NSSAI in the serving network - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000001 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - homeSnssai: # S-NSSAI in the home network - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - servingSnssai: # S-NSSAI in the serving network - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000002 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - homeSnssai: # S-NSSAI in the home network - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 000003 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - - # Metrics configuration - # If using the same bindingIPv4 as the sbi server, make sure that the ports are different - metrics: - enable: false # (Optional, default false) - scheme: http # (Required) the protocol for metrics (http or https, default https) - bindingIPv4: nssf.free5gc.org # (Required) IP used to bind the metrics endpoint (default 0.0.0.0) - port: 9091 # (Optional, default 9091) port used to bind the service - namespace: free5gc # (Optional, default free5gc) - -logger: # log output setting - enable: true # true or false - level: info # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/config/pcfcfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/pcfcfg.yaml deleted file mode 100644 index 1bc841b..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/pcfcfg.yaml +++ /dev/null @@ -1,41 +0,0 @@ -info: - version: 1.0.2 - description: PCF initial local configuration - -configuration: - pcfName: PCF # the name of this PCF - sbi: # Service-based interface information - scheme: http # the protocol for sbi (http or https) - registerIPv4: pcf.free5gc.org # IP used to register to NRF - bindingIPv4: pcf.free5gc.org # IP used to bind the service - port: 8000 # port used to bind the service - timeFormat: 2019-01-02 15:04:05 # time format of this PCF - defaultBdtRefId: BdtPolicyId- # BDT Reference ID, indicating transfer policies of background data transfer. - nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF - serviceList: # the SBI services provided by this PCF, refer to TS 29.507 - - serviceName: npcf-am-policy-control # Npcf_AMPolicyControl service - - serviceName: npcf-smpolicycontrol # Npcf_SMPolicyControl service - suppFeat: 3fff # the features supported by Npcf_SMPolicyControl, name defined in TS 29.512 5.8-1, value defined in TS 29.571 5.2.2 - - serviceName: npcf-bdtpolicycontrol # Npcf_BDTPolicyControl service - - serviceName: npcf-policyauthorization # Npcf_PolicyAuthorization service - suppFeat: 3 # the features supported by Npcf_PolicyAuthorization, name defined in TS 29.514 5.8-1, value defined in TS 29.571 5.2.2 - - serviceName: npcf-eventexposure # Npcf_EventExposure service - - serviceName: npcf-ue-policy-control # Npcf_UEPolicyControl service - mongodb: # the mongodb connected by this PCF - name: free5gc # name of the mongodb - url: mongodb://db:27017 # a valid URL of the mongodb - locality: area1 # Name of the location where a set of AMF, SMF, PCF and UPFs are located - - # Metrics configuration - # If using the same bindingIPv4 as the sbi server, make sure that the ports are different - metrics: - enable: false # (Optional, default false) - scheme: http # (Required) the protocol for metrics (http or https, default https) - bindingIPv4: pcf.free5gc.org # (Required) IP used to bind the metrics endpoint (default 0.0.0.0) - port: 9091 # (Optional, default 9091) port used to bind the service - namespace: free5gc # (Optional, default free5gc) - -logger: # log output setting - enable: true # true or false - level: trace # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/config/smfcfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/smfcfg.yaml deleted file mode 100644 index 4837ab3..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/smfcfg.yaml +++ /dev/null @@ -1,105 +0,0 @@ -info: - version: 1.0.7 - description: SMF initial local configuration - -configuration: - smfName: SMF # the name of this SMF - sbi: # Service-based interface information - scheme: http # the protocol for sbi (http or https) - registerIPv4: smf.free5gc.org # IP used to register to NRF - bindingIPv4: smf.free5gc.org # IP used to bind the service - port: 8000 # Port used to bind the service - serviceNameList: # the SBI services provided by this SMF, refer to TS 29.502 - - nsmf-pdusession # Nsmf_PDUSession service - - nsmf-event-exposure # Nsmf_EventExposure service - - nsmf-oam # OAM service - snssaiInfos: # the S-NSSAI (Single Network Slice Selection Assistance Information) list supported by this AMF - - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information) - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 010203 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - dnnInfos: # DNN information list - - dnn: internet # Data Network Name - dns: # the IP address of DNS - ipv4: 8.8.8.8 - ipv6: 2001:4860:4860::8888 - - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information) - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - dnnInfos: # DNN information list - - dnn: internet # Data Network Name - dns: # the IP address of DNS - ipv4: 8.8.8.8 - ipv6: 2001:4860:4860::8888 - plmnList: # the list of PLMN IDs that this SMF belongs to (optional, remove this key when unnecessary) - - mcc: 208 # Mobile Country Code (3 digits string, digit: 0~9) - mnc: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) - locality: area1 # Name of the location where a set of AMF, SMF, PCF and UPFs are located - pfcp: # the IP address of N4 interface on this SMF (PFCP) - # addr config is deprecated in smf config v1.0.3, please use the following config - nodeID: smf.free5gc.org # the Node ID of this SMF - listenAddr: smf.free5gc.org # the IP/FQDN of N4 interface on this SMF (PFCP) - externalAddr: smf.free5gc.org # the IP/FQDN of N4 interface on this SMF (PFCP) - userplaneInformation: # list of userplane information - upNodes: # information of userplane node (AN or UPF) - gNB1: # the name of the node - type: AN # the type of the node (AN or UPF) - UPF: # the name of the node - type: UPF # the type of the node (AN or UPF) - nodeID: 192.168.70.129 # the Node ID of this UPF - addr: 192.168.70.129 # the IP/FQDN of N4 interface on this UPF (PFCP) - sNssaiUpfInfos: # S-NSSAI information list for this UPF - - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information) - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 010203 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - dnnUpfInfoList: # DNN information list for this S-NSSAI - - dnn: internet - pools: - - cidr: 10.0.0.0/16 - staticPools: - - cidr: 10.0.100.0/24 - - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information) - sst: 1 # Slice/Service Type (uinteger, range: 0~255) - sd: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - dnnUpfInfoList: # DNN information list for this S-NSSAI - - dnn: internet - pools: - - cidr: 10.1.0.0/16 - staticPools: - - cidr: 10.1.100.0/24 - interfaces: # Interface list for this UPF - - interfaceType: N3 # the type of the interface (N3 or N9) - endpoints: # the IP address of this N3/N9 interface on this UPF - - 192.168.71.129 - networkInstances: # Data Network Name (DNN) - - internet - links: # the topology graph of userplane, A and B represent the two nodes of each link - - A: gNB1 - B: UPF - # retransmission timer for pdu session modification command - t3591: - enable: true # true or false - expireTime: 16s # default is 6 seconds - maxRetryTimes: 3 # the max number of retransmission - # retransmission timer for pdu session release command - t3592: - enable: true # true or false - expireTime: 16s # default is 6 seconds - maxRetryTimes: 3 # the max number of retransmission - nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF - urrPeriod: 10 # default usage report period in seconds - urrThreshold: 1000 # default usage report threshold in bytes - requestedUnit: 1000 - - # Metrics configuration - # If using the same bindingIPv4 as the sbi server, make sure that the ports are different - metrics: - enable: false # (Optional, default false) - scheme: http # (Required) the protocol for metrics (http or https, default https) - bindingIPv4: smf.free5gc.org # (Required) IP used to bind the metrics endpoint (default 0.0.0.0) - port: 9091 # (Optional, default 9091) port used to bind the service - namespace: free5gc # (Optional, default free5gc) - -logger: # log output setting - enable: true # true or false - level: trace # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/config/udmcfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/udmcfg.yaml deleted file mode 100644 index c7cd22b..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/udmcfg.yaml +++ /dev/null @@ -1,40 +0,0 @@ -info: - version: 1.0.3 - description: UDM initial local configuration - -configuration: - serviceNameList: # the SBI services provided by this UDM, refer to TS 29.503 - - nudm-sdm # Nudm_SubscriberDataManagement service - - nudm-uecm # Nudm_UEContextManagement service - - nudm-ueau # Nudm_UEAuthenticationManagement service - - nudm-ee # Nudm_EventExposureManagement service - - nudm-pp # Nudm_ParameterProvisionDataManagement service - sbi: # Service-based interface information - scheme: http # the protocol for sbi (http or https) - registerIPv4: udm.free5gc.org # IP used to register to NRF - bindingIPv4: udm.free5gc.org # IP used to bind the service - port: 8000 # Port used to bind the service - nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF - - # test data set from TS33501-f60 Annex C.4 - SuciProfile: # Home Network Public Key ID = slice index +1 - - ProtectionScheme: 1 # Protect Scheme: Profile A - PrivateKey: c53c22208b61860b06c62e5406a7b330c2b577aa5558981510d128247d38bd1d - PublicKey: 5a8d38864820197c3394b92613b20b91633cbd897119273bf8e4a6f4eec0a650 - - ProtectionScheme: 2 # Protect Scheme: Profile B - PrivateKey: F1AB1074477EBCC7F554EA1C5FC368B1616730155E0041AC447D6301975FECDA - PublicKey: 0472DA71976234CE833A6907425867B82E074D44EF907DFB4B3E21C1C2256EBCD15A7DED52FCBB097A4ED250E036C7B9C8C7004C4EEDC4F068CD7BF8D3F900E3B4 - - # Metrics configuration - # If using the same bindingIPv4 as the sbi server, make sure that the ports are different - metrics: - enable: false # (Optional, default false) - scheme: http # (Required) the protocol for metrics (http or https, default https) - bindingIPv4: udm.free5gc.org # (Required) IP used to bind the metrics endpoint (default 0.0.0.0) - port: 9091 # (Optional, default 9091) port used to bind the service - namespace: free5gc # (Optional, default free5gc) - -logger: # log output setting - enable: true # true or false - level: info # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/config/udrcfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/udrcfg.yaml deleted file mode 100644 index 51827e9..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/udrcfg.yaml +++ /dev/null @@ -1,29 +0,0 @@ -info: - version: 1.1.0 - description: UDR initial local configuration - -configuration: - sbi: # Service-based interface information - scheme: http # the protocol for sbi (http or https) - registerIPv4: udr.free5gc.org # IP used to register to NRF - bindingIPv4: udr.free5gc.org # IP used to bind the service - port: 8000 # port used to bind the service - dbConnectorType: mongodb - mongodb: - name: free5gc # Database name in MongoDB - url: mongodb://db:27017 # URL of MongoDB - nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF - - # Metrics Configuration - # If using the same bindingIPv4 as the sbi server, make sure that the ports are different - metrics: - enable: false # (Optional, default false) - scheme: http # (Required) the protocol for metrics (http or https, default https) - bindingIPv4: udr.free5gc.org # (Required) IP used to bind the metrics endpoint (default 0.0.0.0) - port: 9091 # (Optional, default 9091) port used to bind the service - namespace: free5gc # (Optional, default free5gc) - -logger: # log output setting - enable: true # true or false - level: info # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/config/uerouting.yaml b/demo_containerized/free5gc_setup/free5gc/config/uerouting.yaml deleted file mode 100644 index b04f52a..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/uerouting.yaml +++ /dev/null @@ -1,48 +0,0 @@ -info: - version: 1.0.7 - description: Routing information for UE - -ueRoutingInfo: # the list of UE routing information - UE1: # Group Name - members: - - imsi-208930000000001 # Subscription Permanent Identifier of the UE - - imsi-208930000007487 # Subscription Permanent Identifier of the UE - topology: # Network topology for this group (Uplink: A->B, Downlink: B->A) - # default path derived from this topology - # node name should be consistent with smfcfg.yaml - - A: gNB1 - B: I-UPF - - A: I-UPF - B: PSA-UPF - specificPath: - - dest: 10.0.0.103/32 # the destination IP address on Data Network (DN) - # the order of UPF nodes in this path. We use the UPF's name to represent each UPF node. - # The UPF's name should be consistent with smfcfg.yaml - path: [I-UPF] - - UE2: # Group Name - members: - - imsi-208930000007486 # Subscription Permanent Identifier of the UE - topology: # Network topology for this group (Uplink: A->B, Downlink: B->A) - # default path derived from this topology - # node name should be consistent with smfcfg.yaml - - A: gNB1 - B: BranchingUPF - - A: BranchingUPF - B: AnchorUPF1 - specificPath: - - dest: 10.0.0.11/32 # the destination IP address on Data Network (DN) - # the order of UPF nodes in this path. We use the UPF's name to represent each UPF node. - # The UPF's name should be consistent with smfcfg.yaml - path: [BranchingUPF, AnchorUPF2] - -routeProfile: # Maintains the mapping between RouteProfileID and ForwardingPolicyID of UPF - MEC1: # Route Profile identifier - forwardingPolicyID: 10 # Forwarding Policy ID of the route profile - -pfdDataForApp: # PFDs for an Application - - applicationId: edge # Application identifier - pfds: # PFDs for the Application - - pfdID: pfd1 # PFD identifier - flowDescriptions: # Represents a 3-tuple with protocol, server ip and server port for UL/DL application traffic - - permit out ip from 10.0.0.1 8080 to any diff --git a/demo_containerized/free5gc_setup/free5gc/config/webuicfg.yaml b/demo_containerized/free5gc_setup/free5gc/config/webuicfg.yaml deleted file mode 100644 index 383d34f..0000000 --- a/demo_containerized/free5gc_setup/free5gc/config/webuicfg.yaml +++ /dev/null @@ -1,30 +0,0 @@ -info: - version: 1.0.3 - description: WebUI initial local configuration - -configuration: - mongodb: # the mongodb connected by this webui - name: free5gc # name of the mongodb - url: mongodb://db:27017 # a valid URL of the mongodb - nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF - webServer: - scheme: http - ipv4Address: 0.0.0.0 - port: 5000 - billingServer: - enable: true - hostIPv4: webui - listenPort: 2121 - portRange: # passive port range - start: 2123 - end: 2130 - basePath: /tmp/webconsole - port: 2122 - tls: - pem: cert/chf.pem - key: cert/chf.key - -logger: # log output setting - enable: true # true or false - level: info # how detailed to output, value: trace, debug, info, warn, error, fatal, panic - reportCaller: false # enable the caller report or not, value: true or false diff --git a/demo_containerized/free5gc_setup/free5gc/dump/admin/system.version.bson b/demo_containerized/free5gc_setup/free5gc/dump/admin/system.version.bson deleted file mode 100644 index df4849a..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/admin/system.version.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/admin/system.version.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/admin/system.version.metadata.json deleted file mode 100644 index 40cd0e8..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/admin/system.version.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"116d2dd5872748a39cb9275abcb22d64","collectionName":"system.version","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/NfProfile.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/NfProfile.bson deleted file mode 100644 index 41de2ef..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/NfProfile.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/NfProfile.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/NfProfile.metadata.json deleted file mode 100644 index d7c9b16..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/NfProfile.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"9851be75e1f843338a237a571f423ac8","collectionName":"NfProfile","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.amData.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.amData.bson deleted file mode 100644 index 5f2a389..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.amData.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.amData.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.amData.metadata.json deleted file mode 100644 index b995da9..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.amData.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"a3c18e2378304db8b571d49c953c5a4f","collectionName":"policyData.ues.amData","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.chargingData.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.chargingData.bson deleted file mode 100644 index 486c41b..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.chargingData.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.chargingData.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.chargingData.metadata.json deleted file mode 100644 index 70073fb..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.chargingData.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"64cd40d36b5649238e1f2dc6aa708188","collectionName":"policyData.ues.chargingData","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.flowRule.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.flowRule.bson deleted file mode 100644 index e69de29..0000000 diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.flowRule.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.flowRule.metadata.json deleted file mode 100644 index c33f186..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.flowRule.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"58f0ce1843d1437f9e20ed5d69a0ae8d","collectionName":"policyData.ues.flowRule","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.qosFlow.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.qosFlow.bson deleted file mode 100644 index e69de29..0000000 diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.qosFlow.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.qosFlow.metadata.json deleted file mode 100644 index 8c8f944..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.qosFlow.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"44fb546b8c54426dbb207a0f8ba09b9e","collectionName":"policyData.ues.qosFlow","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.smData.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.smData.bson deleted file mode 100644 index ef27a25..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.smData.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.smData.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.smData.metadata.json deleted file mode 100644 index 2c024b7..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/policyData.ues.smData.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"0c9960fab60a49c293442a77ee25e846","collectionName":"policyData.ues.smData","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.authenticationSubscription.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.authenticationSubscription.bson deleted file mode 100644 index 3ba2e81..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.authenticationSubscription.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.authenticationSubscription.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.authenticationSubscription.metadata.json deleted file mode 100644 index 605e358..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.authenticationSubscription.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"bb2c89455c1141c89473494b737de951","collectionName":"subscriptionData.authenticationData.authenticationSubscription","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.webAuthenticationSubscription.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.webAuthenticationSubscription.bson deleted file mode 100644 index b02aea5..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.webAuthenticationSubscription.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.webAuthenticationSubscription.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.webAuthenticationSubscription.metadata.json deleted file mode 100644 index 7913dce..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.authenticationData.webAuthenticationSubscription.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"21b50689cc864d17a482d65323c8be8d","collectionName":"subscriptionData.authenticationData.webAuthenticationSubscription","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.identityData.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.identityData.bson deleted file mode 100644 index f8635bf..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.identityData.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.identityData.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.identityData.metadata.json deleted file mode 100644 index 68525f0..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.identityData.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"f406bc29302d47b4a646bcee24d511c0","collectionName":"subscriptionData.identityData","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.amData.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.amData.bson deleted file mode 100644 index d0880b5..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.amData.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.amData.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.amData.metadata.json deleted file mode 100644 index 635e960..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.amData.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"e94d4a8e3813418b8821841c782f28e7","collectionName":"subscriptionData.provisionedData.amData","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smData.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smData.bson deleted file mode 100644 index cec4dd9..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smData.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smData.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smData.metadata.json deleted file mode 100644 index 656312f..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smData.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"31c03cc4f5d54e92a35cffcdff65eea0","collectionName":"subscriptionData.provisionedData.smData","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smfSelectionSubscriptionData.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smfSelectionSubscriptionData.bson deleted file mode 100644 index 68be7d6..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smfSelectionSubscriptionData.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smfSelectionSubscriptionData.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smfSelectionSubscriptionData.metadata.json deleted file mode 100644 index 7e91bad..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/subscriptionData.provisionedData.smfSelectionSubscriptionData.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"db898630db85438885ca4f23b25988cd","collectionName":"subscriptionData.provisionedData.smfSelectionSubscriptionData","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/tenantData.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/tenantData.bson deleted file mode 100644 index 0ec4f34..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/tenantData.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/tenantData.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/tenantData.metadata.json deleted file mode 100644 index cc77351..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/tenantData.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"23e0684d7e9548448fb786b36feb1d30","collectionName":"tenantData","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/urilist.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/urilist.bson deleted file mode 100644 index eb99680..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/urilist.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/urilist.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/urilist.metadata.json deleted file mode 100644 index 0480f02..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/urilist.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"efa18a790b7e4e9294a08ec55712554b","collectionName":"urilist","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/userData.bson b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/userData.bson deleted file mode 100644 index b6f9fd6..0000000 Binary files a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/userData.bson and /dev/null differ diff --git a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/userData.metadata.json b/demo_containerized/free5gc_setup/free5gc/dump/free5gc/userData.metadata.json deleted file mode 100644 index 8ad4b10..0000000 --- a/demo_containerized/free5gc_setup/free5gc/dump/free5gc/userData.metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"indexes":[{"v":{"$numberInt":"2"},"key":{"_id":{"$numberInt":"1"}},"name":"_id_"}],"uuid":"2f98f69bf0fd44a5bcae2a58c9eb1ccc","collectionName":"userData","type":"collection"} \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/free5gc/mongorestore.sh b/demo_containerized/free5gc_setup/free5gc/mongorestore.sh deleted file mode 100755 index 4838f6b..0000000 --- a/demo_containerized/free5gc_setup/free5gc/mongorestore.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -mongorestore /data/dump \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/oai/UE_config.yaml b/demo_containerized/free5gc_setup/oai/UE_config.yaml deleted file mode 100644 index 6d4210b..0000000 --- a/demo_containerized/free5gc_setup/oai/UE_config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -uicc0: - dnn: internet - imsi: 208930000000001 - key: 8baf473f2f8fd09487cccbd7097c6862 - nssai_sd: 66051 - nssai_sst: 1 - opc: 8e27b6af0e692e750f32667a3b14605d \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/oai/gNB_config.yaml b/demo_containerized/free5gc_setup/oai/gNB_config.yaml deleted file mode 100644 index 4ab5140..0000000 --- a/demo_containerized/free5gc_setup/oai/gNB_config.yaml +++ /dev/null @@ -1,120 +0,0 @@ -Active_gNBs: -- gnb-rfsim -Asn1_verbosity: none -L1s: -- num_cc: 1 - prach_dtx_threshold: 200 - tr_n_preference: local_mac -MACRLCs: -- num_cc: 1 - pucch_TargetSNRx10: 200 - pusch_TargetSNRx10: 200 - tr_n_preference: local_RRC - tr_s_preference: local_L1 -RUs: -- att_rx: 0 - att_tx: 0 - bands: - - 78 - eNB_instances: - - 0 - local_rf: 'yes' - max_pdschReferenceSignalPower: -27 - max_rxgain: 75 - nb_rx: 1 - nb_tx: 1 - sdr_addrs: serial=XXXXXXX - sf_extension: 0 -gNBs: -- NETWORK_INTERFACES: - GNB_IPV4_ADDRESS_FOR_NG_AMF: 192.168.70.160 - GNB_IPV4_ADDRESS_FOR_NGU: 192.168.71.160 - GNB_PORT_FOR_S1U: 2152 - SCTP: - SCTP_INSTREAMS: 2 - SCTP_OUTSTREAMS: 2 - amf_ip_address: - - ipv4: 192.168.70.132 - gNB_ID: 3584 - gNB_name: gnb-rfsim - min_rxtxtime: 6 - nr_cellid: 16 - plmn_list: - - mcc: 208 - mnc: 93 - mnc_length: 2 - snssaiList: - - sd: 66051 - sst: 1 - - sd: 1122867 - sst: 1 - servingCellConfigCommon: - - absoluteFrequencySSB: 621312 - dl_UL_TransmissionPeriodicity: 6 - dl_absoluteFrequencyPointA: 620040 - dl_carrierBandwidth: 106 - dl_offstToCarrier: 0 - dl_subcarrierSpacing: 1 - dmrs_TypeA_Position: 0 - hoppingId: 40 - initialDLBWPcontrolResourceSetZero: 11 - initialDLBWPlocationAndBandwidth: 28875 - initialDLBWPsearchSpaceZero: 0 - initialDLBWPsubcarrierSpacing: 1 - initialULBWPlocationAndBandwidth: 28875 - initialULBWPsubcarrierSpacing: 1 - msg1_SubcarrierSpacing: 1 - msg3_DeltaPreamble: 1 - nrofDownlinkSlots: 7 - nrofDownlinkSymbols: 6 - nrofUplinkSlots: 2 - nrofUplinkSymbols: 4 - p0_NominalWithGrant: -90 - p0_nominal: -90 - pMax: 20 - physCellId: 0 - powerRampingStep: 1 - prach_ConfigurationIndex: 98 - prach_RootSequenceIndex: 1 - prach_RootSequenceIndex_PR: 2 - prach_msg1_FDM: 0 - prach_msg1_FrequencyStart: 0 - preambleReceivedTargetPower: -104 - preambleTransMax: 6 - pucchGroupHopping: 0 - ra_ContentionResolutionTimer: 7 - referenceSubcarrierSpacing: 1 - restrictedSetConfig: 0 - rsrp_ThresholdSSB: 19 - ssPBCH_BlockPower: -25 - ssb_PositionsInBurst_Bitmap: 1 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB: 15 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4 - ssb_periodicityServingCell: 2 - subcarrierSpacing: 1 - ul_carrierBandwidth: 106 - ul_frequencyBand: 78 - ul_offstToCarrier: 0 - ul_subcarrierSpacing: 1 - zeroCorrelationZoneConfig: 12 - tracking_area_code: 1 -log_config: - f1ap_log_level: debug - global_log_level: info - hw_log_level: info - mac_log_level: info - ngap_log_level: debug - pdcp_log_level: info - phy_log_level: info - rlc_log_level: info - rrc_log_level: info -rfsimulator: - serveraddr: server -security: - ciphering_algorithms: - - nea0 - drb_ciphering: 'yes' - drb_integrity: 'no' - integrity_algorithms: - - nia2 - - nia0 diff --git a/demo_containerized/free5gc_setup/oai/oai_upf_config.yaml b/demo_containerized/free5gc_setup/oai/oai_upf_config.yaml deleted file mode 100644 index 11d8a2b..0000000 --- a/demo_containerized/free5gc_setup/oai/oai_upf_config.yaml +++ /dev/null @@ -1,135 +0,0 @@ -################################################################################ -# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The OpenAirInterface Software Alliance licenses this file to You under -# the OAI Public License, Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.openairinterface.org/?page_id=698 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#------------------------------------------------------------------------------- -# For more information about the OpenAirInterface (OAI) Software Alliance: -# contact@openairinterface.org -################################################################################ - -# OAI CN Configuration File -### This file can be used by all OAI NFs -### Some fields are specific to an NF and will be ignored by other NFs - -## NOTE ON YAML ANCHORS ## -# We use YAML anchors to ease the configuration and to avoid duplicating parts of the configuration. -# This is especially true for the SNSSAIs, as we have to define them for multiple NFs. -# Please note that the use of anchors is not mandatory, and you can define the SNSSAI in each NF yourself. -# You can read more about anchors here: https://yaml.org/spec/1.2.2/#anchors-and-aliases - -############# Common configuration - -# Log level for all the NFs -log_level: - general: debug - -# If you enable registration, the other NFs will use the NRF discovery mechanism -register_nf: - general: yes - -http_version: 2 - -############## SBI Interfaces -### Each NF takes its local SBI interfaces and remote interfaces from here, unless it gets them using NRF discovery mechanisms -nfs: - smf: - host: smf.free5gc.org - sbi: - port: 8000 - api_version: v1 - interface_name: eth0 - n4: - interface_name: eth0 - port: 8805 - upf: - host: oai-upf - sbi: - port: 8080 - api_version: v1 - interface_name: phine-net - n3: - interface_name: demo-n3 - port: 2152 - n4: - interface_name: phine-net - port: 8805 - n6: - interface_name: demo-n6 - n9: - interface_name: demo-n9 - port: 2152 - nrf: - host: 192.168.70.130 - sbi: - port: 8000 - api_version: v1 - interface_name: eth0 - -## general single_nssai configuration -## Defines YAML anchors, which are reused in the config file -snssais: - - &embb_slice1 - sst: 1 - - &embb_slice2 - sst: 1 - sd: 000001 # in hex - - &custom_slice - sst: 222 - sd: 00007B # in hex - - &free5gc_slice - sst: 1 - sd: 010203 # in hex - -############## NF-specific configuration -upf: - support_features: - enable_bpf_datapath: yes # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off - enable_qos: yes - remote_n6_gw: oai-ext-dn - upf_info: - sNssaiUpfInfoList: - - sNssai: *embb_slice1 - dnnUpfInfoList: - - dnn: "oai" - - sNssai: *embb_slice2 - dnnUpfInfoList: - - dnn: "oai.ipv4" - - sNssai: *custom_slice - dnnUpfInfoList: - - dnn: "default" - - sNssai: *free5gc_slice - dnnUpfInfoList: - - dnn: "internet" - -## DNN configuration -dnns: - - dnn: "oai" - pdu_session_type: "IPV4" - ipv4_subnet: "12.1.1.128/25" - - dnn: "oai.ipv4" - pdu_session_type: "IPV4" - ipv4_subnet: "12.1.1.64/26" - - dnn: "default" - pdu_session_type: "IPV4" - ipv4_subnet: "12.1.1.0/26" - - dnn: "ims" - pdu_session_type: "IPV4V6" - ipv4_subnet: "14.1.1.2/24" - - dnn: "internet" - pdu_session_type: "IPV4" - ipv4_subnet: "10.0.0.0/16" - - dnn: "internet" - pdu_session_type: "IPV4" - ipv4_subnet: "10.1.0.0/16" \ No newline at end of file diff --git a/demo_containerized/free5gc_setup/wait_for_core_network.sh b/demo_containerized/free5gc_setup/wait_for_core_network.sh deleted file mode 100755 index a090cfc..0000000 --- a/demo_containerized/free5gc_setup/wait_for_core_network.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# Wait for free5GC core network to be fully loaded -# MongoDB is the first service to come up and is a dependency for other services - -set -e - -TIMEOUT=${1:-300} # Default timeout: 5 minutes -INTERVAL=5 - -echo "Waiting for free5GC core network to be ready..." -echo "Checking mongodb container status..." - -elapsed=0 -while [ $elapsed -lt $TIMEOUT ]; do - # Check if mongodb container is running - mongo_status=$(docker inspect --format='{{.State.Running}}' mongodb 2>/dev/null || echo "false") - - if [ "$mongo_status" = "true" ]; then - echo "MongoDB container is running" - - # Check critical free5GC services - services=("nrf" "amf" "smf" "upf") - all_running=true - - for service in "${services[@]}"; do - if ! docker ps --format '{{.Names}}' | grep -q "^${service}$"; then - all_running=false - echo " Waiting for $service to start..." - break - fi - done - - if [ "$all_running" = true ]; then - echo "All critical free5GC services are running!" - # Give services a moment to fully initialize - sleep 10 - echo "free5GC core network is ready." - exit 0 - fi - fi - - sleep $INTERVAL - elapsed=$((elapsed + INTERVAL)) - echo " Elapsed: ${elapsed}s / ${TIMEOUT}s" -done - -echo "ERROR: Timeout waiting for free5GC core network to be ready." -exit 1 diff --git a/demo_containerized/images/simulation/Dockerfile b/demo_containerized/images/simulation/Dockerfile index 4205c87..0dccc85 100644 --- a/demo_containerized/images/simulation/Dockerfile +++ b/demo_containerized/images/simulation/Dockerfile @@ -66,10 +66,7 @@ WORKDIR /app COPY gazebo_launch gazebo_launch COPY nav_stack nav_stack COPY dds.xml dds.xml -COPY oai_setup oai_setup -COPY free5gc_setup free5gc_setup COPY images images -COPY open5gs_setup open5gs_setup # Build your workspace RUN /bin/bash -c "source /opt/ros/humble/setup.bash && \ cd /app/gazebo_launch && \ diff --git a/demo_containerized/images/simulation/free5gc_setup/docker-compose-gNB.yml b/demo_containerized/images/simulation/free5gc_setup/docker-compose-gNB.yml deleted file mode 100644 index 847e21f..0000000 --- a/demo_containerized/images/simulation/free5gc_setup/docker-compose-gNB.yml +++ /dev/null @@ -1,43 +0,0 @@ -services: - gNB: - image: oaisoftwarealliance/oai-gnb:2026.w04 - privileged: true - container_name : oai-gNB1 - environment: - USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time - ASAN_OPTIONS: detect_leaks=0 - ports: - - 2021:2021 - cap_add: - - SYS_NICE - cap_drop: - - ALL - volumes: - - ${DEMO_PROJECT_PATH}/free5gc_setup/oai/gNB_config.yaml:/opt/oai-gnb/etc/gnb.yaml - healthcheck: - test: /bin/bash -c "pgrep nr-softmodem" - interval: 10s - timeout: 5s - retries: 5 - networks: - public_net: - ipv4_address : 192.168.70.160 - n3_net: - ipv4_address : 192.168.71.160 - entrypoint: - - /bin/bash - - -c - - | - /opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.yaml -E --rfsim --log_config.global_log_options level,nocolor,time & - tail -f /dev/null - -networks: - public_net: - external: true - name : phine-net - n3_net: - external: true - name : demo-oai-n3-net - ros_gz_net: - external: - name : ros_gz_net diff --git a/demo_containerized/images/simulation/free5gc_setup/docker-compose-ue.yml b/demo_containerized/images/simulation/free5gc_setup/docker-compose-ue.yml deleted file mode 100644 index 9966b06..0000000 --- a/demo_containerized/images/simulation/free5gc_setup/docker-compose-ue.yml +++ /dev/null @@ -1,51 +0,0 @@ -services: - robot_1: - image: ue_amr - privileged: true - container_name: ${NAME_ROBOT_1} - environment: - USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - IGN_PARTITION: ${IGN_PARTITION} - networks: - public_net: - ipv4_address: ${IP_ROBOT_1} - ros_gz_net: - ipv4_address: 192.168.73.150 - volumes: - - ${DEMO_PROJECT_PATH}/free5gc_setup/oai/UE_config.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml - - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/robot_logic/install/setup.bash - export ROS_DISCOVERY_SERVER="${ROS_DISCOVERY_SERVER}" - export IGN_IP=192.168.73.150 - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.yaml -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} & - sleep 10 - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROS_GZ_BRIDGE_NAME_1} - ) & - if [ "${EXECUTE_ROBOT_LAUNCH_FILE_1}" = "true" ]; then - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROBOT_LAUNCH_FILE_NAME_1} - ) & - fi - tail -f /dev/null - - healthcheck: - test: /bin/bash -c "pgrep nr-uesoftmodem" - interval: 10s - timeout: 5s - retries: 5 - -networks: - public_net: - external: - name: phine-net - ros_gz_net: - external: - name: ros_gz_net diff --git a/demo_containerized/images/simulation/free5gc_setup/oai/UE_config.yaml b/demo_containerized/images/simulation/free5gc_setup/oai/UE_config.yaml deleted file mode 100644 index 6d4210b..0000000 --- a/demo_containerized/images/simulation/free5gc_setup/oai/UE_config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -uicc0: - dnn: internet - imsi: 208930000000001 - key: 8baf473f2f8fd09487cccbd7097c6862 - nssai_sd: 66051 - nssai_sst: 1 - opc: 8e27b6af0e692e750f32667a3b14605d \ No newline at end of file diff --git a/demo_containerized/images/simulation/free5gc_setup/oai/gNB_config.yaml b/demo_containerized/images/simulation/free5gc_setup/oai/gNB_config.yaml deleted file mode 100644 index 4ab5140..0000000 --- a/demo_containerized/images/simulation/free5gc_setup/oai/gNB_config.yaml +++ /dev/null @@ -1,120 +0,0 @@ -Active_gNBs: -- gnb-rfsim -Asn1_verbosity: none -L1s: -- num_cc: 1 - prach_dtx_threshold: 200 - tr_n_preference: local_mac -MACRLCs: -- num_cc: 1 - pucch_TargetSNRx10: 200 - pusch_TargetSNRx10: 200 - tr_n_preference: local_RRC - tr_s_preference: local_L1 -RUs: -- att_rx: 0 - att_tx: 0 - bands: - - 78 - eNB_instances: - - 0 - local_rf: 'yes' - max_pdschReferenceSignalPower: -27 - max_rxgain: 75 - nb_rx: 1 - nb_tx: 1 - sdr_addrs: serial=XXXXXXX - sf_extension: 0 -gNBs: -- NETWORK_INTERFACES: - GNB_IPV4_ADDRESS_FOR_NG_AMF: 192.168.70.160 - GNB_IPV4_ADDRESS_FOR_NGU: 192.168.71.160 - GNB_PORT_FOR_S1U: 2152 - SCTP: - SCTP_INSTREAMS: 2 - SCTP_OUTSTREAMS: 2 - amf_ip_address: - - ipv4: 192.168.70.132 - gNB_ID: 3584 - gNB_name: gnb-rfsim - min_rxtxtime: 6 - nr_cellid: 16 - plmn_list: - - mcc: 208 - mnc: 93 - mnc_length: 2 - snssaiList: - - sd: 66051 - sst: 1 - - sd: 1122867 - sst: 1 - servingCellConfigCommon: - - absoluteFrequencySSB: 621312 - dl_UL_TransmissionPeriodicity: 6 - dl_absoluteFrequencyPointA: 620040 - dl_carrierBandwidth: 106 - dl_offstToCarrier: 0 - dl_subcarrierSpacing: 1 - dmrs_TypeA_Position: 0 - hoppingId: 40 - initialDLBWPcontrolResourceSetZero: 11 - initialDLBWPlocationAndBandwidth: 28875 - initialDLBWPsearchSpaceZero: 0 - initialDLBWPsubcarrierSpacing: 1 - initialULBWPlocationAndBandwidth: 28875 - initialULBWPsubcarrierSpacing: 1 - msg1_SubcarrierSpacing: 1 - msg3_DeltaPreamble: 1 - nrofDownlinkSlots: 7 - nrofDownlinkSymbols: 6 - nrofUplinkSlots: 2 - nrofUplinkSymbols: 4 - p0_NominalWithGrant: -90 - p0_nominal: -90 - pMax: 20 - physCellId: 0 - powerRampingStep: 1 - prach_ConfigurationIndex: 98 - prach_RootSequenceIndex: 1 - prach_RootSequenceIndex_PR: 2 - prach_msg1_FDM: 0 - prach_msg1_FrequencyStart: 0 - preambleReceivedTargetPower: -104 - preambleTransMax: 6 - pucchGroupHopping: 0 - ra_ContentionResolutionTimer: 7 - referenceSubcarrierSpacing: 1 - restrictedSetConfig: 0 - rsrp_ThresholdSSB: 19 - ssPBCH_BlockPower: -25 - ssb_PositionsInBurst_Bitmap: 1 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB: 15 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4 - ssb_periodicityServingCell: 2 - subcarrierSpacing: 1 - ul_carrierBandwidth: 106 - ul_frequencyBand: 78 - ul_offstToCarrier: 0 - ul_subcarrierSpacing: 1 - zeroCorrelationZoneConfig: 12 - tracking_area_code: 1 -log_config: - f1ap_log_level: debug - global_log_level: info - hw_log_level: info - mac_log_level: info - ngap_log_level: debug - pdcp_log_level: info - phy_log_level: info - rlc_log_level: info - rrc_log_level: info -rfsimulator: - serveraddr: server -security: - ciphering_algorithms: - - nea0 - drb_ciphering: 'yes' - drb_integrity: 'no' - integrity_algorithms: - - nia2 - - nia0 diff --git a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libNetworkMonitor.so b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libNetworkMonitor.so old mode 100755 new mode 100644 index 669b704..3e2afd7 Binary files a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libNetworkMonitor.so and b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libNetworkMonitor.so differ diff --git a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libUePowerPlugin.so b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libUePowerPlugin.so old mode 100755 new mode 100644 index f616df7..60e0362 Binary files a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libUePowerPlugin.so and b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libUePowerPlugin.so differ diff --git a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libgNBPowerPlugin.so b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libgNBPowerPlugin.so old mode 100755 new mode 100644 index 5f0ab46..2ef93d1 Binary files a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libgNBPowerPlugin.so and b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/gui_plugins/libgNBPowerPlugin.so differ diff --git a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py index f6b6f86..cd1e374 100644 --- a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py +++ b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/launch/gazebo_launch.launch.py @@ -65,7 +65,8 @@ def generate_launch_description(): parameters=[{'use_sim_time': use_sim_time, 'robot_description': doc.toxml()}]) - world = os.path.join(get_package_share_directory('ign_turtlebot'), "worlds", "world_only.sdf") + core_network = os.environ.get('CORE_NETWORK', 'oai') + world = os.path.join(get_package_share_directory('ign_turtlebot'), "worlds", f"world_only_{core_network}.sdf") return LaunchDescription([ ign_resource_path, diff --git a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/phine_plugins/libUE_plugin.so b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/phine_plugins/libUE_plugin.so index 31f60b5..caad8f7 100755 Binary files a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/phine_plugins/libUE_plugin.so and b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/phine_plugins/libUE_plugin.so differ diff --git a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/phine_plugins/libgNB_plugin.so b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/phine_plugins/libgNB_plugin.so index 37b1ea1..86a1488 100755 Binary files a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/phine_plugins/libgNB_plugin.so and b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/phine_plugins/libgNB_plugin.so differ diff --git a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only.sdf b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only_oai.sdf similarity index 98% rename from demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only.sdf rename to demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only_oai.sdf index 759b6e0..fa412c5 100644 --- a/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only.sdf +++ b/demo_containerized/images/simulation/gazebo_launch/src/ign_turtlebot/worlds/world_only_oai.sdf @@ -54,6 +54,7 @@ + oai ue_turtlebot 1 192.168.70.150 @@ -108,6 +109,7 @@ gNB1 -6.8 1 7 0 0 0 + oai phine_cell phine-net 192.168.70.160 diff --git a/demo_containerized/images/simulation/images/ue_amr/dds.xml b/demo_containerized/images/simulation/images/ue_amr/dds.xml index 658cdc4..5e5fc38 100644 --- a/demo_containerized/images/simulation/images/ue_amr/dds.xml +++ b/demo_containerized/images/simulation/images/ue_amr/dds.xml @@ -11,260 +11,20 @@ 1048576 true -
10.60.0.1
-
10.60.0.10
-
10.60.0.100
-
10.60.0.101
-
10.60.0.102
-
10.60.0.103
-
10.60.0.104
-
10.60.0.105
-
10.60.0.106
-
10.60.0.107
-
10.60.0.108
-
10.60.0.109
-
10.60.0.11
-
10.60.0.110
-
10.60.0.111
-
10.60.0.112
-
10.60.0.113
-
10.60.0.114
-
10.60.0.115
-
10.60.0.116
-
10.60.0.117
-
10.60.0.118
-
10.60.0.119
-
10.60.0.12
-
10.60.0.120
-
10.60.0.121
-
10.60.0.122
-
10.60.0.123
-
10.60.0.124
-
10.60.0.125
-
10.60.0.126
-
10.60.0.127
-
10.60.0.128
-
10.60.0.129
-
10.60.0.13
-
10.60.0.130
-
10.60.0.131
-
10.60.0.132
-
10.60.0.133
-
10.60.0.134
-
10.60.0.135
-
10.60.0.136
-
10.60.0.137
-
10.60.0.138
-
10.60.0.139
-
10.60.0.14
-
10.60.0.140
-
10.60.0.141
-
10.60.0.142
-
10.60.0.143
-
10.60.0.144
-
10.60.0.145
-
10.60.0.146
-
10.60.0.147
-
10.60.0.148
-
10.60.0.149
-
10.60.0.15
-
10.60.0.150
-
10.60.0.151
-
10.60.0.152
-
10.60.0.153
-
10.60.0.154
-
10.60.0.155
-
10.60.0.156
-
10.60.0.157
-
10.60.0.158
-
10.60.0.159
-
10.60.0.16
-
10.60.0.160
-
10.60.0.161
-
10.60.0.162
-
10.60.0.163
-
10.60.0.164
-
10.60.0.165
-
10.60.0.166
-
10.60.0.167
-
10.60.0.168
-
10.60.0.169
-
10.60.0.17
-
10.60.0.170
-
10.60.0.171
-
10.60.0.172
-
10.60.0.173
-
10.60.0.174
-
10.60.0.175
-
10.60.0.176
-
10.60.0.177
-
10.60.0.178
-
10.60.0.179
-
10.60.0.18
-
10.60.0.180
-
10.60.0.181
-
10.60.0.182
-
10.60.0.183
-
10.60.0.184
-
10.60.0.185
-
10.60.0.186
-
10.60.0.187
-
10.60.0.188
-
10.60.0.189
-
10.60.0.19
-
10.60.0.190
-
10.60.0.191
-
10.60.0.192
-
10.60.0.193
-
10.60.0.194
-
10.60.0.195
-
10.60.0.196
-
10.60.0.197
-
10.60.0.198
-
10.60.0.199
-
10.60.0.2
-
10.60.0.20
-
10.60.0.200
-
10.60.0.201
-
10.60.0.202
-
10.60.0.203
-
10.60.0.204
-
10.60.0.205
-
10.60.0.206
-
10.60.0.207
-
10.60.0.208
-
10.60.0.209
-
10.60.0.21
-
10.60.0.210
-
10.60.0.211
-
10.60.0.212
-
10.60.0.213
-
10.60.0.214
-
10.60.0.215
-
10.60.0.216
-
10.60.0.217
-
10.60.0.218
-
10.60.0.219
-
10.60.0.22
-
10.60.0.220
-
10.60.0.221
-
10.60.0.222
-
10.60.0.223
-
10.60.0.224
-
10.60.0.225
-
10.60.0.226
-
10.60.0.227
-
10.60.0.228
-
10.60.0.229
-
10.60.0.23
-
10.60.0.230
-
10.60.0.231
-
10.60.0.232
-
10.60.0.233
-
10.60.0.234
-
10.60.0.235
-
10.60.0.236
-
10.60.0.237
-
10.60.0.238
-
10.60.0.239
-
10.60.0.24
-
10.60.0.240
-
10.60.0.241
-
10.60.0.242
-
10.60.0.243
-
10.60.0.244
-
10.60.0.245
-
10.60.0.246
-
10.60.0.247
-
10.60.0.248
-
10.60.0.249
-
10.60.0.25
-
10.60.0.250
-
10.60.0.251
-
10.60.0.252
-
10.60.0.253
-
10.60.0.254
-
10.60.0.26
-
10.60.0.27
-
10.60.0.28
-
10.60.0.29
-
10.60.0.3
-
10.60.0.30
-
10.60.0.31
-
10.60.0.32
-
10.60.0.33
-
10.60.0.34
-
10.60.0.35
-
10.60.0.36
-
10.60.0.37
-
10.60.0.38
-
10.60.0.39
-
10.60.0.4
-
10.60.0.40
-
10.60.0.41
-
10.60.0.42
-
10.60.0.43
-
10.60.0.44
-
10.60.0.45
-
10.60.0.46
-
10.60.0.47
-
10.60.0.48
-
10.60.0.49
-
10.60.0.5
-
10.60.0.50
-
10.60.0.51
-
10.60.0.52
-
10.60.0.53
-
10.60.0.54
-
10.60.0.55
-
10.60.0.56
-
10.60.0.57
-
10.60.0.58
-
10.60.0.59
-
10.60.0.6
-
10.60.0.60
-
10.60.0.61
-
10.60.0.62
-
10.60.0.63
-
10.60.0.64
-
10.60.0.65
-
10.60.0.66
-
10.60.0.67
-
10.60.0.68
-
10.60.0.69
-
10.60.0.7
-
10.60.0.70
-
10.60.0.71
-
10.60.0.72
-
10.60.0.73
-
10.60.0.74
-
10.60.0.75
-
10.60.0.76
-
10.60.0.77
-
10.60.0.78
-
10.60.0.79
-
10.60.0.8
-
10.60.0.80
-
10.60.0.81
-
10.60.0.82
-
10.60.0.83
-
10.60.0.84
-
10.60.0.85
-
10.60.0.86
-
10.60.0.87
-
10.60.0.88
-
10.60.0.89
-
10.60.0.9
-
10.60.0.90
-
10.60.0.91
-
10.60.0.92
-
10.60.0.93
-
10.60.0.94
-
10.60.0.95
-
10.60.0.96
-
10.60.0.97
-
10.60.0.98
-
10.60.0.99
+
10.0.0.1
+
10.0.0.10
+
10.0.0.11
+
10.0.0.12
+
10.0.0.13
+
10.0.0.14
+
10.0.0.2
+
10.0.0.3
+
10.0.0.4
+
10.0.0.5
+
10.0.0.6
+
10.0.0.7
+
10.0.0.8
+
10.0.0.9
127.0.0.1
diff --git a/demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/CMakeLists.txt b/demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/CMakeLists.txt similarity index 100% rename from demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/CMakeLists.txt rename to demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/CMakeLists.txt diff --git a/demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/launch/nav_stack.launch.py b/demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/launch/nav_stack.launch.py similarity index 100% rename from demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/launch/nav_stack.launch.py rename to demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/launch/nav_stack.launch.py diff --git a/demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/launch/ros_gz_bridge.launch.py b/demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/launch/ros_gz_bridge.launch.py similarity index 100% rename from demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/launch/ros_gz_bridge.launch.py rename to demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/launch/ros_gz_bridge.launch.py diff --git a/demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/maps/map.yaml b/demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/maps/map.yaml similarity index 100% rename from demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/maps/map.yaml rename to demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/maps/map.yaml diff --git a/demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/maps/map_rotated.png b/demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/maps/map_rotated.png similarity index 100% rename from demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/maps/map_rotated.png rename to demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/maps/map_rotated.png diff --git a/demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/package.xml b/demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/package.xml similarity index 100% rename from demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/package.xml rename to demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/package.xml diff --git a/demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/params/waffle.yaml b/demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/params/waffle.yaml similarity index 100% rename from demo/images/ue_amr_oai/nav_stack/src/ign_turtlebot/params/waffle.yaml rename to demo_containerized/images/simulation/images/ue_amr/nav_stack/src/ign_turtlebot/params/waffle.yaml diff --git a/demo_containerized/images/simulation/images/ue_amr_oai/Dockerfile b/demo_containerized/images/simulation/images/ue_amr_oai/Dockerfile deleted file mode 100644 index fcbfc05..0000000 --- a/demo_containerized/images/simulation/images/ue_amr_oai/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -# Use the OAI NR UE base image as the starting point -FROM oaisoftwarealliance/oai-nr-ue:2024.w44 - -ARG ROBOT_PROJECT_NAME ROS_DISCOVERY_SERVER -# Set environment variables for ROS 2 installation -ENV DEBIAN_FRONTEND=noninteractive -ENV ROS_DISTRO=humble - -# Update package list and install dependencies -RUN apt-get update && \ - apt-get install -y \ - sudo \ - curl \ - gnupg2 \ - lsb-release \ - locales \ - build-essential \ - git \ - wget \ - software-properties-common \ - && rm -rf /var/lib/apt/lists/* - -# Set up locale -RUN sudo locale-gen en_US.UTF-8 && \ - sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 - -ENV LANG=en_US.UTF-8 \ - LC_ALL=en_US.UTF-8 - -RUN add-apt-repository universe && \ - curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" |sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null -RUN curl -fsSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" \ - > /etc/apt/sources.list.d/ros2.list -# Install ROS 2 and other dependencies -RUN apt-get update && \ - apt upgrade -y && \ - apt-get install -y \ - ros-${ROS_DISTRO}-desktop \ - ros-dev-tools \ - ros-humble-navigation2 \ - ros-humble-nav2-bringup && \ - rm -rf /var/lib/apt/lists/* - -RUN apt-get update --fix-missing -RUN apt-get install -y libignition-msgs5-dev -RUN apt-get install -y libignition-transport8-dev -RUN apt-get install -y libignition-tools-dev -RUN apt-get install -y ros-humble-ros-ign-bridge -RUN apt-get install -y iptables - -WORKDIR /app - -COPY ./dds.xml . - -COPY ./wait_for_ue_connected.sh /app/wait_for_ue_connected.sh -RUN chmod +x /app/wait_for_ue_connected.sh - -COPY $ROBOT_PROJECT_NAME robot_logic - -RUN /bin/bash -c "source /opt/ros/humble/setup.bash && \ - cd /app/robot_logic && \ - colcon build" -# Source the ROS setup file -RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc -RUN echo "export RMW_IMPLEMENTATION=rmw_fastrtps_cpp" >> ~/.bashrc -RUN echo "export ROS_DISCOVERY_SERVER="$ROS_DISCOVERY_SERVER"" >> ~/.bashrc -RUN echo "export IGN_IP=192.168.73.150" >> ~/.bashrc -RUN echo "source /app/robot_logic/install/setup.bash" >> ~/.bashrc -RUN echo "export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml" >> ~/.bashrc - - diff --git a/demo_containerized/images/simulation/images/ue_amr_oai/dds.xml b/demo_containerized/images/simulation/images/ue_amr_oai/dds.xml deleted file mode 100644 index 658cdc4..0000000 --- a/demo_containerized/images/simulation/images/ue_amr_oai/dds.xml +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - UDP_5G_Only - UDPv4 - 1400 - 1048576 - 1048576 - true - -
10.60.0.1
-
10.60.0.10
-
10.60.0.100
-
10.60.0.101
-
10.60.0.102
-
10.60.0.103
-
10.60.0.104
-
10.60.0.105
-
10.60.0.106
-
10.60.0.107
-
10.60.0.108
-
10.60.0.109
-
10.60.0.11
-
10.60.0.110
-
10.60.0.111
-
10.60.0.112
-
10.60.0.113
-
10.60.0.114
-
10.60.0.115
-
10.60.0.116
-
10.60.0.117
-
10.60.0.118
-
10.60.0.119
-
10.60.0.12
-
10.60.0.120
-
10.60.0.121
-
10.60.0.122
-
10.60.0.123
-
10.60.0.124
-
10.60.0.125
-
10.60.0.126
-
10.60.0.127
-
10.60.0.128
-
10.60.0.129
-
10.60.0.13
-
10.60.0.130
-
10.60.0.131
-
10.60.0.132
-
10.60.0.133
-
10.60.0.134
-
10.60.0.135
-
10.60.0.136
-
10.60.0.137
-
10.60.0.138
-
10.60.0.139
-
10.60.0.14
-
10.60.0.140
-
10.60.0.141
-
10.60.0.142
-
10.60.0.143
-
10.60.0.144
-
10.60.0.145
-
10.60.0.146
-
10.60.0.147
-
10.60.0.148
-
10.60.0.149
-
10.60.0.15
-
10.60.0.150
-
10.60.0.151
-
10.60.0.152
-
10.60.0.153
-
10.60.0.154
-
10.60.0.155
-
10.60.0.156
-
10.60.0.157
-
10.60.0.158
-
10.60.0.159
-
10.60.0.16
-
10.60.0.160
-
10.60.0.161
-
10.60.0.162
-
10.60.0.163
-
10.60.0.164
-
10.60.0.165
-
10.60.0.166
-
10.60.0.167
-
10.60.0.168
-
10.60.0.169
-
10.60.0.17
-
10.60.0.170
-
10.60.0.171
-
10.60.0.172
-
10.60.0.173
-
10.60.0.174
-
10.60.0.175
-
10.60.0.176
-
10.60.0.177
-
10.60.0.178
-
10.60.0.179
-
10.60.0.18
-
10.60.0.180
-
10.60.0.181
-
10.60.0.182
-
10.60.0.183
-
10.60.0.184
-
10.60.0.185
-
10.60.0.186
-
10.60.0.187
-
10.60.0.188
-
10.60.0.189
-
10.60.0.19
-
10.60.0.190
-
10.60.0.191
-
10.60.0.192
-
10.60.0.193
-
10.60.0.194
-
10.60.0.195
-
10.60.0.196
-
10.60.0.197
-
10.60.0.198
-
10.60.0.199
-
10.60.0.2
-
10.60.0.20
-
10.60.0.200
-
10.60.0.201
-
10.60.0.202
-
10.60.0.203
-
10.60.0.204
-
10.60.0.205
-
10.60.0.206
-
10.60.0.207
-
10.60.0.208
-
10.60.0.209
-
10.60.0.21
-
10.60.0.210
-
10.60.0.211
-
10.60.0.212
-
10.60.0.213
-
10.60.0.214
-
10.60.0.215
-
10.60.0.216
-
10.60.0.217
-
10.60.0.218
-
10.60.0.219
-
10.60.0.22
-
10.60.0.220
-
10.60.0.221
-
10.60.0.222
-
10.60.0.223
-
10.60.0.224
-
10.60.0.225
-
10.60.0.226
-
10.60.0.227
-
10.60.0.228
-
10.60.0.229
-
10.60.0.23
-
10.60.0.230
-
10.60.0.231
-
10.60.0.232
-
10.60.0.233
-
10.60.0.234
-
10.60.0.235
-
10.60.0.236
-
10.60.0.237
-
10.60.0.238
-
10.60.0.239
-
10.60.0.24
-
10.60.0.240
-
10.60.0.241
-
10.60.0.242
-
10.60.0.243
-
10.60.0.244
-
10.60.0.245
-
10.60.0.246
-
10.60.0.247
-
10.60.0.248
-
10.60.0.249
-
10.60.0.25
-
10.60.0.250
-
10.60.0.251
-
10.60.0.252
-
10.60.0.253
-
10.60.0.254
-
10.60.0.26
-
10.60.0.27
-
10.60.0.28
-
10.60.0.29
-
10.60.0.3
-
10.60.0.30
-
10.60.0.31
-
10.60.0.32
-
10.60.0.33
-
10.60.0.34
-
10.60.0.35
-
10.60.0.36
-
10.60.0.37
-
10.60.0.38
-
10.60.0.39
-
10.60.0.4
-
10.60.0.40
-
10.60.0.41
-
10.60.0.42
-
10.60.0.43
-
10.60.0.44
-
10.60.0.45
-
10.60.0.46
-
10.60.0.47
-
10.60.0.48
-
10.60.0.49
-
10.60.0.5
-
10.60.0.50
-
10.60.0.51
-
10.60.0.52
-
10.60.0.53
-
10.60.0.54
-
10.60.0.55
-
10.60.0.56
-
10.60.0.57
-
10.60.0.58
-
10.60.0.59
-
10.60.0.6
-
10.60.0.60
-
10.60.0.61
-
10.60.0.62
-
10.60.0.63
-
10.60.0.64
-
10.60.0.65
-
10.60.0.66
-
10.60.0.67
-
10.60.0.68
-
10.60.0.69
-
10.60.0.7
-
10.60.0.70
-
10.60.0.71
-
10.60.0.72
-
10.60.0.73
-
10.60.0.74
-
10.60.0.75
-
10.60.0.76
-
10.60.0.77
-
10.60.0.78
-
10.60.0.79
-
10.60.0.8
-
10.60.0.80
-
10.60.0.81
-
10.60.0.82
-
10.60.0.83
-
10.60.0.84
-
10.60.0.85
-
10.60.0.86
-
10.60.0.87
-
10.60.0.88
-
10.60.0.89
-
10.60.0.9
-
10.60.0.90
-
10.60.0.91
-
10.60.0.92
-
10.60.0.93
-
10.60.0.94
-
10.60.0.95
-
10.60.0.96
-
10.60.0.97
-
10.60.0.98
-
10.60.0.99
-
127.0.0.1
-
-
-
- - - - - - UDP_5G_Only - - false - - true - - - -
\ No newline at end of file diff --git a/demo_containerized/images/simulation/images/ue_amr_oai/wait_for_ue_connected.sh b/demo_containerized/images/simulation/images/ue_amr_oai/wait_for_ue_connected.sh deleted file mode 100644 index 1f24bf4..0000000 --- a/demo_containerized/images/simulation/images/ue_amr_oai/wait_for_ue_connected.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# Wait until oaitun_ue1 is up and has an IP address -INTERFACE="oaitun_ue1" -TIMEOUT=120 # seconds, set to 0 for infinite wait -INTERVAL=2 # seconds between checks -ELAPSED=0 - -echo "[INFO] Waiting for UE to connect (interface $INTERFACE with IP)..." - -while true; do - if ip addr show "$INTERFACE" 2>/dev/null | grep -q "inet "; then - echo "[SUCCESS] UE is connected. Interface $INTERFACE is up with IP." - exit 0 - fi - - sleep $INTERVAL - ((ELAPSED+=INTERVAL)) - - if [ $TIMEOUT -gt 0 ] && [ $ELAPSED -ge $TIMEOUT ]; then - echo "[ERROR] Timeout reached: UE did not connect within $TIMEOUT seconds." - exit 1 - fi -done diff --git a/demo_containerized/images/simulation/oai_setup/conf/config.yaml b/demo_containerized/images/simulation/oai_setup/conf/config.yaml deleted file mode 100644 index 4563e02..0000000 --- a/demo_containerized/images/simulation/oai_setup/conf/config.yaml +++ /dev/null @@ -1,236 +0,0 @@ -################################################################################ -# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The OpenAirInterface Software Alliance licenses this file to You under -# the OAI Public License, Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.openairinterface.org/?page_id=698 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#------------------------------------------------------------------------------- -# For more information about the OpenAirInterface (OAI) Software Alliance: -# contact@openairinterface.org -################################################################################ - -# OAI CN Configuration File -### This file can be used by all OAI NFs -### Some fields are specific to an NF and will be ignored by other NFs -### The {{ env['ENV_NAME'] }} syntax lets you define these values in a docker-compose file -### If you intend to mount this file or use a bare-metal deployment, please refer to README.md -### The README.md also defines default values and allowed values for each configuration parameter - -############# Common configuration - -# Log level for all the NFs -log_level: - general: debug - -# If you enable registration, the other NFs will use the NRF discovery mechanism -register_nf: - general: yes - -http_version: 1 - -############## SBI Interfaces -### Each NF takes its local SBI interfaces and remote interfaces from here, unless it gets them using NRF discovery mechanisms -nfs: - amf: - host: oai-amf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - n2: - interface_name: eth0 - port: 38412 - smf: - host: oai-smf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - n4: - interface_name: eth0 - port: 8805 - upf: - host: oai-upf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - n3: - interface_name: eth0 - port: 2152 - n4: - interface_name: eth0 - port: 8805 - n6: - interface_name: eth0 - n9: - interface_name: eth0 - port: 2152 - udm: - host: oai-udm - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - udr: - host: oai-udr - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - ausf: - host: oai-ausf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - nrf: - host: oai-nrf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - pcf: - host: oai-pcf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - -#### Common for UDR and AMF -database: - host: mysql - user: test - type: mysql - password: test - database_name: oai_db - generate_random: true - connection_timeout: 300 # seconds - -## general single_nssai configuration -## Defines YAML anchors, which are reused in the config file -snssais: - - &embb_slice1 - sst: 1 - - &embb_slice2 - sst: 1 - sd: 000001 - -############## NF-specific configuration -amf: - pid_directory: "/var/run" - amf_name: "OAI-AMF" - # This really depends on if we want to keep the "mini" version or not - support_features_options: - enable_simple_scenario: no - enable_nssf: no - enable_smf_selection: yes - use_external_udm: no - relative_capacity: 30 - statistics_timer_interval: 20 #in seconds - emergency_support: false - served_guami_list: - - mcc: 001 - mnc: 01 - amf_region_id: 01 - amf_set_id: 001 - amf_pointer: 01 - plmn_support_list: - - mcc: 001 - mnc: 01 - tac: 0x0001 - nssai: - - *embb_slice1 - - *embb_slice2 - supported_integrity_algorithms: - - "NIA1" - - "NIA2" - supported_encryption_algorithms: - - "NEA0" - - "NEA1" - - "NEA2" - -smf: - ue_mtu: 1500 - support_features: - use_local_subscription_info: no # Use infos from local_subscription_info or from UDM - use_local_pcc_rules: no # Use infos from local_pcc_rules or from PCF - # we resolve from NRF, this is just to configure usage_reporting - upfs: - - host: oai-upf - config: - enable_usage_reporting: no - ue_dns: - primary_ipv4: "1.1.1.1" - primary_ipv6: "2001:4860:4860::8888" - secondary_ipv4: "8.8.8.8" - secondary_ipv6: "2001:4860:4860::8888" - ims: - pcscf_ipv4: "127.0.0.1" - pcscf_ipv6: "fe80::7915:f408:1787:db8b" - # the DNN you configure here should be configured in "dnns" - # follows the SmfInfo datatype from 3GPP TS 29.510 - smf_info: - sNssaiSmfInfoList: - - sNssai: *embb_slice1 - dnnSmfInfoList: - - dnn: "oai" - - sNssai: *embb_slice2 - dnnSmfInfoList: - - dnn: "internet" - local_subscription_infos: - - single_nssai: *embb_slice1 - dnn: "oai" - qos_profile: - 5qi: 9 - session_ambr_ul: "10Gbps" - session_ambr_dl: "10Gbps" - - single_nssai: *embb_slice2 - dnn: "internet" - qos_profile: - 5qi: 9 - session_ambr_ul: "10Gbps" - session_ambr_dl: "10Gbps" - -upf: - support_features: - enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off - enable_snat: yes # If "on": Source natting is done for UE, DEFAULT= off - remote_n6_gw: 127.0.0.1 # Dummy host since simple-switch does not use N6 GW - smfs: - - host: oai-smf # To be used for PFCP association in case of no-NRF - upf_info: - sNssaiUpfInfoList: - - sNssai: *embb_slice1 - dnnUpfInfoList: - - dnn: "oai" - - sNssai: *embb_slice2 - dnnUpfInfoList: - - dnn: "internet" - -## DNN configuration -dnns: - - dnn: "oai" - pdu_session_type: "IPV4" - ipv4_subnet: "10.0.0.0/24" - - dnn: "internet" - pdu_session_type: "IPV4V6" - ipv4_subnet: "10.0.1.0/24" - ipv6_prefix: "2001:1:2::/64" - -pcf: - local_policy: - policy_decisions_path: /openair-pcf/policies/policy_decisions - pcc_rules_path: /openair-pcf/policies/pcc_rules - traffic_rules_path: /openair-pcf/policies/traffic_rules - qos_data_path: /openair-pcf/policies/qos_data diff --git a/demo_containerized/images/simulation/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf b/demo_containerized/images/simulation/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf deleted file mode 100644 index 7c190e5..0000000 --- a/demo_containerized/images/simulation/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf +++ /dev/null @@ -1,289 +0,0 @@ -Active_gNBs = ("gNB1"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0x1; - -# cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB1"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({ mcc = 001; - mnc = 01; - mnc_length = 2; - snssaiList = ({ sst = 1, sd = 0xffffff }, { sst = 1, sd = 0x1 }) }); - - nr_cellid = 12345678L - -# tr_s_preference = "local_mac" - - ////////// Physical parameters: - - #pusch_TargetSNRx10 = 200; - #pucch_TargetSNRx10 = 200; - min_rxtxtime = 6; - - servingCellConfigCommon = ( - { - #spCellConfigCommon - - physCellId = 0; - -# downlinkConfigCommon - #frequencyInfoDL - # this is 3301.68 MHz + 22*12*30e-3 MHz = 3309.6 - #absoluteFrequencySSB = 620640; - # this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68 - absoluteFrequencySSB = 621312; - # this is 3503.28 MHz + 22*12*30e-3 MHz = 3511.2 - #absoluteFrequencySSB = 634080; - # this is 3600.48 MHz - #absoluteFrequencySSB = 640032; - #dl_frequencyBand = 78; - # this is 3301.68 MHz - #dl_absoluteFrequencyPointA = 620112; - # this is 3300.60 MHz - dl_absoluteFrequencyPointA = 620040; - # this is 3502.56 MHz - #dl_absoluteFrequencyPointA = 633552; - # this is 3600.48 MHz - #dl_absoluteFrequencyPointA = 640032; - #scs-SpecificCarrierList - dl_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing = 1; - dl_carrierBandwidth = 106; - #initialDownlinkBWP - #genericParameters - # this is RBstart=0,L=106 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 28875; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 11; - initialDLBWPsearchSpaceZero = 0; - - - - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand = 78; - #scs-SpecificCarrierList - ul_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing = 1; - ul_carrierBandwidth = 106; - pMax = 20; - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth = 28875; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialULBWPsubcarrierSpacing = 1; - #rach-ConfigCommon - #rach-ConfigGeneric - prach_ConfigurationIndex = 98; -#prach_msg1_FDM -#0 = one, 1=two, 2=four, 3=eight - prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; - zeroCorrelationZoneConfig = 12; - preambleReceivedTargetPower = -104; -#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 6; -#powerRampingStep -# 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; -#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; -#ra_ContentionResolutionTimer -#(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer = 7; - rsrp_ThresholdSSB = 19; -#prach-RootSequenceIndex_PR -#1 = 839, 2 = 139 - prach_RootSequenceIndex_PR = 2; - prach_RootSequenceIndex = 1; - # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex - # - msg1_SubcarrierSpacing = 1, -# restrictedSetConfig -# 0=unrestricted, 1=restricted type A, 2=restricted type B - restrictedSetConfig = 0, - - msg3_DeltaPreamble = 1; - p0_NominalWithGrant =-90; - -# pucch-ConfigCommon setup : -# pucchGroupHopping -# 0 = neither, 1= group hopping, 2=sequence hopping - pucchGroupHopping = 0; - hoppingId = 40; - p0_nominal = -90; -# ssb_PositionsInBurs_BitmapPR -# 1=short, 2=medium, 3=long - ssb_PositionsInBurst_PR = 2; - ssb_PositionsInBurst_Bitmap = 1; - -# ssb_periodicityServingCell -# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 - ssb_periodicityServingCell = 2; - -# dmrs_TypeA_position -# 0 = pos2, 1 = pos3 - dmrs_TypeA_Position = 0; - -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - subcarrierSpacing = 1; - - - #tdd-UL-DL-ConfigurationCommon -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - referenceSubcarrierSpacing = 1; - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity = 6; - nrofDownlinkSlots = 7; - nrofDownlinkSymbols = 6; - nrofUplinkSlots = 2; - nrofUplinkSymbols = 4; - - ssPBCH_BlockPower = -25; - } - - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - ////////// AMF parameters: - ##modify - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - - NETWORK_INTERFACES : - { - ## modify - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.160"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.160"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - }; - - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - pusch_TargetSNRx10 = 200; - pucch_TargetSNRx10 = 200; - } -); - -L1s = ( -{ - num_cc = 1; - tr_n_preference = "local_mac"; - prach_dtx_threshold = 200; -# pucch0_dtx_threshold = 150; -} -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [78]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 75; - eNB_instances = [0]; - ##beamforming 1x2 matrix: 1 layer x 2 antennas - bf_weights = [0x00007fff, 0x0000]; - ##beamforming 1x4 matrix: 1 layer x 4 antennas - #bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000]; - ## beamforming 2x2 matrix: - # bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff]; - ## beamforming 4x4 matrix: - #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; - sf_extension = 0 - sdr_addrs = "serial=XXXXXXX" - } -); - -THREAD_STRUCT = ( - { - #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" - parallel_config = "PARALLEL_SINGLE_THREAD"; - #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" - worker_config = "WORKER_ENABLE"; - } -); - -rfsimulator: { - serveraddr = "server"; -}; - -security = { - # preferred ciphering algorithms - # the first one of the list that an UE supports in chosen - # valid values: nea0, nea1, nea2, nea3 - ciphering_algorithms = ( "nea0" ); - - # preferred integrity algorithms - # the first one of the list that an UE supports in chosen - # valid values: nia0, nia1, nia2, nia3 - integrity_algorithms = ( "nia2", "nia0" ); - - # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter - # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' - drb_ciphering = "yes"; - drb_integrity = "no"; -}; - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - f1ap_log_level ="info"; - }; diff --git a/demo_containerized/images/simulation/oai_setup/conf/server.conf b/demo_containerized/images/simulation/oai_setup/conf/server.conf deleted file mode 100644 index 5589e2e..0000000 --- a/demo_containerized/images/simulation/oai_setup/conf/server.conf +++ /dev/null @@ -1,7 +0,0 @@ -uicc0 = { - imsi = "001010000000109"; - key = "fec86ba6eb707ed08905757b1bb44b8f"; - opc= "C42449363BBAD02B66D16BC975D77CC1"; - dnn= "oai"; - nssai_sst=1; -} diff --git a/demo_containerized/images/simulation/oai_setup/conf/ue1.conf b/demo_containerized/images/simulation/oai_setup/conf/ue1.conf deleted file mode 100644 index b570997..0000000 --- a/demo_containerized/images/simulation/oai_setup/conf/ue1.conf +++ /dev/null @@ -1,8 +0,0 @@ -uicc0 = { -imsi = "001010000000101"; -key = "fec86ba6eb707ed08905757b1bb44b8f"; -opc = "C42449363BBAD02B66D16BC975D77CC1"; -dnn = "oai"; -nssai_sst = "1"; -#nssai_sd = "no"; -} diff --git a/demo_containerized/images/simulation/oai_setup/conf/ue2.conf b/demo_containerized/images/simulation/oai_setup/conf/ue2.conf deleted file mode 100644 index 9e36b77..0000000 --- a/demo_containerized/images/simulation/oai_setup/conf/ue2.conf +++ /dev/null @@ -1,7 +0,0 @@ -uicc0 = { - imsi = "001010000000102"; - key = "fec86ba6eb707ed08905757b1bb44b8f"; - opc= "C42449363BBAD02B66D16BC975D77CC1"; - dnn= "oai"; - nssai_sst=1; -} diff --git a/demo_containerized/images/simulation/oai_setup/conf/ue3.conf b/demo_containerized/images/simulation/oai_setup/conf/ue3.conf deleted file mode 100644 index 065565a..0000000 --- a/demo_containerized/images/simulation/oai_setup/conf/ue3.conf +++ /dev/null @@ -1,7 +0,0 @@ -uicc0 = { - imsi = "001010000000103"; - key = "fec86ba6eb707ed08905757b1bb44b8f"; - opc= "C42449363BBAD02B66D16BC975D77CC1"; - dnn= "oai"; - nssai_sst=1; -} diff --git a/demo_containerized/images/simulation/oai_setup/database/oai_db.sql b/demo_containerized/images/simulation/oai_setup/database/oai_db.sql deleted file mode 100644 index 9637a9b..0000000 --- a/demo_containerized/images/simulation/oai_setup/database/oai_db.sql +++ /dev/null @@ -1,327 +0,0 @@ --- phpMyAdmin SQL Dump --- version 5.1.0 --- https://www.phpmyadmin.net/ --- --- Host: 172.16.200.10:3306 --- Generation Time: Mar 22, 2021 at 10:31 AM --- Server version: 5.7.33 --- PHP Version: 7.4.15 - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -START TRANSACTION; -SET time_zone = "+00:00"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; - --- --- Database: `oai_db` --- - --- -------------------------------------------------------- - --- --- Table structure for table `AccessAndMobilitySubscriptionData` --- - -CREATE TABLE `AccessAndMobilitySubscriptionData` ( - `ueid` varchar(15) NOT NULL, - `servingPlmnid` varchar(15) NOT NULL, - `supportedFeatures` varchar(50) DEFAULT NULL, - `gpsis` json DEFAULT NULL, - `internalGroupIds` json DEFAULT NULL, - `sharedVnGroupDataIds` json DEFAULT NULL, - `subscribedUeAmbr` json DEFAULT NULL, - `nssai` json DEFAULT NULL, - `ratRestrictions` json DEFAULT NULL, - `forbiddenAreas` json DEFAULT NULL, - `serviceAreaRestriction` json DEFAULT NULL, - `coreNetworkTypeRestrictions` json DEFAULT NULL, - `rfspIndex` int(10) DEFAULT NULL, - `subsRegTimer` int(10) DEFAULT NULL, - `ueUsageType` int(10) DEFAULT NULL, - `mpsPriority` tinyint(1) DEFAULT NULL, - `mcsPriority` tinyint(1) DEFAULT NULL, - `activeTime` int(10) DEFAULT NULL, - `sorInfo` json DEFAULT NULL, - `sorInfoExpectInd` tinyint(1) DEFAULT NULL, - `sorafRetrieval` tinyint(1) DEFAULT NULL, - `sorUpdateIndicatorList` json DEFAULT NULL, - `upuInfo` json DEFAULT NULL, - `micoAllowed` tinyint(1) DEFAULT NULL, - `sharedAmDataIds` json DEFAULT NULL, - `odbPacketServices` json DEFAULT NULL, - `serviceGapTime` int(10) DEFAULT NULL, - `mdtUserConsent` json DEFAULT NULL, - `mdtConfiguration` json DEFAULT NULL, - `traceData` json DEFAULT NULL, - `cagData` json DEFAULT NULL, - `stnSr` varchar(50) DEFAULT NULL, - `cMsisdn` varchar(50) DEFAULT NULL, - `nbIoTUePriority` int(10) DEFAULT NULL, - `nssaiInclusionAllowed` tinyint(1) DEFAULT NULL, - `rgWirelineCharacteristics` varchar(50) DEFAULT NULL, - `ecRestrictionDataWb` json DEFAULT NULL, - `ecRestrictionDataNb` tinyint(1) DEFAULT NULL, - `expectedUeBehaviourList` json DEFAULT NULL, - `primaryRatRestrictions` json DEFAULT NULL, - `secondaryRatRestrictions` json DEFAULT NULL, - `edrxParametersList` json DEFAULT NULL, - `ptwParametersList` json DEFAULT NULL, - `iabOperationAllowed` tinyint(1) DEFAULT NULL, - `wirelineForbiddenAreas` json DEFAULT NULL, - `wirelineServiceAreaRestriction` json DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `Amf3GppAccessRegistration` --- - -CREATE TABLE `Amf3GppAccessRegistration` ( - `ueid` varchar(15) NOT NULL, - `amfInstanceId` varchar(50) NOT NULL, - `supportedFeatures` varchar(50) DEFAULT NULL, - `purgeFlag` tinyint(1) DEFAULT NULL, - `pei` varchar(50) DEFAULT NULL, - `imsVoPs` json DEFAULT NULL, - `deregCallbackUri` varchar(50) NOT NULL, - `amfServiceNameDereg` json DEFAULT NULL, - `pcscfRestorationCallbackUri` varchar(50) DEFAULT NULL, - `amfServiceNamePcscfRest` json DEFAULT NULL, - `initialRegistrationInd` tinyint(1) DEFAULT NULL, - `guami` json NOT NULL, - `backupAmfInfo` json DEFAULT NULL, - `drFlag` tinyint(1) DEFAULT NULL, - `ratType` json NOT NULL, - `urrpIndicator` tinyint(1) DEFAULT NULL, - `amfEeSubscriptionId` varchar(50) DEFAULT NULL, - `epsInterworkingInfo` json DEFAULT NULL, - `ueSrvccCapability` tinyint(1) DEFAULT NULL, - `registrationTime` varchar(50) DEFAULT NULL, - `vgmlcAddress` json DEFAULT NULL, - `contextInfo` json DEFAULT NULL, - `noEeSubscriptionInd` tinyint(1) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `AuthenticationStatus` --- - -CREATE TABLE `AuthenticationStatus` ( - `ueid` varchar(20) NOT NULL, - `nfInstanceId` varchar(50) NOT NULL, - `success` tinyint(1) NOT NULL, - `timeStamp` varchar(50) NOT NULL, - `authType` varchar(25) NOT NULL, - `servingNetworkName` varchar(50) NOT NULL, - `authRemovalInd` tinyint(1) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `AuthenticationSubscription` --- - -CREATE TABLE `AuthenticationSubscription` ( - `ueid` varchar(20) NOT NULL, - `authenticationMethod` varchar(25) NOT NULL, - `encPermanentKey` varchar(50) DEFAULT NULL, - `protectionParameterId` varchar(50) DEFAULT NULL, - `sequenceNumber` json DEFAULT NULL, - `authenticationManagementField` varchar(50) DEFAULT NULL, - `algorithmId` varchar(50) DEFAULT NULL, - `encOpcKey` varchar(50) DEFAULT NULL, - `encTopcKey` varchar(50) DEFAULT NULL, - `vectorGenerationInHss` tinyint(1) DEFAULT NULL, - `n5gcAuthMethod` varchar(15) DEFAULT NULL, - `rgAuthenticationInd` tinyint(1) DEFAULT NULL, - `supi` varchar(20) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `AuthenticationSubscription` --- -INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES -('001010000000101', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000101'); -INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES -('001010000000102', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000102'); -INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES -('001010000000103', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000103'); -INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES -('001010000000104', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000104'); -INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES -('001010000000109', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000109'); - - --- -------------------------------------------------------- - --- --- Table structure for table `SdmSubscriptions` --- - -CREATE TABLE `SdmSubscriptions` ( - `ueid` varchar(15) NOT NULL, - `subsId` int(10) UNSIGNED NOT NULL, - `nfInstanceId` varchar(50) NOT NULL, - `implicitUnsubscribe` tinyint(1) DEFAULT NULL, - `expires` varchar(50) DEFAULT NULL, - `callbackReference` varchar(50) NOT NULL, - `amfServiceName` json DEFAULT NULL, - `monitoredResourceUris` json NOT NULL, - `singleNssai` json DEFAULT NULL, - `dnn` varchar(50) DEFAULT NULL, - `subscriptionId` varchar(50) DEFAULT NULL, - `plmnId` json DEFAULT NULL, - `immediateReport` tinyint(1) DEFAULT NULL, - `report` json DEFAULT NULL, - `supportedFeatures` varchar(50) DEFAULT NULL, - `contextInfo` json DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `SessionManagementSubscriptionData` --- - -CREATE TABLE `SessionManagementSubscriptionData` ( - `ueid` varchar(15) NOT NULL, - `servingPlmnid` varchar(15) NOT NULL, - `singleNssai` json NOT NULL, - `dnnConfigurations` json DEFAULT NULL, - `internalGroupIds` json DEFAULT NULL, - `sharedVnGroupDataIds` json DEFAULT NULL, - `sharedDnnConfigurationsId` varchar(50) DEFAULT NULL, - `odbPacketServices` json DEFAULT NULL, - `traceData` json DEFAULT NULL, - `sharedTraceDataId` varchar(50) DEFAULT NULL, - `expectedUeBehavioursList` json DEFAULT NULL, - `suggestedPacketNumDlList` json DEFAULT NULL, - `3gppChargingCharacteristics` varchar(50) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - -INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000101', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"10.0.0.2\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); -INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000102', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"10.0.0.3\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); -INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000103', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"10.0.0.4\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); -INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000109', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"10.0.0.9\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); --- --- Table structure for table `SmfRegistrations` --- - -CREATE TABLE `SmfRegistrations` ( - `ueid` varchar(15) NOT NULL, - `subpduSessionId` int(10) NOT NULL, - `smfInstanceId` varchar(50) NOT NULL, - `smfSetId` varchar(50) DEFAULT NULL, - `supportedFeatures` varchar(50) DEFAULT NULL, - `pduSessionId` int(10) NOT NULL, - `singleNssai` json NOT NULL, - `dnn` varchar(50) DEFAULT NULL, - `emergencyServices` tinyint(1) DEFAULT NULL, - `pcscfRestorationCallbackUri` varchar(50) DEFAULT NULL, - `plmnId` json NOT NULL, - `pgwFqdn` varchar(50) DEFAULT NULL, - `epdgInd` tinyint(1) DEFAULT NULL, - `deregCallbackUri` varchar(50) DEFAULT NULL, - `registrationReason` json DEFAULT NULL, - `registrationTime` varchar(50) DEFAULT NULL, - `contextInfo` json DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `SmfSelectionSubscriptionData` --- - -CREATE TABLE `SmfSelectionSubscriptionData` ( - `ueid` varchar(15) NOT NULL, - `servingPlmnid` varchar(15) NOT NULL, - `supportedFeatures` varchar(50) DEFAULT NULL, - `subscribedSnssaiInfos` json DEFAULT NULL, - `sharedSnssaiInfosId` varchar(50) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Indexes for dumped tables --- - --- --- Indexes for table `AccessAndMobilitySubscriptionData` --- -ALTER TABLE `AccessAndMobilitySubscriptionData` - ADD PRIMARY KEY (`ueid`,`servingPlmnid`) USING BTREE; - --- --- Indexes for table `Amf3GppAccessRegistration` --- -ALTER TABLE `Amf3GppAccessRegistration` - ADD PRIMARY KEY (`ueid`); - --- --- Indexes for table `AuthenticationStatus` --- -ALTER TABLE `AuthenticationStatus` - ADD PRIMARY KEY (`ueid`); - --- --- Indexes for table `AuthenticationSubscription` --- -ALTER TABLE `AuthenticationSubscription` - ADD PRIMARY KEY (`ueid`); - --- --- Indexes for table `SdmSubscriptions` --- -ALTER TABLE `SdmSubscriptions` - ADD PRIMARY KEY (`subsId`,`ueid`) USING BTREE; - --- --- Indexes for table `SessionManagementSubscriptionData` --- -ALTER TABLE `SessionManagementSubscriptionData` - ADD PRIMARY KEY (`ueid`,`servingPlmnid`) USING BTREE; - --- --- Indexes for table `SmfRegistrations` --- -ALTER TABLE `SmfRegistrations` - ADD PRIMARY KEY (`ueid`,`subpduSessionId`) USING BTREE; - --- --- Indexes for table `SmfSelectionSubscriptionData` --- -ALTER TABLE `SmfSelectionSubscriptionData` - ADD PRIMARY KEY (`ueid`,`servingPlmnid`) USING BTREE; - --- --- AUTO_INCREMENT for dumped tables --- - --- ADD subscription information for bonus II - --- --- AUTO_INCREMENT for table `SdmSubscriptions` --- -ALTER TABLE `SdmSubscriptions` - MODIFY `subsId` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; - diff --git a/demo_containerized/images/simulation/oai_setup/docker-compose-gNB.yml b/demo_containerized/images/simulation/oai_setup/docker-compose-gNB.yml deleted file mode 100644 index 4196b7b..0000000 --- a/demo_containerized/images/simulation/oai_setup/docker-compose-gNB.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: '3.8' -services: - oai-gnb: - image: oaisoftwarealliance/oai-gnb:2024.w44 - privileged: true - container_name : oai-gNB1 - environment: - USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time - ports: - - "2021:2021" - networks: - public_net: - ipv4_address : 192.168.70.160 - volumes: - - ${DEMO_PROJECT_PATH}/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf:/opt/oai-gnb/etc/gnb.conf - healthcheck: - test: /bin/bash -c "pgrep nr-softmodem" - interval: 10s - timeout: 5s - retries: 5 - entrypoint: - - /bin/bash - - -c - - | - /opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.conf --sa -E --rfsim --log_config.global_log_options level,nocolor,time & - tail -f /dev/null -networks: - public_net: - external: - name : phine-net diff --git a/demo_containerized/images/simulation/oai_setup/docker-compose-ue.yml b/demo_containerized/images/simulation/oai_setup/docker-compose-ue.yml deleted file mode 100644 index 0d21f4d..0000000 --- a/demo_containerized/images/simulation/oai_setup/docker-compose-ue.yml +++ /dev/null @@ -1,52 +0,0 @@ -version: '3.8' -services: - robot_1: - image: ue_amr_oai - privileged: true - container_name: ${NAME_ROBOT_1} - environment: - USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - IGN_PARTITION: ${IGN_PARTITION} - networks: - public_net: - ipv4_address: ${IP_ROBOT_1} - ros_gz_net: - ipv4_address: 192.168.73.150 - volumes: - - ${DEMO_PROJECT_PATH}/oai_setup/conf/ue1.conf:/opt/oai-nr-ue/etc/nr-ue.conf - - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/robot_logic/install/setup.bash - export ROS_DISCOVERY_SERVER="${ROS_DISCOVERY_SERVER}" - export IGN_IP=192.168.73.150 - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.conf -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time & - ./wait_for_ue_connected.sh - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROS_GZ_BRIDGE_NAME_1} - ) & - if [ "${EXECUTE_ROBOT_LAUNCH_FILE_1}" = "true" ]; then - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROBOT_LAUNCH_FILE_NAME_1} - ) & - fi - tail -f /dev/null - - healthcheck: - test: /bin/bash -c "pgrep nr-uesoftmodem" - interval: 10s - timeout: 5s - retries: 5 - -networks: - public_net: - external: - name: phine-net - ros_gz_net: - external: - name: ros_gz_net \ No newline at end of file diff --git a/demo_containerized/images/simulation/oai_setup/healthscripts/mysql-healthcheck.sh b/demo_containerized/images/simulation/oai_setup/healthscripts/mysql-healthcheck.sh deleted file mode 100755 index 6fa1728..0000000 --- a/demo_containerized/images/simulation/oai_setup/healthscripts/mysql-healthcheck.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -set -eo pipefail - -if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then - echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)' - exit 0 -fi - -host="$(hostname --ip-address || echo '127.0.0.1')" -user="${MYSQL_USER:-root}" -export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}" - -args=( - # force mysql to not use the local "mysqld.sock" (test "external" connectivity) - -h"$host" - -u"$user" - --silent -) - -STATUS=0 -if command -v mysqladmin &> /dev/null; then - if mysqladmin "${args[@]}" ping > /dev/null; then - database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM AuthenticationSubscription;") - if [[ -z $database_check ]]; then - echo "Healthcheck error: oai_db not populated" - STATUS=1 - fi - STATUS=0 - else - echo "Healthcheck error: Mysql port inactive" - STATUS=1 - fi -else - if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then - database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM AuthenticationSubscription;") - if [[ -z $database_check ]]; then - echo "Healthcheck error: oai_db not populated" - STATUS=1 - fi - STATUS=0 - else - echo "Healthcheck error: Mysql port inactive" - STATUS=1 - fi -fi -exit $STATUS diff --git a/demo_containerized/images/simulation/oai_setup/policies/qos/pcc_rules/pcc_rules.yaml b/demo_containerized/images/simulation/oai_setup/policies/qos/pcc_rules/pcc_rules.yaml deleted file mode 100644 index 3c0817a..0000000 --- a/demo_containerized/images/simulation/oai_setup/policies/qos/pcc_rules/pcc_rules.yaml +++ /dev/null @@ -1,23 +0,0 @@ -non-gbr-rule-5qi-9: - flowInfos: - - flowDescription: permit out ip from any to assigned - packetFilterUsage: true - precedence: 10 - refQosData: - - non-gbr-qos-5qi-9 - -gbr-rule-5qi-1: - flowInfos: - - flowDescription: permit out ip from 192.168.70.135 to assigned - packetFilterUsage: true - precedence: 8 - refQosData: - - gbr-qos-5qi-1 - -gbr-rule-5qi-5: - flowInfos: - - flowDescription: permit out ip from any to assigned - packetFilterUsage: true - precedence: 9 - refQosData: - - gbr-qos-5qi-5 diff --git a/demo_containerized/images/simulation/oai_setup/policies/qos/policy_decisions/policy_decision.yaml b/demo_containerized/images/simulation/oai_setup/policies/qos/policy_decisions/policy_decision.yaml deleted file mode 100644 index b7efa54..0000000 --- a/demo_containerized/images/simulation/oai_setup/policies/qos/policy_decisions/policy_decision.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# as an example to have SUPI / IMSI specific QoS policies - -decision_supi1: - supi_imsi: "001010000000101" - pcc_rules: -# - gbr-rule-5qi-1 - - non-gbr-rule-5qi-9 - - -decision_slice_1: - slice: - sst: 1 - sd: "FFFFFF" - pcc_rules: - - non-gbr-rule-5qi-9 - -decision_slice_2: - slice: - sst: 1 - sd: "000001" - pcc_rules: - - gbr-rule-5qi-5 - - non-gbr-rule-5qi-9 diff --git a/demo_containerized/images/simulation/oai_setup/policies/qos/qos_data/qos_data.yaml b/demo_containerized/images/simulation/oai_setup/policies/qos/qos_data/qos_data.yaml deleted file mode 100644 index 627e889..0000000 --- a/demo_containerized/images/simulation/oai_setup/policies/qos/qos_data/qos_data.yaml +++ /dev/null @@ -1,31 +0,0 @@ - non-gbr-qos-5qi-9: - 5qi: 9 - arp: - priorityLevel: 15 - preemptCap: NOT_PREEMPT - preemptVuln: PREEMPTABLE - priorityLevel: 10 - - gbr-qos-5qi-1: - 5qi: 1 - maxbrUl: 70000 Kbps - maxbrDl: 100 Mbps - gbrUl: 50 Mbps - gbrDl: 50 Mbps - arp: - priorityLevel: 1 - preemptCap: MAY_PREEMPT - preemptVuln: NOT_PREEMPTABLE - priorityLevel: 9 - - gbr-qos-5qi-5: - 5qi: 5 - maxbrUl: 60 Mbps - maxbrDl: 100 Mbps - gbrUl: 50 Mbps - gbrDl: 50 Mbps - arp: - priorityLevel: 1 - preemptCap: MAY_PREEMPT - preemptVuln: NOT_PREEMPTABLE - priorityLevel: 8 diff --git a/demo_containerized/images/simulation/open5gs_setup/README.md b/demo_containerized/images/simulation/open5gs_setup/README.md deleted file mode 100644 index 382f147..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/README.md +++ /dev/null @@ -1,174 +0,0 @@ -# Open5GS Core Network Deployment for RoboSim5G - -This deployment provides an Open5GS 5G Core Network that integrates with RoboSim5G. - -## About Open5GS - -Open5GS is an open-source implementation of 5G Core and EPC (Evolved Packet Core). Key features: -- **User-friendly WebUI** for subscriber management -- **Modular architecture** with independent network functions -- **Persistent storage** using MongoDB for subscriber data -- **Active community** and good documentation - -## Quick Start - -### 1. Start the Core Network -```bash -docker compose up -d -``` - -Wait for all services to become healthy: -```bash -docker compose ps -``` - -### 2. Configure Subscribers via WebUI - -Open http://localhost:9999 in your browser. - -**Default credentials:** -- Username: `admin` -- Password: `1423` - -**Add a subscriber:** -1. Navigate to "Subscribers" → "New Subscriber" -2. Enter the following details: - - **IMSI**: `001010000000101` (must match UE configuration) - - **Security:** - - K: `8baf473f2f8fd09487cccbd7097c6862` - - OPc: `8e27b6af0e692e750f32667a3b14605d` - - AMF: `8000` - - **S-NSSAI (Network Slice):** - - SST: `1` - - SD: `1` (or `000001`) - - **DNN/APN**: `internet` -3. Click "Save" - -> **Note:** First user (001010000000101) is already configured. You can pre-configure multiple additional subscribers for different robots by incrementing the IMSI (e.g., `001010000000102`, `001010000000103`). - -### 3. Start gNB and UE - -Follow the RoboSim5G demo instructions to start your Gazebo simulation with the robot. The gNB and UE will automatically connect to this core network. - -Alternatively, for standalone testing: -```bash -# Start gNB -docker compose -f docker-compose-gNB.yml up -d - -# Start UE -docker compose -f docker-compose-ue.yml up -d -``` - -## Managing the Core Network - -### Check Service Status -```bash -docker compose ps -``` - -All services should show "healthy" or "running" status. - -### View Logs -```bash -# View all services -docker compose logs -f - -# View specific service -docker compose logs -f amf -docker compose logs -f upf -``` - -### Stop the Core Network -```bash -docker compose down -``` - -> **Important:** Do NOT use `docker compose down -v` as this will delete subscriber data. - -### Restart Services -```bash -docker compose restart -``` - -## Subscriber Data Persistence - -Subscriber data is stored in the local `./db_data` directory and persists across container restarts. This makes the deployment portable: -- Copy the entire folder to another machine -- Subscriber configurations remain intact -- No need to reconfigure subscribers after restart - -## Network Configuration - -The core network uses the following subnet: -- **Open5GS CN**: `10.33.33.0/24` -- **UE Data Network (DN)**: `10.45.0.0/24` (assigned via UPF) - -### Key Service Endpoints -- **AMF (N2 interface)**: `10.33.33.5:38412` (SCTP) -- **UPF (N3 interface)**: `10.33.33.10:2152` (GTP-U) -- **WebUI**: `http://localhost:9999` - -## Troubleshooting - -### UE Not Attaching -1. **Check subscriber exists:** Log into WebUI and verify IMSI is configured -2. **Verify credentials match:** K, OPc values in WebUI must match UE config -3. **Check AMF logs:** - ```bash - docker compose logs -f amf - ``` - Look for authentication failures or registration issues - -### gNB Not Connecting to AMF -1. **Check network connectivity:** - ```bash - docker exec amf ping -c 3 oai-gNB - ``` -2. **Verify AMF logs:** - ```bash - docker compose logs -f amf - ``` - Look for NG Setup Request/Response messages - -### No Internet Access from UE -1. **Check UPF logs:** - ```bash - docker compose logs -f upf - ``` -2. **Verify UE has tunnel interface:** - ```bash - docker exec oai-nr-ue1 ip addr show - ``` - Should see `oaitun_ue1` with IP in `10.45.0.0/24` range - -### WebUI Connection Issues -If WebUI cannot connect to MongoDB: -```bash -docker compose restart db webui -``` - -## Configuration Files - -All Open5GS network function configs are in `./configs/`: -- `amf.yaml` - Access and Mobility Management Function -- `smf.yaml` - Session Management Function -- `upf.yaml` - User Plane Function -- `ausf.yaml`, `udm.yaml`, `udr.yaml` - Authentication functions -- `nrf.yaml` - Network Repository Function -- `pcf.yaml` - Policy Control Function - -## Integration with RoboSim5G - -When using this CN with RoboSim5G: -1. Start this core network first -2. Configure subscribers for your robots via WebUI -3. Launch your Gazebo simulation with the RoboSim5G plugins -4. The robot's OAI UE will automatically attach to the network - -Each robot in your simulation can have its own IMSI and network slice configuration, enabling realistic multi-robot 5G scenarios. - -## Additional Resources - -- [Open5GS Documentation](https://open5gs.org/open5gs/docs/) -- [Open5GS GitHub](https://github.com/open5gs/open5gs) -- [RoboSim5G Project](https://github.com/phinetech/RoboSim5G) diff --git a/demo_containerized/images/simulation/open5gs_setup/configs/amf.yaml b/demo_containerized/images/simulation/open5gs_setup/configs/amf.yaml deleted file mode 100644 index f32a1b5..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/configs/amf.yaml +++ /dev/null @@ -1,45 +0,0 @@ -logger: - file: - path: /var/log/open5gs/amf.log - -global: - -amf: - sbi: - server: - - address: amf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 - ngap: - server: - - address: amf.open5gs.org - guami: - - plmn_id: - mcc: 001 - mnc: 01 - amf_id: - region: 2 - set: 1 - tai: - - plmn_id: - mcc: 001 - mnc: 01 - tac: 1 - plmn_support: - - plmn_id: - mcc: 001 - mnc: 01 - s_nssai: - - sst: 1 - sd: 000001 - security: - integrity_order : [ NIA2, NIA1, NIA0 ] - ciphering_order : [ NEA0, NEA1, NEA2 ] - network_name: - full: Open5GS - amf_name: open5gs-amf0 - time: - t3512: - value: 540 diff --git a/demo_containerized/images/simulation/open5gs_setup/configs/ausf.yaml b/demo_containerized/images/simulation/open5gs_setup/configs/ausf.yaml deleted file mode 100644 index 884335b..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/configs/ausf.yaml +++ /dev/null @@ -1,14 +0,0 @@ -logger: - file: - path: /var/log/open5gs/ausf.log - -global: - -ausf: - sbi: - server: - - address: ausf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 diff --git a/demo_containerized/images/simulation/open5gs_setup/configs/bsf.yaml b/demo_containerized/images/simulation/open5gs_setup/configs/bsf.yaml deleted file mode 100644 index 133c904..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/configs/bsf.yaml +++ /dev/null @@ -1,14 +0,0 @@ -logger: - file: - path: /var/log/open5gs/bsf.log - -global: - -bsf: - sbi: - server: - - address: bsf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 diff --git a/demo_containerized/images/simulation/open5gs_setup/configs/nrf.yaml b/demo_containerized/images/simulation/open5gs_setup/configs/nrf.yaml deleted file mode 100644 index 39eb85f..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/configs/nrf.yaml +++ /dev/null @@ -1,11 +0,0 @@ -logger: - file: - path: /var/log/open5gs/nrf.log - -global: - -nrf: - sbi: - server: - - address: nrf.open5gs.org - port: 80 diff --git a/demo_containerized/images/simulation/open5gs_setup/configs/nssf.yaml b/demo_containerized/images/simulation/open5gs_setup/configs/nssf.yaml deleted file mode 100644 index bb75864..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/configs/nssf.yaml +++ /dev/null @@ -1,19 +0,0 @@ -logger: - file: - path: /var/log/open5gs/nssf.log - -global: - -nssf: - sbi: - server: - - address: nssf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 - nsi: - - uri: http://nrf.open5gs.org:80 - s_nssai: - sst: 1 - sd: 1 diff --git a/demo_containerized/images/simulation/open5gs_setup/configs/pcf.yaml b/demo_containerized/images/simulation/open5gs_setup/configs/pcf.yaml deleted file mode 100644 index 204db5d..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/configs/pcf.yaml +++ /dev/null @@ -1,16 +0,0 @@ -db_uri: mongodb://db.open5gs.org/open5gs - -logger: - file: - path: /var/log/open5gs/pcf.log - -global: - -pcf: - sbi: - server: - - address: pcf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 diff --git a/demo_containerized/images/simulation/open5gs_setup/configs/smf.yaml b/demo_containerized/images/simulation/open5gs_setup/configs/smf.yaml deleted file mode 100644 index 93beeab..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/configs/smf.yaml +++ /dev/null @@ -1,30 +0,0 @@ -logger: - file: - path: /var/log/open5gs/smf.log - -global: - -smf: - sbi: - server: - - address: smf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 - pfcp: - server: - - address: smf.open5gs.org - client: - upf: - - address: upf.open5gs.org - gtpu: - server: - - address: smf.open5gs.org - session: - - subnet: 10.0.0.0/24 - gateway: 10.0.0.1 - dns: - - 8.8.8.8 - - 8.8.4.4 - mtu: 1400 diff --git a/demo_containerized/images/simulation/open5gs_setup/configs/udm.yaml b/demo_containerized/images/simulation/open5gs_setup/configs/udm.yaml deleted file mode 100644 index e166299..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/configs/udm.yaml +++ /dev/null @@ -1,14 +0,0 @@ -logger: - file: - path: /var/log/open5gs/udm.log - -global: - -udm: - sbi: - server: - - address: udm.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 diff --git a/demo_containerized/images/simulation/open5gs_setup/configs/udr.yaml b/demo_containerized/images/simulation/open5gs_setup/configs/udr.yaml deleted file mode 100644 index d17a7b8..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/configs/udr.yaml +++ /dev/null @@ -1,16 +0,0 @@ -db_uri: mongodb://db.open5gs.org/open5gs - -logger: - file: - path: var/log/open5gs/udr.log - -global: - -udr: - sbi: - server: - - address: udr.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 diff --git a/demo_containerized/images/simulation/open5gs_setup/configs/upf.yaml b/demo_containerized/images/simulation/open5gs_setup/configs/upf.yaml deleted file mode 100644 index 1731395..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/configs/upf.yaml +++ /dev/null @@ -1,17 +0,0 @@ -logger: - file: - path: /var/log/open5gs/upf.log - -global: - -upf: - pfcp: - server: - - address: upf.open5gs.org - client: - gtpu: - server: - - address: upf.open5gs.org - session: - - subnet: 10.0.0.0/24 - gateway: 10.0.0.1 diff --git a/demo_containerized/images/simulation/open5gs_setup/create_physical_bridge.sh b/demo_containerized/images/simulation/open5gs_setup/create_physical_bridge.sh deleted file mode 100755 index ebb9d59..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/create_physical_bridge.sh +++ /dev/null @@ -1,5 +0,0 @@ -docker network create \ - --driver bridge \ - --subnet=192.168.73.128/26 \ - --opt com.docker.network.bridge.name="ros_gz_net" \ - ros_gz_net \ No newline at end of file diff --git a/demo_containerized/images/simulation/open5gs_setup/docker-compose-ue.yml b/demo_containerized/images/simulation/open5gs_setup/docker-compose-ue.yml deleted file mode 100644 index 093b799..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/docker-compose-ue.yml +++ /dev/null @@ -1,50 +0,0 @@ -services: - robot_1: - image: ue_amr - privileged: true - container_name: ${NAME_ROBOT_1} - environment: - USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - IGN_PARTITION: ${IGN_PARTITION} - networks: - public_net: - ipv4_address: ${IP_ROBOT_1} - ros_gz_net: - ipv4_address: 192.168.73.150 - volumes: - - ${DEMO_PROJECT_PATH}/open5gs_setup/oai/conf/UE_config.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/robot_logic/install/setup.bash - export ROS_DISCOVERY_SERVER="${ROS_DISCOVERY_SERVER}" - export IGN_IP=192.168.73.150 - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.yaml -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} & - sleep 10 - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROS_GZ_BRIDGE_NAME_1} - ) & - if [ "${EXECUTE_ROBOT_LAUNCH_FILE_1}" = "true" ]; then - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROBOT_LAUNCH_FILE_NAME_1} - ) & - fi - tail -f /dev/null - - healthcheck: - test: /bin/bash -c "pgrep nr-uesoftmodem" - interval: 10s - timeout: 5s - retries: 5 - -networks: - public_net: - external: true - name: phine-net - ros_gz_net: - external: - name: ros_gz_net diff --git a/demo_containerized/images/simulation/open5gs_setup/oai/conf/UE_config.yaml b/demo_containerized/images/simulation/open5gs_setup/oai/conf/UE_config.yaml deleted file mode 100644 index fad445c..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/oai/conf/UE_config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -uicc0: - dnn: internet - imsi: 001010000000101 - key: 8baf473f2f8fd09487cccbd7097c6862 - opc: 8e27b6af0e692e750f32667a3b14605d - nssai_sst: 1 - nssai_sd: 000001 diff --git a/demo_containerized/images/simulation/open5gs_setup/oai/conf/gNB_config.yaml b/demo_containerized/images/simulation/open5gs_setup/oai/conf/gNB_config.yaml deleted file mode 100644 index 7355156..0000000 --- a/demo_containerized/images/simulation/open5gs_setup/oai/conf/gNB_config.yaml +++ /dev/null @@ -1,197 +0,0 @@ -Active_gNBs: - - gnb-rfsim -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity: none -gNBs: - ##### Identification parameters: - - gNB_ID: 0xe00 - gNB_name: gnb-rfsim - tracking_area_code: 1 - plmn_list: - - mcc: 001 - mnc: 01 - mnc_length: 2 - snssaiList: - - sst: 1 - sd: 000001 - nr_cellid: 12345678 - ##### Physical parameters: - min_rxtxtime: 6 - servingCellConfigCommon: - #spCellConfigCommon - - physCellId: 0 - # downlinkConfigCommon - #frequencyInfoDL - # this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68 - absoluteFrequencySSB: 621312 - # this is 3300.60 MHz - dl_absoluteFrequencyPointA: 620040 - #scs-SpecificCarrierList - dl_offstToCarrier: 0 - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing: 1 - dl_carrierBandwidth: 106 - #initialDownlinkBWP - #genericParameters - # this is RBstart=0,L=106 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth: 28875 - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing: 1 - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero: 11 - initialDLBWPsearchSpaceZero: 0 - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand: 78 - #scs-SpecificCarrierList - ul_offstToCarrier: 0 - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing: 1 - ul_carrierBandwidth: 106 - pMax: 20 - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth: 28875 - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialULBWPsubcarrierSpacing: 1 - #rach-ConfigCommon - #rach-ConfigGeneric - prach_ConfigurationIndex: 98 - #prach_msg1_FDM - #0 = one, 1=two, 2=four, 3=eight - prach_msg1_FDM: 0 - prach_msg1_FrequencyStart: 0 - zeroCorrelationZoneConfig: 12 - preambleReceivedTargetPower: -104 - #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax: 6 - #powerRampingStep - # 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep: 1 - #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR - #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4 - #one (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB: 15 - #ra_ContentionResolutionTimer - #(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer: 7 - rsrp_ThresholdSSB: 19 - #prach-RootSequenceIndex_PR - #1 = 839, 2 = 139 - prach_RootSequenceIndex_PR: 2 - prach_RootSequenceIndex: 1 - # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex - msg1_SubcarrierSpacing: 1 - # restrictedSetConfig - # 0=unrestricted, 1=restricted type A, 2=restricted type B - restrictedSetConfig: 0 - msg3_DeltaPreamble: 1 - p0_NominalWithGrant: -90 - - # pucch-ConfigCommon setup : - # pucchGroupHopping - # 0 = neither, 1= group hopping, 2=sequence hopping - pucchGroupHopping: 0 - hoppingId: 40 - p0_nominal: -90 - ssb_PositionsInBurst_Bitmap: 1 - # ssb_periodicityServingCell - # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 - ssb_periodicityServingCell: 2 - - # dmrs_TypeA_position - # 0 = pos2, 1 = pos3 - dmrs_TypeA_Position: 0 - - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - subcarrierSpacing: 1 - - #tdd-UL-DL-ConfigurationCommon - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - referenceSubcarrierSpacing: 1 - - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity: 6 - nrofDownlinkSlots: 7 - nrofDownlinkSymbols: 6 - nrofUplinkSlots: 2 - nrofUplinkSymbols: 4 - ssPBCH_BlockPower: -25 - SCTP: - SCTP_INSTREAMS: 2 - SCTP_OUTSTREAMS: 2 - - ##### AMF parameters: - amf_ip_address: - - ipv4: 192.168.70.132 - - NETWORK_INTERFACES: - GNB_IPV4_ADDRESS_FOR_NG_AMF: 192.168.70.160 - GNB_IPV4_ADDRESS_FOR_NGU: 192.168.70.160 - GNB_PORT_FOR_S1U: 2152 # Spec 2152 - - -MACRLCs: - - num_cc: 1 - tr_s_preference: local_L1 - tr_n_preference: local_RRC - pusch_TargetSNRx10: 200 - pucch_TargetSNRx10: 200 - -L1s: - - num_cc: 1 - tr_n_preference: local_mac - prach_dtx_threshold: 200 - # pucch0_dtx_threshold = 150; - -RUs: - - local_rf: yes - nb_tx: 1 - nb_rx: 1 - att_tx: 0 - att_rx: 0 - bands: [78] - max_pdschReferenceSignalPower: -27 - max_rxgain: 75 - eNB_instances: [0] - sf_extension: 0 - sdr_addrs: serial=XXXXXXX - -rfsimulator: - serveraddr: server - -security: - # preferred ciphering algorithms - # the first one of the list that an UE supports in chosen - # valid values: nea0, nea1, nea2, nea3 - ciphering_algorithms: [nea0] - - # preferred integrity algorithms - # the first one of the list that an UE supports in chosen - # valid values: nia0, nia1, nia2, nia3 - integrity_algorithms: [nia2, nia0] - - # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter - # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' - drb_ciphering: yes - drb_integrity: no - -log_config: - global_log_level: info - hw_log_level: info - phy_log_level: info - mac_log_level: info - rlc_log_level: info - pdcp_log_level: info - rrc_log_level: info - ngap_log_level: debug - f1ap_log_level: debug diff --git a/demo_containerized/kill.sh b/demo_containerized/kill.sh new file mode 100755 index 0000000..9a725ef --- /dev/null +++ b/demo_containerized/kill.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Unified kill script for RoboSim5G containerized demo +# Usage: CORE_NETWORK=oai|free5gc|open5gs ./kill.sh + +CORE_NETWORK=${CORE_NETWORK:-oai} +REPO_ROOT=$(cd "$(dirname "$0")/.." && pwd) +DEMO_DIR=$(cd "$(dirname "$0")" && pwd) +CN_DIR="$REPO_ROOT/core_network_setup/$CORE_NETWORK" +export NAME_ROBOT_1=${NAME_ROBOT_1:-"ue_turtlebot"} + +echo "=== Stopping RoboSim5G containerized demo ($CORE_NETWORK) ===" + +# Stop UE services (simulation, rcc, dds) +cd "$DEMO_DIR" +docker compose -f oai/docker-compose-ue.yml down + +# Stop gNB containers +docker ps -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -r -I {} docker stop {} +docker ps -a -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -r -I {} docker rm {} + +# Stop core network +cd "$CN_DIR" +docker compose down 2>/dev/null || true + +# Remove networks +docker network rm ros_gz_net 2>/dev/null || true + +# Revoke X11 access +xhost -local:docker 2>/dev/null || true + +echo "=== RoboSim5G containerized demo stopped ===" diff --git a/demo_containerized/kill_all.sh b/demo_containerized/kill_all.sh deleted file mode 100755 index 649a8e3..0000000 --- a/demo_containerized/kill_all.sh +++ /dev/null @@ -1,8 +0,0 @@ -pkill -f ign\ gazebo -cd oai_setup -docker compose -f docker-compose-ue.yml down -docker ps -q --filter ancestor=oaisoftwarealliance/oai-gnb:2024.w44 | xargs -I {} docker stop {} && docker ps -a -q --filter ancestor=oaisoftwarealliance/oai-gnb:2024.w44 | xargs -I {} docker rm {} -docker compose down -docker network rm ros_gz_net -xhost -local:docker -cd .. diff --git a/demo_containerized/kill_all_free5gc.sh b/demo_containerized/kill_all_free5gc.sh deleted file mode 100755 index 1231e7e..0000000 --- a/demo_containerized/kill_all_free5gc.sh +++ /dev/null @@ -1,7 +0,0 @@ -cd free5gc_setup -docker compose -f docker-compose-ue.yml down -docker ps -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -I {} docker stop {} && docker ps -a -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -I {} docker rm {} -docker compose down -docker network rm ros_gz_net -xhost -local:docker -cd .. diff --git a/demo_containerized/kill_all_open5gs.sh b/demo_containerized/kill_all_open5gs.sh deleted file mode 100755 index b42bdc3..0000000 --- a/demo_containerized/kill_all_open5gs.sh +++ /dev/null @@ -1,7 +0,0 @@ -cd open5gs_setup -docker compose -f docker-compose-ue.yml down -docker ps -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -I {} docker stop {} && docker ps -a -q --filter ancestor=oaisoftwarealliance/oai-gnb:2026.w04 | xargs -I {} docker rm {} -docker compose down -docker network rm ros_gz_net -xhost -local:docker -cd .. diff --git a/demo_containerized/launch.sh b/demo_containerized/launch.sh new file mode 100755 index 0000000..fd753b7 --- /dev/null +++ b/demo_containerized/launch.sh @@ -0,0 +1,89 @@ +#!/bin/bash +# Unified launch script for RoboSim5G containerized demo +# Usage: CORE_NETWORK=oai|free5gc|open5gs ./launch.sh + +set -e + +CORE_NETWORK=${CORE_NETWORK:-oai} +REPO_ROOT=$(cd "$(dirname "$0")/.." && pwd) +DEMO_DIR=$(cd "$(dirname "$0")" && pwd) +CN_DIR="$REPO_ROOT/core_network_setup/$CORE_NETWORK" + +# Validate CORE_NETWORK +if [[ ! "$CORE_NETWORK" =~ ^(oai|free5gc|open5gs)$ ]]; then + echo "ERROR: CORE_NETWORK must be one of: oai, free5gc, open5gs (got: $CORE_NETWORK)" + exit 1 +fi + +echo "=== Starting RoboSim5G containerized demo with $CORE_NETWORK core network ===" + +# Set CN-specific environment variables +case $CORE_NETWORK in + oai) + export UE_ROUTE_SUBNET="10.0.0.0/24" + export UE_ROUTE_GW="192.168.70.134" + export UE_CARRIER_FREQ="3619200000" + ;; + free5gc) + export UE_ROUTE_SUBNET="10.0.0.0/24" + export UE_ROUTE_GW="192.168.70.135" + export UE_CARRIER_FREQ="3319680000" + ;; + open5gs) + export UE_ROUTE_SUBNET="10.0.0.0/24" + export UE_ROUTE_GW="192.168.70.134" + export UE_CARRIER_FREQ="3319680000" + ;; +esac + +# Set common environment variables +export CORE_NETWORK +export DEMO_PROJECT_PATH="$DEMO_DIR" +export ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-10} +export IGN_PARTITION=${IGN_PARTITION:-domain1} +export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=~/workspace/install/lib +export ROS_DISCOVERY_SERVER="192.168.70.159:11811" +export GNB_NAME_FOR_BUTTON=${GNB_NAME_FOR_BUTTON:-"gNB1"} +export UE_NAME_FOR_BUTTON=${UE_NAME_FOR_BUTTON:-"ue_turtlebot"} +export GPU_RUNTIME=${GPU_RUNTIME:-"nvidia"} +export NAME_ROBOT_1=${NAME_ROBOT_1:-"ue_turtlebot"} + +# 1. Start the core network +echo "Starting $CORE_NETWORK core network..." +cd "$CN_DIR" +docker compose up -d + +# 2. Wait for core network readiness +if [ "$CORE_NETWORK" = "oai" ]; then + ./wait_for_core_network.sh +else + sleep 10 +fi + +# 3. Add UE subscriber (open5gs only, after DB is ready) +if [ "$CORE_NETWORK" = "open5gs" ]; then + echo "Adding UE subscriber to Open5GS database..." + cd "$CN_DIR/scripts" + ./add_ue_subscriber.sh + cd "$CN_DIR" +fi + +# 4. Create ros_gz_net bridge +docker network create \ + --driver bridge \ + --subnet=192.168.73.128/26 \ + --opt com.docker.network.bridge.name="ros_gz_net" \ + ros_gz_net 2>/dev/null || true + +# 5. Start DDS discovery server +cd "$DEMO_DIR" +docker compose -f oai/docker-compose-ue.yml up dds_discovery_server -d + +# 6. Start simulation container (Gazebo) +xhost +local:docker +docker compose -f oai/docker-compose-ue.yml up simulation -d + +# 7. Start RCC +docker compose -f oai/docker-compose-ue.yml up rcc -d + +echo "=== RoboSim5G containerized demo launched with $CORE_NETWORK ===" diff --git a/demo_containerized/launch_robot_5G_docker.sh b/demo_containerized/launch_robot_5G_docker.sh deleted file mode 100755 index a559e9c..0000000 --- a/demo_containerized/launch_robot_5G_docker.sh +++ /dev/null @@ -1,19 +0,0 @@ -export DEMO_PROJECT_PATH=$(pwd) -export ROS_DOMAIN_ID=10 -export IGN_PARTITION=domain1 -export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=~/workspace/install/lib -export ROS_DISCOVERY_SERVER="192.168.70.159:11811" -export GNB_NAME_FOR_BUTTON="gNB1" -export UE_NAME_FOR_BUTTON="ue_turtlebot" -export GPU_RUNTIME="nvidia" - - -cd oai_setup -docker compose up -d -./wait_for_core_network.sh -docker compose -f docker-compose-ue.yml up dds_discovery_server -d -./create_physical_bridge.sh -xhost +local:docker -docker compose -f docker-compose-ue.yml up simulation -d -docker compose -f docker-compose-ue.yml up rcc -d -cd .. diff --git a/demo_containerized/launch_robot_5G_docker_free5gc.sh b/demo_containerized/launch_robot_5G_docker_free5gc.sh deleted file mode 100755 index 71968fa..0000000 --- a/demo_containerized/launch_robot_5G_docker_free5gc.sh +++ /dev/null @@ -1,19 +0,0 @@ -export DEMO_PROJECT_PATH=$(pwd) -export ROS_DOMAIN_ID=10 -export IGN_PARTITION=domain1 -export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=~/workspace/install/lib -export ROS_DISCOVERY_SERVER="192.168.70.159:11811" -export GNB_NAME_FOR_BUTTON="gNB1" -export UE_NAME_FOR_BUTTON="ue_turtlebot" -export GPU_RUNTIME="nvidia" - - -cd free5gc_setup -docker compose up -d -sleep 10 -docker compose -f docker-compose-ue.yml up dds_discovery_server -d -./create_physical_bridge.sh -xhost +local:docker -docker compose -f docker-compose-ue.yml up simulation -d -docker compose -f docker-compose-ue.yml up rcc -d -cd .. diff --git a/demo_containerized/launch_robot_5G_docker_open5gs.sh b/demo_containerized/launch_robot_5G_docker_open5gs.sh deleted file mode 100755 index 59d66b7..0000000 --- a/demo_containerized/launch_robot_5G_docker_open5gs.sh +++ /dev/null @@ -1,19 +0,0 @@ -export DEMO_PROJECT_PATH=$(pwd) -export ROS_DOMAIN_ID=10 -export IGN_PARTITION=domain1 -export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=~/workspace/install/lib -export ROS_DISCOVERY_SERVER="192.168.70.159:11811" -export GNB_NAME_FOR_BUTTON="gNB1" -export UE_NAME_FOR_BUTTON="ue_turtlebot" -export GPU_RUNTIME="nvidia" - - -cd open5gs_setup -docker compose up -d -sleep 10 -docker compose -f docker-compose-ue.yml up dds_discovery_server -d -./create_physical_bridge.sh -xhost +local:docker -docker compose -f docker-compose-ue.yml up simulation -d -docker compose -f docker-compose-ue.yml up rcc -d -cd .. diff --git a/demo_containerized/oai/conf/UE_config.yaml b/demo_containerized/oai/conf/UE_config.yaml new file mode 100644 index 0000000..170a755 --- /dev/null +++ b/demo_containerized/oai/conf/UE_config.yaml @@ -0,0 +1,7 @@ +uicc0: + dnn : oai + imsi : 001010000000101 + key : fec86ba6eb707ed08905757b1bb44b8f + opc : C42449363BBAD02B66D16BC975D77CC1 + nssai_sst : 1 + # nssai_sd : 000001 diff --git a/demo_containerized/open5gs_setup/oai/conf/gNB_config.yaml b/demo_containerized/oai/conf/gNB_config.yaml similarity index 95% rename from demo_containerized/open5gs_setup/oai/conf/gNB_config.yaml rename to demo_containerized/oai/conf/gNB_config.yaml index 7355156..6db29b7 100644 --- a/demo_containerized/open5gs_setup/oai/conf/gNB_config.yaml +++ b/demo_containerized/oai/conf/gNB_config.yaml @@ -1,19 +1,21 @@ Active_gNBs: - - gnb-rfsim + - gNB1 # Asn1_verbosity, choice in: none, info, annoying Asn1_verbosity: none gNBs: ##### Identification parameters: - - gNB_ID: 0xe00 - gNB_name: gnb-rfsim + - gNB_ID : 0x1 + gNB_name : gNB1 tracking_area_code: 1 plmn_list: - - mcc: 001 - mnc: 01 + - mcc : 001 + mnc : 01 mnc_length: 2 snssaiList: - sst: 1 - sd: 000001 + sd: 0xffffff + - sst: 1 + sd: 0x1 nr_cellid: 12345678 ##### Physical parameters: min_rxtxtime: 6 @@ -132,11 +134,11 @@ gNBs: ##### AMF parameters: amf_ip_address: - - ipv4: 192.168.70.132 + - ipv4 : 192.168.70.132 NETWORK_INTERFACES: - GNB_IPV4_ADDRESS_FOR_NG_AMF: 192.168.70.160 - GNB_IPV4_ADDRESS_FOR_NGU: 192.168.70.160 + GNB_IPV4_ADDRESS_FOR_NG_AMF : 192.168.70.160 + GNB_IPV4_ADDRESS_FOR_NGU : 192.168.70.160 GNB_PORT_FOR_S1U: 2152 # Spec 2152 diff --git a/demo_containerized/oai/docker-compose-gNB.free5gc.yml b/demo_containerized/oai/docker-compose-gNB.free5gc.yml new file mode 100644 index 0000000..89b3ff6 --- /dev/null +++ b/demo_containerized/oai/docker-compose-gNB.free5gc.yml @@ -0,0 +1,14 @@ +services: + gNB : + cap_add: + - SYS_NICE + cap_drop: + - ALL + networks: + n3_net: + ipv4_address : 192.168.71.160 + +networks: + n3_net: + external: true + name : demo-oai-n3-net diff --git a/demo_containerized/images/simulation/open5gs_setup/docker-compose-gNB.yml b/demo_containerized/oai/docker-compose-gNB.yml similarity index 75% rename from demo_containerized/images/simulation/open5gs_setup/docker-compose-gNB.yml rename to demo_containerized/oai/docker-compose-gNB.yml index f4cb82f..fe5d174 100644 --- a/demo_containerized/images/simulation/open5gs_setup/docker-compose-gNB.yml +++ b/demo_containerized/oai/docker-compose-gNB.yml @@ -1,16 +1,18 @@ services: - gNB: + gNB : image: oaisoftwarealliance/oai-gnb:2026.w04 privileged: true - container_name: oai-gNB1 + container_name : oai-gNB1 environment: USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time ASAN_OPTIONS: detect_leaks=0 + ports: + - "2021:2021" volumes: - - ${DEMO_PROJECT_PATH}/open5gs_setup/oai/conf/gNB_config.yaml:/opt/oai-gnb/etc/gnb.yaml + - ${DEMO_PROJECT_PATH}/oai/conf/gNB_config.yaml:/opt/oai-gnb/etc/gnb.yaml networks: public_net: - ipv4_address: 192.168.70.160 + ipv4_address : 192.168.70.160 healthcheck: test: /bin/bash -c "pgrep nr-softmodem" interval: 10s @@ -26,4 +28,4 @@ services: networks: public_net: external: true - name: phine-net + name : phine-net diff --git a/demo_containerized/free5gc_setup/docker-compose-ue.yml b/demo_containerized/oai/docker-compose-ue.yml similarity index 76% rename from demo_containerized/free5gc_setup/docker-compose-ue.yml rename to demo_containerized/oai/docker-compose-ue.yml index 2f03c7e..b3a58b3 100644 --- a/demo_containerized/free5gc_setup/docker-compose-ue.yml +++ b/demo_containerized/oai/docker-compose-ue.yml @@ -4,7 +4,7 @@ services: privileged: true container_name: ${NAME_ROBOT_1} environment: - USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 -C ${UE_CARRIER_FREQ:-3619200000} --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} IGN_PARTITION: ${IGN_PARTITION} networks: @@ -13,7 +13,7 @@ services: ros_gz_net: ipv4_address: 192.168.73.150 volumes: - - ./oai/UE_config.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml + - ${DEMO_PROJECT_PATH}/oai/conf/UE_config.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml entrypoint: - /bin/bash - -c @@ -23,17 +23,17 @@ services: export ROS_DISCOVERY_SERVER="${ROS_DISCOVERY_SERVER}" export IGN_IP=192.168.73.150 export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.yaml -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} & - sleep 10 + /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.yaml -E --rfsim -r 106 --numerology 1 -C ${UE_CARRIER_FREQ:-3619200000} --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time & + ./wait_for_ue_connected.sh ( ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROS_GZ_BRIDGE_NAME_1} ) & if [ "${EXECUTE_ROBOT_LAUNCH_FILE_1}" = "true" ]; then - ( + ( ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROBOT_LAUNCH_FILE_NAME_1} ) & fi - tail -f /dev/null + tail -f /dev/null healthcheck: test: /bin/bash -c "pgrep nr-uesoftmodem" @@ -62,13 +62,14 @@ services: - | source /opt/ros/humble/setup.bash source /app/rviz_rcc/install/setup.bash + export ROS_DISCOVERY_SERVER="192.168.70.159:11811" export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - ip route add 10.0.0.0/24 via 192.168.70.135 dev eth0 - sleep 20 + ip route add ${UE_ROUTE_SUBNET:-10.0.0.0/24} via ${UE_ROUTE_GW:-192.168.70.134} dev eth0 + ./wait_for_nav_stack.sh ros2 launch rviz_launch rviz_launch.launch.py & - tail -f /dev/null - - + tail -f /dev/null + + dds_discovery_server: image: dds_discovery_server privileged: true @@ -79,14 +80,14 @@ services: public_net: ipv4_address: 192.168.70.159 ports: - - "11811:11811" + - "11811:11811" entrypoint: - /bin/bash - -c - | - ip route add 10.0.0.0/24 via 192.168.70.135 dev eth0 + ip route add ${UE_ROUTE_SUBNET:-10.0.0.0/24} via ${UE_ROUTE_GW:-192.168.70.134} dev eth0 source /opt/ros/humble/setup.bash - fastdds discovery -i 0 -l 192.168.70.159 -p 11811 + fastdds discovery -i 0 -l 192.168.70.159 -p 11811 simulation: image: simulation @@ -95,19 +96,23 @@ services: environment: - DISPLAY=${DISPLAY} - QT_X11_NO_MITSHM=1 - - ROS_DOMAIN_ID= ${ROS_DOMAIN_ID} - - IGN_PARTITION=${IGN_PARTITION} + - ROS_DOMAIN_ID=${ROS_DOMAIN_ID} + - IGN_PARTITION=${IGN_PARTITION} - GNB_NAME_FOR_BUTTON=${GNB_NAME_FOR_BUTTON} - UE_NAME_FOR_BUTTON=${UE_NAME_FOR_BUTTON} - PROJECT_PATH=/app - DEMO_PROJECT_PATH=${DEMO_PROJECT_PATH} - - ROS_DISCOVERY_SERVER="192.168.70.159:11811" - - IGN_IP=192.168.73.151 + - ROS_DISCOVERY_SERVER=192.168.70.159:11811 + - IGN_IP=192.168.73.151 + - CORE_NETWORK=${CORE_NETWORK:-oai} - NVIDIA_VISIBLE_DEVICES=all - - NVIDIA_DRIVER_CAPABILITIES=all + - NVIDIA_DRIVER_CAPABILITIES=all + - NAME_ROBOT_1=${NAME_ROBOT_1:-"ue_turtlebot"} + volumes: - /tmp/.X11-unix:/tmp/.X11-unix:rw - /var/run/docker.sock:/var/run/docker.sock + - ${DEMO_PROJECT_PATH}/oai:/app/oai stdin_open: true tty: true runtime: ${GPU_RUNTIME:-runc} @@ -138,18 +143,16 @@ services: source /opt/ros/humble/setup.bash source /app/gazebo_launch/install/setup.bash export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml + export CORE_NETWORK=${CORE_NETWORK:-oai} export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=${IGN_GAZEBO_SYSTEM_PLUGIN_PATH}:/usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins:/opt/ros/humble/lib - ip route add 10.0.0.0/24 via 192.168.70.135 dev eth0 + ip route add ${UE_ROUTE_SUBNET:-10.0.0.0/24} via ${UE_ROUTE_GW:-192.168.70.134} dev eth0 ros2 launch ign_turtlebot gazebo_launch.launch.py & - tail -f /dev/null - + tail -f /dev/null + networks: public_net: external: name: phine-net - n6_net: - external: - name: demo-oai-n6-net ros_gz_net: external: name: ros_gz_net diff --git a/demo_containerized/oai_setup/README.md b/demo_containerized/oai_setup/README.md deleted file mode 100644 index 58a52ba..0000000 --- a/demo_containerized/oai_setup/README.md +++ /dev/null @@ -1,581 +0,0 @@ -# OAI Core Network Deployment for RoboSim5G - -This deployment provides an OpenAirInterface (OAI) 5G Core Network that integrates with RoboSim5G. - -## About OAI (OpenAirInterface) - -OpenAirInterface is a leading open-source implementation of 5G Core Network (5GC) and Radio Access Network (RAN) developed by EURECOM. Key features: -- **Full 3GPP compliance** with 5G Core specifications -- **High performance** C++-based network functions -- **Modular architecture** with independent containerized NFs -- **Advanced features** including network slicing, QoS policies, and eBPF data plane -- **Active development** backed by research and industry collaboration -- **Database-driven** subscriber management using MySQL - -## Architecture - -This deployment includes: -- **Control Plane NFs**: AMF, SMF, UDM, UDR, AUSF, NRF, PCF -- **User Plane**: OAI UPF with eBPF-based high-performance data plane -- **Database**: MySQL for subscriber and network configuration -- **Traffic Server**: External data network for internet access simulation - -## Quick Start - -### 1. Start the Core Network -```bash -docker compose up -d -``` - -Wait for all services to become healthy (this may take 15-30 seconds): -```bash -docker compose ps -``` - -All services should show "healthy" status. - -### 2. Verify Core Network is Running - -Check that the UDR has completed initialization: -```bash -docker logs oai-udr -``` - -You should see at the end: -``` -[udr_app] [debug] Status: REGISTERED -[udr_app] [debug] HeartBeat timer: 50 -[udr_app] [debug] Priority: 1 -[udr_app] [debug] Capacity: 100 -``` - -### 3. Configure Subscribers - -Subscribers are configured via the MySQL database. The default subscriber is already configured: - -**Default subscriber credentials:** -- **IMSI**: `001010000000101` -- **K (Permanent Key)**: `fec86ba6eb707ed08905757b1bb44b8f` -- **OPc (Operator Key)**: `C42449363BBAD02B66D16BC975D77CC1` -- **DNN**: `oai` -- **S-NSSAI**: SST=`1`, SD=`FFFFFF` (no slice differentiator) - -#### Adding Additional Subscribers - -To add more subscribers for multi-robot scenarios, connect to the MySQL database: - -```bash -docker exec -it mysql mysql -u root -plinux oai_db -``` - -Then run SQL commands (example for second robot): - -```sql --- Add authentication data -INSERT INTO AuthenticationSubscription (ueid, authenticationMethod, encPermanentKey, protectionParameterId, sequenceNumber, authenticationManagementField, algorithmId, encOpcKey, encTopcKey, vectorGenerationInHss, n5gcAuthMethod, rgAuthenticationInd, supi) -VALUES ('001010000000102', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{"sqn": "000000000020", "sqnScheme": "NON_TIME_BASED", "lastIndexes": {"ausf": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000102'); - --- Add session management subscription data -INSERT INTO SessionManagementSubscriptionData (ueid, servingPlmnid, singleNssai, dnnConfigurations) -VALUES ('001010000000102', '00101', '{"sst": 1, "sd": "FFFFFF"}', -'{"oai":{"pduSessionTypes":{"defaultSessionType": "IPV4"},"sscModes": {"defaultSscMode": "SSC_MODE_1"},"5gQosProfile": {"5qi": 6,"arp":{"priorityLevel": 15,"preemptCap": "NOT_PREEMPT","preemptVuln":"PREEMPTABLE"},"priorityLevel":1},"sessionAmbr":{"uplink":"1000Mbps", "downlink":"1000Mbps"}}}'); - --- Exit MySQL -exit; -``` - -> **Note:** Increment the IMSI for each additional robot: `001010000000102`, `001010000000103`, etc. - -### 4. Start gNB and UE - -Follow the RoboSim5G demo instructions to start your Gazebo simulation with the robot. The gNB and UE will automatically connect to this core network. - -Alternatively, for standalone testing: -```bash -# Start gNB -docker compose -f docker-compose-gNB.yml up -d - -# Verify gNB connected to AMF (wait 5-10 seconds) -docker logs oai-amf -``` - -Expected output showing gNB registration: -``` -|------------------------------gNBs' Information-------------------------| -| Index | gNB Name | Status | PLMN | Global Id | -| 1 | gnb-rfsim | Connected | 001,01 | 0x0E00 | -``` - -```bash -# Start UE -docker compose -f docker-compose-ue.yml up oai-nr-ue -d - -# Verify UE registered (wait 5-10 seconds) -docker logs oai-amf -``` - -Expected output showing UE registration: -``` -|----------------------UEs' Information-----------------------------------------| -| Index | 5GMM State | IMSI | GUTI | -| 1 | 5GMM-REGISTERED | 001010000000101 | 00101010041631377652 | -``` - -## Managing the Core Network - -### Check Service Status -```bash -docker compose ps -``` - -All services should show "healthy" status. - -### View Logs -```bash -# View all services -docker compose logs -f - -# View specific service -docker compose logs -f amf -docker compose logs -f smf -docker compose logs -f upf -docker compose logs -f mysql -``` - -### Verify Network Functions Registration -Check the NRF to see registered network functions: -```bash -docker logs oai-nrf -``` - -You should see heartbeat messages from AMF, SMF, UDM, UDR, AUSF, PCF, and UPF. - -### Stop the Core Network -```bash -# Stop gNB and UE first (if running) -docker compose -f docker-compose-gNB.yml down -docker compose -f docker-compose-ue.yml down - -# Stop core network -docker compose down -``` - -> **Important:** Do NOT use `docker compose down -v` as this will delete the MySQL database with all subscriber configurations. - -### Restart Services -```bash -# Restart all services -docker compose restart - -# Restart specific service -docker compose restart amf -docker compose restart upf -``` - -## Subscriber Data Persistence - -Subscriber data is stored in the MySQL database container. The database is initialized from `./database/oai_db.sql` on first startup. - -### Backup Database -```bash -docker exec mysql mysqldump -u root -plinux oai_db > backup_$(date +%Y%m%d).sql -``` - -### Restore Database -```bash -docker exec -i mysql mysql -u root -plinux oai_db < backup_file.sql -``` - -### View Current Subscribers -```bash -docker exec mysql mysql -u root -plinux oai_db -e "SELECT ueid, authenticationMethod, encPermanentKey, encOpcKey FROM AuthenticationSubscription;" -``` - -## Network Configuration - -The deployment uses a single Docker network for all components: - -### Control and User Plane Network (public_net) -- **Subnet**: `192.168.70.128/26` -- **Bridge name**: `phine-net` -- All core network functions and RAN communicate on this network - -### UE IP Address Pool -- **UE Data Network**: `10.0.0.0/16` -- IP addresses assigned to UE tunnel interfaces (e.g., `10.0.0.2`, `10.0.0.3`) - -### Key Service Endpoints - -| Service | IP Address | Port | Protocol | Purpose | -|---------|------------|------|----------|---------| -| **MySQL** | 192.168.70.131 | 3306 | TCP | Subscriber database | -| **NRF** | 192.168.70.130 | 8080 | HTTP | NF discovery | -| **AMF** | 192.168.70.132 | 38412 | SCTP | N2 interface (gNB) | -| **AMF** | 192.168.70.132 | 8080 | HTTP | SBI interface | -| **SMF** | 192.168.70.133 | 8080 | HTTP | SBI interface | -| **SMF** | 192.168.70.133 | 8805 | UDP | PFCP (N4) | -| **UPF** | 192.168.70.134 | 2152 | UDP | GTP-U (N3) | -| **UPF** | 192.168.70.134 | 8805 | UDP | PFCP (N4) | -| **UDR** | 192.168.70.136 | 8080 | HTTP | SBI interface | -| **UDM** | 192.168.70.137 | 8080 | HTTP | SBI interface | -| **AUSF** | 192.168.70.138 | 8080 | HTTP | SBI interface | -| **PCF** | 192.168.70.139 | 8080 | HTTP | SBI interface | -| **Ext DN** | 192.168.70.135 | - | - | External data network | - -## Configuration Files - -All OAI network functions share a single unified configuration file: - -### Main Configuration -- `./conf/config.yaml` - **Unified configuration for all OAI NFs** - - Contains SBI interfaces for all network functions - - Defines PLMN, TAC, and slice configurations - - Configures UPF user plane parameters - - Sets up MySQL database connection - -### Database -- `./database/oai_db.sql` - Initial MySQL database schema and subscriber data - -### Health Scripts -- `./healthscripts/mysql-healthcheck.sh` - MySQL container health check - -### QoS Policies -- `./policies/qos/pcc_rules/pcc_rules.yaml` - PCC (Policy and Charging Control) rules -- `./policies/qos/policy_decisions/policy_decision.yaml` - Policy decisions -- `./policies/qos/qos_data/qos_data.yaml` - QoS flow configuration - -### Radio Access Network (for testing) -- `./conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf` - gNB configuration (rfsimulator mode) -- `./conf/ue1.conf` - UE configuration with subscriber credentials - -## Default Network Parameters - -The deployment is pre-configured with the following network identifiers: - -- **MCC (Mobile Country Code)**: `001` (Test network) -- **MNC (Mobile Network Code)**: `01` -- **PLMN ID**: `00101` -- **TAC (Tracking Area Code)**: `1` - -### Network Slices (S-NSSAI) -One network slice is configured by default: -- **SST**: `1` (eMBB - Enhanced Mobile Broadband) -- **SD**: `FFFFFF` (no slice differentiator) - -### Data Networks (DNN) -- **oai** - Main data network for robot connectivity -- **ims** - IP Multimedia Subsystem (available but not used by default) - -## Troubleshooting - -### UE Not Attaching - -1. **Check subscriber exists in database:** - ```bash - docker exec mysql mysql -u root -plinux oai_db -e \ - "SELECT ueid FROM AuthenticationSubscription WHERE ueid='001010000000101';" - ``` - -2. **Verify UE credentials match database:** - - Check `./conf/ue1.conf` for IMSI, K, OPc - - Ensure DNN (`oai`) matches database configuration - - Verify S-NSSAI (SST=1) is configured - -3. **Check AMF logs:** - ```bash - docker compose logs -f amf - ``` - Look for: - - "Receive Registration Request" messages - - Authentication success/failure - - "Send Registration Accept" confirmation - -4. **Check AUSF logs for authentication:** - ```bash - docker compose logs -f oai-ausf - ``` - -5. **Verify MySQL is accessible:** - ```bash - docker compose logs mysql - ``` - -### gNB Not Connecting to AMF - -1. **Verify network connectivity:** - ```bash - docker exec oai-gNB1 ping -c 3 192.168.70.132 - ``` - -2. **Check AMF logs for NG Setup:** - ```bash - docker compose logs -f amf - ``` - Look for "Received NG SETUP REQUEST" and "Sending NG SETUP RESPONSE" - -3. **Verify PLMN configuration:** - - gNB PLMN must match AMF PLMN (001/01) - - Check `./conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf` - - Verify in `./conf/config.yaml` under AMF section - -4. **Check gNB logs:** - ```bash - docker logs oai-gNB1 - ``` - Look for "Received NG Setup Response" - -### No Internet Access from UE - -1. **Check UE has tunnel interface:** - ```bash - docker exec ip addr show - ``` - Should see `oaitun_ue1` with IP in `10.0.0.0/16` range - -2. **Verify PDU Session established:** - ```bash - docker compose logs -f smf - ``` - Look for "PDU Session Establishment Accept" messages - -3. **Check UPF logs:** - ```bash - docker compose logs -f upf - ``` - Look for: - - PFCP association with SMF - - Session creation messages - - GTP-U tunnel establishment - -4. **Verify external data network routing:** - ```bash - docker exec oai-ext-dn ip route | grep 10.0.0 - ``` - Should show route to `10.0.0.0/16` via UPF (192.168.70.134) - -5. **Test connectivity from UE:** - ```bash - docker exec ping -I oaitun_ue1 192.168.70.135 - ``` - -### UPF Not Connecting to SMF - -1. **Check UPF logs for PFCP association:** - ```bash - docker compose logs -f upf - ``` - Look for "Received PFCP Association Setup Request" - -2. **Verify SMF configuration:** - Check `./conf/config.yaml` under `nfs.upf` section for correct IP and ports - -3. **Check network connectivity:** - ```bash - docker exec oai-upf ping -c 3 192.168.70.133 - ``` - -### MySQL Connection Issues - -1. **Check MySQL health:** - ```bash - docker compose ps mysql - ``` - Should show "healthy" status - -2. **Test database connection:** - ```bash - docker exec mysql mysql -u test -ptest oai_db -e "SELECT 1;" - ``` - -3. **Check which NFs are connected:** - ```bash - docker compose logs mysql | grep "Connect" - ``` - -4. **Restart MySQL and dependent services:** - ```bash - docker compose restart mysql - sleep 10 - docker compose restart oai-udr oai-udm - ``` - -### Services Not Registering with NRF - -1. **Check NRF is running:** - ```bash - docker compose logs -f oai-nrf - ``` - -2. **Verify NRF address in config:** - Check `./conf/config.yaml` - ensure `register_nf.general` is set to `yes` - -3. **Restart NRF and other services:** - ```bash - docker compose restart oai-nrf - sleep 5 - docker compose restart oai-amf oai-smf oai-udm oai-udr oai-ausf oai-pcf oai-upf - ``` - -## Advanced Configuration - -### Modifying Network Slices - -To add or modify network slices, edit `./conf/config.yaml`: - -```yaml -amf: - supported_slices: - - sst: 1 - sd: 0xFFFFFF # Default slice - - sst: 2 # New slice for URLLC - sd: 0x000002 -``` - -Update the MySQL database with matching slice configurations for subscribers. - -### Changing UE IP Pool - -Edit `./conf/config.yaml` under the SMF/UPF section: - -```yaml -upf: - ue_ip_pools: - - network: 10.0.0.0/16 # Change this - ranges: - - start: 10.0.0.2 - end: 10.0.255.254 -``` - -Also update the external data network container: -```yaml -oai-traffic-server: - entrypoint: /bin/bash -c \ - "ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0; ip route; sleep infinity" -``` - -### Adjusting QoS Policies - -Modify the policy files in `./policies/qos/`: -- `pcc_rules.yaml` - Define PCC rules (policy enforcement) -- `qos_data.yaml` - Set 5QI, bitrates, and packet delays -- `policy_decision.yaml` - Map policies to subscribers - -Restart PCF after changes: -```bash -docker compose restart oai-pcf -``` - -### Enabling HTTP/2 for SBI - -In `./conf/config.yaml`, change: -```yaml -http_version: 2 -``` - -HTTP/2 provides better performance for service-based interfaces. - -### Changing PLMN Configuration - -Update all occurrences in `./conf/config.yaml`: - -```yaml -# In AMF section -amf: - guami: - mcc: 208 # Change MCC - mnc: 95 # Change MNC - plmn_support_list: - - mcc: 208 - mnc: 95 - tac: 0x0001 -``` - -Also update: -- gNB configuration (`gnb.sa.bandn78.fr1.106PRB.rfsim.conf`) -- Subscriber IMSIs in the database (must start with new MCC/MNC) - -## Integration with RoboSim5G - -When using this CN with RoboSim5G: - -1. **Start the core network first:** - ```bash - cd demo/oai_setup - docker compose up -d - ./wait_for_core_network.sh - ``` - -2. **Configure subscribers** for your robots in the MySQL database - -3. **Launch your Gazebo simulation** with RoboSim5G plugins: - - The gNB plugin will automatically connect to the AMF at `192.168.70.132` - - The UE plugin will register with credentials from the plugin configuration - - Ensure plugin configuration matches subscriber data in MySQL - -4. **Verify connectivity:** - - Check AMF logs for successful UE registration - - Verify PDU session establishment in SMF logs - - Test data connectivity through the 5G network - -### Multi-Robot Configuration - -For multiple robots, add subscribers with sequential IMSIs: - -| Robot | IMSI | K (same for all) | OPc (same for all) | -|-------|------|------------------|-------------------| -| Robot 1 | `001010000000101` | `fec86ba6eb707ed08905757b1bb44b8f` | `C42449363BBAD02B66D16BC975D77CC1` | -| Robot 2 | `001010000000102` | `fec86ba6eb707ed08905757b1bb44b8f` | `C42449363BBAD02B66D16BC975D77CC1` | -| Robot 3 | `001010000000103` | `fec86ba6eb707ed08905757b1bb44b8f` | `C42449363BBAD02B66D16BC975D77CC1` | - -Each robot can use different network slices and QoS profiles for realistic 5G scenarios. - -## Performance Considerations - -### OAI Network Functions -- Written in C++ for high performance -- Multi-threaded architecture -- Optimized for low latency - -### eBPF-based UPF -The OAI UPF uses Extended Berkeley Packet Filter (eBPF) for fast packet processing: -- Requires kernel >= 4.18 (5.4+ recommended) -- Needs `NET_ADMIN` and `SYS_ADMIN` capabilities -- Provides near line-rate throughput - -### Resource Requirements -Minimum recommended resources for the full deployment: -- **CPU**: 4 cores -- **RAM**: 8 GB -- **Storage**: 10 GB -- **Network**: Bridge networking with kernel routing support - - -## Utility Scripts - -### Wait for Core Network -```bash -./wait_for_core_network.sh -``` -This script waits for all core network services to become healthy before proceeding. - -### Create Physical Bridge -```bash -./create_physical_bridge.sh -``` -Creates network bridges and sets up routing for the 5G network (if needed for host integration). - -## Additional Resources - -- [OAI GitLab Repository](https://gitlab.eurecom.fr/oai/cn5g) -- [OAI 5G Core Network Documentation](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/docs/DEPLOY_HOME.md) -- [OAI Tutorials](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/tree/master/docs/TUTORIALS) -- [3GPP 5G Specifications](https://www.3gpp.org/specifications-technologies/specifications-by-series) -- [RoboSim5G Project](https://github.com/phinetech/RoboSim5G) - -## Support - -For issues specific to: -- **OAI Core Network**: Check [OAI GitLab issues](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/issues) -- **OAI Community**: Join the [OAI Slack workspace](https://openairinterface.slack.com/) -- **RoboSim5G integration**: Use the [RoboSim5G Slack chat](https://join.slack.com/t/robosimworkspace/shared_invite/zt-38i7sbsit-FpsT6d7PU241~nGz0fcUig) - diff --git a/demo_containerized/oai_setup/conf/config.yaml b/demo_containerized/oai_setup/conf/config.yaml deleted file mode 100644 index 4563e02..0000000 --- a/demo_containerized/oai_setup/conf/config.yaml +++ /dev/null @@ -1,236 +0,0 @@ -################################################################################ -# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The OpenAirInterface Software Alliance licenses this file to You under -# the OAI Public License, Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.openairinterface.org/?page_id=698 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#------------------------------------------------------------------------------- -# For more information about the OpenAirInterface (OAI) Software Alliance: -# contact@openairinterface.org -################################################################################ - -# OAI CN Configuration File -### This file can be used by all OAI NFs -### Some fields are specific to an NF and will be ignored by other NFs -### The {{ env['ENV_NAME'] }} syntax lets you define these values in a docker-compose file -### If you intend to mount this file or use a bare-metal deployment, please refer to README.md -### The README.md also defines default values and allowed values for each configuration parameter - -############# Common configuration - -# Log level for all the NFs -log_level: - general: debug - -# If you enable registration, the other NFs will use the NRF discovery mechanism -register_nf: - general: yes - -http_version: 1 - -############## SBI Interfaces -### Each NF takes its local SBI interfaces and remote interfaces from here, unless it gets them using NRF discovery mechanisms -nfs: - amf: - host: oai-amf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - n2: - interface_name: eth0 - port: 38412 - smf: - host: oai-smf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - n4: - interface_name: eth0 - port: 8805 - upf: - host: oai-upf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - n3: - interface_name: eth0 - port: 2152 - n4: - interface_name: eth0 - port: 8805 - n6: - interface_name: eth0 - n9: - interface_name: eth0 - port: 2152 - udm: - host: oai-udm - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - udr: - host: oai-udr - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - ausf: - host: oai-ausf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - nrf: - host: oai-nrf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - pcf: - host: oai-pcf - sbi: - port: 8080 - api_version: v1 - interface_name: eth0 - -#### Common for UDR and AMF -database: - host: mysql - user: test - type: mysql - password: test - database_name: oai_db - generate_random: true - connection_timeout: 300 # seconds - -## general single_nssai configuration -## Defines YAML anchors, which are reused in the config file -snssais: - - &embb_slice1 - sst: 1 - - &embb_slice2 - sst: 1 - sd: 000001 - -############## NF-specific configuration -amf: - pid_directory: "/var/run" - amf_name: "OAI-AMF" - # This really depends on if we want to keep the "mini" version or not - support_features_options: - enable_simple_scenario: no - enable_nssf: no - enable_smf_selection: yes - use_external_udm: no - relative_capacity: 30 - statistics_timer_interval: 20 #in seconds - emergency_support: false - served_guami_list: - - mcc: 001 - mnc: 01 - amf_region_id: 01 - amf_set_id: 001 - amf_pointer: 01 - plmn_support_list: - - mcc: 001 - mnc: 01 - tac: 0x0001 - nssai: - - *embb_slice1 - - *embb_slice2 - supported_integrity_algorithms: - - "NIA1" - - "NIA2" - supported_encryption_algorithms: - - "NEA0" - - "NEA1" - - "NEA2" - -smf: - ue_mtu: 1500 - support_features: - use_local_subscription_info: no # Use infos from local_subscription_info or from UDM - use_local_pcc_rules: no # Use infos from local_pcc_rules or from PCF - # we resolve from NRF, this is just to configure usage_reporting - upfs: - - host: oai-upf - config: - enable_usage_reporting: no - ue_dns: - primary_ipv4: "1.1.1.1" - primary_ipv6: "2001:4860:4860::8888" - secondary_ipv4: "8.8.8.8" - secondary_ipv6: "2001:4860:4860::8888" - ims: - pcscf_ipv4: "127.0.0.1" - pcscf_ipv6: "fe80::7915:f408:1787:db8b" - # the DNN you configure here should be configured in "dnns" - # follows the SmfInfo datatype from 3GPP TS 29.510 - smf_info: - sNssaiSmfInfoList: - - sNssai: *embb_slice1 - dnnSmfInfoList: - - dnn: "oai" - - sNssai: *embb_slice2 - dnnSmfInfoList: - - dnn: "internet" - local_subscription_infos: - - single_nssai: *embb_slice1 - dnn: "oai" - qos_profile: - 5qi: 9 - session_ambr_ul: "10Gbps" - session_ambr_dl: "10Gbps" - - single_nssai: *embb_slice2 - dnn: "internet" - qos_profile: - 5qi: 9 - session_ambr_ul: "10Gbps" - session_ambr_dl: "10Gbps" - -upf: - support_features: - enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off - enable_snat: yes # If "on": Source natting is done for UE, DEFAULT= off - remote_n6_gw: 127.0.0.1 # Dummy host since simple-switch does not use N6 GW - smfs: - - host: oai-smf # To be used for PFCP association in case of no-NRF - upf_info: - sNssaiUpfInfoList: - - sNssai: *embb_slice1 - dnnUpfInfoList: - - dnn: "oai" - - sNssai: *embb_slice2 - dnnUpfInfoList: - - dnn: "internet" - -## DNN configuration -dnns: - - dnn: "oai" - pdu_session_type: "IPV4" - ipv4_subnet: "10.0.0.0/24" - - dnn: "internet" - pdu_session_type: "IPV4V6" - ipv4_subnet: "10.0.1.0/24" - ipv6_prefix: "2001:1:2::/64" - -pcf: - local_policy: - policy_decisions_path: /openair-pcf/policies/policy_decisions - pcc_rules_path: /openair-pcf/policies/pcc_rules - traffic_rules_path: /openair-pcf/policies/traffic_rules - qos_data_path: /openair-pcf/policies/qos_data diff --git a/demo_containerized/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf b/demo_containerized/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf deleted file mode 100644 index 7c190e5..0000000 --- a/demo_containerized/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf +++ /dev/null @@ -1,289 +0,0 @@ -Active_gNBs = ("gNB1"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0x1; - -# cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB1"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({ mcc = 001; - mnc = 01; - mnc_length = 2; - snssaiList = ({ sst = 1, sd = 0xffffff }, { sst = 1, sd = 0x1 }) }); - - nr_cellid = 12345678L - -# tr_s_preference = "local_mac" - - ////////// Physical parameters: - - #pusch_TargetSNRx10 = 200; - #pucch_TargetSNRx10 = 200; - min_rxtxtime = 6; - - servingCellConfigCommon = ( - { - #spCellConfigCommon - - physCellId = 0; - -# downlinkConfigCommon - #frequencyInfoDL - # this is 3301.68 MHz + 22*12*30e-3 MHz = 3309.6 - #absoluteFrequencySSB = 620640; - # this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68 - absoluteFrequencySSB = 621312; - # this is 3503.28 MHz + 22*12*30e-3 MHz = 3511.2 - #absoluteFrequencySSB = 634080; - # this is 3600.48 MHz - #absoluteFrequencySSB = 640032; - #dl_frequencyBand = 78; - # this is 3301.68 MHz - #dl_absoluteFrequencyPointA = 620112; - # this is 3300.60 MHz - dl_absoluteFrequencyPointA = 620040; - # this is 3502.56 MHz - #dl_absoluteFrequencyPointA = 633552; - # this is 3600.48 MHz - #dl_absoluteFrequencyPointA = 640032; - #scs-SpecificCarrierList - dl_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing = 1; - dl_carrierBandwidth = 106; - #initialDownlinkBWP - #genericParameters - # this is RBstart=0,L=106 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 28875; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 11; - initialDLBWPsearchSpaceZero = 0; - - - - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand = 78; - #scs-SpecificCarrierList - ul_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing = 1; - ul_carrierBandwidth = 106; - pMax = 20; - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth = 28875; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialULBWPsubcarrierSpacing = 1; - #rach-ConfigCommon - #rach-ConfigGeneric - prach_ConfigurationIndex = 98; -#prach_msg1_FDM -#0 = one, 1=two, 2=four, 3=eight - prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; - zeroCorrelationZoneConfig = 12; - preambleReceivedTargetPower = -104; -#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 6; -#powerRampingStep -# 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; -#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; -#ra_ContentionResolutionTimer -#(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer = 7; - rsrp_ThresholdSSB = 19; -#prach-RootSequenceIndex_PR -#1 = 839, 2 = 139 - prach_RootSequenceIndex_PR = 2; - prach_RootSequenceIndex = 1; - # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex - # - msg1_SubcarrierSpacing = 1, -# restrictedSetConfig -# 0=unrestricted, 1=restricted type A, 2=restricted type B - restrictedSetConfig = 0, - - msg3_DeltaPreamble = 1; - p0_NominalWithGrant =-90; - -# pucch-ConfigCommon setup : -# pucchGroupHopping -# 0 = neither, 1= group hopping, 2=sequence hopping - pucchGroupHopping = 0; - hoppingId = 40; - p0_nominal = -90; -# ssb_PositionsInBurs_BitmapPR -# 1=short, 2=medium, 3=long - ssb_PositionsInBurst_PR = 2; - ssb_PositionsInBurst_Bitmap = 1; - -# ssb_periodicityServingCell -# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 - ssb_periodicityServingCell = 2; - -# dmrs_TypeA_position -# 0 = pos2, 1 = pos3 - dmrs_TypeA_Position = 0; - -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - subcarrierSpacing = 1; - - - #tdd-UL-DL-ConfigurationCommon -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - referenceSubcarrierSpacing = 1; - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity = 6; - nrofDownlinkSlots = 7; - nrofDownlinkSymbols = 6; - nrofUplinkSlots = 2; - nrofUplinkSymbols = 4; - - ssPBCH_BlockPower = -25; - } - - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - ////////// AMF parameters: - ##modify - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - - NETWORK_INTERFACES : - { - ## modify - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.160"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.160"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - }; - - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - pusch_TargetSNRx10 = 200; - pucch_TargetSNRx10 = 200; - } -); - -L1s = ( -{ - num_cc = 1; - tr_n_preference = "local_mac"; - prach_dtx_threshold = 200; -# pucch0_dtx_threshold = 150; -} -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [78]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 75; - eNB_instances = [0]; - ##beamforming 1x2 matrix: 1 layer x 2 antennas - bf_weights = [0x00007fff, 0x0000]; - ##beamforming 1x4 matrix: 1 layer x 4 antennas - #bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000]; - ## beamforming 2x2 matrix: - # bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff]; - ## beamforming 4x4 matrix: - #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; - sf_extension = 0 - sdr_addrs = "serial=XXXXXXX" - } -); - -THREAD_STRUCT = ( - { - #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" - parallel_config = "PARALLEL_SINGLE_THREAD"; - #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" - worker_config = "WORKER_ENABLE"; - } -); - -rfsimulator: { - serveraddr = "server"; -}; - -security = { - # preferred ciphering algorithms - # the first one of the list that an UE supports in chosen - # valid values: nea0, nea1, nea2, nea3 - ciphering_algorithms = ( "nea0" ); - - # preferred integrity algorithms - # the first one of the list that an UE supports in chosen - # valid values: nia0, nia1, nia2, nia3 - integrity_algorithms = ( "nia2", "nia0" ); - - # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter - # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' - drb_ciphering = "yes"; - drb_integrity = "no"; -}; - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - f1ap_log_level ="info"; - }; diff --git a/demo_containerized/oai_setup/conf/server.conf b/demo_containerized/oai_setup/conf/server.conf deleted file mode 100644 index 5589e2e..0000000 --- a/demo_containerized/oai_setup/conf/server.conf +++ /dev/null @@ -1,7 +0,0 @@ -uicc0 = { - imsi = "001010000000109"; - key = "fec86ba6eb707ed08905757b1bb44b8f"; - opc= "C42449363BBAD02B66D16BC975D77CC1"; - dnn= "oai"; - nssai_sst=1; -} diff --git a/demo_containerized/oai_setup/conf/ue1.conf b/demo_containerized/oai_setup/conf/ue1.conf deleted file mode 100644 index b570997..0000000 --- a/demo_containerized/oai_setup/conf/ue1.conf +++ /dev/null @@ -1,8 +0,0 @@ -uicc0 = { -imsi = "001010000000101"; -key = "fec86ba6eb707ed08905757b1bb44b8f"; -opc = "C42449363BBAD02B66D16BC975D77CC1"; -dnn = "oai"; -nssai_sst = "1"; -#nssai_sd = "no"; -} diff --git a/demo_containerized/oai_setup/conf/ue2.conf b/demo_containerized/oai_setup/conf/ue2.conf deleted file mode 100644 index 9e36b77..0000000 --- a/demo_containerized/oai_setup/conf/ue2.conf +++ /dev/null @@ -1,7 +0,0 @@ -uicc0 = { - imsi = "001010000000102"; - key = "fec86ba6eb707ed08905757b1bb44b8f"; - opc= "C42449363BBAD02B66D16BC975D77CC1"; - dnn= "oai"; - nssai_sst=1; -} diff --git a/demo_containerized/oai_setup/conf/ue3.conf b/demo_containerized/oai_setup/conf/ue3.conf deleted file mode 100644 index 065565a..0000000 --- a/demo_containerized/oai_setup/conf/ue3.conf +++ /dev/null @@ -1,7 +0,0 @@ -uicc0 = { - imsi = "001010000000103"; - key = "fec86ba6eb707ed08905757b1bb44b8f"; - opc= "C42449363BBAD02B66D16BC975D77CC1"; - dnn= "oai"; - nssai_sst=1; -} diff --git a/demo_containerized/oai_setup/create_physical_bridge.sh b/demo_containerized/oai_setup/create_physical_bridge.sh deleted file mode 100755 index ebb9d59..0000000 --- a/demo_containerized/oai_setup/create_physical_bridge.sh +++ /dev/null @@ -1,5 +0,0 @@ -docker network create \ - --driver bridge \ - --subnet=192.168.73.128/26 \ - --opt com.docker.network.bridge.name="ros_gz_net" \ - ros_gz_net \ No newline at end of file diff --git a/demo_containerized/oai_setup/database/oai_db.sql b/demo_containerized/oai_setup/database/oai_db.sql deleted file mode 100644 index 9637a9b..0000000 --- a/demo_containerized/oai_setup/database/oai_db.sql +++ /dev/null @@ -1,327 +0,0 @@ --- phpMyAdmin SQL Dump --- version 5.1.0 --- https://www.phpmyadmin.net/ --- --- Host: 172.16.200.10:3306 --- Generation Time: Mar 22, 2021 at 10:31 AM --- Server version: 5.7.33 --- PHP Version: 7.4.15 - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -START TRANSACTION; -SET time_zone = "+00:00"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; - --- --- Database: `oai_db` --- - --- -------------------------------------------------------- - --- --- Table structure for table `AccessAndMobilitySubscriptionData` --- - -CREATE TABLE `AccessAndMobilitySubscriptionData` ( - `ueid` varchar(15) NOT NULL, - `servingPlmnid` varchar(15) NOT NULL, - `supportedFeatures` varchar(50) DEFAULT NULL, - `gpsis` json DEFAULT NULL, - `internalGroupIds` json DEFAULT NULL, - `sharedVnGroupDataIds` json DEFAULT NULL, - `subscribedUeAmbr` json DEFAULT NULL, - `nssai` json DEFAULT NULL, - `ratRestrictions` json DEFAULT NULL, - `forbiddenAreas` json DEFAULT NULL, - `serviceAreaRestriction` json DEFAULT NULL, - `coreNetworkTypeRestrictions` json DEFAULT NULL, - `rfspIndex` int(10) DEFAULT NULL, - `subsRegTimer` int(10) DEFAULT NULL, - `ueUsageType` int(10) DEFAULT NULL, - `mpsPriority` tinyint(1) DEFAULT NULL, - `mcsPriority` tinyint(1) DEFAULT NULL, - `activeTime` int(10) DEFAULT NULL, - `sorInfo` json DEFAULT NULL, - `sorInfoExpectInd` tinyint(1) DEFAULT NULL, - `sorafRetrieval` tinyint(1) DEFAULT NULL, - `sorUpdateIndicatorList` json DEFAULT NULL, - `upuInfo` json DEFAULT NULL, - `micoAllowed` tinyint(1) DEFAULT NULL, - `sharedAmDataIds` json DEFAULT NULL, - `odbPacketServices` json DEFAULT NULL, - `serviceGapTime` int(10) DEFAULT NULL, - `mdtUserConsent` json DEFAULT NULL, - `mdtConfiguration` json DEFAULT NULL, - `traceData` json DEFAULT NULL, - `cagData` json DEFAULT NULL, - `stnSr` varchar(50) DEFAULT NULL, - `cMsisdn` varchar(50) DEFAULT NULL, - `nbIoTUePriority` int(10) DEFAULT NULL, - `nssaiInclusionAllowed` tinyint(1) DEFAULT NULL, - `rgWirelineCharacteristics` varchar(50) DEFAULT NULL, - `ecRestrictionDataWb` json DEFAULT NULL, - `ecRestrictionDataNb` tinyint(1) DEFAULT NULL, - `expectedUeBehaviourList` json DEFAULT NULL, - `primaryRatRestrictions` json DEFAULT NULL, - `secondaryRatRestrictions` json DEFAULT NULL, - `edrxParametersList` json DEFAULT NULL, - `ptwParametersList` json DEFAULT NULL, - `iabOperationAllowed` tinyint(1) DEFAULT NULL, - `wirelineForbiddenAreas` json DEFAULT NULL, - `wirelineServiceAreaRestriction` json DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `Amf3GppAccessRegistration` --- - -CREATE TABLE `Amf3GppAccessRegistration` ( - `ueid` varchar(15) NOT NULL, - `amfInstanceId` varchar(50) NOT NULL, - `supportedFeatures` varchar(50) DEFAULT NULL, - `purgeFlag` tinyint(1) DEFAULT NULL, - `pei` varchar(50) DEFAULT NULL, - `imsVoPs` json DEFAULT NULL, - `deregCallbackUri` varchar(50) NOT NULL, - `amfServiceNameDereg` json DEFAULT NULL, - `pcscfRestorationCallbackUri` varchar(50) DEFAULT NULL, - `amfServiceNamePcscfRest` json DEFAULT NULL, - `initialRegistrationInd` tinyint(1) DEFAULT NULL, - `guami` json NOT NULL, - `backupAmfInfo` json DEFAULT NULL, - `drFlag` tinyint(1) DEFAULT NULL, - `ratType` json NOT NULL, - `urrpIndicator` tinyint(1) DEFAULT NULL, - `amfEeSubscriptionId` varchar(50) DEFAULT NULL, - `epsInterworkingInfo` json DEFAULT NULL, - `ueSrvccCapability` tinyint(1) DEFAULT NULL, - `registrationTime` varchar(50) DEFAULT NULL, - `vgmlcAddress` json DEFAULT NULL, - `contextInfo` json DEFAULT NULL, - `noEeSubscriptionInd` tinyint(1) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `AuthenticationStatus` --- - -CREATE TABLE `AuthenticationStatus` ( - `ueid` varchar(20) NOT NULL, - `nfInstanceId` varchar(50) NOT NULL, - `success` tinyint(1) NOT NULL, - `timeStamp` varchar(50) NOT NULL, - `authType` varchar(25) NOT NULL, - `servingNetworkName` varchar(50) NOT NULL, - `authRemovalInd` tinyint(1) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `AuthenticationSubscription` --- - -CREATE TABLE `AuthenticationSubscription` ( - `ueid` varchar(20) NOT NULL, - `authenticationMethod` varchar(25) NOT NULL, - `encPermanentKey` varchar(50) DEFAULT NULL, - `protectionParameterId` varchar(50) DEFAULT NULL, - `sequenceNumber` json DEFAULT NULL, - `authenticationManagementField` varchar(50) DEFAULT NULL, - `algorithmId` varchar(50) DEFAULT NULL, - `encOpcKey` varchar(50) DEFAULT NULL, - `encTopcKey` varchar(50) DEFAULT NULL, - `vectorGenerationInHss` tinyint(1) DEFAULT NULL, - `n5gcAuthMethod` varchar(15) DEFAULT NULL, - `rgAuthenticationInd` tinyint(1) DEFAULT NULL, - `supi` varchar(20) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `AuthenticationSubscription` --- -INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES -('001010000000101', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000101'); -INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES -('001010000000102', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000102'); -INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES -('001010000000103', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000103'); -INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES -('001010000000104', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000104'); -INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES -('001010000000109', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000109'); - - --- -------------------------------------------------------- - --- --- Table structure for table `SdmSubscriptions` --- - -CREATE TABLE `SdmSubscriptions` ( - `ueid` varchar(15) NOT NULL, - `subsId` int(10) UNSIGNED NOT NULL, - `nfInstanceId` varchar(50) NOT NULL, - `implicitUnsubscribe` tinyint(1) DEFAULT NULL, - `expires` varchar(50) DEFAULT NULL, - `callbackReference` varchar(50) NOT NULL, - `amfServiceName` json DEFAULT NULL, - `monitoredResourceUris` json NOT NULL, - `singleNssai` json DEFAULT NULL, - `dnn` varchar(50) DEFAULT NULL, - `subscriptionId` varchar(50) DEFAULT NULL, - `plmnId` json DEFAULT NULL, - `immediateReport` tinyint(1) DEFAULT NULL, - `report` json DEFAULT NULL, - `supportedFeatures` varchar(50) DEFAULT NULL, - `contextInfo` json DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `SessionManagementSubscriptionData` --- - -CREATE TABLE `SessionManagementSubscriptionData` ( - `ueid` varchar(15) NOT NULL, - `servingPlmnid` varchar(15) NOT NULL, - `singleNssai` json NOT NULL, - `dnnConfigurations` json DEFAULT NULL, - `internalGroupIds` json DEFAULT NULL, - `sharedVnGroupDataIds` json DEFAULT NULL, - `sharedDnnConfigurationsId` varchar(50) DEFAULT NULL, - `odbPacketServices` json DEFAULT NULL, - `traceData` json DEFAULT NULL, - `sharedTraceDataId` varchar(50) DEFAULT NULL, - `expectedUeBehavioursList` json DEFAULT NULL, - `suggestedPacketNumDlList` json DEFAULT NULL, - `3gppChargingCharacteristics` varchar(50) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - -INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000101', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"10.0.0.2\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); -INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000102', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"10.0.0.3\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); -INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000103', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"10.0.0.4\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); -INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000109', '00101', '{\"sst\": 1, \"sd\": \"FFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"10.0.0.9\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); --- --- Table structure for table `SmfRegistrations` --- - -CREATE TABLE `SmfRegistrations` ( - `ueid` varchar(15) NOT NULL, - `subpduSessionId` int(10) NOT NULL, - `smfInstanceId` varchar(50) NOT NULL, - `smfSetId` varchar(50) DEFAULT NULL, - `supportedFeatures` varchar(50) DEFAULT NULL, - `pduSessionId` int(10) NOT NULL, - `singleNssai` json NOT NULL, - `dnn` varchar(50) DEFAULT NULL, - `emergencyServices` tinyint(1) DEFAULT NULL, - `pcscfRestorationCallbackUri` varchar(50) DEFAULT NULL, - `plmnId` json NOT NULL, - `pgwFqdn` varchar(50) DEFAULT NULL, - `epdgInd` tinyint(1) DEFAULT NULL, - `deregCallbackUri` varchar(50) DEFAULT NULL, - `registrationReason` json DEFAULT NULL, - `registrationTime` varchar(50) DEFAULT NULL, - `contextInfo` json DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `SmfSelectionSubscriptionData` --- - -CREATE TABLE `SmfSelectionSubscriptionData` ( - `ueid` varchar(15) NOT NULL, - `servingPlmnid` varchar(15) NOT NULL, - `supportedFeatures` varchar(50) DEFAULT NULL, - `subscribedSnssaiInfos` json DEFAULT NULL, - `sharedSnssaiInfosId` varchar(50) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Indexes for dumped tables --- - --- --- Indexes for table `AccessAndMobilitySubscriptionData` --- -ALTER TABLE `AccessAndMobilitySubscriptionData` - ADD PRIMARY KEY (`ueid`,`servingPlmnid`) USING BTREE; - --- --- Indexes for table `Amf3GppAccessRegistration` --- -ALTER TABLE `Amf3GppAccessRegistration` - ADD PRIMARY KEY (`ueid`); - --- --- Indexes for table `AuthenticationStatus` --- -ALTER TABLE `AuthenticationStatus` - ADD PRIMARY KEY (`ueid`); - --- --- Indexes for table `AuthenticationSubscription` --- -ALTER TABLE `AuthenticationSubscription` - ADD PRIMARY KEY (`ueid`); - --- --- Indexes for table `SdmSubscriptions` --- -ALTER TABLE `SdmSubscriptions` - ADD PRIMARY KEY (`subsId`,`ueid`) USING BTREE; - --- --- Indexes for table `SessionManagementSubscriptionData` --- -ALTER TABLE `SessionManagementSubscriptionData` - ADD PRIMARY KEY (`ueid`,`servingPlmnid`) USING BTREE; - --- --- Indexes for table `SmfRegistrations` --- -ALTER TABLE `SmfRegistrations` - ADD PRIMARY KEY (`ueid`,`subpduSessionId`) USING BTREE; - --- --- Indexes for table `SmfSelectionSubscriptionData` --- -ALTER TABLE `SmfSelectionSubscriptionData` - ADD PRIMARY KEY (`ueid`,`servingPlmnid`) USING BTREE; - --- --- AUTO_INCREMENT for dumped tables --- - --- ADD subscription information for bonus II - --- --- AUTO_INCREMENT for table `SdmSubscriptions` --- -ALTER TABLE `SdmSubscriptions` - MODIFY `subsId` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; - diff --git a/demo_containerized/oai_setup/docker-compose-gNB.yml b/demo_containerized/oai_setup/docker-compose-gNB.yml deleted file mode 100644 index 4f76159..0000000 --- a/demo_containerized/oai_setup/docker-compose-gNB.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: '3.8' -services: - oai-gnb: - image: oaisoftwarealliance/oai-gnb:2024.w44 - privileged: true - container_name : oai-gNB1 - environment: - USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time - ports: - - "2021:2021" - networks: - public_net: - ipv4_address : 192.168.70.160 - volumes: - - ./conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf:/opt/oai-gnb/etc/gnb.conf - healthcheck: - test: /bin/bash -c "pgrep nr-softmodem" - interval: 10s - timeout: 5s - retries: 5 - entrypoint: - - /bin/bash - - -c - - | - /opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.conf --sa -E --rfsim --log_config.global_log_options level,nocolor,time & - tail -f /dev/null -networks: - public_net: - external: - name : phine-net diff --git a/demo_containerized/oai_setup/docker-compose-ue.yml b/demo_containerized/oai_setup/docker-compose-ue.yml deleted file mode 100644 index 655c1bb..0000000 --- a/demo_containerized/oai_setup/docker-compose-ue.yml +++ /dev/null @@ -1,154 +0,0 @@ -version: '3.8' -services: - robot_1: - image: ue_amr_oai - privileged: true - container_name: ${NAME_ROBOT_1} - environment: - USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - IGN_PARTITION: ${IGN_PARTITION} - networks: - public_net: - ipv4_address: ${IP_ROBOT_1} - ros_gz_net: - ipv4_address: 192.168.73.150 - volumes: - - ./conf/ue1.conf:/opt/oai-nr-ue/etc/nr-ue.conf - - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/robot_logic/install/setup.bash - export ROS_DISCOVERY_SERVER="${ROS_DISCOVERY_SERVER}" - export IGN_IP=192.168.73.150 - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.conf -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time & - ./wait_for_ue_connected.sh - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROS_GZ_BRIDGE_NAME_1} - ) & - if [ "${EXECUTE_ROBOT_LAUNCH_FILE_1}" = "true" ]; then - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROBOT_LAUNCH_FILE_NAME_1} - ) & - fi - tail -f /dev/null - - healthcheck: - test: /bin/bash -c "pgrep nr-uesoftmodem" - interval: 10s - timeout: 5s - retries: 5 - - rcc: - image: rcc - privileged: true - container_name: rcc - environment: - - DISPLAY=${DISPLAY} - - QT_X11_NO_MITSHM=1 - - ROS_DOMAIN_ID=${ROS_DOMAIN_ID} - volumes: - - /tmp/.X11-unix:/tmp/.X11-unix:rw - stdin_open: true - tty: true - networks: - public_net: - ipv4_address: 192.168.70.151 - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/rviz_rcc/install/setup.bash - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0 - ./wait_for_nav_stack.sh - ros2 launch rviz_launch rviz_launch.launch.py & - tail -f /dev/null - - - dds_discovery_server: - image: dds_discovery_server - privileged: true - environment: - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - container_name: discovery-server - networks: - public_net: - ipv4_address: 192.168.70.159 - ports: - - "11811:11811" - entrypoint: - - /bin/bash - - -c - - | - ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0 - source /opt/ros/humble/setup.bash - fastdds discovery -i 0 -l 192.168.70.159 -p 11811 - - simulation: - image: simulation - privileged: true - container_name: simulation - environment: - - DISPLAY=${DISPLAY} - - QT_X11_NO_MITSHM=1 - - ROS_DOMAIN_ID= ${ROS_DOMAIN_ID} - - IGN_PARTITION=${IGN_PARTITION} - - GNB_NAME_FOR_BUTTON=${GNB_NAME_FOR_BUTTON} - - UE_NAME_FOR_BUTTON=${UE_NAME_FOR_BUTTON} - - PROJECT_PATH=/app - - DEMO_PROJECT_PATH=${DEMO_PROJECT_PATH} - - ROS_DISCOVERY_SERVER="192.168.70.159:11811" - - IGN_IP=192.168.73.151 - - NVIDIA_VISIBLE_DEVICES=all - - NVIDIA_DRIVER_CAPABILITIES=all - volumes: - - /tmp/.X11-unix:/tmp/.X11-unix:rw - - /var/run/docker.sock:/var/run/docker.sock - stdin_open: true - tty: true - runtime: ${GPU_RUNTIME:-runc} - networks: - public_net: - ipv4_address: 192.168.70.152 - ros_gz_net: - ipv4_address: 192.168.73.151 - entrypoint: - - /bin/bash - - -c - - | - if ip -4 addr show eth0 | grep -q "192.168.73"; then - echo "Wrong interface order detected. Swapping eth0 and eth1..." - ip link set eth0 name eth_temp - ip link set eth1 name eth0 - ip link set eth_temp name eth1 - else - echo "Interface order is correct (eth0 is public_net)." - fi - if [ "$GPU_RUNTIME" = "nvidia" ]; then - echo "NVIDIA runtime detected. Enabling GPU offload..." - export __NV_PRIME_RENDER_OFFLOAD=1 - export __GLX_VENDOR_LIBRARY_NAME=nvidia - else - echo "Standard runtime detected. Proceeding without NVIDIA offload." - fi - source /opt/ros/humble/setup.bash - source /app/gazebo_launch/install/setup.bash - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=${IGN_GAZEBO_SYSTEM_PLUGIN_PATH}:/usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins:/opt/ros/humble/lib - ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0 - ros2 launch ign_turtlebot gazebo_launch.launch.py & - tail -f /dev/null - -networks: - public_net: - external: - name: phine-net - ros_gz_net: - external: - name: ros_gz_net \ No newline at end of file diff --git a/demo_containerized/oai_setup/docker-compose.yml b/demo_containerized/oai_setup/docker-compose.yml deleted file mode 100644 index 7514fca..0000000 --- a/demo_containerized/oai_setup/docker-compose.yml +++ /dev/null @@ -1,182 +0,0 @@ -version: '3.8' -services: - mysql: - container_name: "mysql" - image: mysql:8.0 - volumes: - - ./database/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - - ./healthscripts/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh - environment: - - TZ=Europe/Paris - - MYSQL_DATABASE=oai_db - - MYSQL_USER=test - - MYSQL_PASSWORD=test - - MYSQL_ROOT_PASSWORD=linux - healthcheck: - test: /bin/bash -c "/tmp/mysql-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 30 - networks: - public_net: - ipv4_address: 192.168.70.131 - oai-udr: - container_name: "oai-udr" - image: oaisoftwarealliance/oai-udr:develop - expose: - - 80/tcp - - 8080/tcp - volumes: - - ./conf/config.yaml:/openair-udr/etc/config.yaml - environment: - - TZ=Europe/Paris - depends_on: - - mysql - - oai-nrf - networks: - public_net: - ipv4_address: 192.168.70.136 - oai-udm: - container_name: "oai-udm" - image: oaisoftwarealliance/oai-udm:develop - expose: - - 80/tcp - - 8080/tcp - volumes: - - ./conf/config.yaml:/openair-udm/etc/config.yaml - environment: - - TZ=Europe/Paris - depends_on: - - oai-udr - networks: - public_net: - ipv4_address: 192.168.70.137 - oai-ausf: - container_name: "oai-ausf" - image: oaisoftwarealliance/oai-ausf:develop - expose: - - 80/tcp - - 8080/tcp - volumes: - - ./conf/config.yaml:/openair-ausf/etc/config.yaml - environment: - - TZ=Europe/Paris - depends_on: - - oai-udm - networks: - public_net: - ipv4_address: 192.168.70.138 - oai-nrf: - container_name: "oai-nrf" - image: oaisoftwarealliance/oai-nrf:develop - expose: - - 80/tcp - - 8080/tcp - volumes: - - ./conf/config.yaml:/openair-nrf/etc/config.yaml - environment: - - TZ=Europe/Paris - networks: - public_net: - ipv4_address: 192.168.70.130 - oai-amf: - container_name: "oai-amf" - image: oaisoftwarealliance/oai-amf:develop - expose: - - 80/tcp - - 8080/tcp - - 38412/sctp - volumes: - - ./conf/config.yaml:/openair-amf/etc/config.yaml - environment: - - TZ=Europe/Paris - depends_on: - - mysql - - oai-nrf - - oai-ausf - networks: - public_net: - ipv4_address: 192.168.70.132 - oai-smf: - container_name: "oai-smf" - image: oaisoftwarealliance/oai-smf:develop - expose: - - 80/tcp - - 8080/tcp - - 8805/udp - volumes: - - ./conf/config.yaml:/openair-smf/etc/config.yaml - environment: - - TZ=Europe/Paris - depends_on: - - oai-nrf - - oai-amf - networks: - public_net: - ipv4_address: 192.168.70.133 - oai-pcf: - container_name: "oai-pcf" - image: oaisoftwarealliance/oai-pcf:develop - expose: - - 80/tcp - - 8080/tcp - - 8805/udp - volumes: - - ./conf/config.yaml:/openair-pcf/etc/config.yaml - - ./policies/qos:/openair-pcf/policies - environment: - - TZ=Europe/Paris - depends_on: - - oai-nrf - - oai-amf - networks: - public_net: - ipv4_address: 192.168.70.139 - oai-upf: - container_name: "oai-upf" - image: oaisoftwarealliance/oai-upf:develop - expose: - - 2152/udp - - 8805/udp - volumes: - - ./conf/config.yaml:/openair-upf/etc/config.yaml - environment: - - TZ=Europe/Paris - depends_on: - - oai-nrf - - oai-smf - cap_add: - - NET_ADMIN - - SYS_ADMIN - cap_drop: - - ALL - privileged: true - networks: - public_net: - ipv4_address: 192.168.70.134 - oai-traffic-server: - privileged: true - init: true - container_name: oai-ext-dn - image: oaisoftwarealliance/trf-gen-cn5g:latest - entrypoint: /bin/bash -c \ - "ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0; ip route; sleep infinity" - command: ["/bin/bash", "-c", "trap : SIGTERM SIGINT; sleep infinity & wait"] - healthcheck: - test: /bin/bash -c "ip r | grep 10.0.0" - interval: 5s - timeout: 2s - retries: 10 - networks: - public_net: - ipv4_address: 192.168.70.135 -networks: - public_net: - driver: bridge - name: phine-net - ipam: - config: - - subnet: 192.168.70.128/26 - driver_opts: - com.docker.network.bridge.name: "phine-net" - diff --git a/demo_containerized/oai_setup/healthscripts/mysql-healthcheck.sh b/demo_containerized/oai_setup/healthscripts/mysql-healthcheck.sh deleted file mode 100755 index 6fa1728..0000000 --- a/demo_containerized/oai_setup/healthscripts/mysql-healthcheck.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -set -eo pipefail - -if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then - echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)' - exit 0 -fi - -host="$(hostname --ip-address || echo '127.0.0.1')" -user="${MYSQL_USER:-root}" -export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}" - -args=( - # force mysql to not use the local "mysqld.sock" (test "external" connectivity) - -h"$host" - -u"$user" - --silent -) - -STATUS=0 -if command -v mysqladmin &> /dev/null; then - if mysqladmin "${args[@]}" ping > /dev/null; then - database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM AuthenticationSubscription;") - if [[ -z $database_check ]]; then - echo "Healthcheck error: oai_db not populated" - STATUS=1 - fi - STATUS=0 - else - echo "Healthcheck error: Mysql port inactive" - STATUS=1 - fi -else - if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then - database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM AuthenticationSubscription;") - if [[ -z $database_check ]]; then - echo "Healthcheck error: oai_db not populated" - STATUS=1 - fi - STATUS=0 - else - echo "Healthcheck error: Mysql port inactive" - STATUS=1 - fi -fi -exit $STATUS diff --git a/demo_containerized/oai_setup/policies/qos/pcc_rules/pcc_rules.yaml b/demo_containerized/oai_setup/policies/qos/pcc_rules/pcc_rules.yaml deleted file mode 100644 index 3c0817a..0000000 --- a/demo_containerized/oai_setup/policies/qos/pcc_rules/pcc_rules.yaml +++ /dev/null @@ -1,23 +0,0 @@ -non-gbr-rule-5qi-9: - flowInfos: - - flowDescription: permit out ip from any to assigned - packetFilterUsage: true - precedence: 10 - refQosData: - - non-gbr-qos-5qi-9 - -gbr-rule-5qi-1: - flowInfos: - - flowDescription: permit out ip from 192.168.70.135 to assigned - packetFilterUsage: true - precedence: 8 - refQosData: - - gbr-qos-5qi-1 - -gbr-rule-5qi-5: - flowInfos: - - flowDescription: permit out ip from any to assigned - packetFilterUsage: true - precedence: 9 - refQosData: - - gbr-qos-5qi-5 diff --git a/demo_containerized/oai_setup/policies/qos/policy_decisions/policy_decision.yaml b/demo_containerized/oai_setup/policies/qos/policy_decisions/policy_decision.yaml deleted file mode 100644 index b7efa54..0000000 --- a/demo_containerized/oai_setup/policies/qos/policy_decisions/policy_decision.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# as an example to have SUPI / IMSI specific QoS policies - -decision_supi1: - supi_imsi: "001010000000101" - pcc_rules: -# - gbr-rule-5qi-1 - - non-gbr-rule-5qi-9 - - -decision_slice_1: - slice: - sst: 1 - sd: "FFFFFF" - pcc_rules: - - non-gbr-rule-5qi-9 - -decision_slice_2: - slice: - sst: 1 - sd: "000001" - pcc_rules: - - gbr-rule-5qi-5 - - non-gbr-rule-5qi-9 diff --git a/demo_containerized/oai_setup/policies/qos/qos_data/qos_data.yaml b/demo_containerized/oai_setup/policies/qos/qos_data/qos_data.yaml deleted file mode 100644 index 627e889..0000000 --- a/demo_containerized/oai_setup/policies/qos/qos_data/qos_data.yaml +++ /dev/null @@ -1,31 +0,0 @@ - non-gbr-qos-5qi-9: - 5qi: 9 - arp: - priorityLevel: 15 - preemptCap: NOT_PREEMPT - preemptVuln: PREEMPTABLE - priorityLevel: 10 - - gbr-qos-5qi-1: - 5qi: 1 - maxbrUl: 70000 Kbps - maxbrDl: 100 Mbps - gbrUl: 50 Mbps - gbrDl: 50 Mbps - arp: - priorityLevel: 1 - preemptCap: MAY_PREEMPT - preemptVuln: NOT_PREEMPTABLE - priorityLevel: 9 - - gbr-qos-5qi-5: - 5qi: 5 - maxbrUl: 60 Mbps - maxbrDl: 100 Mbps - gbrUl: 50 Mbps - gbrDl: 50 Mbps - arp: - priorityLevel: 1 - preemptCap: MAY_PREEMPT - preemptVuln: NOT_PREEMPTABLE - priorityLevel: 8 diff --git a/demo_containerized/oai_setup/wait_for_core_network.sh b/demo_containerized/oai_setup/wait_for_core_network.sh deleted file mode 100755 index d2ffceb..0000000 --- a/demo_containerized/oai_setup/wait_for_core_network.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# Wait for OAI core network to be fully loaded -# The database (MySQL) is the longest thing to load and is a dependency for other services - -set -e - -TIMEOUT=${1:-300} # Default timeout: 5 minutes -INTERVAL=5 - -echo "Waiting for OAI core network to be ready..." -echo "Checking mysql container health status..." - -elapsed=0 -while [ $elapsed -lt $TIMEOUT ]; do - # Check if mysql container is healthy - mysql_health=$(docker inspect --format='{{.State.Health.Status}}' mysql 2>/dev/null || echo "not_found") - - if [ "$mysql_health" = "healthy" ]; then - echo "✓ MySQL container is healthy" - - # Additional check: verify critical services are running - services=("oai-nrf" "oai-amf" "oai-smf" "oai-upf") - all_running=true - - for service in "${services[@]}"; do - if ! docker ps --format '{{.Names}}' | grep -q "^${service}$"; then - all_running=false - echo " Waiting for $service to start..." - break - fi - done - - if [ "$all_running" = true ]; then - echo "✓ All critical OAI services are running" - echo "OAI core network is ready!" - exit 0 - fi - else - echo " MySQL status: $mysql_health (elapsed: ${elapsed}s)" - fi - - sleep $INTERVAL - elapsed=$((elapsed + INTERVAL)) -done - -echo "ERROR: Timeout waiting for OAI core network to be ready after ${TIMEOUT}s" -exit 1 diff --git a/demo_containerized/open5gs_setup/README.md b/demo_containerized/open5gs_setup/README.md deleted file mode 100644 index 382f147..0000000 --- a/demo_containerized/open5gs_setup/README.md +++ /dev/null @@ -1,174 +0,0 @@ -# Open5GS Core Network Deployment for RoboSim5G - -This deployment provides an Open5GS 5G Core Network that integrates with RoboSim5G. - -## About Open5GS - -Open5GS is an open-source implementation of 5G Core and EPC (Evolved Packet Core). Key features: -- **User-friendly WebUI** for subscriber management -- **Modular architecture** with independent network functions -- **Persistent storage** using MongoDB for subscriber data -- **Active community** and good documentation - -## Quick Start - -### 1. Start the Core Network -```bash -docker compose up -d -``` - -Wait for all services to become healthy: -```bash -docker compose ps -``` - -### 2. Configure Subscribers via WebUI - -Open http://localhost:9999 in your browser. - -**Default credentials:** -- Username: `admin` -- Password: `1423` - -**Add a subscriber:** -1. Navigate to "Subscribers" → "New Subscriber" -2. Enter the following details: - - **IMSI**: `001010000000101` (must match UE configuration) - - **Security:** - - K: `8baf473f2f8fd09487cccbd7097c6862` - - OPc: `8e27b6af0e692e750f32667a3b14605d` - - AMF: `8000` - - **S-NSSAI (Network Slice):** - - SST: `1` - - SD: `1` (or `000001`) - - **DNN/APN**: `internet` -3. Click "Save" - -> **Note:** First user (001010000000101) is already configured. You can pre-configure multiple additional subscribers for different robots by incrementing the IMSI (e.g., `001010000000102`, `001010000000103`). - -### 3. Start gNB and UE - -Follow the RoboSim5G demo instructions to start your Gazebo simulation with the robot. The gNB and UE will automatically connect to this core network. - -Alternatively, for standalone testing: -```bash -# Start gNB -docker compose -f docker-compose-gNB.yml up -d - -# Start UE -docker compose -f docker-compose-ue.yml up -d -``` - -## Managing the Core Network - -### Check Service Status -```bash -docker compose ps -``` - -All services should show "healthy" or "running" status. - -### View Logs -```bash -# View all services -docker compose logs -f - -# View specific service -docker compose logs -f amf -docker compose logs -f upf -``` - -### Stop the Core Network -```bash -docker compose down -``` - -> **Important:** Do NOT use `docker compose down -v` as this will delete subscriber data. - -### Restart Services -```bash -docker compose restart -``` - -## Subscriber Data Persistence - -Subscriber data is stored in the local `./db_data` directory and persists across container restarts. This makes the deployment portable: -- Copy the entire folder to another machine -- Subscriber configurations remain intact -- No need to reconfigure subscribers after restart - -## Network Configuration - -The core network uses the following subnet: -- **Open5GS CN**: `10.33.33.0/24` -- **UE Data Network (DN)**: `10.45.0.0/24` (assigned via UPF) - -### Key Service Endpoints -- **AMF (N2 interface)**: `10.33.33.5:38412` (SCTP) -- **UPF (N3 interface)**: `10.33.33.10:2152` (GTP-U) -- **WebUI**: `http://localhost:9999` - -## Troubleshooting - -### UE Not Attaching -1. **Check subscriber exists:** Log into WebUI and verify IMSI is configured -2. **Verify credentials match:** K, OPc values in WebUI must match UE config -3. **Check AMF logs:** - ```bash - docker compose logs -f amf - ``` - Look for authentication failures or registration issues - -### gNB Not Connecting to AMF -1. **Check network connectivity:** - ```bash - docker exec amf ping -c 3 oai-gNB - ``` -2. **Verify AMF logs:** - ```bash - docker compose logs -f amf - ``` - Look for NG Setup Request/Response messages - -### No Internet Access from UE -1. **Check UPF logs:** - ```bash - docker compose logs -f upf - ``` -2. **Verify UE has tunnel interface:** - ```bash - docker exec oai-nr-ue1 ip addr show - ``` - Should see `oaitun_ue1` with IP in `10.45.0.0/24` range - -### WebUI Connection Issues -If WebUI cannot connect to MongoDB: -```bash -docker compose restart db webui -``` - -## Configuration Files - -All Open5GS network function configs are in `./configs/`: -- `amf.yaml` - Access and Mobility Management Function -- `smf.yaml` - Session Management Function -- `upf.yaml` - User Plane Function -- `ausf.yaml`, `udm.yaml`, `udr.yaml` - Authentication functions -- `nrf.yaml` - Network Repository Function -- `pcf.yaml` - Policy Control Function - -## Integration with RoboSim5G - -When using this CN with RoboSim5G: -1. Start this core network first -2. Configure subscribers for your robots via WebUI -3. Launch your Gazebo simulation with the RoboSim5G plugins -4. The robot's OAI UE will automatically attach to the network - -Each robot in your simulation can have its own IMSI and network slice configuration, enabling realistic multi-robot 5G scenarios. - -## Additional Resources - -- [Open5GS Documentation](https://open5gs.org/open5gs/docs/) -- [Open5GS GitHub](https://github.com/open5gs/open5gs) -- [RoboSim5G Project](https://github.com/phinetech/RoboSim5G) diff --git a/demo_containerized/open5gs_setup/configs/amf.yaml b/demo_containerized/open5gs_setup/configs/amf.yaml deleted file mode 100644 index f32a1b5..0000000 --- a/demo_containerized/open5gs_setup/configs/amf.yaml +++ /dev/null @@ -1,45 +0,0 @@ -logger: - file: - path: /var/log/open5gs/amf.log - -global: - -amf: - sbi: - server: - - address: amf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 - ngap: - server: - - address: amf.open5gs.org - guami: - - plmn_id: - mcc: 001 - mnc: 01 - amf_id: - region: 2 - set: 1 - tai: - - plmn_id: - mcc: 001 - mnc: 01 - tac: 1 - plmn_support: - - plmn_id: - mcc: 001 - mnc: 01 - s_nssai: - - sst: 1 - sd: 000001 - security: - integrity_order : [ NIA2, NIA1, NIA0 ] - ciphering_order : [ NEA0, NEA1, NEA2 ] - network_name: - full: Open5GS - amf_name: open5gs-amf0 - time: - t3512: - value: 540 diff --git a/demo_containerized/open5gs_setup/configs/ausf.yaml b/demo_containerized/open5gs_setup/configs/ausf.yaml deleted file mode 100644 index 884335b..0000000 --- a/demo_containerized/open5gs_setup/configs/ausf.yaml +++ /dev/null @@ -1,14 +0,0 @@ -logger: - file: - path: /var/log/open5gs/ausf.log - -global: - -ausf: - sbi: - server: - - address: ausf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 diff --git a/demo_containerized/open5gs_setup/configs/bsf.yaml b/demo_containerized/open5gs_setup/configs/bsf.yaml deleted file mode 100644 index 133c904..0000000 --- a/demo_containerized/open5gs_setup/configs/bsf.yaml +++ /dev/null @@ -1,14 +0,0 @@ -logger: - file: - path: /var/log/open5gs/bsf.log - -global: - -bsf: - sbi: - server: - - address: bsf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 diff --git a/demo_containerized/open5gs_setup/configs/nrf.yaml b/demo_containerized/open5gs_setup/configs/nrf.yaml deleted file mode 100644 index 39eb85f..0000000 --- a/demo_containerized/open5gs_setup/configs/nrf.yaml +++ /dev/null @@ -1,11 +0,0 @@ -logger: - file: - path: /var/log/open5gs/nrf.log - -global: - -nrf: - sbi: - server: - - address: nrf.open5gs.org - port: 80 diff --git a/demo_containerized/open5gs_setup/configs/nssf.yaml b/demo_containerized/open5gs_setup/configs/nssf.yaml deleted file mode 100644 index bb75864..0000000 --- a/demo_containerized/open5gs_setup/configs/nssf.yaml +++ /dev/null @@ -1,19 +0,0 @@ -logger: - file: - path: /var/log/open5gs/nssf.log - -global: - -nssf: - sbi: - server: - - address: nssf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 - nsi: - - uri: http://nrf.open5gs.org:80 - s_nssai: - sst: 1 - sd: 1 diff --git a/demo_containerized/open5gs_setup/configs/pcf.yaml b/demo_containerized/open5gs_setup/configs/pcf.yaml deleted file mode 100644 index 204db5d..0000000 --- a/demo_containerized/open5gs_setup/configs/pcf.yaml +++ /dev/null @@ -1,16 +0,0 @@ -db_uri: mongodb://db.open5gs.org/open5gs - -logger: - file: - path: /var/log/open5gs/pcf.log - -global: - -pcf: - sbi: - server: - - address: pcf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 diff --git a/demo_containerized/open5gs_setup/configs/smf.yaml b/demo_containerized/open5gs_setup/configs/smf.yaml deleted file mode 100644 index 93beeab..0000000 --- a/demo_containerized/open5gs_setup/configs/smf.yaml +++ /dev/null @@ -1,30 +0,0 @@ -logger: - file: - path: /var/log/open5gs/smf.log - -global: - -smf: - sbi: - server: - - address: smf.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 - pfcp: - server: - - address: smf.open5gs.org - client: - upf: - - address: upf.open5gs.org - gtpu: - server: - - address: smf.open5gs.org - session: - - subnet: 10.0.0.0/24 - gateway: 10.0.0.1 - dns: - - 8.8.8.8 - - 8.8.4.4 - mtu: 1400 diff --git a/demo_containerized/open5gs_setup/configs/udm.yaml b/demo_containerized/open5gs_setup/configs/udm.yaml deleted file mode 100644 index e166299..0000000 --- a/demo_containerized/open5gs_setup/configs/udm.yaml +++ /dev/null @@ -1,14 +0,0 @@ -logger: - file: - path: /var/log/open5gs/udm.log - -global: - -udm: - sbi: - server: - - address: udm.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 diff --git a/demo_containerized/open5gs_setup/configs/udr.yaml b/demo_containerized/open5gs_setup/configs/udr.yaml deleted file mode 100644 index d17a7b8..0000000 --- a/demo_containerized/open5gs_setup/configs/udr.yaml +++ /dev/null @@ -1,16 +0,0 @@ -db_uri: mongodb://db.open5gs.org/open5gs - -logger: - file: - path: var/log/open5gs/udr.log - -global: - -udr: - sbi: - server: - - address: udr.open5gs.org - port: 80 - client: - nrf: - - uri: http://nrf.open5gs.org:80 diff --git a/demo_containerized/open5gs_setup/configs/upf.yaml b/demo_containerized/open5gs_setup/configs/upf.yaml deleted file mode 100644 index 1731395..0000000 --- a/demo_containerized/open5gs_setup/configs/upf.yaml +++ /dev/null @@ -1,17 +0,0 @@ -logger: - file: - path: /var/log/open5gs/upf.log - -global: - -upf: - pfcp: - server: - - address: upf.open5gs.org - client: - gtpu: - server: - - address: upf.open5gs.org - session: - - subnet: 10.0.0.0/24 - gateway: 10.0.0.1 diff --git a/demo_containerized/open5gs_setup/create_physical_bridge.sh b/demo_containerized/open5gs_setup/create_physical_bridge.sh deleted file mode 100755 index ebb9d59..0000000 --- a/demo_containerized/open5gs_setup/create_physical_bridge.sh +++ /dev/null @@ -1,5 +0,0 @@ -docker network create \ - --driver bridge \ - --subnet=192.168.73.128/26 \ - --opt com.docker.network.bridge.name="ros_gz_net" \ - ros_gz_net \ No newline at end of file diff --git a/demo_containerized/open5gs_setup/docker-compose-gNB.yml b/demo_containerized/open5gs_setup/docker-compose-gNB.yml deleted file mode 100644 index 8e884fc..0000000 --- a/demo_containerized/open5gs_setup/docker-compose-gNB.yml +++ /dev/null @@ -1,29 +0,0 @@ -services: - gNB: - image: oaisoftwarealliance/oai-gnb:2026.w04 - privileged: true - container_name: oai-gNB1 - environment: - USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time - ASAN_OPTIONS: detect_leaks=0 - volumes: - - ./oai/conf/gNB_config.yaml:/opt/oai-gnb/etc/gnb.yaml - networks: - public_net: - ipv4_address: 192.168.70.160 - healthcheck: - test: /bin/bash -c "pgrep nr-softmodem" - interval: 10s - timeout: 5s - retries: 5 - entrypoint: - - /bin/bash - - -c - - | - /opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.yaml -E --rfsim --log_config.global_log_options level,nocolor,time & - tail -f /dev/null - -networks: - public_net: - external: true - name: phine-net diff --git a/demo_containerized/open5gs_setup/docker-compose-ue.yml b/demo_containerized/open5gs_setup/docker-compose-ue.yml deleted file mode 100644 index f7a2904..0000000 --- a/demo_containerized/open5gs_setup/docker-compose-ue.yml +++ /dev/null @@ -1,152 +0,0 @@ -services: - robot_1: - image: ue_amr - privileged: true - container_name: ${NAME_ROBOT_1} - environment: - USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} --log_config.global_log_options level,nocolor,time - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - IGN_PARTITION: ${IGN_PARTITION} - networks: - public_net: - ipv4_address: ${IP_ROBOT_1} - ros_gz_net: - ipv4_address: 192.168.73.150 - volumes: - - ./oai/conf/UE_config.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/robot_logic/install/setup.bash - export ROS_DISCOVERY_SERVER="${ROS_DISCOVERY_SERVER}" - export IGN_IP=192.168.73.150 - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.yaml -E --rfsim -r 106 --numerology 1 -C 3319680000 --rfsimulator.serveraddr ${IP_GNB} & - sleep 10 - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROS_GZ_BRIDGE_NAME_1} - ) & - if [ "${EXECUTE_ROBOT_LAUNCH_FILE_1}" = "true" ]; then - ( - ros2 launch ${ROBOT_PACKAGE_NAME_1} ${ROBOT_LAUNCH_FILE_NAME_1} - ) & - fi - tail -f /dev/null - - healthcheck: - test: /bin/bash -c "pgrep nr-uesoftmodem" - interval: 10s - timeout: 5s - retries: 5 - - rcc: - image: rcc - privileged: true - container_name: rcc - environment: - - DISPLAY=${DISPLAY} - - QT_X11_NO_MITSHM=1 - - ROS_DOMAIN_ID=${ROS_DOMAIN_ID} - volumes: - - /tmp/.X11-unix:/tmp/.X11-unix:rw - stdin_open: true - tty: true - networks: - public_net: - ipv4_address: 192.168.70.151 - entrypoint: - - /bin/bash - - -c - - | - source /opt/ros/humble/setup.bash - source /app/rviz_rcc/install/setup.bash - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - ip route add 10.0.0.0/24 via 192.168.70.134 dev eth0 - sleep 20 - ros2 launch rviz_launch rviz_launch.launch.py & - tail -f /dev/null - - - dds_discovery_server: - image: dds_discovery_server - privileged: true - environment: - ROS_DOMAIN_ID: ${ROS_DOMAIN_ID} - container_name: discovery-server - networks: - public_net: - ipv4_address: 192.168.70.159 - ports: - - "11811:11811" - entrypoint: - - /bin/bash - - -c - - | - ip route add 10.0.0.0/24 via 192.168.70.134 dev eth0 - source /opt/ros/humble/setup.bash - fastdds discovery -i 0 -l 192.168.70.159 -p 11811 - - simulation: - image: simulation - privileged: true - container_name: simulation - environment: - - DISPLAY=${DISPLAY} - - QT_X11_NO_MITSHM=1 - - ROS_DOMAIN_ID= ${ROS_DOMAIN_ID} - - IGN_PARTITION=${IGN_PARTITION} - - GNB_NAME_FOR_BUTTON=${GNB_NAME_FOR_BUTTON} - - UE_NAME_FOR_BUTTON=${UE_NAME_FOR_BUTTON} - - PROJECT_PATH=/app - - DEMO_PROJECT_PATH=${DEMO_PROJECT_PATH} - - ROS_DISCOVERY_SERVER="192.168.70.159:11811" - - IGN_IP=192.168.73.151 - - NVIDIA_VISIBLE_DEVICES=all - - NVIDIA_DRIVER_CAPABILITIES=all - volumes: - - /tmp/.X11-unix:/tmp/.X11-unix:rw - - /var/run/docker.sock:/var/run/docker.sock - stdin_open: true - tty: true - runtime: ${GPU_RUNTIME:-runc} - networks: - public_net: - ipv4_address: 192.168.70.152 - ros_gz_net: - ipv4_address: 192.168.73.151 - entrypoint: - - /bin/bash - - -c - - | - if ip -4 addr show eth0 | grep -q "192.168.73"; then - echo "Wrong interface order detected. Swapping eth0 and eth1..." - ip link set eth0 name eth_temp - ip link set eth1 name eth0 - ip link set eth_temp name eth1 - else - echo "Interface order is correct (eth0 is public_net)." - fi - if [ "$GPU_RUNTIME" = "nvidia" ]; then - echo "NVIDIA runtime detected. Enabling GPU offload..." - export __NV_PRIME_RENDER_OFFLOAD=1 - export __GLX_VENDOR_LIBRARY_NAME=nvidia - else - echo "Standard runtime detected. Proceeding without NVIDIA offload." - fi - source /opt/ros/humble/setup.bash - source /app/gazebo_launch/install/setup.bash - export FASTRTPS_DEFAULT_PROFILES_FILE=/app/dds.xml - export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=${IGN_GAZEBO_SYSTEM_PLUGIN_PATH}:/usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins:/opt/ros/humble/lib - ip route add 10.0.0.0/24 via 192.168.70.134 dev eth0 - ros2 launch ign_turtlebot gazebo_launch.launch.py & - tail -f /dev/null - -networks: - public_net: - external: true - name: phine-net - ros_gz_net: - external: - name: ros_gz_net diff --git a/demo_containerized/open5gs_setup/docker-compose.yml b/demo_containerized/open5gs_setup/docker-compose.yml deleted file mode 100644 index 10916ec..0000000 --- a/demo_containerized/open5gs_setup/docker-compose.yml +++ /dev/null @@ -1,195 +0,0 @@ -services: - db: - container_name: db - image: mongo:6.0 - command: "mongod --bind_ip 0.0.0.0 --port 27017" - networks: - public_net: - ipv4_address: 192.168.70.131 - aliases: - - db.open5gs.org - ports: - - "27017:27017" - volumes: - - ./db_data:/data/db - - ./db_config:/data/configdb - - nrf: - container_name: nrf - image: borieher/nrf:v2.7.6 - command: "-c /etc/open5gs/custom/nrf.yaml" - networks: - public_net: - ipv4_address: 192.168.70.130 - aliases: - - nrf.open5gs.org - configs: - - source: nrf_config - target: /etc/open5gs/custom/nrf.yaml - - ausf: - container_name: ausf - image: borieher/ausf:v2.7.6 - command: "-c /etc/open5gs/custom/ausf.yaml" - networks: - public_net: - ipv4_address: 192.168.70.138 - aliases: - - ausf.open5gs.org - configs: - - source: ausf_config - target: /etc/open5gs/custom/ausf.yaml - depends_on: - - nrf - - udm: - container_name: udm - image: borieher/udm:v2.7.6 - command: "-c /etc/open5gs/custom/udm.yaml" - networks: - public_net: - ipv4_address: 192.168.70.137 - aliases: - - udm.open5gs.org - configs: - - source: udm_config - target: /etc/open5gs/custom/udm.yaml - depends_on: - - nrf - - udr: - container_name: udr - image: borieher/udr:v2.7.6 - command: "-c /etc/open5gs/custom/udr.yaml" - restart: unless-stopped - networks: - public_net: - ipv4_address: 192.168.70.136 - aliases: - - udr.open5gs.org - configs: - - source: udr_config - target: /etc/open5gs/custom/udr.yaml - depends_on: - - db - - nrf - - pcf: - container_name: pcf - image: borieher/pcf:v2.7.6 - command: "-c /etc/open5gs/custom/pcf.yaml" - restart: unless-stopped - networks: - public_net: - ipv4_address: 192.168.70.139 - aliases: - - pcf.open5gs.org - configs: - - source: pcf_config - target: /etc/open5gs/custom/pcf.yaml - depends_on: - - db - - nrf - - amf: - container_name: amf - image: borieher/amf:v2.7.6 - command: "-c /etc/open5gs/custom/amf.yaml" - networks: - public_net: - ipv4_address: 192.168.70.132 - aliases: - - amf.open5gs.org - configs: - - source: amf_config - target: /etc/open5gs/custom/amf.yaml - depends_on: - - nrf - ports: - - "38412:38412/sctp" - - smf: - container_name: smf - image: borieher/smf:v2.7.6 - command: "-c /etc/open5gs/custom/smf.yaml" - networks: - public_net: - ipv4_address: 192.168.70.133 - aliases: - - smf.open5gs.org - configs: - - source: smf_config - target: /etc/open5gs/custom/smf.yaml - depends_on: - nrf: - condition: service_started - upf: - condition: service_healthy - - upf: - container_name: upf - image: borieher/upf:v2.7.6 - command: "-c /etc/open5gs/custom/upf.yaml" - networks: - public_net: - ipv4_address: 192.168.70.134 - aliases: - - upf.open5gs.org - configs: - - source: upf_config - target: /etc/open5gs/custom/upf.yaml - ports: - - "2152:2152/udp" - privileged: true - cap_add: - - NET_ADMIN - healthcheck: - test: ["CMD-SHELL", "pgrep open5gs-upfd || exit 1"] - interval: 5s - timeout: 3s - retries: 10 - - webui: - container_name: webui - image: borieher/webui:v2.7.6 - networks: - public_net: - ipv4_address: 192.168.70.140 - ports: - - "9999:9999" - depends_on: - - db - environment: - DB_URI: mongodb://db:27017/open5gs - -networks: - public_net: - driver: bridge - name: phine-net - ipam: - config: - - subnet: 192.168.70.128/26 - driver_opts: - com.docker.network.bridge.name: "phine-net" - -volumes: - db_data: - db_config: - -configs: - nrf_config: - file: configs/nrf.yaml - ausf_config: - file: configs/ausf.yaml - udm_config: - file: configs/udm.yaml - udr_config: - file: configs/udr.yaml - pcf_config: - file: configs/pcf.yaml - amf_config: - file: configs/amf.yaml - smf_config: - file: configs/smf.yaml - upf_config: - file: configs/upf.yaml \ No newline at end of file diff --git a/demo_containerized/open5gs_setup/oai/conf/UE_config.yaml b/demo_containerized/open5gs_setup/oai/conf/UE_config.yaml deleted file mode 100644 index fad445c..0000000 --- a/demo_containerized/open5gs_setup/oai/conf/UE_config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -uicc0: - dnn: internet - imsi: 001010000000101 - key: 8baf473f2f8fd09487cccbd7097c6862 - opc: 8e27b6af0e692e750f32667a3b14605d - nssai_sst: 1 - nssai_sd: 000001 diff --git a/phine-plugins/src/phine_plugins/CMakeLists.txt b/phine-plugins/src/phine_plugins/CMakeLists.txt index ae2a620..f10c1cc 100644 --- a/phine-plugins/src/phine_plugins/CMakeLists.txt +++ b/phine-plugins/src/phine_plugins/CMakeLists.txt @@ -13,6 +13,7 @@ find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(ignition-cmake2 REQUIRED) find_package(std_msgs REQUIRED) +find_package(yaml-cpp REQUIRED) if(BUILD_TESTING) @@ -32,12 +33,14 @@ set_property(TARGET gNB_plugin PROPERTY CXX_STANDARD 17) # adding gazebo gazebo-plugin and ros libraries ament_target_dependencies(gNB_plugin ignition-plugin${IGN_PLUGIN_VER} ignition-gazebo${IGN_GAZEBO_VER} rclcpp std_msgs) +target_link_libraries(gNB_plugin yaml-cpp) add_library(UE_plugin SHARED src/UE_plugin.cc src/aux_functions.cc) set_property(TARGET UE_plugin PROPERTY CXX_STANDARD 17) # adding gazebo gazebo-plugin and ros libraries ament_target_dependencies(UE_plugin ignition-plugin${IGN_PLUGIN_VER} ignition-gazebo${IGN_GAZEBO_VER} rclcpp std_msgs) +target_link_libraries(UE_plugin yaml-cpp) # ---- NetworkMonitor GUI Plugin ---- find_package(Qt5 REQUIRED COMPONENTS Core Quick) diff --git a/phine-plugins/src/phine_plugins/package.xml b/phine-plugins/src/phine_plugins/package.xml index d82c784..d18dafa 100644 --- a/phine-plugins/src/phine_plugins/package.xml +++ b/phine-plugins/src/phine_plugins/package.xml @@ -11,6 +11,7 @@ rclcpp std_msgs + yaml-cpp ament_lint_auto ament_lint_common diff --git a/phine-plugins/src/phine_plugins/src/UE_plugin.cc b/phine-plugins/src/phine_plugins/src/UE_plugin.cc index 1090cba..1ddad36 100644 --- a/phine-plugins/src/phine_plugins/src/UE_plugin.cc +++ b/phine-plugins/src/phine_plugins/src/UE_plugin.cc @@ -98,8 +98,7 @@ void UE_plugin::Configure(const gz::sim::Entity &_entity, return; if (!GetParamFromSDF(sdfClone, "nssai_sst", this->nssai_sst)) return; - if (!GetParamFromSDF(sdfClone, "nssai_sd", this->nssai_sd)) - return; + GetOptionalParamFromSDF(sdfClone, "nssai_sd", this->nssai_sd, "no"); if (!GetParamFromSDF(sdfClone, "robot_project_path", this->robot_project_path)) return; @@ -155,14 +154,15 @@ void UE_plugin::Configure(const gz::sim::Entity &_entity, } void UE_plugin::configureOAI(const char *project_path) { - // Define file paths using PROJECT_PATH + // Define file paths using PROJECT_PATH (unified location) std::string file_path1 = - std::string(project_path) + "/oai_setup/docker-compose-ue.yml"; - std::string file_path2 = std::string(project_path) + "/oai_setup/conf/ue" + - this->robot_id + ".conf"; + std::string(project_path) + "/oai/docker-compose-ue.yml"; + // YAML config file (v26 format) — modify UE_config.yaml directly + std::string file_path2 = + std::string(project_path) + "/oai/conf/UE_config.yaml"; std::string file_path3 = - std::string(project_path) + "/images/ue_amr_oai/dds.xml"; - std::string file_path4 = std::string(project_path) + "/images/ue_amr_oai"; + std::string(project_path) + "/images/ue_amr/dds.xml"; + std::string file_path4 = std::string(project_path) + "/images/ue_amr"; // Replace interface whitelist addresses in DDS XML replace_interface_whitelist_addresses(this->subnet_5G, file_path3, @@ -174,33 +174,20 @@ void UE_plugin::configureOAI(const char *project_path) { " && docker build --build-arg ROBOT_PROJECT_NAME=" + this->robot_project_name + " --build-arg ROS_DISCOVERY_SERVER=" + this->ros_discovery_server + - " -t ue_amr_oai " + file_path4; + " -t ue_amr " + file_path4; system(docker_build_command.c_str()); - // Prepare configuration file modifications for UE - const std::string key1 = "imsi"; - const std::string new_value1 = "\"" + this->imsi + "\";"; - const std::string key2 = "key"; - const std::string new_value2 = "\"" + this->key + "\";"; - const std::string key3 = "opc"; - const std::string new_value3 = "\"" + this->opc + "\";"; - const std::string key4 = "dnn"; - const std::string new_value4 = "\"" + this->dnn + "\";"; - const std::string key5 = "nssai_sst"; - const std::string new_value5 = "\"" + this->nssai_sst + "\";"; - const std::string key6 = "nssai_sd"; - const std::string new_value6 = "\"" + this->nssai_sd + "\";"; - - // Modify UE configuration file with new values - modify_conf(file_path2, key1, new_value1, this->debug_logs); - modify_conf(file_path2, key2, new_value2, this->debug_logs); - modify_conf(file_path2, key3, new_value3, this->debug_logs); - modify_conf(file_path2, key4, new_value4, this->debug_logs); - modify_conf(file_path2, key5, new_value5, this->debug_logs); - modify_conf(file_path2, key6, new_value6, this->debug_logs); + // Modify UE YAML configuration file using YAML key: value format + modify_dockerC(file_path2, "imsi", this->imsi, this->debug_logs); + modify_dockerC(file_path2, "key", this->key, this->debug_logs); + modify_dockerC(file_path2, "opc", this->opc, this->debug_logs); + modify_dockerC(file_path2, "dnn", this->dnn, this->debug_logs); + modify_dockerC(file_path2, "nssai_sst", this->nssai_sst, this->debug_logs); + modify_or_comment_dockerC(file_path2, "nssai_sd", this->nssai_sd, + this->debug_logs); // Compose and run Docker container for UE robot - std::string folder_path = std::string(project_path) + "/oai_setup"; + std::string folder_path = std::string(project_path) + "/oai"; std::string docker_compose_command = "cd " + folder_path + " && " + "NAME_ROBOT_" + this->robot_id + "=" + this->robot_container_name + " " + "IP_GNB=" + this->ip_gNB + " " + @@ -212,17 +199,18 @@ void UE_plugin::configureOAI(const char *project_path) { this->robot_launch_file_name + " " + "EXECUTE_ROBOT_LAUNCH_FILE_" + this->robot_id + "=" + this->execute_robot_launch_file + " " + "ROS_DISCOVERY_SERVER=" + this->ros_discovery_server + " " + + "UE_CARRIER_FREQ=3619200000 " + "docker compose -f docker-compose-ue.yml up robot_" + this->robot_id + " -d"; system(docker_compose_command.c_str()); } void UE_plugin::configureFree5gc(const char *project_path) { - // Define file paths for free5gc setup + // Define file paths for free5gc setup (unified location) std::string file_path1 = - std::string(project_path) + "/free5gc_setup/docker-compose-ue.yml"; + std::string(project_path) + "/oai/docker-compose-ue.yml"; std::string file_path2 = - std::string(project_path) + "/free5gc_setup/oai/UE_config.yaml"; + std::string(project_path) + "/oai/conf/UE_config.yaml"; std::string file_path3 = std::string(project_path) + "/images/ue_amr/dds.xml"; std::string file_path4 = std::string(project_path) + "/images/ue_amr"; @@ -246,10 +234,11 @@ void UE_plugin::configureFree5gc(const char *project_path) { modify_dockerC(file_path2, "opc", this->opc, this->debug_logs); modify_dockerC(file_path2, "dnn", this->dnn, this->debug_logs); modify_dockerC(file_path2, "nssai_sst", this->nssai_sst, this->debug_logs); - modify_dockerC(file_path2, "nssai_sd", this->nssai_sd, this->debug_logs); + modify_or_comment_dockerC(file_path2, "nssai_sd", this->nssai_sd, + this->debug_logs); // Compose and run Docker container for UE robot - std::string folder_path = std::string(project_path) + "/free5gc_setup"; + std::string folder_path = std::string(project_path) + "/oai"; std::string docker_compose_command = "cd " + folder_path + " && " + "NAME_ROBOT_" + this->robot_id + "=" + this->robot_container_name + " " + "IP_GNB=" + this->ip_gNB + " " + @@ -261,17 +250,18 @@ void UE_plugin::configureFree5gc(const char *project_path) { this->robot_launch_file_name + " " + "EXECUTE_ROBOT_LAUNCH_FILE_" + this->robot_id + "=" + this->execute_robot_launch_file + " " + "ROS_DISCOVERY_SERVER=" + this->ros_discovery_server + " " + + "UE_CARRIER_FREQ=3319680000 " + "docker compose -f docker-compose-ue.yml up robot_" + this->robot_id + " -d"; system(docker_compose_command.c_str()); } void UE_plugin::configureOpen5gs(const char *project_path) { - // Define file paths for open5gs setup + // Define file paths for open5gs setup (unified location) std::string file_path1 = - std::string(project_path) + "/open5gs_setup/docker-compose-ue.yml"; + std::string(project_path) + "/oai/docker-compose-ue.yml"; std::string file_path2 = - std::string(project_path) + "/open5gs_setup/oai/conf/UE_config.yaml"; + std::string(project_path) + "/oai/conf/UE_config.yaml"; std::string file_path3 = std::string(project_path) + "/images/ue_amr/dds.xml"; std::string file_path4 = std::string(project_path) + "/images/ue_amr"; @@ -295,10 +285,11 @@ void UE_plugin::configureOpen5gs(const char *project_path) { modify_dockerC(file_path2, "opc", this->opc, this->debug_logs); modify_dockerC(file_path2, "dnn", this->dnn, this->debug_logs); modify_dockerC(file_path2, "nssai_sst", this->nssai_sst, this->debug_logs); - modify_dockerC(file_path2, "nssai_sd", this->nssai_sd, this->debug_logs); + modify_or_comment_dockerC(file_path2, "nssai_sd", this->nssai_sd, + this->debug_logs); // Compose and run Docker container for UE robot - std::string folder_path = std::string(project_path) + "/open5gs_setup"; + std::string folder_path = std::string(project_path) + "/oai"; std::string docker_compose_command = "cd " + folder_path + " && " + "NAME_ROBOT_" + this->robot_id + "=" + this->robot_container_name + " " + "IP_GNB=" + this->ip_gNB + " " + @@ -310,6 +301,7 @@ void UE_plugin::configureOpen5gs(const char *project_path) { this->robot_launch_file_name + " " + "EXECUTE_ROBOT_LAUNCH_FILE_" + this->robot_id + "=" + this->execute_robot_launch_file + " " + "ROS_DISCOVERY_SERVER=" + this->ros_discovery_server + " " + + "UE_CARRIER_FREQ=3319680000 " + "docker compose -f docker-compose-ue.yml up robot_" + this->robot_id + " -d"; system(docker_compose_command.c_str()); diff --git a/phine-plugins/src/phine_plugins/src/UePowerPlugin.cc b/phine-plugins/src/phine_plugins/src/UePowerPlugin.cc index 2b599f0..4856c7f 100644 --- a/phine-plugins/src/phine_plugins/src/UePowerPlugin.cc +++ b/phine-plugins/src/phine_plugins/src/UePowerPlugin.cc @@ -48,16 +48,6 @@ void UePowerPlugin::LoadConfig(const tinyxml2::XMLElement *_pluginElem) { container_name = QString::fromStdString(name_elem->GetText()); } - auto *ver_elem = _pluginElem->FirstChildElement("version"); - if (ver_elem != nullptr && ver_elem->GetText() != nullptr) { - std::string ver = ver_elem->GetText(); - if (ver == "v24") { - version_index = 0; - } else if (ver == "v26") { - version_index = 1; - } - } - auto *ip_elem = _pluginElem->FirstChildElement("gnb_ip"); if (ip_elem != nullptr && ip_elem->GetText() != nullptr) { gnb_ip = QString::fromStdString(ip_elem->GetText()); @@ -74,15 +64,6 @@ void UePowerPlugin::setContainerName(const QString &name) { } } -int UePowerPlugin::getVersionIndex() const { return version_index; } - -void UePowerPlugin::setVersionIndex(int index) { - if (version_index != index) { - version_index = index; - emit versionIndexChanged(); - } -} - QString UePowerPlugin::getGnbIp() const { return gnb_ip; } void UePowerPlugin::setGnbIp(const QString &ip) { @@ -135,18 +116,6 @@ std::string UePowerPlugin::buildStartCommand() const { std::string name = container_name.toStdString(); std::string ip = gnb_ip.toStdString(); - if (version_index == 0) { - // v24: uses .conf file with --sa flag, freq 3619200000 - return "docker exec " + name + - " /bin/bash -c" - " '/opt/oai-nr-ue/bin/nr-uesoftmodem" - " -O /opt/oai-nr-ue/etc/nr-ue.conf" - " -E --sa --rfsim -r 106 --numerology 1" - " -C 3619200000" - " --rfsimulator.serveraddr " + - ip + " --log_config.global_log_options level,nocolor,time &'"; - } - // v26: uses .yaml file without --sa flag, freq 3319680000 return "docker exec " + name + " /bin/bash -c" " '/opt/oai-nr-ue/bin/nr-uesoftmodem" diff --git a/phine-plugins/src/phine_plugins/src/UePowerPlugin.hh b/phine-plugins/src/phine_plugins/src/UePowerPlugin.hh index 4062e5c..b0a5cc3 100644 --- a/phine-plugins/src/phine_plugins/src/UePowerPlugin.hh +++ b/phine-plugins/src/phine_plugins/src/UePowerPlugin.hh @@ -26,8 +26,6 @@ class UePowerPlugin : public ignition::gui::Plugin { Q_PROPERTY(QString containerName READ getContainerName WRITE setContainerName NOTIFY containerNameChanged) - Q_PROPERTY(int versionIndex READ getVersionIndex WRITE setVersionIndex - NOTIFY versionIndexChanged) Q_PROPERTY(QString gnbIp READ getGnbIp WRITE setGnbIp NOTIFY gnbIpChanged) Q_PROPERTY( bool processRunning READ isProcessRunning NOTIFY processRunningChanged) @@ -40,8 +38,6 @@ class UePowerPlugin : public ignition::gui::Plugin { QString getContainerName() const; void setContainerName(const QString &name); - int getVersionIndex() const; - void setVersionIndex(int index); QString getGnbIp() const; void setGnbIp(const QString &ip); bool isProcessRunning() const; @@ -52,7 +48,6 @@ class UePowerPlugin : public ignition::gui::Plugin { signals: void containerNameChanged(); - void versionIndexChanged(); void gnbIpChanged(); void processRunningChanged(); void connectedChanged(); @@ -64,7 +59,6 @@ class UePowerPlugin : public ignition::gui::Plugin { static bool isValidIpAddress(const std::string &ip); QString container_name{"ue_turtlebot"}; - int version_index{0}; // 0 = v24, 1 = v26 QString gnb_ip{"192.168.70.160"}; bool process_running{false}; bool connected{false}; diff --git a/phine-plugins/src/phine_plugins/src/UePowerPlugin.qml b/phine-plugins/src/phine_plugins/src/UePowerPlugin.qml index 98e03ec..13647fa 100644 --- a/phine-plugins/src/phine_plugins/src/UePowerPlugin.qml +++ b/phine-plugins/src/phine_plugins/src/UePowerPlugin.qml @@ -56,39 +56,6 @@ Rectangle { } } - // Version Selector - RowLayout { - spacing: 8 - Label { - text: "Version:" - color: "#cccccc" - font.pixelSize: 13 - Layout.preferredWidth: 80 - } - ComboBox { - id: versionCombo - model: ["v24 (.conf)", "v26 (.yaml)"] - currentIndex: UePowerPlugin.versionIndex - onCurrentIndexChanged: UePowerPlugin.versionIndex = currentIndex - enabled: !UePowerPlugin.connected - Layout.fillWidth: true - font.pixelSize: 13 - - background: Rectangle { - color: versionCombo.enabled ? "#3c3c3c" : "#2a2a2a" - border.color: "#666666" - radius: 3 - } - contentItem: Text { - text: versionCombo.displayText - color: "#ffffff" - font: versionCombo.font - verticalAlignment: Text.AlignVCenter - leftPadding: 8 - } - } - } - // gNB IP Input RowLayout { spacing: 8 diff --git a/phine-plugins/src/phine_plugins/src/aux_functions.cc b/phine-plugins/src/phine_plugins/src/aux_functions.cc index da33341..fd128df 100644 --- a/phine-plugins/src/phine_plugins/src/aux_functions.cc +++ b/phine-plugins/src/phine_plugins/src/aux_functions.cc @@ -90,13 +90,113 @@ void RoboSimLogger::Log(LogLevel level, const std::string &message) { << "\033[0m" << std::endl; } +// --- yaml-cpp helper functions --- + +std::vector read_file_lines(const std::string &file_path) { + std::vector lines; + std::ifstream file_in(file_path); + if (!file_in) { + RoboSimLogger::Log(LogLevel::ERR, + "Error opening file for reading: " + file_path); + return lines; + } + std::string line; + while (std::getline(file_in, line)) { + lines.push_back(line); + } + file_in.close(); + return lines; +} + +void write_file_lines(const std::string &file_path, + const std::vector &lines) { + std::ofstream file_out(file_path, std::ios::trunc); + if (!file_out) { + RoboSimLogger::Log(LogLevel::ERR, + "Error opening file for writing: " + file_path); + return; + } + for (const auto &l : lines) { + file_out << l << "\n"; + } + file_out.close(); +} + +static int find_yaml_key_line_impl(const YAML::Node &node, + const std::string &key, int occurrence, + int &count) { + if (node.IsMap()) { + for (auto it = node.begin(); it != node.end(); ++it) { + std::string node_key; + try { + node_key = it->first.as(); + } catch (...) { + continue; + } + if (node_key == key) { + count++; + if (count == occurrence) { + return it->first.Mark().line; + } + } + // Recurse into child value + int result = + find_yaml_key_line_impl(it->second, key, occurrence, count); + if (result >= 0) { + return result; + } + } + } else if (node.IsSequence()) { + for (size_t i = 0; i < node.size(); ++i) { + int result = + find_yaml_key_line_impl(node[i], key, occurrence, count); + if (result >= 0) { + return result; + } + } + } + return -1; +} + +int find_yaml_key_line(const YAML::Node &node, const std::string &key, + int occurrence) { + int count = 0; + return find_yaml_key_line_impl(node, key, occurrence, count); +} + +bool find_yaml_value_node(const YAML::Node &node, const std::string &key, + YAML::Node &result) { + if (node.IsMap()) { + for (auto it = node.begin(); it != node.end(); ++it) { + std::string node_key; + try { + node_key = it->first.as(); + } catch (...) { + continue; + } + if (node_key == key) { + result = it->second; + return true; + } + if (find_yaml_value_node(it->second, key, result)) { + return true; + } + } + } else if (node.IsSequence()) { + for (size_t i = 0; i < node.size(); ++i) { + if (find_yaml_value_node(node[i], key, result)) { + return true; + } + } + } + return false; +} + /** * @brief Modifies the value associated with a specified key in a file. * - * This function searches for a line in the file at `file_path` that contains - * the given `key` followed by a colon and a value, and replaces the value with - * `new_value`. The function preserves the original indentation of the matched - * line. If `debug` is true, debug messages are logged. + * This function uses yaml-cpp to parse the YAML file, find the target key, + * and then performs a line-based edit to preserve comments and formatting. * * @param file_path The path to the file to be modified. * @param key The key whose value should be modified. @@ -105,56 +205,147 @@ void RoboSimLogger::Log(LogLevel level, const std::string &message) { */ void modify_dockerC(const std::string &file_path, const std::string &key, const std::string &new_value, bool debug) { - // Open the file for reading - std::ifstream file_in(file_path); - if (!file_in) { + YAML::Node root; + try { + root = YAML::LoadFile(file_path); + } catch (const YAML::Exception &e) { RoboSimLogger::Log(LogLevel::ERR, - "Error opening file for reading: " + file_path); + "Error parsing YAML file: " + file_path + " - " + + std::string(e.what())); return; } - std::stringstream modified_content; - std::string line; + int line_num = find_yaml_key_line(root, key); + if (line_num < 0) { + RoboSimLogger::Log(LogLevel::ERR, "Key not found in YAML: " + key + + " in file: " + file_path); + return; + } - // Create a regex pattern to match the key followed by a colon and its value - std::string regex_pattern = R"(\b)" + key + R"(\b\s*:\s*\S+)"; + std::vector lines = read_file_lines(file_path); + if (lines.empty()) { + return; + } - // Iterate through each line of the file - while (std::getline(file_in, line)) { - std::regex pattern(regex_pattern); + std::string &target = lines[line_num]; + if (debug) { + RoboSimLogger::Log(LogLevel::DEBUG, "Matched Line: " + target); + } - // Check if the line matches the pattern - if (std::regex_search(line, pattern)) { - if (debug) { - RoboSimLogger::Log(LogLevel::DEBUG, "Matched Line: " + line); - } + size_t colon_pos = target.find(':'); + if (colon_pos != std::string::npos) { + std::string prefix = target.substr(0, colon_pos + 1); + target = prefix + " " + new_value; + } - std::smatch match; - // Capture leading whitespace and optional YAML list marker (- ) - if (std::regex_search(line, match, - std::regex(R"(^(\s*)(-\s*)?)"))) { - std::string prefix = match.str(0); - // Replace the key's value with the new value, preserving prefix - line = prefix + key + " : " + new_value; - } - } + write_file_lines(file_path, lines); - // Append the (modified or unmodified) line to the output content - modified_content << line << "\n"; + if (debug) { + RoboSimLogger::Log(LogLevel::DEBUG, "File modified successfully."); } +} - file_in.close(); - - // Open the file for writing and overwrite it with the modified content - std::ofstream file_out(file_path, std::ios::trunc); - if (!file_out) { +/** + * @brief Modifies or comments a YAML configuration line based on the value. + * + * Uses yaml-cpp to find the key in the YAML tree. If the key exists: + * - If new_value is "no", the line is commented out with '#'. + * - If new_value is not "no", the value is updated. + * If the key doesn't exist (already commented out): + * - If new_value is not "no", searches for the commented line and uncomments + * it. + * + * @param file_path The path to the Docker configuration file to be modified. + * @param key The key whose value should be updated or commented in the + * configuration file. + * @param new_value The new value to assign to the specified key, or "no" to + * comment the line. + * @param debug If true, enables debug output for tracing the modification + * process. + */ +void modify_or_comment_dockerC(const std::string &file_path, + const std::string &key, + const std::string &new_value, bool debug) { + YAML::Node root; + try { + root = YAML::LoadFile(file_path); + } catch (const YAML::Exception &e) { RoboSimLogger::Log(LogLevel::ERR, - "Error opening file for writing: " + file_path); + "Error parsing YAML file: " + file_path + " - " + + std::string(e.what())); return; } - file_out << modified_content.str(); - file_out.close(); + std::vector lines = read_file_lines(file_path); + if (lines.empty()) { + return; + } + + int line_num = find_yaml_key_line(root, key); + + if (line_num >= 0) { + // Key exists in YAML tree + std::string &target = lines[line_num]; + if (debug) { + RoboSimLogger::Log(LogLevel::DEBUG, "Matched Line: " + target); + } + + if (new_value == "no") { + // Comment out the line + size_t first_non_space = target.find_first_not_of(" \t"); + if (first_non_space != std::string::npos) { + target.insert(first_non_space, "# "); + } + if (debug) { + RoboSimLogger::Log(LogLevel::DEBUG, + "Commenting out line: " + target); + } + } else { + // Modify the value + size_t colon_pos = target.find(':'); + if (colon_pos != std::string::npos) { + std::string prefix = target.substr(0, colon_pos + 1); + target = prefix + " " + new_value; + } + if (debug) { + RoboSimLogger::Log(LogLevel::DEBUG, "Setting value: " + target); + } + } + } else { + // Key not found in YAML tree (might be commented out) + if (new_value != "no") { + // Search for a commented line containing the key + for (size_t i = 0; i < lines.size(); ++i) { + const std::string &line = lines[i]; + size_t first_non_space = line.find_first_not_of(" \t"); + if (first_non_space == std::string::npos || + line[first_non_space] != '#') { + continue; + } + // This is a commented line, check if it contains the key + std::string after_comment = line.substr(first_non_space + 1); + size_t key_start = after_comment.find_first_not_of(" \t"); + if (key_start == std::string::npos) { + continue; + } + std::string key_part = after_comment.substr(key_start); + if (key_part.find(key) == 0) { + // Found the commented key - uncomment and set value + std::string indent = line.substr(0, first_non_space); + lines[i] = indent + key + " : " + new_value; + if (debug) { + RoboSimLogger::Log(LogLevel::DEBUG, + "Uncommenting and setting: " + + lines[i]); + } + break; + } + } + } + // If new_value == "no" and key is already commented, nothing to do + } + + write_file_lines(file_path, lines); if (debug) { RoboSimLogger::Log(LogLevel::DEBUG, "File modified successfully."); @@ -245,86 +436,51 @@ void modify_conf(const std::string &file_path, const std::string &key, * @brief Modifies a specific key in a file, replacing it with a new key while * preserving its value. * - * This function searches for lines in the specified file that contain the given - * `old_key` followed by a colon, and replaces the key with `new_key`, keeping - * any associated value intact. The function preserves indentation and only - * updates lines where the key matches exactly. The modified content is written - * back to the original file. + * Uses yaml-cpp to find the key in the YAML tree, then performs a targeted + * text replacement on the line to rename the key while preserving formatting. * * @param file_path The path to the file to be modified. * @param old_key The key to search for and replace. * @param new_key The new key to use as a replacement. * @param debug If true, debug messages will be logged during processing. - * - * @note If the file cannot be opened for reading or writing, an error is logged - * and the function returns early. */ void modify_service_name(const std::string &file_path, const std::string &old_key, const std::string &new_key, bool debug) { - std::ifstream file_in(file_path); - if (!file_in) { + YAML::Node root; + try { + root = YAML::LoadFile(file_path); + } catch (const YAML::Exception &e) { RoboSimLogger::Log(LogLevel::ERR, - "Error opening file for reading: " + file_path); + "Error parsing YAML file: " + file_path + " - " + + std::string(e.what())); return; } - std::stringstream modified_content; - std::string line; - - // Create a regex pattern to find the old_key followed by a colon and - // optional spaces or value - std::string regex_pattern = - R"(\b)" + old_key + - R"(\b\s*:\s*)"; // Matches `old_key:` with optional spaces after it - - // Iterate over each line of the file - while (std::getline(file_in, line)) { - std::regex pattern(regex_pattern); - - // If the line contains the old_key: (with or without value) - if (std::regex_search(line, pattern)) { - if (debug) { - RoboSimLogger::Log(LogLevel::DEBUG, "Matched Line: " + line); - } - - // Search for the key in the line and ensure it matches the old_key - std::smatch match; - if (std::regex_search(line, match, std::regex(R"(^\s*)"))) { - std::string indentation = - match.str(0); // Capture leading whitespace - - // If there is a value after the colon, retain the value. - // Otherwise, keep it empty. - size_t pos = line.find(":"); - std::string value = ""; - if (pos != std::string::npos && pos + 1 < line.size()) { - value = line.substr(pos + 1); // Extract value if present - } - - // If there's no value, ensure we just have `new_key:` - line = indentation + new_key + " :" + - value; // Update the key while preserving any value - } - } + int line_num = find_yaml_key_line(root, old_key); + if (line_num < 0) { + RoboSimLogger::Log(LogLevel::ERR, "Key not found in YAML: " + old_key + + " in file: " + file_path); + return; + } - // Append the line (modified or not) to the output string - modified_content << line << "\n"; + std::vector lines = read_file_lines(file_path); + if (lines.empty()) { + return; } - file_in.close(); + std::string &target = lines[line_num]; + if (debug) { + RoboSimLogger::Log(LogLevel::DEBUG, "Matched Line: " + target); + } - // Open the file in write mode to overwrite it with the modified content - std::ofstream file_out(file_path, std::ios::trunc); - if (!file_out) { - RoboSimLogger::Log(LogLevel::ERR, - "Error opening file for writing: " + file_path); - return; + // Replace the old key name with the new key name on this line + size_t key_pos = target.find(old_key); + if (key_pos != std::string::npos) { + target.replace(key_pos, old_key.length(), new_key); } - // Write the modified content back to the file - file_out << modified_content.str(); - file_out.close(); + write_file_lines(file_path, lines); if (debug) { RoboSimLogger::Log(LogLevel::DEBUG, "File modified successfully."); @@ -574,54 +730,44 @@ bool GetOptionalParamFromSDF(sdf::ElementPtr sdfClone, void modify_dockerC_nth(const std::string &file_path, const std::string &key, const std::string &new_value, int occurrence, bool debug) { - std::ifstream file_in(file_path); - if (!file_in) { + YAML::Node root; + try { + root = YAML::LoadFile(file_path); + } catch (const YAML::Exception &e) { RoboSimLogger::Log(LogLevel::ERR, - "Error opening file for reading: " + file_path); + "Error parsing YAML file: " + file_path + " - " + + std::string(e.what())); return; } - std::stringstream modified_content; - std::string line; - int match_count = 0; - - std::string regex_pattern = R"(\b)" + key + R"(\b\s*:\s*\S+)"; - - while (std::getline(file_in, line)) { - std::regex pattern(regex_pattern); - - if (std::regex_search(line, pattern)) { - match_count++; - if (match_count == occurrence) { - if (debug) { - RoboSimLogger::Log(LogLevel::DEBUG, - "Matched Line (occurrence " + - std::to_string(occurrence) + - "): " + line); - } - - std::smatch match; - if (std::regex_search(line, match, std::regex(R"(^\s*)"))) { - std::string indentation = match.str(0); - line = indentation + key + " : " + new_value; - } - } - } + int line_num = find_yaml_key_line(root, key, occurrence); + if (line_num < 0) { + RoboSimLogger::Log(LogLevel::ERR, "Key not found (occurrence " + + std::to_string(occurrence) + + "): " + key + + " in file: " + file_path); + return; + } - modified_content << line << "\n"; + std::vector lines = read_file_lines(file_path); + if (lines.empty()) { + return; } - file_in.close(); + std::string &target = lines[line_num]; + if (debug) { + RoboSimLogger::Log(LogLevel::DEBUG, "Matched Line (occurrence " + + std::to_string(occurrence) + + "): " + target); + } - std::ofstream file_out(file_path, std::ios::trunc); - if (!file_out) { - RoboSimLogger::Log(LogLevel::ERR, - "Error opening file for writing: " + file_path); - return; + size_t colon_pos = target.find(':'); + if (colon_pos != std::string::npos) { + std::string prefix = target.substr(0, colon_pos + 1); + target = prefix + " " + new_value; } - file_out << modified_content.str(); - file_out.close(); + write_file_lines(file_path, lines); if (debug) { RoboSimLogger::Log(LogLevel::DEBUG, "File modified successfully."); @@ -631,57 +777,58 @@ void modify_dockerC_nth(const std::string &file_path, const std::string &key, void modify_yaml_list_entry(const std::string &file_path, const std::string &parent_key, const std::string &new_value, bool debug) { - std::ifstream file_in(file_path); - if (!file_in) { + YAML::Node root; + try { + root = YAML::LoadFile(file_path); + } catch (const YAML::Exception &e) { RoboSimLogger::Log(LogLevel::ERR, - "Error opening file for reading: " + file_path); + "Error parsing YAML file: " + file_path + " - " + + std::string(e.what())); return; } - std::stringstream modified_content; - std::string line; - bool found_parent = false; - - std::string parent_pattern_str = R"(\b)" + parent_key + R"(\b\s*:\s*$)"; - std::regex parent_pattern(parent_pattern_str); - std::regex list_item_pattern(R"(^(\s*)-\s*.+)"); + // Find the value node for the parent key (should be a sequence) + YAML::Node list_node; + if (!find_yaml_value_node(root, parent_key, list_node)) { + RoboSimLogger::Log(LogLevel::ERR, + "Parent key not found: " + parent_key + + " in file: " + file_path); + return; + } - while (std::getline(file_in, line)) { - if (found_parent) { - std::smatch match; - if (std::regex_search(line, match, list_item_pattern)) { - if (debug) { - RoboSimLogger::Log(LogLevel::DEBUG, - "Replacing list item: " + line); - } - std::string indentation = match.str(1); - line = indentation + "- " + new_value; - found_parent = false; - } - } + if (!list_node.IsSequence() || list_node.size() == 0) { + RoboSimLogger::Log(LogLevel::ERR, + "Key " + parent_key + + " is not a non-empty sequence in: " + file_path); + return; + } - if (std::regex_search(line, parent_pattern)) { - found_parent = true; - if (debug) { - RoboSimLogger::Log(LogLevel::DEBUG, - "Found parent key: " + line); - } - } + // Get the line number of the first list element + int line_num = list_node[0].Mark().line; + if (line_num < 0) { + RoboSimLogger::Log(LogLevel::ERR, + "Could not determine line for list entry under: " + + parent_key); + return; + } - modified_content << line << "\n"; + std::vector lines = read_file_lines(file_path); + if (lines.empty()) { + return; } - file_in.close(); + std::string &target = lines[line_num]; + if (debug) { + RoboSimLogger::Log(LogLevel::DEBUG, "Replacing list item: " + target); + } - std::ofstream file_out(file_path, std::ios::trunc); - if (!file_out) { - RoboSimLogger::Log(LogLevel::ERR, - "Error opening file for writing: " + file_path); - return; + // Find the "- " marker and replace the value after it + size_t dash_pos = target.find("- "); + if (dash_pos != std::string::npos) { + target = target.substr(0, dash_pos + 2) + new_value; } - file_out << modified_content.str(); - file_out.close(); + write_file_lines(file_path, lines); if (debug) { RoboSimLogger::Log(LogLevel::DEBUG, "File modified successfully."); diff --git a/phine-plugins/src/phine_plugins/src/aux_functions.hh b/phine-plugins/src/phine_plugins/src/aux_functions.hh index 62a77e8..f96fa8d 100644 --- a/phine-plugins/src/phine_plugins/src/aux_functions.hh +++ b/phine-plugins/src/phine_plugins/src/aux_functions.hh @@ -27,6 +27,7 @@ limitations under the License.*/ #include #include #include +#include // Enum for log levels enum class LogLevel { DEBUG, WARN, ERR, INFO }; @@ -104,6 +105,27 @@ void modify_service_name(const std::string &file_path, void modify_dockerC(const std::string &file_path, const std::string &key, const std::string &new_value, bool debug); +/** + * @brief Modifies or comments a YAML configuration line based on the value. + * + * This function handles conditional commenting of YAML configuration lines: + * - If new_value is "no", the line containing the key is commented out with + * '#'. + * - If new_value is not "no", the line is uncommented (if needed) and the value + * is set. + * + * @param file_path The path to the Docker configuration file to be modified. + * @param key The key whose value should be updated or commented in the + * configuration file. + * @param new_value The new value to assign to the specified key, or "no" to + * comment the line. + * @param debug If true, enables debug output for tracing the modification + * process. + */ +void modify_or_comment_dockerC(const std::string &file_path, + const std::string &key, + const std::string &new_value, bool debug); + /** * @brief Modifies the value associated with a specified key in a gNb * configuration file. @@ -247,4 +269,40 @@ void modify_yaml_list_entry(const std::string &file_path, const std::string &parent_key, const std::string &new_value, bool debug); +// --- yaml-cpp helpers for YAML file manipulation --- + +/** + * @brief Reads all lines from a file into a vector. + */ +std::vector read_file_lines(const std::string &file_path); + +/** + * @brief Writes a vector of lines back to a file. + */ +void write_file_lines(const std::string &file_path, + const std::vector &lines); + +/** + * @brief Recursively searches a YAML tree for a key and returns its line + * number. + * + * @param node The YAML node to search. + * @param key The key name to find. + * @param occurrence Which occurrence to find (1-based). Default is 1. + * @return The 0-based line number of the key, or -1 if not found. + */ +int find_yaml_key_line(const YAML::Node &node, const std::string &key, + int occurrence = 1); + +/** + * @brief Recursively searches a YAML tree for a key and returns the value node. + * + * @param node The YAML node to search. + * @param key The key name to find. + * @param result Output: the value node associated with the key. + * @return true if the key was found. + */ +bool find_yaml_value_node(const YAML::Node &node, const std::string &key, + YAML::Node &result); + #endif // AUX_FUNCTIONS_HH \ No newline at end of file diff --git a/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.cc b/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.cc index 8f93ed7..ea37688 100644 --- a/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.cc +++ b/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.cc @@ -39,16 +39,6 @@ void gNBPowerPlugin::LoadConfig(const tinyxml2::XMLElement *_pluginElem) { if (name_elem != nullptr && name_elem->GetText() != nullptr) { container_name = QString::fromStdString(name_elem->GetText()); } - - auto *ver_elem = _pluginElem->FirstChildElement("version"); - if (ver_elem != nullptr && ver_elem->GetText() != nullptr) { - std::string ver = ver_elem->GetText(); - if (ver == "v24") { - version_index = 0; - } else if (ver == "v26") { - version_index = 1; - } - } } } @@ -61,15 +51,6 @@ void gNBPowerPlugin::setContainerName(const QString &name) { } } -int gNBPowerPlugin::getVersionIndex() const { return version_index; } - -void gNBPowerPlugin::setVersionIndex(int index) { - if (version_index != index) { - version_index = index; - emit versionIndexChanged(); - } -} - bool gNBPowerPlugin::isProcessRunning() const { return process_running; } bool gNBPowerPlugin::isConnected() const { return connected; } @@ -95,16 +76,6 @@ bool gNBPowerPlugin::checkProcessRunning() { std::string gNBPowerPlugin::buildStartCommand() const { std::string name = container_name.toStdString(); - if (version_index == 0) { - // v24: uses .conf file with --sa flag - return "docker exec " + name + - " /bin/bash -c" - " '/opt/oai-gnb/bin/nr-softmodem" - " -O /opt/oai-gnb/etc/gnb.conf" - " --sa -E --rfsim" - " --log_config.global_log_options level,nocolor,time &'"; - } - // v26: uses .yaml file without --sa flag return "docker exec " + name + " /bin/bash -c" " '/opt/oai-gnb/bin/nr-softmodem" diff --git a/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.hh b/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.hh index 2a35549..b256bab 100644 --- a/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.hh +++ b/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.hh @@ -26,8 +26,6 @@ class gNBPowerPlugin : public ignition::gui::Plugin { Q_PROPERTY(QString containerName READ getContainerName WRITE setContainerName NOTIFY containerNameChanged) - Q_PROPERTY(int versionIndex READ getVersionIndex WRITE setVersionIndex - NOTIFY versionIndexChanged) Q_PROPERTY( bool processRunning READ isProcessRunning NOTIFY processRunningChanged) Q_PROPERTY(bool connected READ isConnected NOTIFY connectedChanged) @@ -39,8 +37,6 @@ class gNBPowerPlugin : public ignition::gui::Plugin { QString getContainerName() const; void setContainerName(const QString &name); - int getVersionIndex() const; - void setVersionIndex(int index); bool isProcessRunning() const; bool isConnected() const; @@ -49,7 +45,6 @@ class gNBPowerPlugin : public ignition::gui::Plugin { signals: void containerNameChanged(); - void versionIndexChanged(); void processRunningChanged(); void connectedChanged(); @@ -59,7 +54,6 @@ class gNBPowerPlugin : public ignition::gui::Plugin { static bool isValidContainerName(const std::string &name); QString container_name{"oai-gNB1"}; - int version_index{0}; // 0 = v24, 1 = v26 bool process_running{false}; bool connected{false}; }; diff --git a/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.qml b/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.qml index b245c57..6a30797 100644 --- a/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.qml +++ b/phine-plugins/src/phine_plugins/src/gNBPowerPlugin.qml @@ -56,39 +56,6 @@ Rectangle { } } - // Version Selector - RowLayout { - spacing: 8 - Label { - text: "Version:" - color: "#cccccc" - font.pixelSize: 13 - Layout.preferredWidth: 80 - } - ComboBox { - id: versionCombo - model: ["v24 (.conf)", "v26 (.yaml)"] - currentIndex: gNBPowerPlugin.versionIndex - onCurrentIndexChanged: gNBPowerPlugin.versionIndex = currentIndex - enabled: !gNBPowerPlugin.connected - Layout.fillWidth: true - font.pixelSize: 13 - - background: Rectangle { - color: versionCombo.enabled ? "#3c3c3c" : "#2a2a2a" - border.color: "#666666" - radius: 3 - } - contentItem: Text { - text: versionCombo.displayText - color: "#ffffff" - font: versionCombo.font - verticalAlignment: Text.AlignVCenter - leftPadding: 8 - } - } - } - Rectangle { Layout.fillWidth: true height: 1 diff --git a/phine-plugins/src/phine_plugins/src/gNB_plugin.cc b/phine-plugins/src/phine_plugins/src/gNB_plugin.cc index d97d528..6143110 100644 --- a/phine-plugins/src/phine_plugins/src/gNB_plugin.cc +++ b/phine-plugins/src/phine_plugins/src/gNB_plugin.cc @@ -159,14 +159,13 @@ void gNB_plugin::Configure(const gz::sim::Entity &_entity, void gNB_plugin::configureOAI(const char *project_path) { // Define the docker compose file path using PROJECT_PATH std::string file_path1 = - std::string(project_path) + "/oai_setup/docker-compose-gNB.yml"; - // Define the configuration file path using PROJECT_PATH + std::string(project_path) + "/oai/docker-compose-gNB.yml"; + // Define the configuration file path using PROJECT_PATH (YAML format for + // v26) std::string file_path2 = - std::string(project_path) + - "/oai_setup/conf/gnb.sa.bandn78.fr1.106PRB.rfsim.conf"; + std::string(project_path) + "/oai/conf/gNB_config.yaml"; // Define the key-value pairs for modifications in the Docker Compose file - // and configuration file const std::string key1 = "name"; const std::string new_value1 = this->netName; // Set the network name @@ -179,47 +178,14 @@ void gNB_plugin::configureOAI(const char *project_path) { "oai-" + this->model_name; // Set the container name based on the model name - const std::string key4 = - "ipv4"; // The parameter key to search for in the configuration file - const std::string new_value4 = - "\"" + this->ip_amf + "\";"; // Set the AMF's IPv4 address - - const std::string key5 = - "GNB_IPV4_ADDRESS_FOR_NG_AMF"; // The parameter key to search for - const std::string new_value5 = - "\"" + this->ip_gnb + "\";"; // Set the gNB's IPv4 address for NG-AMF - - const std::string key6 = - "GNB_IPV4_ADDRESS_FOR_NGU"; // The parameter key to search for - const std::string new_value6 = - "\"" + this->ip_gnb + "\";"; // Set the gNB's IPv4 address for NG-U - - const std::string key7 = "Active_gNBs"; // The parameter key to search for - const std::string new_value7 = - "(\"" + this->model_name + "\");"; // SChanging gNB name in config file - - const std::string key8 = "gNB_name"; // The parameter key to search for - const std::string new_value8 = - "\"" + this->model_name + "\";"; // Changing gNB name in config file - + // Define the key-value pairs for modifications in the YAML configuration + // file std::string gNB_ID = extractAndConvertToHex( this->model_name); // Extract and convert the gNB number to hexadecimal - const std::string key9 = "gNB_ID"; // The parameter key to search for - const std::string new_value9 = - gNB_ID + ";"; // Changing gNB ID number (hexadecimal) in config file - - const std::string key10 = "mcc"; // The parameter key to search for - const std::string new_value10 = - this->mcc + ";"; // Changing the mcc in config file - - const std::string key11 = "mnc"; // The parameter key to search for - const std::string new_value11 = - this->mnc + ";"; // Changing the mnc in config file const std::string old_key = - "oai_gNB"; // The old service name in the Docker Compose file + "gNB"; // The old service name in the Docker Compose file const std::string new_key = - "oai_" + this->model_name; // The new service name based on the model name // Call modifyFile for each key-value pair to update the Docker Compose file @@ -227,21 +193,24 @@ void gNB_plugin::configureOAI(const char *project_path) { modify_dockerC(file_path1, key2, new_value2, this->debug_logs); modify_dockerC(file_path1, key3, new_value3, this->debug_logs); - // Call modifyFile for each key-value pair to update the configuration file - modify_conf(file_path2, key4, new_value4, this->debug_logs); - modify_conf(file_path2, key5, new_value5, this->debug_logs); - modify_conf(file_path2, key6, new_value6, this->debug_logs); - modify_conf(file_path2, key7, new_value7, this->debug_logs); - modify_conf(file_path2, key8, new_value8, this->debug_logs); - modify_conf(file_path2, key9, new_value9, this->debug_logs); - modify_conf(file_path2, key10, new_value10, this->debug_logs); - modify_conf(file_path2, key11, new_value11, this->debug_logs); + // Call modify functions to update the YAML configuration file + modify_yaml_list_entry(file_path2, "Active_gNBs", this->model_name, + this->debug_logs); + modify_dockerC(file_path2, "gNB_name", this->model_name, this->debug_logs); + modify_dockerC(file_path2, "gNB_ID", gNB_ID, this->debug_logs); + modify_dockerC(file_path2, "GNB_IPV4_ADDRESS_FOR_NG_AMF", this->ip_gnb, + this->debug_logs); + modify_dockerC(file_path2, "GNB_IPV4_ADDRESS_FOR_NGU", this->ip_gnb, + this->debug_logs); + modify_dockerC(file_path2, "mcc", this->mcc, this->debug_logs); + modify_dockerC(file_path2, "mnc", this->mnc, this->debug_logs); + modify_dockerC(file_path2, "ipv4", this->ip_amf, this->debug_logs); + // Update the service name in the Docker Compose file modify_service_name(file_path1, old_key, new_key, this->debug_logs); // Define the Docker Compose command to run in that specific folder - std::string folder_path = - std::string(project_path) + "/oai_setup"; // Update with your path + std::string folder_path = std::string(project_path) + "/oai"; std::string docker_compose_command = "cd " + folder_path + " && docker compose -f docker-compose-gNB.yml up -d"; @@ -252,30 +221,31 @@ void gNB_plugin::configureOAI(const char *project_path) { } void gNB_plugin::configureFree5gc(const char *project_path) { - // Define file paths for free5gc setup + // Define file paths for free5gc setup (unified location) std::string file_path1 = - std::string(project_path) + "/free5gc_setup/docker-compose-gNB.yml"; + std::string(project_path) + "/oai/docker-compose-gNB.yml"; + std::string file_path_override = + std::string(project_path) + "/oai/docker-compose-gNB.free5gc.yml"; std::string file_path2 = - std::string(project_path) + "/free5gc_setup/oai/gNB_config.yaml"; + std::string(project_path) + "/oai/conf/gNB_config.yaml"; - // Modify Docker Compose file - // container_name is unique per key + // Modify base Docker Compose file (public_net only) modify_dockerC(file_path1, "container_name", "oai-" + this->model_name, this->debug_logs); - // ipv4_address appears twice: 1st for public_net, 2nd for n3_net - modify_dockerC_nth(file_path1, "ipv4_address", this->ip_gnb, 1, - this->debug_logs); - modify_dockerC_nth(file_path1, "ipv4_address", this->ip_gnb_n3, 2, - this->debug_logs); - // network name appears twice: 1st for public_net, 2nd for n3_net - modify_dockerC_nth(file_path1, "name", this->netName, 1, this->debug_logs); - modify_dockerC_nth(file_path1, "name", this->n3_net_name, 2, - this->debug_logs); + modify_dockerC(file_path1, "ipv4_address", this->ip_gnb, this->debug_logs); + modify_dockerC(file_path1, "name", this->netName, this->debug_logs); - // Update the service name in Docker Compose + // Modify override Docker Compose file (n3_net) + modify_dockerC(file_path_override, "ipv4_address", this->ip_gnb_n3, + this->debug_logs); + modify_dockerC(file_path_override, "name", this->n3_net_name, + this->debug_logs); + + // Update the service name in both Docker Compose files const std::string old_key = "gNB"; const std::string new_key = this->model_name; modify_service_name(file_path1, old_key, new_key, this->debug_logs); + modify_service_name(file_path_override, old_key, new_key, this->debug_logs); // Modify gNB YAML configuration file std::string gNB_ID = extractAndConvertToHex(this->model_name); @@ -292,23 +262,25 @@ void gNB_plugin::configureFree5gc(const char *project_path) { modify_dockerC(file_path2, "mnc", this->mnc, this->debug_logs); modify_dockerC(file_path2, "ipv4", this->ip_amf, this->debug_logs); - // Launch Docker Compose for the free5gc gNB - std::string folder_path = std::string(project_path) + "/free5gc_setup"; + // Launch Docker Compose for the free5gc gNB (base + override) + std::string folder_path = std::string(project_path) + "/oai"; std::string docker_compose_command = "cd " + folder_path + - " && docker compose -f docker-compose-gNB.yml up -d"; + " && docker compose -f docker-compose-gNB.yml" + " -f docker-compose-gNB.free5gc.yml up -d"; system(docker_compose_command.c_str()); // Reset the service name for subsequent gNBs modify_service_name(file_path1, new_key, old_key, this->debug_logs); + modify_service_name(file_path_override, new_key, old_key, this->debug_logs); } void gNB_plugin::configureOpen5gs(const char *project_path) { - // Define file paths for open5gs setup + // Define file paths for open5gs setup (unified location) std::string file_path1 = - std::string(project_path) + "/open5gs_setup/docker-compose-gNB.yml"; + std::string(project_path) + "/oai/docker-compose-gNB.yml"; std::string file_path2 = - std::string(project_path) + "/open5gs_setup/oai/conf/gNB_config.yaml"; + std::string(project_path) + "/oai/conf/gNB_config.yaml"; // Modify Docker Compose file modify_dockerC(file_path1, "container_name", "oai-" + this->model_name, @@ -337,7 +309,7 @@ void gNB_plugin::configureOpen5gs(const char *project_path) { modify_dockerC(file_path2, "ipv4", this->ip_amf, this->debug_logs); // Launch Docker Compose for the open5gs gNB - std::string folder_path = std::string(project_path) + "/open5gs_setup"; + std::string folder_path = std::string(project_path) + "/oai"; std::string docker_compose_command = "cd " + folder_path + " && docker compose -f docker-compose-gNB.yml up -d"; diff --git a/tests/integration/docker-compose-test-simulation.yml b/tests/integration/docker-compose-test-simulation.yml index 3dcee73..3cddc4e 100644 --- a/tests/integration/docker-compose-test-simulation.yml +++ b/tests/integration/docker-compose-test-simulation.yml @@ -13,6 +13,7 @@ services: - IGN_PARTITION=domain1 volumes: - /var/run/docker.sock:/var/run/docker.sock + - ${DEMO_PROJECT_PATH}/oai:/app/oai stdin_open: true tty: true networks: @@ -33,7 +34,7 @@ services: export IGN_GUI_PLUGIN_PATH=$${PACKAGE_PATH}/gui_plugins ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0 || true echo "Starting Gazebo in headless (server-only) mode..." - ign gazebo -s -r -v 3 $${PACKAGE_PATH}/worlds/world_only.sdf & + ign gazebo -s -r -v 3 $${PACKAGE_PATH}/worlds/world_only_oai.sdf & tail -f /dev/null networks: public_net: