Merge branch 'integration_2023_w41' into 'develop'
integration_2023_w41 See merge request oai/openairinterface5g!2394 * !2389 Remove global variable rx_spatial_power * !2364 NR UE PUCCH2 sanitize errors * !2352 Break DCI processing function into smaller pieces * !2391 Remove calloc from L1 at CSIRS_PDU conversion function * !2393 Fix UE assertion due to PUCCH resource lookup all BWPs * !2307 Improve documentation for L2sim Readme * !2310 doc(websvr): how to install properly the dependencies
This commit is contained in:
@@ -12,18 +12,81 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
This page is only valid for an `Ubuntu18` host.
|
||||
This page is valid for an `Ubuntu18` host.
|
||||
It is also valid for `Ubuntu 20.04`.
|
||||
|
||||
This tutorial is only valid once this file is merged into the `develop` branch.
|
||||
# 1. Adapt the `docker-compose` to your environment #
|
||||
The yaml file is in the following directory: `ci-scripts/yaml_files/5g_l2sim_tdd`
|
||||
|
||||
# 1. Retrieving the images on Docker-Hub #
|
||||
In the `SMF` section, provide your own DNS IP address:
|
||||
|
||||
```yaml
|
||||
DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
|
||||
```
|
||||
gNB section:
|
||||
|
||||
All the parameter values will be taken from the mounted config file:
|
||||
|
||||
```yaml
|
||||
oai-gnb:
|
||||
[...]
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band78.106prb.l2sim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
```
|
||||
|
||||
You need to provide your docker-host primary IP address and interface name: in our case `172.21.16.128` and `eno1`.
|
||||
The following refers to the contents of the previously mentioned .conf file
|
||||
|
||||
```yaml
|
||||
GNB_NGA_IF_NAME: eno1
|
||||
GNB_NGA_IP_ADDRESS: 172.21.16.128
|
||||
GNB_NGU_IF_NAME: eno1
|
||||
GNB_NGU_IP_ADDRESS: 172.21.16.128
|
||||
```
|
||||
|
||||
For the UE, all the parameter values will be taken from the mounted config
|
||||
file, in the section `oai-nr-ue0`:
|
||||
|
||||
```yaml
|
||||
oai-nr-ue0:
|
||||
[...]
|
||||
volumes:
|
||||
- ../../conf_files/nrue.band78.106prb.l2sim.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
- ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results
|
||||
```
|
||||
|
||||
In this section, you need to set the proper values for `local_n_if_name` and `remote_n_address`
|
||||
where the UE configuration (mounted to `/opt/oai-nr-ue/etc/nr-ue.conf`) reads:
|
||||
|
||||
```libconfig
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "nfapi";
|
||||
local_n_if_name = "eno1";
|
||||
remote_n_address = "127.0.0.1"; //Proxy IP
|
||||
local_n_address = "127.0.0.1";
|
||||
...
|
||||
```
|
||||
|
||||
This tutorial is a first draft. This nFAPI feature and the proxy are still under development.
|
||||
|
||||
At time of writing, we were able to run in `host-mode`, 1 `NR-UE` and just ping traffic.
|
||||
|
||||
|
||||
|
||||
|
||||
# 2. Retrieving the images on Docker-Hub #
|
||||
|
||||
Currently the images are hosted under the team account `oaisoftwarealliance`. They were previously hosted under the user account `rdefosseoai`.
|
||||
|
||||
Once again you may need to log on [docker-hub](https://hub.docker.com/) if your organization has reached pulling limit as `anonymous`.
|
||||
|
||||
```bash
|
||||
$ docker login
|
||||
docker login
|
||||
```
|
||||
```bash
|
||||
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
|
||||
Username:
|
||||
Password:
|
||||
@@ -32,33 +95,33 @@ Password:
|
||||
Now pull images.
|
||||
|
||||
```bash
|
||||
$ docker pull mysql:8.0
|
||||
$ docker pull oaisoftwarealliance/oai-amf:v1.5.0
|
||||
$ docker pull oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
$ docker pull oaisoftwarealliance/oai-smf:v1.5.0
|
||||
$ docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
$ docker pull oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
docker pull mysql:8.0
|
||||
docker pull oaisoftwarealliance/oai-amf:v1.5.0
|
||||
docker pull oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
docker pull oaisoftwarealliance/oai-smf:v1.5.0
|
||||
docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
docker pull oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
|
||||
$ docker pull oaisoftwarealliance/oai-gnb:develop
|
||||
$ docker pull oaisoftwarealliance/oai-nr-ue:develop
|
||||
$ docker pull oaisoftwarealliance/proxy:develop
|
||||
docker pull oaisoftwarealliance/oai-gnb:develop
|
||||
docker pull oaisoftwarealliance/oai-nr-ue:develop
|
||||
docker pull oaisoftwarealliance/proxy:develop
|
||||
```
|
||||
|
||||
And **re-tag** them for tutorials' docker-compose file to work.
|
||||
|
||||
```bash
|
||||
$ docker image tag oaisoftwarealliance/proxy:develop oai-lte-multi-ue-proxy:latest
|
||||
docker image tag oaisoftwarealliance/proxy:develop oai-lte-multi-ue-proxy:latest
|
||||
```
|
||||
|
||||
```bash
|
||||
$ docker logout
|
||||
docker logout
|
||||
```
|
||||
|
||||
Note that the proxy image is based on the source available at [https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy](https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy).
|
||||
|
||||
At time of writing, the `latest` tag corresponded to `56cfdc046a5f96d5e67d42a2fc2bf6ba2fe58b41` commit.
|
||||
|
||||
# 2. Deploy containers #
|
||||
# 3. Deploy containers #
|
||||
|
||||
**CAUTION: this SHALL be done in multiple steps.**
|
||||
|
||||
@@ -72,11 +135,13 @@ The `gNB`, `proxy` and `NR-UE` containers will be deployed in `host`-mode. It wi
|
||||
sudo ifconfig lo: 127.0.0.2 netmask 255.0.0.0 up
|
||||
```
|
||||
|
||||
## 2.1. Deploy OAI 5G Core Network ##
|
||||
## 3.1. Deploy OAI 5G Core Network ##
|
||||
|
||||
```bash
|
||||
$ cd ci-scripts/yaml_files/5g_l2sim_tdd
|
||||
$ docker-compose up -d mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn
|
||||
cd ci-scripts/yaml_files/5g_l2sim_tdd
|
||||
docker-compose up -d mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn
|
||||
```
|
||||
```bash
|
||||
Creating network "l2sim-oai-public-net" with driver "bridge"
|
||||
Creating network "l2sim-oai-traffic_net-net" with driver "bridge"
|
||||
Creating l2sim-oai-nrf ... done
|
||||
@@ -90,7 +155,9 @@ Creating l2sim-oai-ext-dn ... done
|
||||
Wait for a bit.
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
docker-compose ps -a
|
||||
```
|
||||
```bash
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
l2sim-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
@@ -104,7 +171,9 @@ l2sim-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 880
|
||||
At this point, you can prepare a capture on the newly-created public docker bridges:
|
||||
|
||||
```bash
|
||||
$ ifconfig
|
||||
ifconfig
|
||||
```
|
||||
```bash
|
||||
...
|
||||
l2sim-public: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 192.168.71.129 netmask 255.255.255.192 broadcast 192.168.71.191
|
||||
@@ -124,16 +193,19 @@ l2sim-traffic: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
TX packets 3999 bytes 23367972 (23.3 MB)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
...
|
||||
|
||||
$ sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not arp and not port 53 and not port 2152 and not port 2153)" -i l2sim-public -i l2sim-traffic -w /tmp/capture_5g_l2sim_tdd.pcap > /tmp/tshark.log 2>&1 &
|
||||
```
|
||||
```bash
|
||||
sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not arp and not port 53 and not port 2152 and not port 2153)" -i l2sim-public -i l2sim-traffic -w /tmp/capture_5g_l2sim_tdd.pcap > /tmp/tshark.log 2>&1 &
|
||||
```
|
||||
|
||||
## 2.2. Deploy OAI gNB in Standalone Mode as a VNF ##
|
||||
## 3.2. Deploy OAI gNB in Standalone Mode as a VNF ##
|
||||
|
||||
**CAUTION: To execute this 2nd step, the whole `CN5G` SHALL be in `healthy` state (especially the `mysql` container).**
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d oai-gnb
|
||||
docker-compose up -d oai-gnb
|
||||
```
|
||||
```bash
|
||||
l2sim-oai-nrf is up-to-date
|
||||
l2sim-oai-spgwu is up-to-date
|
||||
l2sim-oai-ext-dn is up-to-date
|
||||
@@ -144,6 +216,8 @@ Wait for a bit.
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
```
|
||||
```bash
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
l2sim-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
@@ -157,8 +231,10 @@ l2sim-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 880
|
||||
|
||||
You can verify that the `gNB` is connected with the `AMF`:
|
||||
|
||||
```bagh
|
||||
$ docker logs rfsim5g-oai-amf
|
||||
```bash
|
||||
docker logs l2sim-oai-amf
|
||||
```
|
||||
```bash
|
||||
...
|
||||
[AMF] [amf_app] [info ] |----------------------------------------------------gNBs' information-------------------------------------------|
|
||||
[AMF] [amf_app] [info ] | Index | Status | Global ID | gNB Name | PLMN |
|
||||
@@ -167,10 +243,12 @@ $ docker logs rfsim5g-oai-amf
|
||||
...
|
||||
```
|
||||
|
||||
## 2.3. Deploy OAI NR-UE and proxy
|
||||
## 3.3. Deploy OAI NR-UE and proxy
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d proxy oai-nr-ue0
|
||||
docker-compose up -d proxy oai-nr-ue
|
||||
```
|
||||
```bash
|
||||
l2sim-mysql is up-to-date
|
||||
l2sim-oai-nrf is up-to-date
|
||||
l2sim-oai-amf is up-to-date
|
||||
@@ -185,7 +263,9 @@ Creating l2sim-proxy ... done
|
||||
Wait for a bit.
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
docker-compose ps -a
|
||||
```
|
||||
```bash
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
l2sim-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
@@ -197,8 +277,11 @@ l2sim-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/
|
||||
l2sim-oai-smf /bin/bash /openair-smf/bin ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
l2sim-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
l2sim-proxy /oai-lte-multi-ue-proxy/bi ... Up (healthy)
|
||||
|
||||
$ docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}} {{.MemUsage}}\t{{.MemPerc}}" l2sim-mysql l2sim-oai-amf l2sim-oai-ext-dn l2sim-oai-gnb l2sim-oai-nr-ue0 l2sim-oai-nrf l2sim-oai-smf l2sim-oai-spgwu l2sim-proxy
|
||||
```
|
||||
```bash
|
||||
docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}} {{.MemUsage}}\t{{.MemPerc}}" l2sim-mysql l2sim-oai-amf l2sim-oai-ext-dn l2sim-oai-gnb l2sim-oai-nr-ue0 l2sim-oai-nrf l2sim-oai-smf l2sim-oai-spgwu l2sim-proxy
|
||||
```
|
||||
```bash
|
||||
CONTAINER CPU % MEM USAGE / LIMIT MEM %
|
||||
l2sim-mysql 0.03% 206.7MiB / 62.54GiB 0.32%
|
||||
l2sim-oai-amf 4.05% 29.49MiB / 62.54GiB 0.05%
|
||||
@@ -216,7 +299,9 @@ l2sim-proxy 6.97% 290.4MiB / 62.54GiB 0.45%
|
||||
But the CPU speed matters; I am running on a fast server:
|
||||
|
||||
```bash
|
||||
$ lscpu
|
||||
lscpu
|
||||
```
|
||||
```bash
|
||||
Architecture: x86_64
|
||||
CPU(s): 16
|
||||
...
|
||||
@@ -239,7 +324,9 @@ We will work on this issue.
|
||||
Making sure the OAI UE is connected:
|
||||
|
||||
```bash
|
||||
$ docker exec -it l2sim-oai-nr-ue /bin/bash
|
||||
docker exec -it l2sim-oai-nr-ue0 /bin/bash
|
||||
```
|
||||
```bash
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ifconfig
|
||||
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 192.168.71.137 netmask 255.255.255.192 broadcast 192.168.71.191
|
||||
@@ -266,14 +353,19 @@ oaitun_ue1: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
```
|
||||
|
||||
# 3. Check traffic #
|
||||
# 4. Check traffic #
|
||||
|
||||
## 3.1. Check your Internet connectivity ##
|
||||
## 4.1. Check your Internet connectivity ##
|
||||
|
||||
You can also check with the `ext-dn` container (IP address is `192.168.72.135` in docker-compose)
|
||||
|
||||
```bash
|
||||
$ docker exec -it l2sim-oai-nr-ue /bin/bash
|
||||
docker exec -it l2sim-oai-nr-ue0 /bin/bash
|
||||
```
|
||||
```bash
|
||||
ping -I oaitun_ue1 -c 20 192.168.72.135
|
||||
```
|
||||
```bash
|
||||
root@bb4d400a832d# ping -I oaitun_ue1 -c 20 192.168.72.135
|
||||
PING 192.168.72.135 (192.168.72.135) from 12.1.1.2 oaitun_ue1: 56(84) bytes of data.
|
||||
64 bytes from 192.168.72.135: icmp_seq=1 ttl=63 time=65.1 ms
|
||||
@@ -287,10 +379,12 @@ PING 192.168.72.135 (192.168.72.135) from 12.1.1.2 oaitun_ue1: 56(84) bytes of d
|
||||
rtt min/avg/max/mdev = 16.413/120.639/209.673/57.159 ms
|
||||
```
|
||||
|
||||
# 4. Un-deployment #
|
||||
# 5. Un-deployment #
|
||||
|
||||
```bash
|
||||
$ docker-compose down
|
||||
docker-compose down
|
||||
```
|
||||
```bash
|
||||
Stopping l2sim-oai-nr-ue2 ... done
|
||||
Stopping l2sim-oai-nr-ue ... done
|
||||
Stopping l2sim-oai-gnb ... done
|
||||
@@ -313,68 +407,3 @@ Removing network l2sim-oai-public-net
|
||||
Removing network l2sim-oai-traffic-net
|
||||
```
|
||||
|
||||
# 5. Adapt the `docker-compose` to your environment #
|
||||
|
||||
In the `SMF` section, provide your own DNS IP address:
|
||||
|
||||
```yaml
|
||||
DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
|
||||
```
|
||||
|
||||
gNB section:
|
||||
|
||||
All the parameter values will be taken from the mounted config file
|
||||
|
||||
```yaml
|
||||
oai-gnb:
|
||||
[...]
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band78.106prb.l2sim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
```
|
||||
|
||||
with the configuration file having something like:
|
||||
|
||||
```libconfig
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.128";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "eno1";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.128";
|
||||
GNB_PORT_FOR_NGU = 2152; # Spec 2152
|
||||
};
|
||||
```
|
||||
|
||||
For the UE, all the parameter values will be taken from the mounted config
|
||||
file. Example:
|
||||
|
||||
```yaml
|
||||
oai-nr-ue0:
|
||||
[...]
|
||||
volumes:
|
||||
- ../../conf_files/nrue.band78.106prb.l2sim.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
- ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results
|
||||
```
|
||||
|
||||
where the UE configuration (mounted to `/opt/oai-nr-ue/etc/nr-ue.conf`) reads
|
||||
|
||||
```libconfig
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "nfapi";
|
||||
local_n_if_name = "eno1";
|
||||
remote_n_address = "127.0.0.1"; //Proxy IP
|
||||
local_n_address = "127.0.0.1";
|
||||
...
|
||||
```
|
||||
|
||||
This tutorial is a first draft. This nFAPI feature and the proxy are still under development.
|
||||
|
||||
At time of writing, we were able to run in `host-mode`, 1 `NR-UE` and just ping traffic.
|
||||
|
||||
Later development will include:
|
||||
|
||||
- deploying `gNB-VNF`, `proxy` and `UE` in isolated containers (with their own IP address)
|
||||
- more UEs
|
||||
- more traffic (`UDP` and `TCP`)
|
||||
|
||||
@@ -1,164 +1,65 @@
|
||||
## building the webserver
|
||||
[[_TOC_]]
|
||||
|
||||
# Building the webserver
|
||||
|
||||
|
||||
back-end (the http server) and front-end (the html and javascript code for the browsers) are both built when the build of the `websrv` optional library is requested.
|
||||
|
||||
You can include the web server interface components in your build using the build_oai script with the `--build-lib "telnetsrv websrv"` option.
|
||||
You can include the web server interface components in your build using the `build_oai` script with the `--build-lib "telnetsrv websrv"` option.
|
||||
The related cmake cache entry in `ran_build/build/CMakeCache.txt` for building the web server
|
||||
is `ENABLE_WEBSRV:BOOL=ON`
|
||||
|
||||
When cmake configuration has been completed, with websrv enabled and all dependencies met,font-end and back-end
|
||||
When cmake configuration has been completed, with websrv enabled and all dependencies met, font-end and back-end
|
||||
can be built separately, using respectively `make websrvfront` or `make websrv` from the build repository (replace make by ninja if you
|
||||
build using ninja).
|
||||
|
||||
## Additional dependencies for the backend
|
||||
|
||||
To build the webserver frontend, you need additionally
|
||||
|
||||
###### build example when back-end dependency is not installed
|
||||
1. the [ulfius library](https://github.com/babelouest/ulfius)
|
||||
2. the [jansson library](https://github.com/akheron/jansson-debian)
|
||||
|
||||
```
|
||||
./build_oai --gNB --nrUE -w USRP --build-lib "telnetsrv websrv nrscope"
|
||||
Will compile gNB
|
||||
Will compile NR UE
|
||||
Enabling build of optional shared library telnetsrv
|
||||
Enabling build of optional shared library websrv
|
||||
Enabling build of optional shared library nrscope
|
||||
OPENAIR_DIR = /usr/local/oai/develop_unmodified/openairinterface5g
|
||||
Running "cmake -DOAI_USRP=ON -DENABLE_TELNETSRV=ON -DENABLE_WEBSRV=ON -DENABLE_NRSCOPE=ON ../../.."
|
||||
-- The C compiler identification is GNU 11.4.0
|
||||
-- The CXX compiler identification is GNU 11.4.0
|
||||
-- Detecting C compiler ABI info
|
||||
-- Detecting C compiler ABI info - done
|
||||
-- Check for working C compiler: /usr/bin/cc - skipped
|
||||
-- Detecting C compile features
|
||||
-- Detecting C compile features - done
|
||||
-- Detecting CXX compiler ABI info
|
||||
-- Detecting CXX compiler ABI info - done
|
||||
-- Check for working CXX compiler: /usr/bin/c++ - skipped
|
||||
-- Detecting CXX compile features
|
||||
-- Detecting CXX compile features - done
|
||||
-- Ccache not found. Consider installing it for faster compilation. Command: sudo apt/dnf install ccache
|
||||
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -gen-APER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-UPER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-JER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-BER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-OER
|
||||
-- CMAKE_BUILD_TYPE is RelWithDebInfo
|
||||
-- CPUARCH x86_64
|
||||
-- AVX512 intrinsics are OFF
|
||||
-- AVX2 intrinsics are ON
|
||||
-- Found Git: /usr/bin/git (found version "2.34.1")
|
||||
-- Checking for module 'libconfig'
|
||||
-- Found libconfig, version 1.5
|
||||
-- Checking for module 'openssl'
|
||||
-- Found openssl, version 3.0.2
|
||||
-- Checking for module 'blas'
|
||||
-- Found blas, version 3.10.3
|
||||
-- Checking for module 'lapacke'
|
||||
-- Found lapacke, version 3.10.0
|
||||
-- Checking for module 'cblas'
|
||||
-- No package 'cblas' found
|
||||
-- Add enb specific telnet functions in libtelnetsrv_enb.so
|
||||
-- No specific telnet functions for gnb
|
||||
-- No specific telnet functions for 4Gue
|
||||
-- Add 5Gue specific telnet functions in libtelnetsrv_5Gue.so
|
||||
-- Add CI specific telnet functions in libtelnetsrv_ci.so
|
||||
CMake Error at common/utils/websrv/CMakeLists.txt:31 (find_library):
|
||||
Could not find ULFIUS using the following names: libulfius.so
|
||||
-- Configuring incomplete, errors occurred!
|
||||
See also "/usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build/CMakeFiles/CMakeOutput.log".
|
||||
build have failed
|
||||
```
|
||||
You can fix this first dependency problem, the backend dependency, by installing the libulfius library:
|
||||
These libraries are not handled by `build_oai -I`
|
||||
|
||||
On ubuntu: `sudo apt-get install libulfius-dev`, for fedora: `dnf install libulfius`. Some distribution don't have
|
||||
libulfius package, instruction to install it can be found [here](https://github.com/babelouest/ulfius/blob/master/INSTALL.md)
|
||||
### Ubuntu
|
||||
|
||||
###### build example when front-end dependency is not installed
|
||||
```
|
||||
./build_oai --build-lib "websrv telnetsrv nrscope"
|
||||
|
||||
|
||||
|
||||
./build_oai --gNB --nrUE -w USRP --build-lib "telnetsrv websrv nrscope"
|
||||
Will compile gNB
|
||||
Will compile NR UE
|
||||
Enabling build of optional shared library telnetsrv
|
||||
Enabling build of optional shared library websrv
|
||||
Enabling build of optional shared library nrscope
|
||||
OPENAIR_DIR = /usr/local/oai/develop_unmodified/openairinterface5g
|
||||
Running "cmake -DOAI_USRP=ON -DENABLE_TELNETSRV=ON -DENABLE_WEBSRV=ON -DENABLE_NRSCOPE=ON ../../.."
|
||||
-- Ccache not found. Consider installing it for faster compilation. Command: sudo apt/dnf install ccache
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -gen-APER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-UPER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-JER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-BER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-OER
|
||||
-- CMAKE_BUILD_TYPE is RelWithDebInfo
|
||||
-- CPUARCH x86_64
|
||||
-- AVX512 intrinsics are OFF
|
||||
-- AVX2 intrinsics are ON
|
||||
-- Checking for module 'cblas'
|
||||
-- No package 'cblas' found
|
||||
-- Add enb specific telnet functions in libtelnetsrv_enb.so
|
||||
-- No specific telnet functions for gnb
|
||||
-- No specific telnet functions for 4Gue
|
||||
-- Add 5Gue specific telnet functions in libtelnetsrv_5Gue.so
|
||||
-- Add CI specific telnet functions in libtelnetsrv_ci.so
|
||||
-- found libulfius for websrv
|
||||
-- found libjansson for websrv
|
||||
CMake Error at common/utils/websrv/CMakeLists.txt:45 (find_program):
|
||||
Could not find NPM using the following names: npm
|
||||
|
||||
|
||||
-- Configuring incomplete, errors occurred!
|
||||
See also "/usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build/CMakeFiles/CMakeOutput.log".
|
||||
build have failed
|
||||
```
|
||||
Currently the web server frontend can run with nodejs 18, you can check the version (if any) installed on your system entering the `node -v` command.
|
||||
|
||||
To prevent difficult situations with nodejs or npm versions it is better to specifically install the required nodejs version (after removing existing versions of npm and nodejs), as explained
|
||||
[here](https://www.stewright.me/2023/04/install-nodejs-18-on-ubuntu-22-04/) for ubuntu. Similar instructions can be found for other distributions.
|
||||
It is also possible to make several nodejs versions co-habiting on your system, this is beyond this doc.
|
||||
|
||||
|
||||
###### example: installing nodejs 18 on ubuntu
|
||||
```bash
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install -y libulfius-dev libjansson-dev npm curl wget
|
||||
```
|
||||
|
||||
curl -s https://deb.nodesource.com/setup_18.x | sudo bash
|
||||
### Fedora(-based OS)
|
||||
|
||||
## Installing the NodeSource Node.js 18.x repo...
|
||||
```bash
|
||||
$ sudo dnf update -y
|
||||
$ sudo dnf install -y jansson-devel npm curl wget
|
||||
```
|
||||
|
||||
ulfius has to be installed as explained [here](https://github.com/babelouest/ulfius/blob/master/INSTALL.md#pre-compiled-packages).
|
||||
|
||||
## Additional dependencies for the frontend
|
||||
|
||||
Currently the web server frontend can run with nodejs 18, you can check the
|
||||
version (if any) installed on your system entering the `node -v` command.
|
||||
|
||||
To prevent difficult situations with nodejs or npm versions it is better to
|
||||
specifically install the required nodejs version (after removing existing
|
||||
versions of npm and nodejs), as explained
|
||||
[here](https://www.stewright.me/2023/04/install-nodejs-18-on-ubuntu-22-04/) for
|
||||
ubuntu. Similar instructions can be found for other distributions. It is also
|
||||
possible to make several nodejs versions co-habiting on your system, this is
|
||||
beyond this doc.
|
||||
|
||||
|
||||
For example, to install a specific nodeJS version, you can run the below
|
||||
command, with the typical output printed below for your convenience:
|
||||
```bash
|
||||
$ curl -s https://deb.nodesource.com/setup_18.x | sudo bash
|
||||
|
||||
## Populating apt-get cache...
|
||||
|
||||
+ apt-get update
|
||||
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
|
||||
Hit:2 http://us.archive.ubuntu.com/ubuntu jammy InRelease
|
||||
Get:3 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages [305 kB]
|
||||
Get:4 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [678 kB]
|
||||
Get:5 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
|
||||
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [42.8 kB]
|
||||
Get:7 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [11.2 kB]
|
||||
Get:8 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages [553 kB]
|
||||
Get:9 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
|
||||
Get:10 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [770 kB]
|
||||
Get:11 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [39.8 kB]
|
||||
Get:12 http://us.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [471 kB]
|
||||
Get:13 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [892 kB]
|
||||
Get:14 http://us.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [214 kB]
|
||||
Get:15 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [100 kB]
|
||||
Get:16 http://us.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [714 kB]
|
||||
Get:17 http://us.archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [114 kB]
|
||||
Get:18 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [968 kB]
|
||||
Get:19 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [648 kB]
|
||||
Get:20 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [211 kB]
|
||||
Get:21 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [288 kB]
|
||||
Get:22 http://us.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B]
|
||||
Get:23 http://us.archive.ubuntu.com/ubuntu jammy-backports/main amd64 DEP-11 Metadata [4,924 B]
|
||||
Get:24 http://us.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [15.6 kB]
|
||||
Fetched 7,379 kB in 4s (2,095 kB/s)
|
||||
Reading package lists... Done
|
||||
apt-get update
|
||||
|
||||
## Confirming "jammy" is supported...
|
||||
|
||||
@@ -176,15 +77,6 @@ Reading package lists... Done
|
||||
## Running `apt-get update` for you...
|
||||
|
||||
+ apt-get update
|
||||
Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
|
||||
Get:2 https://deb.nodesource.com/node_18.x jammy InRelease [4,563 B]
|
||||
Get:3 https://deb.nodesource.com/node_18.x jammy/main amd64 Packages [776 B]
|
||||
Hit:4 http://us.archive.ubuntu.com/ubuntu jammy InRelease
|
||||
Hit:5 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease
|
||||
Hit:6 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
|
||||
Fetched 5,339 B in 1s (7,666 B/s)
|
||||
Reading package lists... Done
|
||||
|
||||
## Run `sudo apt-get install -y nodejs` to install Node.js 18.x and npm
|
||||
## You may also need development tools to build native addons:
|
||||
sudo apt-get install gcc g++ make
|
||||
@@ -214,88 +106,46 @@ Preparing to unpack .../nodejs_18.17.1-deb-1nodesource1_amd64.deb ...
|
||||
Unpacking nodejs (18.17.1-deb-1nodesource1) ...
|
||||
Setting up nodejs (18.17.1-deb-1nodesource1) ...
|
||||
Processing triggers for man-db (2.10.2-1) ...
|
||||
|
||||
|
||||
```
|
||||
|
||||
###### build example when dependencies are met
|
||||
|
||||
|
||||
``` bash
|
||||
|
||||
./build_oai --ninja -c -C --gNB --nrUE -w USRP --build-lib "telnetsrv websrv nrscope"
|
||||
Will compile gNB
|
||||
Will compile NR UE
|
||||
Enabling build of optional shared library telnetsrv
|
||||
Enabling build of optional shared library websrv
|
||||
Enabling build of optional shared library nrscope
|
||||
OPENAIR_DIR = /usr/local/oai/develop_unmodified/openairinterface5g
|
||||
Erased all previously producted files
|
||||
Running "cmake -GNinja -DOAI_USRP=ON -DENABLE_TELNETSRV=ON -DENABLE_WEBSRV=ON -DENABLE_NRSCOPE=ON ../../.."
|
||||
-- The C compiler identification is GNU 11.4.0
|
||||
-- The CXX compiler identification is GNU 11.4.0
|
||||
-- Detecting C compiler ABI info
|
||||
-- Detecting C compiler ABI info - done
|
||||
-- Check for working C compiler: /usr/bin/cc - skipped
|
||||
-- Detecting C compile features
|
||||
-- Detecting C compile features - done
|
||||
-- Detecting CXX compiler ABI info
|
||||
-- Detecting CXX compiler ABI info - done
|
||||
-- Check for working CXX compiler: /usr/bin/c++ - skipped
|
||||
-- Detecting CXX compile features
|
||||
-- Detecting CXX compile features - done
|
||||
-- Ccache not found. Consider installing it for faster compilation. Command: sudo apt/dnf install ccache
|
||||
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -gen-APER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-UPER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-JER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-BER
|
||||
-- Check if /opt/asn1c/bin/asn1c supports -no-gen-OER
|
||||
-- CMAKE_BUILD_TYPE is RelWithDebInfo
|
||||
-- CPUARCH x86_64
|
||||
-- AVX512 intrinsics are OFF
|
||||
-- AVX2 intrinsics are ON
|
||||
-- Found Git: /usr/bin/git (found version "2.34.1")
|
||||
-- Checking for module 'libconfig'
|
||||
-- Found libconfig, version 1.5
|
||||
-- Checking for module 'openssl'
|
||||
-- Found openssl, version 3.0.2
|
||||
-- Checking for module 'blas'
|
||||
-- Found blas, version 3.10.3
|
||||
-- Checking for module 'lapacke'
|
||||
-- Found lapacke, version 3.10.0
|
||||
-- Checking for module 'cblas'
|
||||
-- No package 'cblas' found
|
||||
-- Add enb specific telnet functions in libtelnetsrv_enb.so
|
||||
-- No specific telnet functions for gnb
|
||||
-- No specific telnet functions for 4Gue
|
||||
-- Add 5Gue specific telnet functions in libtelnetsrv_5Gue.so
|
||||
-- Add CI specific telnet functions in libtelnetsrv_ci.so
|
||||
-- found libulfius for websrv
|
||||
-- found libjansson for websrv
|
||||
-- found npm for websrv
|
||||
-- Configuring webserver backend
|
||||
-- Configuring webserver frontend
|
||||
-- No Doxygen documentation requested
|
||||
-- libforms library, required for scopes, found at /usr/lib/libforms.so
|
||||
-- Found UHD: /usr/lib/x86_64-linux-gnu/libuhd.so
|
||||
-- Configuring done
|
||||
-- Generating done
|
||||
-- Build files have been written to: /usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build
|
||||
cd /usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build
|
||||
Running "cmake --build . --target nr-softmodem nr-cuup nr-uesoftmodem oai_usrpdevif telnetsrv websrv nrscope params_libconfig coding rfsimulator dfts -- -j8"
|
||||
Log file for compilation is being written to: /usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/log/all.txt
|
||||
nr-softmodem nr-cuup nr-uesoftmodem oai_usrpdevif telnetsrv websrv nrscope params_libconfig coding rfsimulator dfts compiled
|
||||
BUILD SHOULD BE SUCCESSFUL
|
||||
|
||||
If you want to put a more recent version, refer to the steps below, which is
|
||||
common for any OS:
|
||||
```bash
|
||||
$ sudo npm -g install @angular/cli@latest npm@latest
|
||||
$ sudo npm install n -g
|
||||
# Install the LTS version
|
||||
$ n lts
|
||||
# Or install the latest version
|
||||
$ n latest
|
||||
$ node --version
|
||||
```
|
||||
|
||||
###### building and installing the front-end after cmake has been successfully configured
|
||||
## Building the webserver
|
||||
|
||||
### Backend
|
||||
|
||||
The websrv targets won't be available till cmake has been successfully configured with the websrv option enabled
|
||||
|
||||
```bash
|
||||
$ cd <oai repository>/openairinterface5g/cmake_targets
|
||||
$ ./build_oai --build-lib websrv
|
||||
```
|
||||
cd \<oai repository\>/openairinterface5g/cmake_targets/ran_build/build
|
||||
make websrvfront
|
||||
or, without the help of the `build_oai` script:
|
||||
|
||||
```bash
|
||||
$ cd \<oai repository\>/openairinterface5g/cmake_targets/ran_build/build
|
||||
$ make websrv
|
||||
```
|
||||
|
||||
This will create the `libwebsrv.so` file in the `cmake_targets/ran_build/build` directory.
|
||||
|
||||
### Frontend
|
||||
|
||||
The frontend targets needs to be triggered explicitly:
|
||||
|
||||
```bash
|
||||
$ cd \<oai repository\>/openairinterface5g/cmake_targets/ran_build/build
|
||||
$ make websrvfront
|
||||
up to date, audited 1099 packages in 3s
|
||||
|
||||
142 packages are looking for funding
|
||||
@@ -332,27 +182,59 @@ Built target websrvfront
|
||||
```
|
||||
|
||||
|
||||
###### building and installing the back-end after cmake has been successfully configured
|
||||
## Examples
|
||||
|
||||
**build example when back-end dependency is not installed**
|
||||
```bash
|
||||
cd <oai repository>/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets
|
||||
./build_oai --build-lib websrv
|
||||
```
|
||||
or, without the help of the `build_oai` script:
|
||||
|
||||
```bash
|
||||
cd \<oai repository\>/openairinterface5g/cmake_targets/ran_build/build
|
||||
make websrv
|
||||
$ ./build_oai --gNB --nrUE -w USRP --build-lib "telnetsrv websrv nrscope"
|
||||
[...]
|
||||
CMake Error at common/utils/websrv/CMakeLists.txt:31 (find_library):
|
||||
Could not find ULFIUS using the following names: libulfius.so
|
||||
-- Configuring incomplete, errors occurred!
|
||||
See also "/usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build/CMakeFiles/CMakeOutput.log".
|
||||
build have failed
|
||||
```
|
||||
|
||||
This will create the `libwebsrv.so` file in the `targets/bin` and `cmake_targets/ran_build/build` sub directories of the oai repository.
|
||||
**build example when front-end dependency is not installed**
|
||||
```bash
|
||||
$ ./build_oai --gNB --nrUE -w USRP --build-lib "telnetsrv websrv nrscope"
|
||||
[...]
|
||||
-- found libulfius for websrv
|
||||
-- found libjansson for websrv
|
||||
CMake Error at common/utils/websrv/CMakeLists.txt:45 (find_program):
|
||||
Could not find NPM using the following names: npm
|
||||
|
||||
When starting the softmodem, you must specify the **_\-\-websrv_** option to load and start the web server. The web server is loaded via the [oai shared library loader](loader).
|
||||
|
||||
# Testing the web server interface
|
||||
-- Configuring incomplete, errors occurred!
|
||||
See also "/usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build/CMakeFiles/CMakeOutput.log".
|
||||
build have failed
|
||||
```
|
||||
|
||||
**build example when dependencies are met**
|
||||
|
||||
```bash
|
||||
$ ./build_oai --ninja -c -C --gNB --nrUE -w USRP --build-lib "telnetsrv websrv nrscope"
|
||||
[...]
|
||||
-- found libulfius for websrv
|
||||
-- found libjansson for websrv
|
||||
-- found npm for websrv
|
||||
-- Configuring webserver backend
|
||||
-- Configuring webserver frontend
|
||||
[...]
|
||||
-- Configuring done
|
||||
-- Generating done
|
||||
-- Build files have been written to: /usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build
|
||||
cd /usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build
|
||||
Running "cmake --build . --target nr-softmodem nr-cuup nr-uesoftmodem oai_usrpdevif telnetsrv websrv nrscope params_libconfig coding rfsimulator dfts -- -j8"
|
||||
Log file for compilation is being written to: /usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/log/all.txt
|
||||
nr-softmodem nr-cuup nr-uesoftmodem oai_usrpdevif telnetsrv websrv nrscope params_libconfig coding rfsimulator dfts compiled
|
||||
BUILD SHOULD BE SUCCESSFUL
|
||||
```
|
||||
|
||||
|
||||
# Running the web server interface
|
||||
|
||||
When starting the softmodem, you must specify the `--websrv` option to load and start the web server. The web server is loaded via the [oai shared library loader](loader).
|
||||
|
||||
## web server parameters
|
||||
The web server back-end is using the [oai configuration module](Config/Rtusage). web server parameters must be specified in the websrv section.
|
||||
@@ -367,7 +249,7 @@ The web server back-end is using the [oai configuration module](Config/Rtusage).
|
||||
| | | | |
|
||||
|
||||
## running the back-end
|
||||
To trigger the back-end use the `--websrv` option, possibly modifying the parameters as explained in the previous chapter. The two following commands allow starting the oai gNB and the oai 5G UE on the same computer, starting the telnet server and the web interface on both executables.
|
||||
To trigger the back-end use the `--websrv` option, possibly modifying the parameters as explained in the [previous section](./websrvuse.md#web-server-parameters). The two following commands allow starting the oai gNB and the oai 5G UE on the same computer, starting the telnet server and the web interface on both executables.
|
||||
|
||||
`./nr-softmodem -O /usr/local/oai/conf/gnb.band78.sa.fr1.106PRB.usrpb210.conf --rfsim --rfsimulator.serveraddr server --telnetsrv --telnetsrv.listenstdin --websrv --rfsimulator.options chanmod`
|
||||
|
||||
@@ -392,6 +274,7 @@ The interface should be intuitive enough, keeping in mind the following restrict
|
||||
Some front-end objects, which usage are less intuitive provide a tooltip to help interface usage.
|
||||
|
||||
## some webserver screenshots
|
||||
|
||||
- [main page](main.png)
|
||||
- [Configuring logs](logscfg.png)
|
||||
- [scope interface](scope.png)
|
||||
|
||||
@@ -239,19 +239,6 @@ typedef struct {
|
||||
nfapi_vendor_extension_tlv_t vendor_extension;
|
||||
} nfapi_nr_config_request_t;
|
||||
|
||||
|
||||
|
||||
typedef enum {
|
||||
NFAPI_NR_DL_DCI_FORMAT_1_0 = 0,
|
||||
NFAPI_NR_DL_DCI_FORMAT_1_1,
|
||||
NFAPI_NR_DL_DCI_FORMAT_2_0,
|
||||
NFAPI_NR_DL_DCI_FORMAT_2_1,
|
||||
NFAPI_NR_DL_DCI_FORMAT_2_2,
|
||||
NFAPI_NR_DL_DCI_FORMAT_2_3,
|
||||
NFAPI_NR_UL_DCI_FORMAT_0_0,
|
||||
NFAPI_NR_UL_DCI_FORMAT_0_1
|
||||
} nfapi_nr_dci_format_e;
|
||||
|
||||
typedef enum {
|
||||
NFAPI_NR_RNTI_new = 0,
|
||||
NFAPI_NR_RNTI_C,
|
||||
|
||||
@@ -216,8 +216,7 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB,
|
||||
ulsch_measurements_gNB *ulsch_measurements = &ulsch->ulsch_measurements;
|
||||
|
||||
int rx_power[fp->nb_antennas_rx];
|
||||
allocCast2D(rx_spatial_power, int, ulsch_measurements->rx_spatial_power, nrOfLayers, fp->nb_antennas_rx, true);
|
||||
allocCast2D(rx_spatial_power_dB, unsigned short, ulsch_measurements->rx_spatial_power_dB, nrOfLayers, fp->nb_antennas_rx, true);
|
||||
int rx_spatial_power[nrOfLayers][fp->nb_antennas_rx];
|
||||
for (int aarx = 0; aarx < fp->nb_antennas_rx; aarx++){
|
||||
rx_power[aarx] = 0;
|
||||
|
||||
@@ -230,7 +229,6 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB,
|
||||
rx_spatial_power[aatx][aarx] = 0;
|
||||
}
|
||||
|
||||
rx_spatial_power_dB[aatx][aarx] = (unsigned short)dB_fixed(rx_spatial_power[aatx][aarx]);
|
||||
rx_power[aarx] += rx_spatial_power[aatx][aarx];
|
||||
}
|
||||
LOG_D(PHY, "[RNTI %04x] RX power in antenna %d = %d\n", ulsch->rnti, aarx, rx_power[aarx]);
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
|
||||
uint16_t nr_get_dci_size(nfapi_nr_dci_format_e format,
|
||||
nfapi_nr_rnti_type_e rnti_type,
|
||||
uint16_t N_RB);
|
||||
|
||||
void nr_generate_dci_top(processingData_L1tx_t *msgTx,
|
||||
int slot,
|
||||
int32_t *txdataF,
|
||||
|
||||
@@ -834,23 +834,23 @@ int nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t r
|
||||
return 0;
|
||||
}
|
||||
|
||||
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *convert_csirs_pdu(fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu)
|
||||
static nfapi_nr_dl_tti_csi_rs_pdu_rel15_t convert_csirs_pdu(const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu)
|
||||
{
|
||||
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *dl_tti_csi_rs_pdu = calloc(1, sizeof(nfapi_nr_dl_tti_csi_rs_pdu_rel15_t));
|
||||
dl_tti_csi_rs_pdu->subcarrier_spacing = csirs_config_pdu->subcarrier_spacing;
|
||||
dl_tti_csi_rs_pdu->cyclic_prefix = csirs_config_pdu->cyclic_prefix;
|
||||
dl_tti_csi_rs_pdu->start_rb = csirs_config_pdu->start_rb;
|
||||
dl_tti_csi_rs_pdu->nr_of_rbs = csirs_config_pdu->nr_of_rbs;
|
||||
dl_tti_csi_rs_pdu->csi_type = csirs_config_pdu->csi_type;
|
||||
dl_tti_csi_rs_pdu->row = csirs_config_pdu->row;
|
||||
dl_tti_csi_rs_pdu->freq_domain = csirs_config_pdu->freq_domain;
|
||||
dl_tti_csi_rs_pdu->symb_l0 = csirs_config_pdu->symb_l0;
|
||||
dl_tti_csi_rs_pdu->symb_l1 = csirs_config_pdu->symb_l1;
|
||||
dl_tti_csi_rs_pdu->cdm_type = csirs_config_pdu->cdm_type;
|
||||
dl_tti_csi_rs_pdu->freq_density = csirs_config_pdu->freq_density;
|
||||
dl_tti_csi_rs_pdu->scramb_id = csirs_config_pdu->scramb_id;
|
||||
dl_tti_csi_rs_pdu->power_control_offset = csirs_config_pdu->power_control_offset;
|
||||
dl_tti_csi_rs_pdu->power_control_offset_ss = csirs_config_pdu->power_control_offset_ss;
|
||||
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t dl_tti_csi_rs_pdu;
|
||||
dl_tti_csi_rs_pdu.subcarrier_spacing = csirs_config_pdu->subcarrier_spacing;
|
||||
dl_tti_csi_rs_pdu.cyclic_prefix = csirs_config_pdu->cyclic_prefix;
|
||||
dl_tti_csi_rs_pdu.start_rb = csirs_config_pdu->start_rb;
|
||||
dl_tti_csi_rs_pdu.nr_of_rbs = csirs_config_pdu->nr_of_rbs;
|
||||
dl_tti_csi_rs_pdu.csi_type = csirs_config_pdu->csi_type;
|
||||
dl_tti_csi_rs_pdu.row = csirs_config_pdu->row;
|
||||
dl_tti_csi_rs_pdu.freq_domain = csirs_config_pdu->freq_domain;
|
||||
dl_tti_csi_rs_pdu.symb_l0 = csirs_config_pdu->symb_l0;
|
||||
dl_tti_csi_rs_pdu.symb_l1 = csirs_config_pdu->symb_l1;
|
||||
dl_tti_csi_rs_pdu.cdm_type = csirs_config_pdu->cdm_type;
|
||||
dl_tti_csi_rs_pdu.freq_density = csirs_config_pdu->freq_density;
|
||||
dl_tti_csi_rs_pdu.scramb_id = csirs_config_pdu->scramb_id;
|
||||
dl_tti_csi_rs_pdu.power_control_offset = csirs_config_pdu->power_control_offset;
|
||||
dl_tti_csi_rs_pdu.power_control_offset_ss = csirs_config_pdu->power_control_offset_ss;
|
||||
return dl_tti_csi_rs_pdu;
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t
|
||||
return;
|
||||
}
|
||||
|
||||
const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu = (fapi_nr_dl_config_csirs_pdu_rel15_t*)&ue->csirs_vars[gNB_id]->csirs_config_pdu;
|
||||
const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu = &ue->csirs_vars[gNB_id]->csirs_config_pdu;
|
||||
|
||||
#ifdef NR_CSIRS_DEBUG
|
||||
LOG_I(NR_PHY, "csirs_config_pdu->subcarrier_spacing = %i\n", csirs_config_pdu->subcarrier_spacing);
|
||||
@@ -906,12 +906,12 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t
|
||||
uint8_t cqi = 0;
|
||||
uint8_t i1[3];
|
||||
uint8_t i2[1];
|
||||
|
||||
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t csi_params = convert_csirs_pdu(csirs_config_pdu);
|
||||
nr_generate_csi_rs(frame_parms,
|
||||
ue->nr_csi_info->csi_rs_generated_signal,
|
||||
AMP,
|
||||
ue->nr_csi_info,
|
||||
convert_csirs_pdu((fapi_nr_dl_config_csirs_pdu_rel15_t*)&ue->csirs_vars[gNB_id]->csirs_config_pdu),
|
||||
&csi_params,
|
||||
proc->nr_slot_rx,
|
||||
&N_cdm_groups,
|
||||
&CDM_group_size,
|
||||
|
||||
@@ -759,7 +759,10 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue,
|
||||
|
||||
for (int l=0; l<pucch_pdu->nr_of_symbols; l++) {
|
||||
// c_init calculation according to TS38.211 subclause
|
||||
x2 = (((1<<17)*((14*nr_slot_tx) + (l+startingSymbolIndex) + 1)*((2*pucch_pdu->dmrs_scrambling_id) + 1)) + (2*pucch_pdu->dmrs_scrambling_id))%(1U<<31);
|
||||
uint64_t temp_x2 = 1ll << 17;
|
||||
temp_x2 *= 14UL * nr_slot_tx + l + startingSymbolIndex + 1;
|
||||
temp_x2 *= 2UL * pucch_pdu->dmrs_scrambling_id + 1;
|
||||
x2 = (temp_x2 + 2UL * pucch_pdu->dmrs_scrambling_id) % (1UL << 31);
|
||||
|
||||
int reset = 1;
|
||||
for (int ii=0; ii<=(startingPRB>>2); ii++) {
|
||||
|
||||
@@ -237,10 +237,6 @@ static inline int crcType(int nbSeg, int len)
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
//! estimated received spatial signal power (linear)
|
||||
fourDimArray_t * rx_spatial_power;
|
||||
//! estimated received spatial signal power (dB)
|
||||
fourDimArray_t * rx_spatial_power_dB;
|
||||
//! estimated rssi (dBm)
|
||||
int rx_rssi_dBm;
|
||||
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
|
||||
|
||||
@@ -447,7 +447,8 @@ typedef enum {
|
||||
NR_DL_DCI_FORMAT_2_2,
|
||||
NR_DL_DCI_FORMAT_2_3,
|
||||
NR_UL_DCI_FORMAT_0_0,
|
||||
NR_UL_DCI_FORMAT_0_1
|
||||
NR_UL_DCI_FORMAT_0_1,
|
||||
NR_DCI_NONE
|
||||
} nr_dci_format_t;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -161,12 +161,17 @@ int nr_get_sf_periodicBSRTimer(uint8_t bucketSize);
|
||||
*/
|
||||
int nr_get_sf_retxBSRTimer(uint8_t retxBSR_Timer);
|
||||
|
||||
int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, frame_t frame, int slot, dci_pdu_rel15_t *dci, fapi_nr_dci_indication_pdu_t *dci_ind);
|
||||
int8_t nr_ue_process_dci(module_id_t module_id,
|
||||
int cc_id,
|
||||
frame_t frame,
|
||||
int slot,
|
||||
dci_pdu_rel15_t *dci,
|
||||
fapi_nr_dci_indication_pdu_t *dci_ind);
|
||||
int nr_ue_process_dci_indication_pdu(module_id_t module_id, int cc_id, int gNB_index, frame_t frame, int slot, fapi_nr_dci_indication_pdu_t *dci);
|
||||
int8_t nr_ue_process_csirs_measurements(module_id_t module_id, frame_t frame, int slot, fapi_nr_csirs_measurements_t *csirs_measurements);
|
||||
|
||||
uint32_t get_ssb_frame(uint32_t test);
|
||||
|
||||
int8_t nr_ue_process_csirs_measurements(module_id_t module_id,
|
||||
frame_t frame,
|
||||
int slot,
|
||||
fapi_nr_csirs_measurements_t *csirs_measurements);
|
||||
void nr_ue_aperiodic_srs_scheduling(NR_UE_MAC_INST_t *mac, long resource_trigger, int frame, int slot);
|
||||
|
||||
bool trigger_periodic_scheduling_request(NR_UE_MAC_INST_t *mac,
|
||||
@@ -415,6 +420,6 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
dci_pdu_rel15_t *dci,
|
||||
RAR_grant_t *rar_grant,
|
||||
uint16_t rnti,
|
||||
const nr_dci_format_t *dci_format);
|
||||
const nr_dci_format_t dci_format);
|
||||
#endif
|
||||
/** @}*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -422,7 +422,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
dci_pdu_rel15_t *dci,
|
||||
RAR_grant_t *rar_grant,
|
||||
uint16_t rnti,
|
||||
const nr_dci_format_t *dci_format)
|
||||
const nr_dci_format_t dci_format)
|
||||
{
|
||||
|
||||
int f_alloc;
|
||||
@@ -534,23 +534,23 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
pusch_config_pdu->bwp_size = current_UL_BWP->BWPSize;
|
||||
|
||||
/* Transform precoding */
|
||||
pusch_config_pdu->transform_precoding = get_transformPrecoding(current_UL_BWP, *dci_format, 0);
|
||||
pusch_config_pdu->transform_precoding = get_transformPrecoding(current_UL_BWP, dci_format, 0);
|
||||
|
||||
/*DCI format-related configuration*/
|
||||
int target_ss;
|
||||
if (*dci_format == NR_UL_DCI_FORMAT_0_0) {
|
||||
if (dci_format == NR_UL_DCI_FORMAT_0_0) {
|
||||
target_ss = NR_SearchSpace__searchSpaceType_PR_common;
|
||||
if ((pusch_config_pdu->transform_precoding == NR_PUSCH_Config__transformPrecoder_disabled) &&
|
||||
pusch_config_pdu->nr_of_symbols < 3)
|
||||
pusch_config_pdu->num_dmrs_cdm_grps_no_data = 1;
|
||||
else
|
||||
pusch_config_pdu->num_dmrs_cdm_grps_no_data = 2;
|
||||
} else if (*dci_format == NR_UL_DCI_FORMAT_0_1) {
|
||||
} else if (dci_format == NR_UL_DCI_FORMAT_0_1) {
|
||||
target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
|
||||
ul_layers_config(mac, pusch_config_pdu, dci, *dci_format);
|
||||
ul_ports_config(mac, &dmrslength, pusch_config_pdu, dci, *dci_format);
|
||||
ul_layers_config(mac, pusch_config_pdu, dci, dci_format);
|
||||
ul_ports_config(mac, &dmrslength, pusch_config_pdu, dci, dci_format);
|
||||
} else {
|
||||
LOG_E(NR_MAC, "In %s: UL grant from DCI format %d is not handled...\n", __FUNCTION__, *dci_format);
|
||||
LOG_E(NR_MAC, "In %s: UL grant from DCI format %d is not handled...\n", __FUNCTION__, dci_format);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
|
||||
pusch_config_pdu->scid = 0;
|
||||
pusch_config_pdu->ul_dmrs_scrambling_id = mac->physCellId;
|
||||
if(*dci_format == NR_UL_DCI_FORMAT_0_1)
|
||||
if (dci_format == NR_UL_DCI_FORMAT_0_1)
|
||||
pusch_config_pdu->scid = dci->dmrs_sequence_initialization.val;
|
||||
|
||||
/* TRANSFORM PRECODING ------------------------------------------------------------------------------------------*/
|
||||
@@ -620,9 +620,15 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
|
||||
/* MCS TABLE */
|
||||
if (pusch_config_pdu->transform_precoding == NR_PUSCH_Config__transformPrecoder_disabled) {
|
||||
pusch_config_pdu->mcs_table = get_pusch_mcs_table(pusch_Config ? pusch_Config->mcs_Table : NULL, 0, *dci_format, rnti_type, target_ss, false);
|
||||
pusch_config_pdu->mcs_table =
|
||||
get_pusch_mcs_table(pusch_Config ? pusch_Config->mcs_Table : NULL, 0, dci_format, rnti_type, target_ss, false);
|
||||
} else {
|
||||
pusch_config_pdu->mcs_table = get_pusch_mcs_table(pusch_Config ? pusch_Config->mcs_TableTransformPrecoder : NULL, 1, *dci_format, rnti_type, target_ss, false);
|
||||
pusch_config_pdu->mcs_table = get_pusch_mcs_table(pusch_Config ? pusch_Config->mcs_TableTransformPrecoder : NULL,
|
||||
1,
|
||||
dci_format,
|
||||
rnti_type,
|
||||
target_ss,
|
||||
false);
|
||||
}
|
||||
|
||||
/* NDI */
|
||||
|
||||
@@ -87,7 +87,6 @@ int eth_socket_init_raw(openair0_device *device) {
|
||||
}
|
||||
|
||||
/* initialize destination address */
|
||||
bzero((void *)&(eth->local_addrc_ll), sizeof(struct sockaddr_ll));
|
||||
bzero((void *)&(eth->local_addrd_ll), sizeof(struct sockaddr_ll));
|
||||
bzero((void *)&(eth->if_index), sizeof(struct ifreq));
|
||||
|
||||
@@ -98,17 +97,12 @@ int eth_socket_init_raw(openair0_device *device) {
|
||||
for (int i=0;i<eth->num_fd;i++)
|
||||
if (ioctl(eth->sockfdd[i], SIOCGIFINDEX, &(eth->if_index)) < 0)
|
||||
perror("SIOCGIFINDEX");
|
||||
|
||||
eth->local_addrc_ll.sll_family = AF_PACKET;
|
||||
eth->local_addrc_ll.sll_ifindex = eth->if_index.ifr_ifindex;
|
||||
|
||||
eth->local_addrd_ll.sll_family = AF_PACKET;
|
||||
eth->local_addrd_ll.sll_ifindex = eth->if_index.ifr_ifindex;
|
||||
/* hear traffic from specific protocol*/
|
||||
eth->local_addrc_ll.sll_protocol = htons((short)device->eth_params->my_portc);
|
||||
eth->local_addrd_ll.sll_protocol = htons((short)device->eth_params->my_portd);
|
||||
|
||||
eth->local_addrc_ll.sll_halen = ETH_ALEN;
|
||||
eth->local_addrc_ll.sll_pkttype = PACKET_OTHERHOST;
|
||||
|
||||
eth->local_addrd_ll.sll_halen = ETH_ALEN;
|
||||
eth->local_addrd_ll.sll_pkttype = PACKET_OTHERHOST;
|
||||
eth->addr_len = sizeof(struct sockaddr_ll);
|
||||
|
||||
@@ -80,14 +80,6 @@ typedef struct {
|
||||
struct sockaddr_in local_addrd;
|
||||
/*!\brief address length for both UDP and RAW socket*/
|
||||
int addr_len;
|
||||
/*!\brief destination address (control) for RAW socket*/
|
||||
struct sockaddr_ll dest_addrc_ll;
|
||||
/*!\brief local address (control) for RAW socket*/
|
||||
struct sockaddr_ll local_addrc_ll;
|
||||
/*!\brief destination address (user) for RAW socket*/
|
||||
struct sockaddr_ll dest_addrd_ll;
|
||||
/*!\brief local address (user) for RAW socket*/
|
||||
struct sockaddr_ll local_addrd_ll;
|
||||
/*!\brief inteface index for RAW socket*/
|
||||
struct ifreq if_index;
|
||||
/*!\brief timeout ms */
|
||||
@@ -146,7 +138,9 @@ typedef struct {
|
||||
/*!\brief precomputed ethernet header (control) */
|
||||
struct ether_header ehc;
|
||||
/*!\brief precomputed ethernet header (data) */
|
||||
struct ether_header ehd;
|
||||
struct ether_header ehd;
|
||||
/*!\brief local address (user) for RAW socket*/
|
||||
struct sockaddr_ll local_addrd_ll;
|
||||
} eth_state_t;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user