diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index 1e4933838b..95aa4046d7 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -24,6 +24,7 @@ // Location of the python executor node shall be in the same subnet as the others servers def pythonExecutor = params.pythonExecutor +def DataBaseHost = params.DataBaseHost // Location of the test XML file to be run def testXMLFile = params.pythonTestXmlFile @@ -45,10 +46,12 @@ def eNB_CommitID def eNB_AllowMergeRequestProcess def eNB_TargetBranch +//Status fed to the database +def StatusForDb = "" + + pipeline { - agent { - label pythonExecutor - } + agent {label pythonExecutor} options { disableConcurrentBuilds() ansiColor('xterm') @@ -270,9 +273,18 @@ pipeline { } } } + stage ("SQL Collect"){ + agent {label DataBaseHost} + steps { + script { + if (currentBuild.result=='FAILURE') {StatusForDb = 'FAIL'} else {StatusForDb = 'PASS'} + sh "python3 /home/oaicicd/mysql/sql_connect.py ${JOB_NAME} ${params.eNB_MR} ${params.eNB_Branch} ${env.BUILD_ID} ${env.BUILD_URL} ${StatusForDb} ''" + } + } + } } } - } + } post { always { diff --git a/ci-scripts/ran_dashboard.py b/ci-scripts/ran_dashboard.py index 4f18638e68..d9ce62b3b6 100644 --- a/ci-scripts/ran_dashboard.py +++ b/ci-scripts/ran_dashboard.py @@ -286,7 +286,7 @@ class gDashboard: def main(): - my_gDashboard=gDashboard("/home/oaicicd/remi/creds.json", 'OAI RAN Dashboard', 'MR Status') + my_gDashboard=gDashboard("/opt/dashboard/g_creds.json", 'OAI RAN Dashboard', 'MR Status') cmd="""curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100" """ my_gDashboard.fetchData(cmd) my_gDashboard.gBuild("MR Status") diff --git a/ci-scripts/xml_files/container_4g_rfsim.xml b/ci-scripts/xml_files/container_4g_rfsim.xml index 5430b2b056..ab6422b86d 100644 --- a/ci-scripts/xml_files/container_4g_rfsim.xml +++ b/ci-scripts/xml_files/container_4g_rfsim.xml @@ -22,7 +22,7 @@ --> rfsim-4glte - Testing 4G LTE RF sim in containers + Testing 4G LTE RF sim - Monolithic eNB wrench 100011 diff --git a/ci-scripts/xml_files/container_4g_rfsim_down.xml b/ci-scripts/xml_files/container_4g_rfsim_down.xml index dee516d924..651447a9ca 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_down.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_down.xml @@ -22,7 +22,7 @@ --> rfsim-4glte-down - CleanUp 4G RF + CleanUp 4G RF - Monolithic eNB trash 100011 diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml index 36591cbaea..400cd86fcd 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml @@ -22,7 +22,7 @@ --> rfsim-5gnr-f1 - Testing 5G NR RF sim in containers (CU/DU) + Testing 5G NR RF sim in containers - CU-DU F1 split wrench 100021 diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml b/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml index 340bb9d06e..ac3f7347ba 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml @@ -22,7 +22,7 @@ --> rfsim-5gnr-down-f1 - CleanUp 5G RF + CleanUp 5G RF - CU-DU F1 split trash 100022 diff --git a/ci-scripts/xml_files/container_5g_rfsim.xml b/ci-scripts/xml_files/container_5g_rfsim.xml index 660cd7cde8..31d7c1429b 100644 --- a/ci-scripts/xml_files/container_5g_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_rfsim.xml @@ -22,7 +22,7 @@ --> rfsim-5gnr - Testing 5G NR RF sim in containers + Testing 5G NR RF sim - Monolithic gNB wrench 100001 diff --git a/ci-scripts/xml_files/container_5g_rfsim_down.xml b/ci-scripts/xml_files/container_5g_rfsim_down.xml index 57b0f67a21..9acc3f85a1 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_down.xml @@ -22,7 +22,7 @@ --> rfsim-5gnr-down - CleanUp 5G RF + CleanUp 5G RF - Monolithic gNB trash 100002 diff --git a/doc/BUILD.md b/doc/BUILD.md index bbb06a1e69..166563877e 100644 --- a/doc/BUILD.md +++ b/doc/BUILD.md @@ -77,7 +77,7 @@ cd cmake_targets/ ./build_oai -I -w USRP --eNB --UE --nrUE --gNB ``` -- The `-I` option is to install pre-requisites, you only need it the first time you build the softmodem or when some oai dependencies have changed. +- The `-I` option is to install pre-requisites, you only need it the first time you build the softmodem or when some oai dependencies have changed. Note: for Ubuntu 20 use cmake_targets/install_external_packages.ubuntu20 instead! - The `-w` option is to select the radio head support you want to include in your build. Radio head support is provided via a shared library, which is called the "oai device" The build script creates a soft link from `liboai_device.so` to the true device which will be used at run-time (here the USRP one,`liboai_usrpdevif.so` . USRP is the only hardware tested today in the Continuous Integration process. The RF simulator[RF simulator](../targets/ARCH/rfsimulator/README.md) is implemented as a specific device replacing RF hardware, it can be specifically built using `-w SIMU` option, but is also built during any softmodem build. - `--eNB` is to build the `lte-softmodem` executable and all required shared libraries - `--gNB` is to build the `nr-softmodem` executable and all required shared libraries diff --git a/doc/FEATURE_SET.md b/doc/FEATURE_SET.md index c2f3833203..4105d17511 100644 --- a/doc/FEATURE_SET.md +++ b/doc/FEATURE_SET.md @@ -272,10 +272,10 @@ The following features are valid for the gNB and the 5G-NR UE. * 30KHz SCS for FR1 and 120 KHz SCS for FR2 * Generation of NR-PSS/NR-SSS * NR-PBCH supports multiple SSBs and flexible periodicity -* Generation of NR-PDCCH for SIB1 (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc) - - common search space configured by MIB - - user-specific search space configured by RRC - - DCI formats: 00, 10 (01 and 11 **under integration**) +* Generation of NR-PDCCH (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc) + - common search space + - user-specific search space + - DCI formats: 00, 10, 01 and 11 * Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). - PDSCH mapping type A and B - DMRS configuration type 1 and 2 @@ -292,8 +292,8 @@ The following features are valid for the gNB and the 5G-NR UE. - Support for 1 RX antenna - Support for 1 layer * NR-PUCCH - - Format 0 (2 bits, mainly for ACK/NACK) - - Format 2 (up to 64 bits, mainly for CSI feedback) + - Format 0 (2 bits, for ACK/NACK and SR) + - Format 2 (up to 11 bits, mainly for CSI feedback) * NR-PRACH - Formats 0,1,2,3, A1-A3, B1-B3 * Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported) @@ -302,34 +302,103 @@ The following features are valid for the gNB and the 5G-NR UE. ## gNB Higher Layers ## -**gNB RRC** -- NR RRC (38.331) Rel 15 messages using new asn1c -- LTE RRC (36.331) also updated to Rel 15 -- Generation of CellGroupConfig (for eNB) and MIB -- Generation of system information block 1 (SIB1) -- Application to read configuration file and program gNB RRC -- RRC can configure PDCP, RLC, MAC - -**gNB X2AP** -- X2 setup with eNB -- Handling of SgNB Addition Request / Addition Request Acknowledge / Reconfiguration Complete - **gNB MAC** - MAC -> PHY configuration using NR FAPI P5 interface - MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU - Scheduler procedures for SIB1 - Scheduler procedures for RA + - Contention free RA procedure + - Contention based RA procedure - Scheduler procedures for CSI-RS -- MAC downlink scheduler (fixed allocations) +- MAC downlink scheduler + - phy-test scheduler (fixed allocation and usable also without UE) + - regular scheduler with dynamic allocation - MAC header generation (including timing advance) - ACK / NACK handling and HARQ procedures for downlink -- **As of May 2020** only DL was validated with COTS phone ; UL in progress, validated with OAI UE in noS1 mode +- MAC uplink scheduler + - phy-test scheduler (fixed allocation) + - regular scheduler with dynamic allocation + - HARQ procedures for uplink +- MAC procedures to handle CSI measurement report + - evalution of RSRP report + - evaluation of CQI report +- MAC scheduling of SR reception + +**gNB RLC** +- Send/Receive operations according to 38.322 Rel.16 + - Segmentation and reassembly procedures + - RLC Acknowledged mode supporting PDU retransmissions + - RLC Unacknowledged mode + - DRBs and SRBs establishment/handling and association with RLC entities + - Timers implementation + - Interfaces with PDCP, MAC + - Interfaces with gtp-u (data Tx/Rx over F1-U at the DU) + +**gNB PDCP** +- Send/Receive operations according to 38.323 Rel.16 + - Integrity protection and ciphering procedures + - Sequence number management, SDU dicard and in-order delivery + - Radio bearer establishment/handling and association with PDCP entities + - Interfaces with RRC, RLC + - Interfaces with gtp-u (data Tx/Rx over N3 and F1-U interfaces) + +**gNB RRC** +- NR RRC (38.331) Rel 16 messages using new asn1c +- LTE RRC (36.331) also updated to Rel 15 +- Generation of CellGroupConfig (for eNB) and MIB +- Generation of system information block 1 (SIB1) +- Generation of system information block 2 (SIB2) +- Application to read configuration file and program gNB RRC +- RRC can configure PDCP, RLC, MAC +- Interface with gtp-u (tunnel creation/handling for S1-U (NSA), N3 (SA) interfaces) +- Integration of RRC messages and procedures supporting UE 5G SA connection + - RRCSetupRequest/RRCSetup/RRCSetupComplete + - RRC Uplink/Downlink Information transfer carrying NAS messages transparently + - RRC Reconfiguration/Reconfiguration complete + - Support for master cell group configuration + - Interface with NGAP for the interactions with the AMF + - Interface with F1AP for CU/DU split deployment option + +**gNB X2AP** +- Integration of X2AP messages and procedures for the exchanges with the eNB over X2 interface supporting the NSA setup according to 36.423 Rel. 15 + - X2 setup with eNB + - Handling of SgNB Addition Request / Addition Request Acknowledge / Reconfiguration Complete + +**gNB NGAP** + +- Integration of NGAP messages and procedures for the exchanges with the AMF over N2 interface according to 38.413 Rel. 15 + - NGAP Setup request/response + - NGAP Initial UE message + - NGAP Initial context setup request/response + - NGAP Downlink/Uplink NAS transfer + - NGAP UE context release request/complete + - NGAP UE radio capability info indication + - NGAP PDU session resource setup request/response +- Interface with RRC + +**gNB F1AP** + +- Integration of F1AP messages and procedures for the control plane exchanges between the CU and DU entities according to 38.473 Rel. 16 + - F1 Setup request/response + - F1 DL/UL RRC message transfer + - F1 Initial UL RRC message transfer + - F1 UE Context setup request/response + - F1 gNB CU configuration update +- Interface with RRC +- Interface with gtp-u (tunnel creation/handling for F1-U interface) + +**gNB GTP-U** +- New gtp-u implementation supporting both N3 and F1-U interfaces according to 29.281 Rel.15 + - Interfaces with RRC, F1AP for tunnel creation + - Interfaces with PDCP and RLC for data send/receive at the CU and DU respectively (F1-U interface) # OpenAirInterface 5G-NR UE Feature Set # -**as of May 2020** only supporting "noS1" mode (DL): -- Creates TUN interface to PDCP to inject and receive user-place traffic -- Will only work with OAI gNB configured in the same mode +* Supporting "noS1" mode (DL and UL): + - Creates TUN interface to PDCP to inject and receive user-place traffic + - No connection to the core network +* Supporting Standalone (SA) mode: + - UE can register with the 5G Core Network, establish a PDU Session and exchange user-plane traffic ## NR UE PHY Layer ## @@ -339,10 +408,10 @@ The following features are valid for the gNB and the 5G-NR UE. * 30KHz SCS for FR1 and 120 KHz SCS for FR2 * Reception of NR-PSS/NR-SSS * NR-PBCH supports multiple SSBs and flexible periodicity -* Reception of NR-PDCCH for SIB1 (including reception of DCI, polar decoding, de-scrambling, de-modulation, RB de-mapping, etc) +* Reception of NR-PDCCH (including reception of DCI, polar decoding, de-scrambling, de-modulation, RB de-mapping, etc) - common search space configured by MIB - user-specific search space configured by RRC - - DCI formats: 00, 10 (01 and 11 **under integration**) + - DCI formats: 00, 10, 01 and 11 * Reception of NR-PDSCH (including Segmentation, LDPC decoding, rate de-matching, de-scrambling, de-modulation, RB de-mapping, etc). - PDSCH mapping type A and B - DMRS configuration type 1 and 2 @@ -358,29 +427,86 @@ The following features are valid for the gNB and the 5G-NR UE. - Support for 1 TX antenna - Support for 1 layer * NR-PUCCH - - Format 0 (2 bits, mainly for ACK/NACK) + - Format 0 (2 bits for ACK/NACK and SR) - Format 2 (up to 64 bits, mainly for CSI feedback) + - Format 1, 3 and 4 present but old code never dested (need restructuring before verification) * NR-PRACH - Formats 0,1,2,3, A1-A3, B1-B3 +* NR-SRS + - Old code never dested (need restructuring before verification) +* SS-RSRP + - RSRP measured on synchronization SSB (ok only for single SSB) * Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported) * Highly efficient 3GPP compliant polar encoder and decoder * Encoder and decoder for short block +## NR UE FAPI ## + +* MAC -> PHY configuration via UE FAPI P5 interface +* Basic MAC to control PHY via UE FAPI P7 interface +* PHY -> MAC indication (needs some improvement) ## NR UE Higher Layers ## **UE MAC** * Minimum system information (MSI) - - Initial sync and MIB detection - - System information block 1 (SIB1) reception -* MAC -> PHY configuration of PHY via UE FAPI P5 interface -* Basic MAC to control PHY via UE FAPI P7 interface -* Random access procedure + - MIB processing + - Scheduling of system information block 1 (SIB1) reception +* Random access procedure (needs improvement, there is still not a clear separation between MAC and PHY) + - Mapping SSBs to multiple ROs + - Scheduling of PRACH + - Processing of RAR + - Transmission and re-transmission of Msg3 + - Msg4 and contention resolution +* DCI processing + - format 10 (RA-RNTI, C-RNTI, SI-RNTI, TC-RNTI) + - format 00 (C-RNTI, TC-RNTI) + - format 11 (C-RNTI) + - format 01 (C-RNTI) +* UCI processing + - ACK/NACK processing + - Triggering periodic SR + - CSI measurement reporting (SSB RSRP only) +* DLSH scheduler + - Configuration of fapi PDU according to DCI + - HARQ procedures +* ULSCH scheduler + - Configuration of fapi PDU according to DCI -**RLC** +**UE RLC** +* Tx/Rx operations according to 38.322 Rel.16 + - Segmentation and reassembly procedures + - RLC Acknowledged mode supporting PDU retransmissions + - RLC Unacknowledged mode + - DRBs and SRBs establishment and handling + - Timers implementation + - Interfaces with PDCP, MAC -**PDCP** +**UE PDCP** +* Tx/Rx operations according to 38.323 Rel.16 + - Integrity protection and ciphering procedures + - Sequence number management, SDU dicard and in-order delivery + - Radio bearer establishment/handling and association with PDCP entities + - Interfaces with RRC, RLC + +**UE RRC** +* Integration of RRC messages and procedures supporting UE 5G SA connection according to 38.331 Rel.16 + - RRCSetupRequest/RRCSetup/RRCSetupComplete + - RRC Uplink/Downlink Information transfer carrying NAS messages transparently + - RRC Reconfiguration/Reconfiguration complete + - Support for master cell group configuration +* Interface with PDCP: configuration, DCCH and CCCH message handling +* Interface with RLC and MAC for configuration + +**UE NAS** +* Transfer of NAS messages between the AMF and the UE supporting the UE registration with the core network and the PDU session establishment according to 24.501 Rel.16 + - Identity Request/Response + - Authentication Request/Response + - Security Mode Command/Complete + - Registration Request/Accept/Complete + - PDU Session Establishment Request/Accept + - NAS configuration and basic interfacing with RRC diff --git a/doc/TESTING_5GSA_setup.md b/doc/TESTING_5GSA_setup.md index 786af5e27c..475123c990 100644 --- a/doc/TESTING_5GSA_setup.md +++ b/doc/TESTING_5GSA_setup.md @@ -1,5 +1,27 @@ + + + + + +
+ + + + + + OAI 5G SA tutorial +
-# OAI 5G SA tutorial [Under construction] +**TABLE OF CONTENTS** + +1. [SA setup with COTS UE](#1--sa-setup-with-cots-ue) + 1. [gNB build and configuration](#11--gnb-build-and-configuration) + 2. [OAI 5G Core Network installation and configuration](#12--oai-5g-core-network-installation-and-configuration) + 3. [Execution of SA scenario](#13--execution-of-sa-scenario) +2. [SA Setup with OAI NR UE Softmodem](#2-sa-setup-with-oai-nr-ue-softmodem) + 1. [Build and configuration](#21-build-and-configuration) + 2. [OAI 5G Core Network installation and configuration](#22--oai-5g-core-network-installation-and-configuration) + 3. [Execution of SA scenario](#23-execution-of-sa-scenario) In the following tutorial we describe how to deploy configure and test the two SA OAI setups: @@ -12,10 +34,10 @@ The operating system and hardware requirements to support OAI 5G NR are describe At the moment of writing this document interoperability with the following COTS UE devices is being tested: - [Quectel RM500Q-GL](https://www.quectel.com/product/5g-rm500q-gl/) - - [Simcom SIMCOM8200EA](https://www.simcom.com/product/SIM8200G.html) + - [Simcom SIMCOM8200EA](https://www.simcom.com/product/SIM8200EA_M2.html) - Huawei Mate 30 Pro - End-to-end control plane signaling to achieve a 5G SA connection, UE registration and PDU session establishment with the CN, as well as some basic user-plane traffic tests have been validated so far using the Quectel module and Huawei Mate 30 pro and partially validated with SIMCOM module. In terms of interoperability with different 5G Core Networks, so far this setup has been tested with: + End-to-end control plane signaling to achieve a 5G SA connection, UE registration and PDU session establishment with the CN, as well as some basic user-plane traffic tests have been validated so far using SIMCOM/Quectel modules and Huawei Mate 30 pro. In terms of interoperability with different 5G Core Networks, so far this setup has been tested with: - [OAI CN](https://openairinterface.org/oai-5g-core-network-project/) @@ -23,20 +45,57 @@ At the moment of writing this document interoperability with the following COTS - [Free CN](https://www.free5gc.org/) - ## 1.1 gNB build and configuration -At the moment of writing this document, most of the code to support the SA setup is not merged into develop branch yet, but it is accessible through the following branches: +## 1.1 gNB build and configuration +To get the code and build the gNB executable: - - NR_SA_F1AP_5GRECORDS - - develop-NR_SA_F1AP_5GRECORDS (up-to-date with latest develop branch) - -To build the gNB executable: +### Ubuntu 18.04 ```bash - cd cmake_targets + git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git + git checkout develop + cd openairinterface5g/ + source oaienv + cd cmake_targets/ ./build_oai -I -w USRP #For OAI first time installation only to install software dependencies ./build_oai --gNB -w USRP ``` -A reference configuration file for the gNB is provided [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop-NR_SA_F1AP_5GRECORDS/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf). +### Ubuntu 20.04 +```bash + # Build UHD from source + # https://files.ettus.com/manual/page_build_guide.html + sudo apt-get install libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils python3-mako python3-numpy python3-requests python3-ruamel.yaml python3-setuptools cmake build-essential + + git clone https://github.com/EttusResearch/uhd.git + cd uhd/host + mkdir build + cd build + cmake ../ + make -j 4 + make test # This step is optional + sudo make install + sudo ldconfig + sudo uhd_images_downloader + + + git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git + git checkout develop + + # Install dependencies in Ubuntu 20.04 + cd + cd openairinterface5g/ + source oaienv + cd cmake_targets/ + ./install_external_packages.ubuntu20 + + # Build OAI gNB + cd + cd openairinterface5g/ + source oaienv + cd cmake_targets/ + ./build_oai --gNB -w USRP +``` + +A reference configuration file for the gNB is provided [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf). In the following, we highlight the fields of the file that have to be configured according to the configuration and interfaces of the Core Network. First, the PLMN section has to be filled with the proper values that match the configuration of the AMF and the UE USIM. @@ -58,42 +117,69 @@ In the following, we highlight the fields of the file that have to be configured } ); }); -``` +``` Then, the source and destination IP interfaces for the communication with the Core Network also need to be set as shown below. ```bash - ////////// MME parameters: - amf_ip_address = ( { ipv4 = "192.168.70.132"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - NETWORK_INTERFACES : - { - GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; - GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - }; -``` + ////////// AMF parameters: + amf_ip_address = ( { ipv4 = "192.168.70.132"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + + NETWORK_INTERFACES : + { + GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; + GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; + GNB_PORT_FOR_S1U = 2152; # Spec 2152 + }; +``` In the first part (*amf_ip_address*) we specify the IP of the AMF and in the second part (*NETWORK_INTERFACES*) we specify the gNB local interface with AMF (N2 interface) and the UPF (N3 interface). +**CAUTION:** the `192.168.70.132` AMF IF address is the OAI-CN5G `AMF` Container IP address. You certainly will need to do some networking manipulations for the `gNB` server to be able to see this AMF container. + +Please read [CN5G tutorial for more details](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md). + ### **gNB configuration in CU/DU split mode** -For the configuration of the gNB in CU and DU blocks the following sample configuration files are provided for the CU and DU entities respectively. -...... -At the point of writing this document the control-plane exchanges between the CU and the DU over *F1-C* interface have been validated. The integration of *F1-U* over gtp-u for the support of data plane traffic is ongoing. +For the configuration of the gNB in CU and DU blocks, the following sample configuration files are provided for the [CU](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf) and the [DU](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf) entities respectively. These configuration files have to be updated with the IP addresses of the CU and the DU over the F1 interface. For example, in the following section from the DU configuration file, *local_n_address* corresponds to the DU address and *remote_n_address* corresponds to the CU address: + +```bash +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "f1"; + local_n_if_name = "lo"; + local_n_address = "127.0.0.3"; + remote_n_address = "127.0.0.4"; + local_n_portc = 601; + local_n_portd = 2152; + remote_n_portc = 600; + remote_n_portd = 2152; + + } +); +``` + + +At the point of writing this document the control-plane exchanges between the CU and the DU over *F1-C* interface, as well as some IP traffic tests over *F1-U* have been validated using the OAI gNB/nrUE in RFSIMULATOR mode. + +*These extensions are not yet fully integrated into develop branch, as they are under merge request. Until they get fully integrated, the CU/DU functionalities can be tested in [NR_F1C_F1U_extensions](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/NR_F1C_F1U_extensions) branch.* ## 1.2 OAI 5G Core Network installation and configuration -The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using docker compose can be found [here](https://gitlab.eurecom.fr/oai/cn5g). Below are some complementary instructions which can be useful for the deployment. +The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using `docker-compose` can be found [here](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md). - ## 1.3 Execution of SA scenario +## 1.3 Execution of SA scenario After having configured the gNB, we can start the individual components in the following sequence: - - Launch Core Network + - Launch 5G Core Network - Launch gNB - Launch COTS UE (disable airplane mode) @@ -101,62 +187,94 @@ The execution command to start the gNB (in monolithic mode) is the following: ```bash cd cmake_targets/ran_build/build sudo ./nr-softmodem -E --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf -``` +``` -# 2. SA Setup with OAI UE -The SA setup with OAI UE has been validated with RFSIMULATOR for the moment. The control plane for the successful UE registration and PDU Session establishment has been verified with OAI and Nokia SA Box CNs. User-plane traffic validation after the establishment of the 5G connection is still pending for this setup. +# 2. SA Setup with OAI NR UE Softmodem +The SA setup with OAI UE has been validated with **RFSIMULATOR**. Both control plane and user plane for the successful UE registration and PDU Session establishment has been verified with OAI and Nokia SA Box CNs. + +In the following, we provide the instructions on how to build, configure and execute this SA setup. + +### NAS configuration for the OAI UE +The NAS configuration parameters of the OAI UE can be set as input parameters, configuration file or can be hardcoded. More specifically: +- SUCI (*Subscription Concealed Identifier*) +- USIM_API_K and OPc keys +- NSSAI (*Network Slice Assistance Information*) +- DNN (*Data Network Name*) + +Below is a sample configuration file that can be parsed through the execution command ([section 2.3](#23-execution-of-sa-scenario)). + +```bash +uicc0 = { +imsi = "208990000007487"; +key = "fec86ba6eb707ed08905757b1bb44b8f"; +opc= "C42449363BBAD02B66D16BC975D77CC1"; +dnn= "oai"; +nssai_sst=1; +nssai_sd=1; +} +``` + +Alternatively, the values can be hardcoded/edited in source file ***openair3/UICC/usim_interface.c*** through the following lines: +```bash +#define UICC_PARAMS_DESC {\ + {"imsi", "USIM IMSI\n", 0, strptr:&(uicc->imsiStr), defstrval:"2089900007487", TYPE_STRING, 0 },\ + {"nmc_size" "number of digits in NMC", 0, iptr:&(uicc->nmc_size), defintval:2, TYPE_INT, 0 },\ + {"key", "USIM Ki\n", 0, strptr:&(uicc->keyStr), defstrval:"fec86ba6eb707ed08905757b1bb44b8f", TYPE_STRING, 0 },\ + {"opc", "USIM OPc\n", 0, strptr:&(uicc->opcStr), defstrval:"c42449363bbad02b66d16bc975d77cc1", TYPE_STRING, 0 },\ + {"amf", "USIM amf\n", 0, strptr:&(uicc->amfStr), defstrval:"8000", TYPE_STRING, 0 },\ + {"sqn", "USIM sqn\n", 0, strptr:&(uicc->sqnStr), defstrval:"000000", TYPE_STRING, 0 },\ + {"dnn", "UE dnn (apn)\n", 0, strptr:&(uicc->dnnStr), defstrval:"oai", TYPE_STRING, 0 },\ + {"nssai_sst", "UE nssai\n", 0, iptr:&(uicc->nssai_sst), defintval:1, TYPE_INT, 0 }, \ + {"nssai_sd", "UE nssai\n", 0, iptr:&(uicc->nssai_sd), defintval:1, TYPE_INT, 0 }, \ + }; +``` + +For interoperability with OAI or other CNs, it should be ensured that the configuration of the aforementioned parameters match the configuration of the corresponding subscribed user at the core network. -In the following, we provide the instructions on how to build, configure and execute this SA setup. ## 2.1 Build and configuration To build the gNB and OAI UE executables: ```bash cd cmake_targets - ./build_oai -I #For OAI first time installation only to install software dependencies + # Note: For OAI first time installation please install software dependencies as described in 1.1. ./build_oai --gNB --nrUE -w SIMU ``` -The gNB configuration can be performed according to what is described in section 1.1, using the same reference configuration file as with the RF scenario. +The gNB configuration can be performed according to what is described in [section 1.1](#11--gnb-build-and-configuration), using the same reference configuration file as with the RF scenario. -### NAS configuration for the OAI UE -At the moment, the NAS configuration parameters of the OAI UE are hardcoded in ***openair3/NAS/NR_UE/nr_nas_msg_sim.c***. More specifically: +## 2.2 OAI 5G Core Network installation and configuration +The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using `docker-compose` can be found [here](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md). - - The SUCI (*Subscription Concealed Identifier*) corresponding to default IMSI 2089900007487 is hardcoded in functions *generateRegistrationRequest()* and *generateIdentityResponse()* through the following lines: -```bash - mm_msg->registration_request.fgsmobileidentity.suci.typeofidentity = FGS_MOBILE_IDENTITY_SUCI; - mm_msg->registration_request.fgsmobileidentity.suci.mncdigit1 = 9; - mm_msg->registration_request.fgsmobileidentity.suci.mncdigit2 = 9; - mm_msg->registration_request.fgsmobileidentity.suci.mncdigit3 = 0xf; - mm_msg->registration_request.fgsmobileidentity.suci.mccdigit1 = 2; - mm_msg->registration_request.fgsmobileidentity.suci.mccdigit2 = 0; - mm_msg->registration_request.fgsmobileidentity.suci.mccdigit3 = 8; - mm_msg->registration_request.fgsmobileidentity.suci.schemeoutput = 0x4778; -``` - - USIM_API_K and OPc keys are hardcoded at the beginning of the file: -```bash -// USIM_API_K: fe c8 6b a6 eb 70 7e d0 89 05 75 7b 1b b4 4b 8f -uint8_t k[16] = {0xfe, 0xc8, 0x6b, 0xa6, 0xeb, 0x70, 0x7e, 0xd0, 0x89, 0x05, 0x75, 0x7b, 0x1b, 0xb4, 0x4b, 0x8f}; -// OPC: c4 24 49 36 3b ba d0 2b 66 d1 6b c9 75 d7 7c c1 -const uint8_t opc[16] = {0xc4, 0x24, 0x49, 0x36, 0x3b, 0xba, 0xd0, 0x2b, 0x66, 0xd1, 0x6b, 0xc9, 0x75, 0xd7, 0x7c, 0xc1}; -``` -- The NSSAI (*Network Slice Assistance Information*) and DNN (*Data Network Name*) are hardcoded in function *generatePduSessionEstablishRequest()* -```bash - uint8_t nssai[]={1,0,0,1}; //Corresponding to SST:1, SD:1 - uint8_t dnn[4]={0x4,0x6f,0x61,0x69}; //Corresponding to dnn:"oai" -``` -For interoperability with OAI or other CNs, it should be ensured that the configuration of the aforementioned parameters match the configuration of the corresponding subscribed user at the core network. -Hardcoding of the USIM information will soon be substituted with parsing those parameters from a configuration file. +In addition, if you do not want to build anything, please have a look at [this tutorial](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/ci-scripts/yaml_files/5g_rfsimulator/README.md). -## 2.2 Execution of SA scenario +## 2.3 Execution of SA scenario -The order of starting the different components should be the same as the one described in section 1.3. +The order of starting the different components should be the same as the one described in [section 1.3](#13--execution-of-sa-scenario). - - To launch the gNB: +the gNB can be launched in 2 modes: + +- To launch the gNB in `monolithic` mode: ```bash - sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --rfsim --sa + sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa \ + -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf ``` -- To launch the OAI UE: +- To launch the gNB in `CU/DU split` mode: + + 1. Launch the CU component: + ```bash + sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa \ + -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf + ``` + 2. Launch the DU component: + ```bash + sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa \ + -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf + ``` + +- To launch the OAI UE (valid in `monolithic` gNB and `CU/DU split` gNB): ```bash -sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --nokrnmod +sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 \ + --rfsim --sa --nokrnmod -O ``` + The IP address at the execution command of the OAI UE corresponds to the target IP of the gNB host that the RFSIMULATOR at the UE will connect to. In the above example, we assume that the gNB and UE are running on the same host so the specified address (127.0.0.1) is the one of the loopback interface. diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 92fe5174c2..1d415e1230 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -147,14 +147,6 @@ static void UE_synch(void *arg) { if (UE->UE_scan == 0) { - #ifdef FR2_TEST - // Overwrite DL frequency (for FR2 testing) - if (downlink_frequency[0][0]!=0){ - UE->frame_parms.dl_CarrierFreq = downlink_frequency[0][0]; - UE->frame_parms.ul_CarrierFreq = downlink_frequency[0][0]; - } - #endif - for (i=0; irf_map.card].rx_num_channels; i++) { LOG_I( PHY, "[SCHED][UE] Check absolute frequency DL %f, UL %f (RF card %d, oai_exit %d, channel %d, rx_num_channels %d)\n", @@ -220,7 +212,7 @@ static void UE_synch(void *arg) { LOG_I(PHY, "[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode); uint64_t dl_carrier, ul_carrier; - nr_get_carrier_frequencies(&UE->frame_parms, &dl_carrier, &ul_carrier); + nr_get_carrier_frequencies(UE, &dl_carrier, &ul_carrier); if (nr_initial_sync(&syncD->proc, UE, 2, get_softmodem_params()->sa, get_nrUE_params()->nr_dlsch_parallel) == 0) { freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 76347ced5a..c38c5217ae 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -368,7 +368,7 @@ void init_openair0(void) { openair0_cfg[card].rx_num_channels, duplex_mode[openair0_cfg[card].duplex_mode]); - nr_get_carrier_frequencies(frame_parms, &dl_carrier, &ul_carrier); + nr_get_carrier_frequencies(PHY_vars_UE_g[0][0], &dl_carrier, &ul_carrier); nr_rf_card_config_freq(&openair0_cfg[card], ul_carrier, dl_carrier, freq_off); nr_rf_card_config_gain(&openair0_cfg[card], rx_gain_off); @@ -425,7 +425,7 @@ int main( int argc, char **argv ) { get_options (); //Command-line options specific for NRUE - get_common_options(SOFTMODEM_5GUE_BIT ); + get_common_options(SOFTMODEM_5GUE_BIT); init_tpools(nrUE_params.nr_dlsch_parallel); CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP); #if T_TRACER @@ -495,14 +495,6 @@ int main( int argc, char **argv ) { init_timeshift_rotation(&UE[CC_id]->frame_parms); init_nr_ue_vars(UE[CC_id], 0, abstraction_flag); - #ifdef FR2_TEST - // Overwrite DL frequency (for FR2 testing) - if (downlink_frequency[0][0]!=0){ - frame_parms[CC_id]->dl_CarrierFreq = downlink_frequency[0][0]; - if (frame_parms[CC_id]->frame_type == TDD) - frame_parms[CC_id]->ul_CarrierFreq = downlink_frequency[0][0]; - } - #endif } init_openair0(); diff --git a/executables/nr-uesoftmodem.h b/executables/nr-uesoftmodem.h index 9f2a48d6a1..8469ffe790 100644 --- a/executables/nr-uesoftmodem.h +++ b/executables/nr-uesoftmodem.h @@ -7,7 +7,8 @@ - +#define CONFIG_HLP_IF_FREQ "IF frequency for RF, if needed" +#define CONFIG_HLP_IF_FREQ_OFF "UL IF frequency offset for RF, if needed" #define CONFIG_HLP_DLSCH_PARA "number of threads for dlsch processing 0 for no parallelization\n" #define CONFIG_HLP_OFFSET_DIV "Divisor for computing OFDM symbol offset in Rx chain (num samples in CP/). Default value is 8. To set the sample offset to 0, set this value ~ 10e6\n" /***************************************************************************************************************************************/ @@ -62,6 +63,8 @@ {"r" , CONFIG_HLP_PRB_SA, 0, iptr:&(fp->N_RB_DL), defintval:106, TYPE_UINT, 0}, \ {"s" , CONFIG_HLP_SSC, 0, u16ptr:&(fp->ssb_start_subcarrier), defintval:516, TYPE_UINT16,0}, \ {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \ + {"if_freq" , CONFIG_HLP_IF_FREQ, 0, u64ptr:&(UE->if_freq), defuintval:0, TYPE_UINT64,0}, \ + {"if_freq_off" , CONFIG_HLP_IF_FREQ_OFF, 0, iptr:&(UE->if_freq_off), defuintval:0, TYPE_INT, 0}, \ {"do-prb-interpolation", CONFIG_HLP_PRBINTER, PARAMFLAG_BOOL, iptr:&(UE->prb_interpolation), defintval:0, TYPE_INT, 0}, \ {"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&(UE->no_timing_correction), defintval:0, TYPE_INT, 0}, \ } diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h index c277a8ffcc..046ca927a6 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -1466,7 +1466,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, @param dl_Carrier Pointer to DL carrier to be set @param ul_Carrier Pointer to UL carrier to be set */ -void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp, +void nr_get_carrier_frequencies(PHY_VARS_NR_UE *ue, uint64_t *dl_Carrier, uint64_t *ul_Carrier); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c index 29cccdcf88..6530dd9512 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c @@ -33,19 +33,17 @@ #include "nr_transport_proto_ue.h" #include "executables/softmodem-common.h" -void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t *dl_carrier, uint64_t *ul_carrier){ +void nr_get_carrier_frequencies(PHY_VARS_NR_UE *ue, uint64_t *dl_carrier, uint64_t *ul_carrier){ - if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra==1 || !downlink_frequency[0][0]) { + NR_DL_FRAME_PARMS *fp = &ue->frame_parms; + if (ue->if_freq!=0) { + *dl_carrier = ue->if_freq; + *ul_carrier = *dl_carrier + ue->if_freq_off; + } + else{ *dl_carrier = fp->dl_CarrierFreq; - } else { - *dl_carrier = downlink_frequency[0][0]; + *ul_carrier = fp->ul_CarrierFreq; } - - if (uplink_frequency_offset[0][0]) - *ul_carrier = *dl_carrier + uplink_frequency_offset[0][0]; - else - *ul_carrier = *dl_carrier + fp->ul_CarrierFreq - fp->dl_CarrierFreq; - } diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 33322bccb2..8ce18aa667 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -767,6 +767,10 @@ typedef struct { int UE_scan_carrier; /// \brief Indicator that UE should enable estimation and compensation of frequency offset int UE_fo_compensation; + /// IF frequency for RF + uint64_t if_freq; + /// UL IF frequency offset for RF + int if_freq_off; /// \brief Indicator that UE is synchronized to a gNB int is_synchronized; /// \brief Indicator that UE lost frame synchronization diff --git a/openair2/F1AP/f1ap_common.h b/openair2/F1AP/f1ap_common.h index 5fd3c486c8..18b8f18a6d 100644 --- a/openair2/F1AP/f1ap_common.h +++ b/openair2/F1AP/f1ap_common.h @@ -38,6 +38,7 @@ #define F1AP_COMMON_H_ #include "openairinterface5g_limits.h" +#include #define F1AP_UE_IDENTIFIER_NUMBER 3 #define F1AP_TRANSACTION_IDENTIFIER_NUMBER 3 @@ -479,10 +480,6 @@ static inline f1ap_setup_req_t *f1ap_req(F1_t isCu, instance_t instanceP) { return &getCxt(isCu, instanceP)->setupReq; } -#define asn1cCalloc(VaR, TyPe, lOcPtr) TyPe *lOcPtr=VaR=(TyPe*) calloc(1,sizeof(TyPe)); -#define asn1cCallocOne(VaR, TyPe, VaLue) VaR=(TyPe*) calloc(1,sizeof(TyPe)); *VaR=VaLue; -#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) TyPe *lOcPtr=(TyPe*) calloc(1,sizeof(TyPe)); ASN_SEQUENCE_ADD(&VaR,lOcPtr); - #define TASK_F1APP f1ap_req(false, instance)->cell_type==CELL_MACRO_GNB?TASK_GNB_APP:TASK_ENB_APP //lts: C struct type is not homogeneous, so we need macros instead of functions diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index f955f4b758..6d63394f8a 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -241,7 +241,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; - asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t, tmp); + asn1cCalloc(pdu.choice.successfulOutcome, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_F1Setup; tmp->criticality = F1AP_Criticality_reject; tmp->value.present = F1AP_SuccessfulOutcome__value_PR_F1SetupResponse; @@ -345,7 +345,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) { uint32_t len=0; /* Create */ /* 0. Message Type */ - asn1cCalloc(pdu.choice.unsuccessfulOutcome, F1AP_UnsuccessfulOutcome_t, UnsuccessfulOutcome); + asn1cCalloc(pdu.choice.unsuccessfulOutcome, UnsuccessfulOutcome); pdu.present = F1AP_F1AP_PDU_PR_unsuccessfulOutcome; UnsuccessfulOutcome->procedureCode = F1AP_ProcedureCode_id_F1Setup; UnsuccessfulOutcome->criticality = F1AP_Criticality_reject; @@ -385,13 +385,13 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) { ie4->criticality = F1AP_Criticality_ignore; ie4->value.present = F1AP_F1SetupFailureIEs__value_PR_CriticalityDiagnostics; asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.procedureCode, - F1AP_ProcedureCode_t, F1AP_ProcedureCode_id_UEContextSetup); + F1AP_ProcedureCode_id_UEContextSetup); asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.triggeringMessage, - F1AP_TriggeringMessage_t, F1AP_TriggeringMessage_initiating_message); + F1AP_TriggeringMessage_initiating_message); asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.procedureCriticality, - F1AP_Criticality_t, F1AP_Criticality_reject); + F1AP_Criticality_reject); asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.transactionID, - F1AP_TransactionID_t, 0); + 0); } /* encode */ @@ -438,7 +438,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, initMsg); + asn1cCalloc(pdu.choice.initiatingMessage, initMsg); initMsg->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate; initMsg->criticality = F1AP_Criticality_reject; initMsg->value.present = F1AP_InitiatingMessage__value_PR_GNBCUConfigurationUpdate; @@ -472,7 +472,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu addnRCGI(cells_to_be_activated_list_item->nRCGI, f1ap_gnb_cu_configuration_update->cells_to_activate+i); // optional // -nRPCI - asn1cCalloc(cells_to_be_activated_list_item->nRPCI, F1AP_NRPCI_t, tmp); + asn1cCalloc(cells_to_be_activated_list_item->nRPCI, tmp); *tmp = f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci; // int 0..1007 // optional // 3.1.2 gNB-CUSystem Information diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index e725272b09..50490d2897 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -148,7 +148,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); + asn1cCalloc(pdu.choice.initiatingMessage, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_DLRRCMessageTransfer; tmp->criticality = F1AP_Criticality_ignore; tmp->value.present = F1AP_InitiatingMessage__value_PR_DLRRCMessageTransfer; diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index 740d3a75b4..0b72b2b5a4 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -46,28 +46,26 @@ #include static void setQos(F1AP_NonDynamic5QIDescriptor_t *toFill) { - asn1cCalloc(toFill,F1AP_NonDynamic5QIDescriptor_t, tmp); + asn1cCalloc(toFill, tmp); /* fiveQI */ tmp->fiveQI = 1L; /* OPTIONAL */ /* qoSPriorityLevel */ if (0) { - asn1cCallocOne(toFill->qoSPriorityLevel, long, 1L); + asn1cCallocOne(toFill->qoSPriorityLevel, 1L); } /* OPTIONAL */ /* averagingWindow */ if (0) { - asn1cCallocOne(toFill->averagingWindow, - F1AP_AveragingWindow_t, 1L); + asn1cCallocOne(toFill->averagingWindow, 1L); } /* OPTIONAL */ /* maxDataBurstVolume */ if (0) { - asn1cCallocOne(toFill->maxDataBurstVolume, - F1AP_MaxDataBurstVolume_t, 1L); + asn1cCallocOne(toFill->maxDataBurstVolume, 1L); } } @@ -77,7 +75,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); + asn1cCalloc(pdu.choice.initiatingMessage, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_UEContextSetup; tmp->criticality = F1AP_Criticality_reject; tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextSetupRequest; @@ -138,13 +136,13 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* 6.1 cG_ConfigInfo */ if(f1ap_ue_context_setup_req->cu_to_du_rrc_information->cG_ConfigInfo!=NULL){ const char cG_ConfigInfoStr[]="asdsa1d32sa1d31asd31as"; - asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.cG_ConfigInfo, F1AP_CG_ConfigInfo_t, cG_ConfigInfo); + asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.cG_ConfigInfo, cG_ConfigInfo); OCTET_STRING_fromBuf(cG_ConfigInfo, cG_ConfigInfoStr, strlen(cG_ConfigInfoStr)) ; } /* optional */ /* 6.2 uE_CapabilityRAT_ContainerList */ if(f1ap_ue_context_setup_req->cu_to_du_rrc_information->uE_CapabilityRAT_ContainerList!=NULL){ - asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.uE_CapabilityRAT_ContainerList, F1AP_UE_CapabilityRAT_ContainerList_t, uE_CapabilityRAT_ContainerList ); + asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.uE_CapabilityRAT_ContainerList, uE_CapabilityRAT_ContainerList ); OCTET_STRING_fromBuf(uE_CapabilityRAT_ContainerList, (const char *)f1ap_ue_context_setup_req->cu_to_du_rrc_information->uE_CapabilityRAT_ContainerList, f1ap_ue_context_setup_req->cu_to_du_rrc_information->uE_CapabilityRAT_ContainerList_length) ; } @@ -152,7 +150,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* 6.3 measConfig */ if(f1ap_ue_context_setup_req->cu_to_du_rrc_information->measConfig!=NULL){ const char measConfigStr[]="asdsa1d32sa1d31asd31as"; - asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.measConfig, F1AP_MeasConfig_t, measConfig); + asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.measConfig, measConfig); OCTET_STRING_fromBuf(measConfig, measConfigStr, strlen(measConfigStr)) ; } } @@ -193,14 +191,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* 8.2 shortDRXCycleLength */ if (0) { asn1cCallocOne(ie6->value.choice.DRXCycle.shortDRXCycleLength, - F1AP_ShortDRXCycleLength_t, F1AP_ShortDRXCycleLength_ms2); // enum + F1AP_ShortDRXCycleLength_ms2); // enum } /* optional */ /* 8.3 shortDRXCycleTimer */ if (0) { asn1cCallocOne(ie8->value.choice.DRXCycle.shortDRXCycleTimer, - F1AP_ShortDRXCycleTimer_t, 123L); + 123L); } } @@ -242,7 +240,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* 10.1.3 sCellULConfigured*/ if (0) { asn1cCallocOne(scell_toBeSetup_item->sCellULConfigured, - F1AP_CellULConfigured_t, F1AP_CellULConfigured_ul_and_sul); // enum + F1AP_CellULConfigured_ul_and_sul); // enum } } @@ -268,7 +266,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* 11.1.2 duplicationIndication */ //if (0) { asn1cCallocOne(srbs_toBeSetup_item->duplicationIndication, - F1AP_DuplicationIndication_t, F1AP_DuplicationIndication_true); // enum + F1AP_DuplicationIndication_true); // enum //} } } @@ -298,7 +296,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, if (some_decide_qos) { drbs_toBeSetup_item->qoSInformation.present = F1AP_QoSInformation_PR_eUTRANQoS; /* 12.1.2.1 eUTRANQoS */ - asn1cCalloc(drbs_toBeSetup_item->qoSInformation.choice.eUTRANQoS, F1AP_EUTRANQoS_t, eUTRANQoS); + asn1cCalloc(drbs_toBeSetup_item->qoSInformation.choice.eUTRANQoS, eUTRANQoS); /* 12.1.2.1.1 qCI */ eUTRANQoS->qCI = 254L; /* 12.1.2.1.2 allocationAndRetentionPriority */ @@ -340,7 +338,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, setQos(DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI); } else { DRB_Information->dRB_QoS.qoS_Characteristics.present = F1AP_QoS_Characteristics_PR_dynamic_5QI; - asn1cCalloc(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI, F1AP_Dynamic5QIDescriptor_t, tmp); + asn1cCalloc(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI, tmp); /* qoSPriorityLevel */ tmp->qoSPriorityLevel = 1L; /* packetDelayBudget */ @@ -352,22 +350,19 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* OPTIONAL */ /* delayCritical */ if (0) { - asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical, - long, 1L); + asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical, 1L); } /* OPTIONAL */ /* averagingWindow */ if (0) { - asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow, - F1AP_AveragingWindow_t, 1L); + asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow, 1L); } /* OPTIONAL */ /* maxDataBurstVolume */ if (0) { - asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume, - F1AP_MaxDataBurstVolume_t, 1L); + asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume, 1L); } } // if some_decide_qoS_characteristics } // qoS_Characteristics @@ -381,7 +376,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* OPTIONAL */ /* gBR_QoS_Flow_Information */ if (0) { - asn1cCalloc(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information, F1AP_GBR_QoSFlowInformation_t, tmp); + asn1cCalloc(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information, tmp); asn_long2INTEGER(&tmp->maxFlowBitRateDownlink, 1L); asn_long2INTEGER(&tmp->maxFlowBitRateUplink, 1L); asn_long2INTEGER(&tmp->guaranteedFlowBitRateDownlink, 1L); @@ -390,23 +385,20 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* OPTIONAL */ /* maxPacketLossRateDownlink */ if (0) { - asn1cCallocOne(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink, - F1AP_MaxPacketLossRate_t, 1L); + asn1cCallocOne(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink, 1L); } /* OPTIONAL */ /* maxPacketLossRateUplink */ if (0) { - asn1cCallocOne(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink, - F1AP_MaxPacketLossRate_t, 1L); + asn1cCallocOne(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink, 1L); } } /* OPTIONAL */ /* reflective_QoS_Attribute */ if (0) { - asn1cCallocOne(DRB_Information->dRB_QoS.reflective_QoS_Attribute, - long, 1L); + asn1cCallocOne(DRB_Information->dRB_QoS.reflective_QoS_Attribute, 1L); } } // dRB_QoS /* 12.1.2.2 sNSSAI */ @@ -418,7 +410,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* OPTIONAL */ /* sD */ if (0) { - asn1cCalloc(DRB_Information->sNSSAI.sD, OCTET_STRING_t, tmp); + asn1cCalloc(DRB_Information->sNSSAI.sD, tmp); OCTET_STRING_fromBuf(tmp, "asdsa1d32sa1d31asd31as", strlen("asdsa1d32sa1d31asd31as")); } @@ -428,7 +420,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* 12.1.2.3 notificationControl */ if (0) { asn1cCallocOne(DRB_Information->notificationControl, - F1AP_NotificationControl_t, F1AP_NotificationControl_active); // enum + F1AP_NotificationControl_active); // enum } /* 12.1.2.4 flows_Mapped_To_DRB_List */ // BK: need verifiy @@ -450,7 +442,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, setQos(QosParams->choice.non_Dynamic_5QI); } else { QosParams->present = F1AP_QoS_Characteristics_PR_dynamic_5QI; - asn1cCalloc(QosParams->choice.dynamic_5QI, F1AP_Dynamic5QIDescriptor_t, tmp); + asn1cCalloc(QosParams->choice.dynamic_5QI, tmp); /* qoSPriorityLevel */ tmp->qoSPriorityLevel = 1L; /* packetDelayBudget */ @@ -462,21 +454,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* OPTIONAL */ /* delayCritical */ if (0) { - asn1cCalloc(QosParams->choice.dynamic_5QI->delayCritical, long, tmp); + asn1cCalloc(QosParams->choice.dynamic_5QI->delayCritical, tmp); *tmp = 1L; } /* OPTIONAL */ /* averagingWindow */ if (0) { - asn1cCalloc(QosParams->choice.dynamic_5QI->averagingWindow, F1AP_AveragingWindow_t, tmp); + asn1cCalloc(QosParams->choice.dynamic_5QI->averagingWindow, tmp); *tmp = 1L; } /* OPTIONAL */ /* maxDataBurstVolume */ if (0) { - asn1cCalloc(QosParams->choice.dynamic_5QI->maxDataBurstVolume, F1AP_MaxDataBurstVolume_t, tmp); + asn1cCalloc(QosParams->choice.dynamic_5QI->maxDataBurstVolume, tmp); *tmp= 1L; } } // if some_decide_qoS_characteristics @@ -491,7 +483,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* OPTIONAL */ /* gBR_QoS_Flow_Information */ if (0) { - asn1cCalloc(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information, F1AP_GBR_QoSFlowInformation_t, tmp); + asn1cCalloc(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information, tmp); asn_long2INTEGER(&tmp->maxFlowBitRateDownlink, 1L); asn_long2INTEGER(&tmp->maxFlowBitRateUplink, 1L); asn_long2INTEGER(&tmp->guaranteedFlowBitRateDownlink, 1L); @@ -500,23 +492,20 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* OPTIONAL */ /* maxPacketLossRateDownlink */ if (0) { - asn1cCalloc(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateDownlink, F1AP_MaxPacketLossRate_t, tmp); - *tmp = 1L; + asn1cCallocOne(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateDownlink, 1L); } /* OPTIONAL */ /* maxPacketLossRateUplink */ if (0) { - asn1cCalloc(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateUplink, F1AP_MaxPacketLossRate_t, tmp); - *tmp = 1L; + asn1cCallocOne(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateUplink, 1L); } } /* OPTIONAL */ /* reflective_QoS_Attribute */ if (0) { - asn1cCalloc(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.reflective_QoS_Attribute, long, tmp); - *tmp = 1L; + asn1cCallocOne(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.reflective_QoS_Attribute, 1L); } } // qoSFlowLevelQoSParameters } @@ -544,7 +533,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, F1AP_ULUPTNLInformation_ToBeSetup_Item_t, uLUPTNLInformation_ToBeSetup_Item); uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; asn1cCalloc( uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel, - F1AP_GTPTunnel_t, gTPTunnel); + gTPTunnel); /* 12.3.1.1.1 transportLayerAddress */ TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_ul_tnl[j].tl_address, &gTPTunnel->transportLayerAddress); @@ -567,14 +556,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* OPTIONAL */ /* 12.1.5 ULConfiguration */ if (0) { - asn1cCalloc(drbs_toBeSetup_item->uLConfiguration, F1AP_ULConfiguration_t, tmp); + asn1cCalloc(drbs_toBeSetup_item->uLConfiguration, tmp); tmp->uLUEConfiguration = F1AP_ULUEConfiguration_no_data; } /* OPTIONAL */ /* 12.1.6 duplicationActivation */ if (0) { - asn1cCalloc(drbs_toBeSetup_item->duplicationActivation, F1AP_DuplicationActivation_t, tmp); + asn1cCalloc(drbs_toBeSetup_item->duplicationActivation, tmp); *tmp = F1AP_DuplicationActivation_active; // enum } } @@ -860,7 +849,7 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); + asn1cCalloc(pdu.choice.initiatingMessage, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_UEContextRelease; tmp->criticality = F1AP_Criticality_reject; tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextReleaseCommand; @@ -1037,7 +1026,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); + asn1cCalloc(pdu.choice.initiatingMessage, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_UEContextModification; tmp->criticality = F1AP_Criticality_reject; tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextModificationRequest; @@ -1086,13 +1075,12 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ie5->value.choice.DRXCycle.longDRXCycleLength = F1AP_LongDRXCycleLength_ms10; // enum if (0) { - asn1cCalloc(ie5->value.choice.DRXCycle.shortDRXCycleLength, F1AP_ShortDRXCycleLength_t,tmp); - *tmp = F1AP_ShortDRXCycleLength_ms2; // enum + asn1cCallocOne(ie5->value.choice.DRXCycle.shortDRXCycleLength, + F1AP_ShortDRXCycleLength_ms2); // enum } if (0) { - asn1cCalloc(ie5->value.choice.DRXCycle.shortDRXCycleTimer, F1AP_ShortDRXCycleTimer_t, tmp); - *tmp = 123L; + asn1cCallocOne(ie5->value.choice.DRXCycle.shortDRXCycleTimer, 123L); } } @@ -1103,12 +1091,12 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ie5->id = F1AP_ProtocolIE_ID_id_CUtoDURRCInformation; ie5->criticality = F1AP_Criticality_reject; ie5->value.present = F1AP_UEContextModificationRequestIEs__value_PR_CUtoDURRCInformation; - asn1cCalloc(ie5->value.choice.CUtoDURRCInformation.cG_ConfigInfo, F1AP_CG_ConfigInfo_t, tmp); + asn1cCalloc(ie5->value.choice.CUtoDURRCInformation.cG_ConfigInfo, tmp); /* optional */ OCTET_STRING_fromBuf(tmp, "asdsa1d32sa1d31asd31as", strlen("asdsa1d32sa1d31asd31as")); asn1cCalloc(ie5->value.choice.CUtoDURRCInformation.uE_CapabilityRAT_ContainerList, - F1AP_UE_CapabilityRAT_ContainerList_t,tmp2); + tmp2); /* optional */ OCTET_STRING_fromBuf(tmp2, "asdsa1d32sa1d31asd31as", strlen("asdsa1d32sa1d31asd31as")); @@ -1255,7 +1243,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { F1AP_ULUPTNLInformation_ToBeSetup_Item_t, uLUPTNLInformation_ToBeSetup_Item); uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; asn1cCalloc(uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel, - F1AP_GTPTunnel_t, gTPTunnel) + gTPTunnel) /* transportLayerAddress */ TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress); /* gTP_TEID */ @@ -1293,7 +1281,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { /* dRBID */ drbs_toBeModified_item->dRBID = 30L; /* qoSInformation */ - asn1cCalloc(drbs_toBeModified_item->qoSInformation, F1AP_QoSInformation_t, tmp); + asn1cCalloc(drbs_toBeModified_item->qoSInformation, tmp); tmp->present = F1AP_QoSInformation_PR_eUTRANQoS; tmp->choice.eUTRANQoS = (F1AP_EUTRANQoS_t *)calloc(1, sizeof(F1AP_EUTRANQoS_t)); tmp->choice.eUTRANQoS->qCI = 254L; @@ -1306,7 +1294,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { F1AP_ULUPTNLInformation_ToBeSetup_Item_t, uLUPTNLInformation_ToBeSetup_Item); uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; asn1cCalloc(uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel, - F1AP_GTPTunnel_t, gTPTunnel); + gTPTunnel); TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress); OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204", strlen("1204")); diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 4ee1a064f9..22a370024e 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -102,7 +102,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* Create */ /* 0. pdu Type */ pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, initMsg); + asn1cCalloc(pdu.choice.initiatingMessage, initMsg); initMsg->procedureCode = F1AP_ProcedureCode_id_F1Setup; initMsg->criticality = F1AP_Criticality_reject; initMsg->value.present = F1AP_InitiatingMessage__value_PR_F1SetupRequest; @@ -159,7 +159,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { served_cell_information->nRPCI = cell->nr_pci; // int 0..1007 /* - fiveGS_TAC */ uint32_t tac=htonl(cell->tac); - asn1cCalloc(served_cell_information->fiveGS_TAC, F1AP_FiveGS_TAC_t, netOrder); + asn1cCalloc(served_cell_information->fiveGS_TAC, netOrder); OCTET_STRING_fromBuf(netOrder, ((char *)&tac)+1, 3); /* - Configured_EPS_TAC */ @@ -176,14 +176,14 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { if (f1ap_req(false, instance)->fdd_flag) { // FDD nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD; - asn1cCalloc(nR_Mode_Info->choice.fDD, F1AP_FDD_Info_t, fDD_Info); + asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info); /* FDD.1 UL NRFreqInfo */ /* FDD.1.1 UL NRFreqInfo ARFCN */ fDD_Info->uL_NRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_arfcn; // Integer /* FDD.1.2 F1AP_SUL_Information */ if(0) { // Optional - asn1cCalloc(fDD_Info->uL_NRFreqInfo.sul_Information, F1AP_SUL_Information_t, fdd_sul_info); + asn1cCalloc(fDD_Info->uL_NRFreqInfo.sul_Information, fdd_sul_info); fdd_sul_info->sUL_NRARFCN = 0; fdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0; fdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0; @@ -247,7 +247,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { fDD_Info->dL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nrb); } else { // TDD nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD; - asn1cCalloc(nR_Mode_Info->choice.tDD, F1AP_TDD_Info_t, tDD_Info); + asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info); /* TDD.1 nRFreqInfo */ /* TDD.1.1 nRFreqInfo ARFCN */ tDD_Info->nRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_arfcn; // Integer @@ -289,7 +289,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { OCTET_STRING_fromBuf(&served_cell_information->measurementTimingConfiguration, measurementTimingConfiguration, strlen(measurementTimingConfiguration)); - asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, F1AP_GNB_DU_System_Information_t, gNB_DU_System_Information); + asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, gNB_DU_System_Information); /* 4.1.2 gNB-DU System Information */ OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018 (const char *)f1ap_req(false,instance)->mib[i], //f1ap_du_data->mib, @@ -535,7 +535,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu.choice.initiatingMessage,F1AP_InitiatingMessage_t, initMsg); + asn1cCalloc(pdu.choice.initiatingMessage, initMsg); initMsg->procedureCode = F1AP_ProcedureCode_id_gNBDUConfigurationUpdate; initMsg->criticality = F1AP_Criticality_reject; initMsg->value.present = F1AP_InitiatingMessage__value_PR_GNBDUConfigurationUpdate; @@ -587,7 +587,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, if (f1ap_setup_req->fdd_flag) { nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD; /* > FDD >> FDD Info */ - asn1cCalloc(nR_Mode_Info->choice.fDD, F1AP_FDD_Info_t, fDD_Info); + asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info); /* >>> UL NRFreqInfo */ fDD_Info->uL_NRFreqInfo.nRARFCN = 999L; asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, ul_freqBandNrItem); @@ -609,7 +609,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, } else { // TDD nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD; /* > TDD >> TDD Info */ - asn1cCalloc(nR_Mode_Info->choice.tDD, F1AP_TDD_Info_t, tDD_Info); + asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info); /* >>> ARFCN */ tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem); @@ -626,7 +626,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, measurementTimingConfiguration, strlen(measurementTimingConfiguration)); /* 2.1.2 gNB-DU System Information */ - asn1cCalloc(served_cells_to_add_item->gNB_DU_System_Information, F1AP_GNB_DU_System_Information_t, gNB_DU_System_Information); + asn1cCalloc(served_cells_to_add_item->gNB_DU_System_Information, gNB_DU_System_Information); OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018 "1", sizeof("1")); @@ -659,14 +659,14 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, /* - nRPCI */ served_cell_information->nRPCI = f1ap_setup_req->cell[i].nr_pci; // int 0..1007 /* - fiveGS_TAC */ - asn1cCalloc(served_cell_information->fiveGS_TAC,F1AP_FiveGS_TAC_t, tac ); + asn1cCalloc(served_cell_information->fiveGS_TAC, tac ); OCTET_STRING_fromBuf(tac, (const char *) &f1ap_setup_req->cell[i].tac, 3); /* - Configured_EPS_TAC */ if(1) { - asn1cCalloc(served_cell_information->configured_EPS_TAC, F1AP_Configured_EPS_TAC_t, tmp2); + asn1cCalloc(served_cell_information->configured_EPS_TAC, tmp2); OCTET_STRING_fromBuf(tmp2, "2", 2); @@ -680,7 +680,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, if (f1ap_setup_req->fdd_flag) { nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD; /* > FDD >> FDD Info */ - asn1cCalloc(nR_Mode_Info->choice.fDD, F1AP_FDD_Info_t, fDD_Info); + asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info); /* >>> UL NRFreqInfo */ fDD_Info->uL_NRFreqInfo.nRARFCN = 999L; asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, ul_freqBandNrItem); @@ -703,7 +703,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, } else { // TDD nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD; /* > TDD >> TDD Info */ - asn1cCalloc(nR_Mode_Info->choice.tDD, F1AP_TDD_Info_t, tDD_Info); + asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info); /* >>> ARFCN */ tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem); @@ -720,7 +720,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, measurementTimingConfiguration, strlen(measurementTimingConfiguration)); /* 3.2.2 gNB-DU System Information */ - asn1cCalloc( served_cells_to_modify_item->gNB_DU_System_Information, F1AP_GNB_DU_System_Information_t, gNB_DU_System_Information); + asn1cCalloc( served_cells_to_modify_item->gNB_DU_System_Information, gNB_DU_System_Information); OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018 "1", sizeof("1")); @@ -949,7 +949,7 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, /* Create */ /* 0. pdu Type */ pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; - asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t, tmp); + asn1cCalloc(pdu.choice.successfulOutcome, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate; tmp->criticality = F1AP_Criticality_reject; tmp->value.present = F1AP_SuccessfulOutcome__value_PR_GNBCUConfigurationUpdateAcknowledge; diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index adfbff2823..c456f9e2d2 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -767,7 +767,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP, /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); + asn1cCalloc(pdu.choice.initiatingMessage, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_InitialULRRCMessageTransfer; tmp->criticality = F1AP_Criticality_ignore; tmp->value.present = F1AP_InitiatingMessage__value_PR_InitialULRRCMessageTransfer; @@ -841,7 +841,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); + asn1cCalloc(pdu.choice.initiatingMessage, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_ULRRCMessageTransfer; tmp->criticality = F1AP_Criticality_ignore; tmp->value.present = F1AP_InitiatingMessage__value_PR_ULRRCMessageTransfer; diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c index e2f804c35b..f779637d7e 100644 --- a/openair2/F1AP/f1ap_du_ue_context_management.c +++ b/openair2/F1AP/f1ap_du_ue_context_management.c @@ -261,7 +261,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; - asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t,tmp); + asn1cCalloc(pdu.choice.successfulOutcome, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_UEContextSetup; tmp->criticality = F1AP_Criticality_reject; tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextSetupResponse; @@ -296,16 +296,14 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup /* OPTIONAL */ /* measGapConfig */ if (0) { - asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.measGapConfig, - F1AP_MeasGapConfig_t, tmp); + asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.measGapConfig, tmp); OCTET_STRING_fromBuf(tmp, "asdsa", strlen("asdsa")); } /* OPTIONAL */ /* requestedP_MaxFR1 */ if (0) { - asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.requestedP_MaxFR1, - OCTET_STRING_t, tmp); + asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.requestedP_MaxFR1, tmp); OCTET_STRING_fromBuf(tmp, "asdsa", strlen("asdsa")); } } @@ -375,8 +373,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item); dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; /* gTPTunnel */ - asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, - F1AP_GTPTunnel_t, gTPTunnel); + asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,gTPTunnel); /* transportLayerAddress */ struct sockaddr_in addr= {0}; inet_pton(AF_INET, getCxt(false,instance)->setupReq.DU_f1_ip_address.ipv4_address, @@ -410,7 +407,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup /* sRBID */ srbs_failedToBeSetup_item->sRBID = 13L; /* cause */ - asn1cCalloc(srbs_failedToBeSetup_item->cause, F1AP_Cause_t,tmp); + asn1cCalloc(srbs_failedToBeSetup_item->cause, tmp); // dummy value tmp->present = F1AP_Cause_PR_radioNetwork; @@ -459,7 +456,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup /* dRBID */ drbs_failedToBeSetup_item->dRBID = 14; /* cause */ - asn1cCalloc(drbs_failedToBeSetup_item->cause, F1AP_Cause_t,tmp); + asn1cCalloc(drbs_failedToBeSetup_item->cause,tmp); // dummy value tmp->present = F1AP_Cause_PR_radioNetwork; @@ -507,7 +504,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup /* sCell_ID */ addnRCGI(sCell_FailedtoSetup_item->sCell_ID,f1ap_req(false, instance)->cell+i); /* cause */ - asn1cCalloc(sCell_FailedtoSetup_item->cause, F1AP_Cause_t, tmp); + asn1cCalloc(sCell_FailedtoSetup_item->cause, tmp); // dummy value tmp->present = F1AP_Cause_PR_radioNetwork; @@ -575,13 +572,13 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup ie12->criticality = F1AP_Criticality_ignore; ie12->value.present = F1AP_UEContextSetupResponseIEs__value_PR_CriticalityDiagnostics; asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.procedureCode, - F1AP_ProcedureCode_t, F1AP_ProcedureCode_id_UEContextSetup); + F1AP_ProcedureCode_id_UEContextSetup); asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.triggeringMessage, - F1AP_TriggeringMessage_t, F1AP_TriggeringMessage_initiating_message); + F1AP_TriggeringMessage_initiating_message); asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.procedureCriticality, - F1AP_Criticality_t, F1AP_Criticality_reject); + F1AP_Criticality_reject); asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.transactionID, - F1AP_TransactionID_t, 0); + 0); } /* encode */ @@ -609,7 +606,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); + asn1cCalloc(pdu.choice.initiatingMessage, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_UEContextReleaseRequest; tmp->criticality = F1AP_Criticality_reject; tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextReleaseRequest; @@ -823,7 +820,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; - asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t, tmp); + asn1cCalloc(pdu.choice.successfulOutcome, tmp); tmp->procedureCode = F1AP_ProcedureCode_id_UEContextRelease; tmp->criticality = F1AP_Criticality_reject; tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextReleaseComplete; @@ -921,7 +918,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { /* Create */ /* 0. Message Type */ pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; - asn1cCalloc(pdu.choice.successfulOutcome,F1AP_SuccessfulOutcome_t, tmp); + asn1cCalloc(pdu.choice.successfulOutcome,tmp); tmp->procedureCode = F1AP_ProcedureCode_id_UEContextModification; tmp->criticality = F1AP_Criticality_reject; tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextModificationResponse; @@ -998,7 +995,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item); dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, - F1AP_GTPTunnel_t, gTPTunnel); + gTPTunnel); TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress); OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204", strlen("1204")); @@ -1031,10 +1028,9 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { /* DLTunnels_Modified_Item */ asn1cSequenceAdd(drbs_modified_item->dLUPTNLInformation_ToBeSetup_List.list, F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item); - asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item, F1AP_DLUPTNLInformation_ToBeSetup_Item_t, tmp); + asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item, tmp); tmp->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; - asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, - F1AP_GTPTunnel_t, gTPTunnel); + asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, gTPTunnel); TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress); OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204", strlen("1204")); } @@ -1059,7 +1055,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { &srbs_failedToBeSetupMod_item_ies->value.choice.SRBs_FailedToBeSetupMod_Item; /* - sRBID */ srbs_failedToBeSetupMod_item->sRBID = 50L; - asn1cCalloc(srbs_failedToBeSetupMod_item->cause, F1AP_Cause_t, tmp) + asn1cCalloc(srbs_failedToBeSetupMod_item->cause, tmp) tmp->present = F1AP_Cause_PR_radioNetwork; tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id; } @@ -1106,7 +1102,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { F1AP_SCell_FailedtoSetupMod_Item_t *scell_failedtoSetupMod_item=&scell_failedtoSetupMod_item_ies->value.choice.SCell_FailedtoSetupMod_Item; /* - sCell_ID */ addnRCGI(scell_failedtoSetupMod_item->sCell_ID, &f1ap_req(false, instance)->cell[i]); - asn1cCalloc(scell_failedtoSetupMod_item->cause, F1AP_Cause_t, tmp); + asn1cCalloc(scell_failedtoSetupMod_item->cause, tmp); tmp->present = F1AP_Cause_PR_radioNetwork; tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id; } @@ -1130,7 +1126,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { &drbs_failedToBeModified_item_ies->value.choice.DRBs_FailedToBeModified_Item ; /* dRBID */ drbs_failedToBeModified_item->dRBID = 30L; - asn1cCalloc(drbs_failedToBeModified_item->cause, F1AP_Cause_t, tmp); + asn1cCalloc(drbs_failedToBeModified_item->cause, tmp); tmp->present = F1AP_Cause_PR_radioNetwork; tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index f43c4bfa6e..18ba5f612d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -810,6 +810,14 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, if( (frameP!=ra->Msg3_frame) || (slotP!=ra->Msg3_slot)) continue; + // for CFRA (NSA) do not schedule retransmission of msg3 + if (ra->cfra) { + LOG_W(NR_MAC, "Random Access %i failed at state %i (NSA msg3 reception failed)\n", i, ra->state); + nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti); + nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); + return; + } + if (ra->msg3_round >= MAX_HARQ_ROUNDS - 1) { LOG_W(NR_MAC, "Random Access %i failed at state %i (Reached msg3 max harq rounds)\n", i, ra->state); nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti); diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.h b/openair2/RRC/LTE/MESSAGES/asn1_msg.h index 0d9fe65aeb..28eb91a5b0 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.h +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.h @@ -52,6 +52,14 @@ */ int xer_sprint(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr); +#define asn1cCallocOne(VaR, VaLue) \ + VaR = calloc(1,sizeof(*VaR)); *VaR=VaLue; +#define asn1cCalloc(VaR, lOcPtr) \ + typeof(VaR) lOcPtr = VaR = calloc(1,sizeof(*VaR)); +#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \ + TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \ + ASN_SEQUENCE_ADD(&VaR,lOcPtr); + uint16_t get_adjacent_cell_id(uint8_t Mod_id,uint8_t index); uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId); diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 143eac680d..c09190dd89 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -153,6 +153,15 @@ typedef struct xer_sprint_string_s { size_t string_index; } xer_sprint_string_t; + +#define asn1cCallocOne(VaR, VaLue) \ + VaR = calloc(1,sizeof(*VaR)); *VaR=VaLue; +#define asn1cCalloc(VaR, lOcPtr) \ + typeof(VaR) lOcPtr = VaR = calloc(1,sizeof(*VaR)); +#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \ + TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \ + ASN_SEQUENCE_ADD(&VaR,lOcPtr); + //replace LTE //extern unsigned char NB_eNB_INST; extern unsigned char NB_gNB_INST; diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.h b/openair2/RRC/NR/MESSAGES/asn1_msg.h index 696a5a9839..4b248b8f1f 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.h +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.h @@ -53,6 +53,15 @@ */ int xer_sprint_NR(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr); + +#define asn1cCallocOne(VaR, VaLue) \ + VaR = calloc(1,sizeof(*VaR)); *VaR=VaLue; +#define asn1cCalloc(VaR, lOcPtr) \ + typeof(VaR) lOcPtr = VaR = calloc(1,sizeof(*VaR)); +#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \ + TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \ + ASN_SEQUENCE_ADD(&VaR,lOcPtr); + uint8_t do_MIB_NR(gNB_RRC_INST *rrc, uint32_t frame); diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf index c6fa68c223..680a6cb4ae 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf @@ -39,7 +39,7 @@ gNBs = tr_s_preference = "f1"; local_s_if_name = "lo"; - local_s_address = "127.0.0.4"; #"192.168.18.207"; #"127.0.0.4"; + local_s_address = "127.0.0.4"; remote_s_address = "127.0.0.3"; local_s_portc = 501; local_s_portd = 2152;