Merge branch 'integration_2022_wk42' into 'develop'

integration_2022_wk42

See merge request oai/openairinterface5g!1762

MR !1726 removing pucch-ResourceCommon from dedicated BWP
MR !1736 OAI UE Security Mode Complete bug
MR !1739 NR UE - Capture PduSessionEstablishmentAccept message
MR !1742 Remove EXMIMO
MR !1754 Remove threads_t struct from the code
MR !1758 Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c
MR !1678 Update 5G NR SA tutorials
This commit is contained in:
Robert Schmidt
2022-10-18 05:39:10 +00:00
105 changed files with 566 additions and 1959 deletions
+3 -24
View File
@@ -50,7 +50,7 @@ include_directories(${CRYPTO_INCLUDE_DIRS})
#uhd 4.0 and iris installs by default in /usr/local
include_directories("/usr/local/include/")
#use native cmake method as this package is not in pkg-config
add_list2_option(RF_BOARD "None" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU" "EXMIMO")
add_list2_option(RF_BOARD "None" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU")
if (${RF_BOARD} STREQUAL "OAI_USRP")
find_package(Boost REQUIRED)
@@ -877,8 +877,6 @@ include_directories ("${OPENAIR_DIR}/sdr/COMMON")
##############################################################
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
add_boolean_option(DEADLINE_SCHEDULER False "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs")
add_boolean_option(NAS_NETLINK False "useless ??? Must be True to compile nasmesh driver without rtai ????")
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
@@ -904,8 +902,6 @@ add_boolean_option(LINUX_LIST False "used only in lists.c: either u
##########################
# PHY options
##########################
add_boolean_option(DRIVER2013 True "only relevant for EXMIMO")
add_boolean_option(EXMIMO_IOT True "????")
add_boolean_option(LOCALIZATION False "???")
add_integer_option(MAX_NUM_CCs 1 "????")
add_boolean_option(SMBV False "Rohde&Schwarz SMBV100A vector signal generator")
@@ -2383,6 +2379,7 @@ set(libnrnas_emm_msg_OBJS
${NAS_SRC}COMMON/EMM/MSG/RegistrationComplete.c
${NAS_SRC}COMMON/EMM/MSG/FGSUplinkNasTransport.c
${NAS_SRC}COMMON/ESM/MSG/PduSessionEstablishRequest.c
${NAS_SRC}COMMON/ESM/MSG/PduSessionEstablishmentAccept.c
)
set(libnrnas_ies_OBJS
@@ -3084,7 +3081,7 @@ if (${T_TRACER})
nr_ulschsim ldpctest polartest smallblocktest cu_test du_test
#all "add_library" definitions
ITTI RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP
params_libconfig oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer
params_libconfig oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer
oai_eth_transpro oai_mobipass coding FLPT_MSG FLEXRAN_AGENT HASHTABLE UTIL OMG_SUMO
SECU_OSA SECU_CN SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
@@ -3181,24 +3178,6 @@ if(OAI_NW_DRIVER_USE_NETLINK)
endif()
make_driver(ue_ip ${OPENAIR2_DIR}/NETWORK_DRIVER/UE_IP ${ue_ip_src})
foreach(file IN ITEMS ${OCT_FILES})
string(REGEX REPLACE "oct *$" "cc" src ${file})
add_custom_command(
OUTPUT ${file}
DEPENDS ${OCT_DIR}/${src} OPENAIR0_LIB
COMMAND mkoctfile
ARGS ${OCT_FLAGS} ${OCT_INCL} ${OCT_LIBS}
ARGS -o ${file} ${OCT_DIR}/${src}
COMMENT "Generating ${file}"
VERBATIM
)
endforeach(file)
ADD_CUSTOM_TARGET(oarf
DEPENDS ${OCT_FILES}
)
include (${OPENAIR_DIR}/common/utils/telnetsrv/telnetsrv_CMakeLists.txt)
include(${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt)
+2 -4
View File
@@ -12,11 +12,9 @@
</tr>
</table>
## Table of Contents ##
**Table of Contents**
1. [Introduction](#1-introduction)
2. [Detailed Description](#2-detailed-description)
3. [Typical Usage](#3-typical-usage)
[[_TOC_]]
# 1. Introduction #
@@ -12,10 +12,9 @@
</tr>
</table>
## Table of Contents ##
**Table of Contents**
1. [Introduction](#1-introduction)
2. [Detailed Description](#2-detailed-description)
[[_TOC_]]
# 1. Introduction #
+2 -4
View File
@@ -12,11 +12,9 @@
</tr>
</table>
## Table of Contents ##
**Table of Contents**
1. [Introduction](#1-introduction)
2. [Detailed Description](#2-detailed-description)
3. [Typical Usage](#3-typical-usage)
[[_TOC_]]
# 1. Introduction #
+2 -4
View File
@@ -12,11 +12,9 @@
</tr>
</table>
## Table of Contents ##
**Table of Contents**
1. [Introduction](#1-introduction)
2. [Detailed Description](#2-detailed-description)
3. [Typical Usage](#3-typical-usage)
[[_TOC_]]
# 1. Introduction #
+2 -5
View File
@@ -12,12 +12,9 @@
</tr>
</table>
## Table of Contents ##
**Table of Contents**
1. [Introduction](#1-introduction)
2. [Prerequisites](#2-prerequisites)
1. [uvtool installation](#21-uvtool-installation)
2. [apt-cacher-server installation](#22-apt-cacher-server-installation)
[[_TOC_]]
# 1. Introduction #
@@ -12,11 +12,9 @@
</tr>
</table>
## Table of Contents ##
**Table of Contents**
1. [Introduction](#1-introduction)
2. [Sub BASH scripts](#2-sub-bash-scripts)
3. [Main script features](#3-main-script-features)
[[_TOC_]]
# 1. Introduction #
+2 -4
View File
@@ -12,11 +12,9 @@
</tr>
</table>
## Table of Contents ##
**Table of Contents**
1. [Introduction](#1-introduction)
2. [Centralized Workspace](#2-centralized-workspace)
3. [Create the ZIP file](#3-create-the-zip-file)
[[_TOC_]]
# 1. Introduction #
+2 -7
View File
@@ -12,14 +12,9 @@
</tr>
</table>
## Table of Contents ##
**Table of Contents**
1. [Introduction](#1-introduction)
2. [Detailed Description](#2-detailed-description)
3. [Typical Usage](#3-typical-usage)
1. [Testing the physical simulators](#31-testing-the-physicals-simulators)
2. [Testing the RF simulator](#33-testing-the-rf-simulator)
3. [Testing the L2-nFAPI simulator](#33-testing-the-l2-nfapi-simulator)
[[_TOC_]]
# 1. Introduction #
@@ -14,20 +14,9 @@
This page is only valid for an `Ubuntu18` host.
**TABLE OF CONTENTS**
**Table of Contents**
1. [Retrieving the images on Docker-Hub](#1-retrieving-the-images-on-docker-hub)
2. [Deploy containers](#2-deploy-containers)
1. [Deploy and Configure Cassandra Database](#21-deploy-and-configure-cassandra-database)
2. [Deploy OAI CN4G containers](#22-deploy-oai-cn4g-containers)
3. [Deploy OAI eNB in RF simulator mode](#23-deploy-oai-enb-in-rf-simulator-mode)
4. [Deploy OAI LTE UE in RF simulator mode](#24-deploy-oai-lte-ue-in-rf-simulator-mode)
3. [Check traffic](#3-check-traffic)
4. [Un-deployment](#4-un-deployment)
5. [Explanation on the configuration](#5-explanation-on-the-configuration)
1. [UE IMSI and Keys](#51-ue-imsi-and-keys)
2. [PLMN and TAI](#52-plmn-and-tai)
3. [Access to Internet](#53-access-to-internet)
[[_TOC_]]
# 1. Retrieving the images on Docker-Hub #
+2 -15
View File
@@ -16,22 +16,9 @@ This page is only valid for an `Ubuntu18` host.
**NOTE: this version (2022-01-27) has been updated for the `v1.3.0` version of the `OAI 5G CN`.**
**TABLE OF CONTENTS**
**Table of Contents**
1. [Retrieving the images on Docker-Hub](#1-retrieving-the-images-on-docker-hub)
2. [Deploy containers](#2-deploy-containers)
1. [Deploy OAI 5G Core Network](#21-deploy-oai-5g-core-network)
2. [Deploy OAI gNB in RF simulator mode and in Standalone Mode](#22-deploy-oai-gnb-in-rf-simulator-mode-and-in-standalone-mode)
3. [Deploy OAI NR-UE in RF simulator mode and in Standalone Mode](#23-deploy-oai-nr-ue-in-rf-simulator-mode-and-in-standalone-mode)
4. [Deploy Second OAI NR-UE in RF simulator mode and in Standalone Mode](#24-deploy-second-oai-nr-ue-in-rf-simulator-mode-and-in-standalone-mode)
3. [Check traffic](#3-check-traffic)
1. [Check your Internet connectivity](#31-check-your-internet-connectivity)
2. [Start the iperf server inside the NR-UE container](#32-start-the-iperf-server-inside-the-nr-ue-container)
3. [Start the iperf client inside the ext-dn container](#33-start-the-iperf-client-inside-the-ext-dn-container)
4. [Un-deployment](#4-un-deployment)
5. [Explanations on the configuration in the docker-compose.yaml](##5-explanations-on-the-configuration-in-the-docker-composeyaml)
1. [Making the NR-UE connect to the core network](#51-making-the-nr-ue-connect-to-the-core-network)
2. [Making the gNB connect to the core network](#52-making-the-gnb-connect-to-the-core-network)
[[_TOC_]]
# 1. Retrieving the images on Docker-Hub #
+4 -91
View File
@@ -40,7 +40,6 @@ conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
XFORMS="True"
SKIP_SHARED_LIB_FLAG="False"
PRINT_STATS="False"
DEADLINE_SCHEDULER_FLAG_USER=""
HW="None"
TP="Ethernet"
EPC=0
@@ -110,7 +109,7 @@ Options:
--UE-gen-nvram [output path]
Specify gen_nvram_path (default \"$gen_nvram_path\")
-w | --hardware
EXMIMO, USRP, BLADERF, LMSSDR, IRIS, ADRV9371_ZC706, SIMU, AW2SORI, None (Default)
USRP, BLADERF, LMSSDR, IRIS, SIMU, AW2SORI, None (Default)
Adds this RF board support (in external packages installation and in compilation)
-t | --transport
Selects the transport protocol type, options: None, Ethernet, benetel4g, benetel5g
@@ -172,13 +171,7 @@ Options:
--sanitize-undefined | -fsanitize=undefined
Enable the undefined behavior sanitizer on all targets
-h | --help
Print this help
Usage (first build):
NI/ETTUS B201 + COTS UE : ./build_oai -I -i --eNB -w USRP
Usage (regular):
Eurecom EXMIMO + OAI ENB : ./build_oai --eNB
NI/ETTUS B201 + OAI ENB : ./build_oai --eNB -w USRP"
Print this help"
}
@@ -293,10 +286,7 @@ function main() {
-w | --hardware)
# Use OAI_USRP as the key word USRP is used inside UHD driver
case "$2" in
"EXMIMO")
HW="EXMIMO"
;;
"USRP" | "BLADERF" | "LMSSDR" | "IRIS" | "ADRV9371_ZC706" | "SIMU" | "AW2SORI")
"USRP" | "BLADERF" | "LMSSDR" | "IRIS" | "SIMU" | "AW2SORI")
HW="OAI_"$2
;;
"None")
@@ -355,26 +345,6 @@ function main() {
BUILD_COVERITY_SCAN=1
echo_info "Will build Coverity-Scan objects for upload"
shift;;
--disable-deadline)
DEADLINE_SCHEDULER_FLAG_USER="False"
CMAKE_CMD="$CMAKE_CMD -DDEADLINE_SCHEDULER=False"
echo_info "Disabling the usage of deadline scheduler"
shift 1;;
--enable-deadline)
DEADLINE_SCHEDULER_FLAG_USER="True"
CMAKE_CMD="$CMAKE_CMD -DDEADLINE_SCHEDULER=True"
echo_info "Enabling the usage of deadline scheduler"
shift 1;;
--enable-cpu-affinity)
CPU_AFFINITY_FLAG_USER="True"
CMAKE_CMD="$CMAKE_CMD -DCPU_AFFINITY=True"
echo_info "Enabling CPU Affinity (only valid when not using deadline scheduler)"
shift 1;;
--disable-cpu-affinity)
CPU_AFFINITY_FLAG_USER="False"
CMAKE_CMD="$CMAKE_CMD -DCPU_AFFINITY=False"
echo_info "Disabling CPU Affinity (only valid when not using deadline scheduler)"
shift 1;;
--disable-T-Tracer)
CMAKE_CMD="$CMAKE_CMD -DT_TRACER=False"
echo_info "Disabling the T tracer"
@@ -491,25 +461,6 @@ function main() {
echo_info "RF HW set to $HW"
# If the user doesn't specify the Linux scheduler to use, we set a value
if [ "$DEADLINE_SCHEDULER_FLAG_USER" = "" ]; then
case "$HW" in
"EXMIMO")
DEADLINE_SCHEDULER_FLAG_USER="True"
;;
*)
DEADLINE_SCHEDULER_FLAG_USER="False"
;;
esac
fi
#Disable CPU Affinity for deadline scheduler
if [ "$DEADLINE_SCHEDULER_FLAG_USER" = "True" ] ; then
CPU_AFFINITY_FLAG_USER="False"
CMAKE_CMD="$CMAKE_CMD -DCPU_AFFINITY=False"
fi
echo_info "Flags for Deadline scheduler: $DEADLINE_SCHEDULER_FLAG_USER"
echo_info "Flags for CPU Affinity: $CPU_AFFINITY_FLAG_USER"
#######################################################
# Setting and printing OAI envs, we should check here #
@@ -548,10 +499,6 @@ function main() {
install_usrp_uhd_driver $UHD_IMAGES_DIR
fi
fi
# if [ "$HW" == "OAI_ADRV9371_ZC706" ] ; then
# echo_info "\nInstalling packages for ADRV9371_ZC706 support"
# check_install_libiio_driver
# fi
if [ "$HW" == "OAI_BLADERF" ] ; then
echo_info "installing packages for BLADERF support"
check_install_bladerf_driver
@@ -712,22 +659,6 @@ function main() {
compilations $BUILD_DIR test_$f
done
fi
####################################
# EXMIMO drivers & firmware loader #
####################################
if [ "$HW" = "EXMIMO" ] ; then
echo_info "Compiling Express MIMO 2 board drivers"
compilations $BUILD_DIR openair_rf
compilations $BUILD_DIR updatefw
echo_info "Compiling oarf tools. The logfile for compilation is here: $dlog/oarf.txt"
make -C $OPENAIR_DIR/cmake_targets/$BUILD_DIR/build oarf > $dlog/oarf.txt 2>&1
if [ -s $OPENAIR_DIR/cmake_targets/$BUILD_DIR/build/oarf_config_exmimo.oct ] ; then
echo_success "oarf tools compiled"
else
echo_error "oarf tools compilation failed"
fi
fi
######################
# Optional libraries #
@@ -747,13 +678,7 @@ function main() {
if [ "$HW" != "None" ] ; then
rm -f liboai_device.so
# link liboai_device.so with the selected RF device library
if [ "$HW" == "EXMIMO" ] ; then
compilations $BUILD_DIR oai_exmimodevif
ln -sf liboai_exmimodevif.so liboai_device.so
echo_info "liboai_device.so is linked to EXMIMO device library"
elif [ "$HW" == "OAI_USRP" ] ; then
if [ "$HW" == "OAI_USRP" ] ; then
compilations $BUILD_DIR oai_usrpdevif
ln -sf liboai_usrpdevif.so liboai_device.so
@@ -777,18 +702,6 @@ function main() {
ln -s liboai_irisdevif.so liboai_device.so
echo_info "liboai_device.so is linked to IRIS device library"
elif [ "$HW" == "OAI_ADRV9371_ZC706" ] ; then
SYRIQ_KVER=$(uname -r)
SYRIQ_KMAJ=$(echo $SYRIQ_KVER | sed -e 's/^\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*.*/\1/')
SYRIQ_KMIN=$(echo $SYRIQ_KVER | sed -e 's/^[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*.*/\1/')
# echo $SYRIQ_KMAJ$SYRIQ_KMIN
if [ "$SYRIQ_KMAJ$SYRIQ_KMIN" == "319" ] || [ "$SYRIQ_KMAJ$SYRIQ_KMIN" == "410" ] || [ "$SYRIQ_KMAJ$SYRIQ_KMIN" == "415" ] ; then
# echo "Kernel $SYRIQ_KMAJ.$SYRIQ_KMIN detected"
ln -sf /usr/local/lib/syriq/libadrv9371zc706.so liboai_device.so
else
echo_error "== FAILED == Unexpected Kernel $SYRIQ_KMAJ.$SYRIQ_KMIN"
fi
echo_info "liboai_device.so is linked to ADRV9371_ZC706 device library for Kernel $SYRIQ_KMAJ.$SYRIQ_KMIN"
elif [ "$HW" == "OAI_AW2SORI" ] ; then
compilations $BUILD_DIR aw2sori_transpro
@@ -1,58 +0,0 @@
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ASN_DEBUG False)
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMIT_ASN_DEBUG False )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING True )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME True )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True )
set ( EXMIMO_IOT True )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U True)
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD True )
set ( DEADLINE_SCHEDULER False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
set ( NAS_BUILT_IN_UE True)
set ( NAS_MME False )
set ( NAS_UE True )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NO_RRM True )
set ( OAISIM False )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR2 True )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "epc_test" )
set ( PDCP_USE_NETLINK True )
set ( PDCP_MSG_PRINT False )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( RF_BOARD "False" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RRC_DEFAULT_RAB_IS_AM True)
set ( RRC_MSG_PRINT False )
set ( SECU False )
set ( SMBV False )
set ( TEST_OMG False )
set ( USE_MME "R10" )
set ( XER_PRINT True )
@@ -1,63 +0,0 @@
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING True )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PDCP_NETLINK_FIFO False )
set ( ENABLE_RAL False )
set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME True )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True )
set ( EXMIMO_IOT True )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U True)
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD True )
set ( DEADLINE_SCHEDULER False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
set ( NAS_BUILT_IN_UE True)
set ( NAS_MME False )
set ( NAS_UE True )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NO_RRM True )
set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR2 True )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" )
set ( PDCP_USE_NETLINK True )
set ( PDCP_MSG_PRINT False )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( RF_BOARD "False" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RRC_DEFAULT_RAB_IS_AM True)
set ( RRC_MSG_PRINT False )
set ( SECU False )
set ( SMBV False )
set ( TEST_OMG False )
set ( TEST_S1C_MME True )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" )
set ( XER_PRINT False )
set ( XFORMS False )
-1
View File
@@ -160,7 +160,6 @@ clean_kernel() {
echo_info "Flushed iptables"
$SUDO rmmod nasmesh > /dev/null 2>&1
$SUDO rmmod oai_nw_drv > /dev/null 2>&1
$SUDO rmmod openair_rf > /dev/null 2>&1
$SUDO rmmod ue_ip > /dev/null 2>&1
echo_info "removed drivers from kernel"
}
@@ -1,91 +0,0 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# file example_enb_exmimo_mme_hss.txt
# brief
# author Lionel Gauthier
TODO: a document file, PDF for example, with nice pictures, etc
This example shows how to generate and launch enb, mme_gw, hss executables on the same host:
################
Configuration
################
freediameter 1.2.0 (not 1.1.5, 1.1.6,...) has to be installed and patched (done by check_install_oai_software() calling install_freediameter_from_source() in script build_helper)
Config File:
/etc/hosts must contain the fqdn of the MME and HSS (same since both run on the same host):
(assuming the realm is openair4G.eur)
127.0.0.1 localhost
127.0.1.1 yang.openair4G.eur yang
...
################
BUILDING, RUNNING
################
Building HSS:
yang@yang:~/openair4G/trunk/cmake_targets$ tools/build_hss -c --connect-to-mme yang.openair4G.eur -t -T --realm openair4G.eur
Configuring the HSS:
In oai_db (easier for newbies to access HSS database through http://127.0.0.1/phpmyadmin)
In table mmeidentity, enter the record corresponding to your MME:
(idmmeidentity, mmehost, mmerealm)
In table pdn, enter the record allowing an IMSI to connect to an APN
In table users, enter the record corresponding to your USIM card.
Running the HSS:
yang@yang:~/openair4G/trunk/cmake_targets$ sudo tools/run_hss -g
Building the MME-GW:
yang@yang:~/openair4G/trunk/cmake_targets/tools$ ./build_epc -c -d -t -T --s6a-server
Configuring the MME-GW:
You can configure in file openair4G/trunk/cmake_targets/tools/epc.local.enb.conf.in the following parameters:
MCC/MNC of your network
SGI interface (outgoing interface of the S/P-GW)
Integrity algorithms, Ciphering algorithms
Please note that DNS addresses are hardcoded in source code (TODO in list).
Running the MME-GW:
yang@yang:~/openair4G/trunk/cmake_targets/tools$ sudo ./run_epc -l -g -K
Building eNB:
yang@yang:~/openair4G/trunk/cmake_targets$ ./build_oai --eNB
Running eNB:
yang@yang:~/openair4G/trunk/cmake_targets$ sudo tools/run_enb_s1_exmimo -c /home/yang/openair4G/trunk/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.yang.epc.eurecom.conf -S -K
################
Tools available:
###############
1) itti_analyser (list messages exchanged between protocol layers)
2) xforms (Layer 1)
3) vcd (timing mesurements)
-10
View File
@@ -1,10 +0,0 @@
# this file contains the calibration values to compute the RSSI
# we can use three different gain stages (high, low, med) as well as a gain factor for fine tuning
# the three lines in this file gives the total rx gain in dB for the three gain stages if the rx gain is set to 30dB
# this is for Express MIMO2 without any additional RF frontend
# high gain
103 107 106 104
# med gain
98 101 100 98
# low gain (byp)
94 97 96 94
-10
View File
@@ -1,10 +0,0 @@
# this file contains the calibration values to compute the RSSI
# we can use three different gain stages (high, low, med) as well as a gain factor for fine tuning
# the three lines in this file gives the total rx gain in dB for the three gain stages if the rx gain is set to 30dB
# this is for Express MIMO2 without any additional RF frontend
# high gain
128 128 128 126
# med gain
122 123 123 120
# low gain (byp)
116 117 116 116
-4
View File
@@ -1,4 +0,0 @@
n=oarf_get_num_detected_cards;
for i=n-1:0
oarf_stop(i);
end
-45
View File
@@ -280,28 +280,6 @@ void thread_top_init(char *thread_name,
uint64_t deadline,
uint64_t period) {
#ifdef DEADLINE_SCHEDULER
struct sched_attr attr;
unsigned int flags = 0;
attr.size = sizeof(attr);
attr.sched_flags = 0;
attr.sched_nice = 0;
attr.sched_priority = 0;
attr.sched_policy = SCHED_DEADLINE;
attr.sched_runtime = runtime;
attr.sched_deadline = deadline;
attr.sched_period = period;
if (sched_setattr(0, &attr, flags) < 0 ) {
perror("[SCHED] eNB tx thread: sched_setattr failed\n");
fprintf(stderr,"sched_setattr Error = %s",strerror(errno));
exit(1);
}
#else //LOW_LATENCY
int policy, s, j;
struct sched_param sparam;
char cpu_affinity[1024];
@@ -314,27 +292,6 @@ void thread_top_init(char *thread_name,
/* Enable CPU Affinity only if number of CPUs > 2 */
CPU_ZERO(&cpuset);
#ifdef CPU_AFFINITY
if (affinity == 0) {
LOG_W(HW,"thread_top_init() called with affinity==0, but overruled by #ifdef CPU_AFFINITY\n");
}
else if (get_nprocs() > 2)
{
for (j = 2; j < get_nprocs(); j++)
CPU_SET(j, &cpuset);
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
if (s != 0)
{
perror( "pthread_setaffinity_np");
exit_fun("Error setting processor affinity");
}
}
#else //CPU_AFFINITY
if (affinity) {
LOG_W(HW,"thread_top_init() called with affinity>0, but overruled by #ifndef CPU_AFFINITY.\n");
}
#endif //CPU_AFFINITY
/* Check the actual affinity mask assigned to the thread */
s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
if (s != 0)
@@ -384,8 +341,6 @@ void thread_top_init(char *thread_name,
"???",
sparam.sched_priority, cpu_affinity );
}
#endif //LOW_LATENCY
}
@@ -121,11 +121,6 @@ char toksep[2];
case SCHED_RR:
lptr+=sprintf(lptr,"%s ","rt: rr");
break;
#ifdef SCHED_DEADLINE
case SCHED_DEADLINE:
lptr+=sprintf(lptr,"%s ","rt: deadline");
break;
#endif
default:
lptr+=sprintf(lptr,"%s ","????");
break;
+1 -25
View File
@@ -1,30 +1,6 @@
**Table of Contents**
1. [Functional Split Architecture](#functional-split-architecture)
2. [OpenAirInterface Block Diagram](#openairinterface-block-diagram)
2. [OpenAirInterface 4G-LTE eNB Feature Set](#openairinterface-4g-lte-enb-feature-set)
1. [eNB PHY Layer](#enb-phy-layer)
2. [eNB MAC Layer](#enb-mac-layer)
3. [eNB RLC Layer](#enb-rlc-layer)
4. [eNB PDCP Layer](#enb-pdcp-layer)
5. [eNB RRC Layer](#enb-rrc-layer)
6. [eNB X2AP](#enb-x2ap)
7. [eNB/MCE M2AP](#enbmce-m2ap)
8. [MCE/MME M3AP](#mcemme-m3ap)
3. [OpenAirInterface 4G-LTE UE Feature Set](#openairinterface-4g-lte-ue-feature-set)
1. [LTE UE PHY Layer](#lte-ue-phy-layer)
2. [LTE UE MAC Layer](#lte-ue-mac-layer)
3. [LTE UE RLC Layer](#lte-ue-rlc-layer)
4. [LTE UE PDCP Layer](#lte-ue-pdcp-layer)
5. [LTE UE RRC Layer](#lte-ue-rrc-layer)
4. [OpenAirInterface 5G-NR gNB Feature Set](#openairinterface-5g-nr-feature-set)
1. [General Parameters](#general-parameters)
2. [gNB Physical Layer](#gnb-phy-layer)
3. [gNB Higher Layers](#gnb-higher-layers)
5. [OpenAirInterface 5G-NR UE Feature Set](#openairinterface-5g-nr-ue-feature-set)
1. [UE Physical Layer](#ue-phy-layer)
2. [UE Higher Layers](#ue-higher-layers)
[[_TOC_]]
# Functional Split Architecture #
+2 -6
View File
@@ -14,13 +14,9 @@
This page is valid for the develop branch
# Table of Contents: #
**Table of Contents**
* [How to build the eNB and the UE](#build)
* [How to run an eNB built with the noS1 option](#run-noS1-eNB)
* [How to run a UE built with the noS1 option](#run-noS1-UE)
* [Continuous Integration notes](#CInote)
* [How to ping an eNB from a UE and vice versa (with the noS1 option)](#noS1-pinging)
[[_TOC_]]
The old oaisim is dead! Long live oaisim! :)
+2 -12
View File
@@ -16,19 +16,9 @@
**2022/03/08: CAUTION, THE LAST VALID TAG on `develop` branch is `2021.w51_c`.**
## Table of Contents ##
**Table of Contents**
1. [Environment](#1-environment)
2. [Retrieve the OAI eNB-UE source code](#2-retrieve-the-oai-enb-ue-source-code)
3. [Setup of the USIM information in UE folder](#3-setup-of-the-usim-information-in-ue-folder)
4. [Setup of the Configuration files](#4-setup-of-the-configuration-files)
1. [The eNB Configuration file](#41-the-enb-configuration-file)
2. [The UE Configuration file](#42-the-ue-configuration-file)
5. [Build OAI UE and eNodeB](#5-build-oai-ue-and-enodeb)
6. [Start the eNB](#6-start-the-enb)
7. [Start the UE](#7-start-the-ue)
8. [Test with ping](#8-test-with-ping)
9. [Limitations](#9-limitations)
[[_TOC_]]
# 1. Environment #
+2 -14
View File
@@ -16,21 +16,9 @@
**2022/03/08: CAUTION, THE LAST VALID TAG on `develop` branch is `2021.w51_c`.**
## Table of Contents ##
**Table of Contents**
1. [Environment](#1-environment)
2. [Prepare the EPC](#2-prepare-the-epc)
3. [Retrieve the OAI eNB-UE source code](#3-retrieve-the-oai-enb-ue-source-code)
4. [Setup of the USIM information in UE folder](#4-setup-of-the-usim-information-in-ue-folder)
5. [Setup of the Configuration files](#5-setup-of-the-configuration-files)
1. [The eNB Configuration file](#51-the-enb-configuration-file)
2. [The UE Configuration file](#52-the-ue-configuration-file)
6. [Build OAI UE and eNodeB](#6-build-oai-ue-and-enodeb)
7. [Start EPC](#7-start-epc)
8. [Start the eNB](#8-start-the-enb)
9. [Start the UE](#9-start-the-ue)
10. [Test with ping](#10-test-with-ping)
11. [Limitations](#11-limitations)
[[_TOC_]]
# 1. Environment #
-227
View File
@@ -1,227 +0,0 @@
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI 5G SA tutorial</font></b>
</td>
</tr>
</table>
**TABLE OF CONTENTS**
1. [Scenario](#1-scenario)
2. [OAI CN5G](#2-oai-cn5g)
1. [OAI CN5G pre-requisites](#21-oai-cn5g-pre-requisites)
2. [OAI CN5G Setup](#22-oai-cn5g-setup)
3. [OAI CN5G Configuration files](#23-oai-cn5g-configuration-files)
4. [SIM Card](#24-sim-card)
3. [OAI gNB](#3-oai-gnb)
1. [OAI gNB pre-requisites](#31-oai-gnb-pre-requisites)
2. [Build OAI gNB](#32-build-oai-gnb)
4. [Run OAI CN5G and OAI gNB with USRP B210](#4-run-oai-cn5g-and-oai-gnb-with-usrp-b210)
1. [Run OAI CN5G](#41-run-oai-cn5g)
2. [Run OAI gNB](#42-run-oai-gnb)
5. [Testing with QUECTEL RM500Q](#5-testing-with-quectel-rm500q)
1. [Setup QUECTEL](#51-setup-quectel)
2. [Ping test](#52-ping-test)
3. [Downlink iPerf test](#53-downlink-iperf-test)
# 1. Scenario
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and COTS UE.
Minimum hardware requirements:
- Laptop/Desktop/Server for OAI CN5G and OAI gNB
- Operating System: [Ubuntu 20.04.4 LTS](https://releases.ubuntu.com/20.04.4/ubuntu-20.04.4-desktop-amd64.iso)
- CPU: 8 cores x86_64 @ 3.5 GHz
- RAM: 32 GB
- Laptop for UE
- Operating System: Microsoft Windows 10 x64
- CPU: 4 cores x86_64
- RAM: 8 GB
- Windows driver for Quectel MUST be equal or higher than version **2.2.4**
- [USRP B210](https://www.ettus.com/all-products/ub210-kit/)
- Quectel RM500Q
- Module, M.2 to USB adapter, antennas and SIM card
- Firmware version of Quectel MUST be equal or higher than **RM500QGLABR11A06M4G**
# 2. OAI CN5G
## 2.1 OAI CN5G pre-requisites
```bash
sudo apt install -y git net-tools putty
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install -y docker docker-ce
# Add your username to the docker group, otherwise you will have to run in sudo mode.
sudo usermod -a -G docker $(whoami)
reboot
# https://docs.docker.com/compose/install/
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
```
## 2.2 OAI CN5G Setup
```bash
# Git oai-cn5g-fed repository
git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git ~/oai-cn5g-fed
# Pull docker images
docker pull oaisoftwarealliance/oai-amf:develop
docker pull oaisoftwarealliance/oai-nrf:develop
docker pull oaisoftwarealliance/oai-smf:develop
docker pull oaisoftwarealliance/oai-udr:develop
docker pull oaisoftwarealliance/oai-udm:develop
docker pull oaisoftwarealliance/oai-ausf:develop
docker pull oaisoftwarealliance/oai-spgwu-tiny:develop
docker pull oaisoftwarealliance/trf-gen-cn5g:latest
# Tag docker images
docker image tag oaisoftwarealliance/oai-amf:develop oai-amf:develop
docker image tag oaisoftwarealliance/oai-nrf:develop oai-nrf:develop
docker image tag oaisoftwarealliance/oai-smf:develop oai-smf:develop
docker image tag oaisoftwarealliance/oai-udr:develop oai-udr:develop
docker image tag oaisoftwarealliance/oai-udm:develop oai-udm:develop
docker image tag oaisoftwarealliance/oai-ausf:develop oai-ausf:develop
docker image tag oaisoftwarealliance/oai-spgwu-tiny:develop oai-spgwu-tiny:develop
docker image tag oaisoftwarealliance/trf-gen-cn5g:latest trf-gen-cn5g:latest
```
## 2.3 OAI CN5G Configuration files
Download and copy configuration files:
- Copy [docker-compose-basic-nrf.yaml](tutorial_resources/docker-compose-basic-nrf.yaml) to `~/oai-cn5g-fed/docker-compose`
- Copy [oai_db.sql](tutorial_resources/oai_db.sql) to `~/oai-cn5g-fed/docker-compose/database`
Change permissions on oai_db.sql to prevent mysql permission denied error:
```bash
chmod 644 ~/oai-cn5g-fed/docker-compose/database/oai_db.sql
```
## 2.4 SIM Card
Program SIM Card with [Open Cells Project](https://open-cells.com/) application [uicc-v2.6](https://open-cells.com/d5138782a8739209ec5760865b1e53b0/uicc-v2.6.tgz).
```bash
sudo ./program_uicc --adm 12345678 --imsi 208990000000001 --isdn 00000001 --acc 0001 --key fec86ba6eb707ed08905757b1bb44b8f --opc C42449363BBAD02B66D16BC975D77CC1 -spn "OpenAirInterface" --authenticate
```
# 3. OAI gNB
## 3.1 OAI gNB pre-requisites
### Build UHD from source
```bash
sudo apt install -y 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 ~/uhd
cd ~/uhd
git checkout v4.0.0.0
cd host
mkdir build
cd build
cmake ../
make -j 4
make test # This step is optional
sudo make install
sudo ldconfig
sudo uhd_images_downloader
```
## 3.2 Build OAI gNB
```bash
# Get openairinterface5g source code
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ~/openairinterface5g
cd ~/openairinterface5g
git checkout develop
# Install dependencies in Ubuntu 20.04
cd ~/openairinterface5g
source oaienv
cd cmake_targets
./build_oai -I
# Build OAI gNB
cd ~/openairinterface5g
source oaienv
cd cmake_targets
./build_oai -w USRP --nrUE --gNB --build-lib all -c
```
# 4. Run OAI CN5G and OAI gNB with USRP B210
## 4.1 Run OAI CN5G
```bash
cd ~/oai-cn5g-fed/docker-compose
python3 core-network.py --type start-basic --scenario 1
```
## 4.2 Run OAI gNB
```bash
cd ~/openairinterface5g
source oaienv
cd cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --sa -E --continuous-tx
```
Make sure that during USRP initialization, it shows that USB 3 is used.
# 5. Testing with Quectel RM500Q
## 5.1 Setup Quectel
With [PuTTY](https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe), send the following AT commands to the module using a serial interface (ex: COM2) at 115200 bps:
```bash
# MUST be sent at least once everytime there is a firmware upgrade!
AT+QMBNCFG="Select","ROW_Commercial"
AT+QMBNCFG="AutoSel",0
AT+CFUN=1,1
AT+CGDCONT=1
AT+CGDCONT=2
AT+CGDCONT=3
AT+CGDCONT=1,"IP","oai"
# (Optional, debug only, AT commands) Activate PDP context, retrieve IP address and test with ping
AT+CGACT=1,1
AT+CGPADDR=1
AT+QPING=1,"openairinterface.org"
```
## 5.2 Ping test
- UE host
```bash
ping 192.168.70.135 -n 1000 -S 12.1.1.2
```
- CN5G host
```bash
docker exec -it oai-ext-dn ping 12.1.1.2
```
## 5.3 Downlink iPerf test
- UE host
- Download iPerf for Microsoft Windows from [here](https://iperf.fr/download/windows/iperf-2.0.9-win64.zip).
- Extract to Desktop and run with Command Prompt:
```bash
cd C:\Users\User\Desktop\iPerf\iperf-2.0.9-win64\iperf-2.0.9-win64
iperf -s -u -i 1 -B 12.1.1.2
```
- CN5G host
```bash
docker exec -it oai-ext-dn iperf -u -t 86400 -i 1 -fk -B 192.168.70.135 -b 125M -c 12.1.1.2
```
@@ -12,26 +12,9 @@
</tr>
</table>
**TABLE OF CONTENTS**
1. [Scenario](#1-scenario)
2. [OAI CN5G](#2-oai-cn5g)
1. [OAI CN5G pre-requisites](#21-oai-cn5g-pre-requisites)
2. [OAI CN5G Setup](#22-oai-cn5g-setup)
3. [OAI CN5G Configuration files](#23-oai-cn5g-configuration-files)
4. [SIM Card](#24-sim-card)
3. [OAI gNB](#3-oai-gnb)
1. [OAI gNB pre-requisites](#31-oai-gnb-pre-requisites)
2. [Build OAI gNB](#32-build-oai-gnb)
3. [N300 Ethernet Tuning](#33-n300-ethernet-tuning)
4. [Run OAI CN5G and OAI gNB with USRP N300](#4-run-oai-cn5g-and-oai-gnb-with-usrp-n300)
1. [Run OAI CN5G](#41-run-oai-cn5g)
2. [Run OAI gNB](#42-run-oai-gnb)
5. [Testing with QUECTEL RM500Q](#5-testing-with-quectel-rm500q)
1. [Setup QUECTEL](#51-setup-quectel)
2. [Ping test](#52-ping-test)
3. [Downlink iPerf test](#53-downlink-iperf-test)
**Table of Contents**
[[_TOC_]]
# 1. Scenario
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and COTS UE.
@@ -46,7 +29,8 @@ Minimum hardware requirements:
- CPU: 4 cores x86_64
- RAM: 8 GB
- Windows driver for Quectel MUST be equal or higher than version **2.2.4**
- [USRP N300](https://www.ettus.com/all-products/USRP-N300/): Please identify the network interface(s) on which the N300 is connected.
- [USRP B210](https://www.ettus.com/all-products/ub210-kit/), [USRP N300](https://www.ettus.com/all-products/USRP-N300/) or [USRP X300](https://www.ettus.com/all-products/x300-kit/)
- Please identify the network interface(s) on which the USRP is connected and update the gNB configuration file
- Quectel RM500Q
- Module, M.2 to USB adapter, antennas and SIM card
- Firmware version of Quectel MUST be equal or higher than **RM500QGLABR11A06M4G**
@@ -159,28 +143,32 @@ cd cmake_targets
cd ~/openairinterface5g
source oaienv
cd cmake_targets
./build_oai -w USRP --nrUE --gNB --build-lib all -c
./build_oai -w USRP --ninja --nrUE --gNB --build-lib all -c
```
## 3.3 N300 Ethernet Tuning
## 3.3 USRP N300 and X300 Ethernet Tuning
Please also refer to the official [USRP Host Performance Tuning Tips and Tricks](https://kb.ettus.com/USRP_Host_Performance_Tuning_Tips_and_Tricks) tuning guide.
The following steps are recommended. Please change the network interface(s) as required. Also, you should have 10Gbps interface(s): if you use two cables, you should have the XG interface. Refer to the [N300 Getting Started Guide](https://kb.ettus.com/USRP_N300/N310/N320/N321_Getting_Started_Guide) for more information.
* Use an MTU of 9000: how to change this depends on the network management tool. In the case of Network Manager, this can be done from the GUI.
* Increase the kernel socket buffer (also done by the USRP driver in OAI):
```
sysctl -w net.core.rmem_max=8388608
sysctl -w net.core.wmem_max=8388608
sysctl -w net.core.rmem_default=65536
sysctl -w net.core.wmem_default=65536
```
* Increase the kernel socket buffer (also done by the USRP driver in OAI)
* Increase Ethernet Ring Buffers: `sudo ethtool -G <ifname> rx 4096 tx 4096`
* Disable hyper-threading in the BIOS
* Disable KPTI Protections for Spectre/Meltdown for more performance. **This is a security risk.** Add `mitigations=off nosmt` in your grub config and update grub.
* Disable hyper-threading in the BIOS (This step is optional)
* Optional: Disable KPTI Protections for Spectre/Meltdown for more performance. **This is a security risk.** Add `mitigations=off nosmt` in your grub config and update grub. (This step is optional)
# 4. Run OAI CN5G and OAI gNB with USRP N300
Example code to run:
```
for ((i=0;i<$(nproc);i++)); do sudo cpufreq-set -c $i -r -g performance; done
sudo sysctl -w net.core.wmem_max=62500000
sudo sysctl -w net.core.rmem_max=62500000
sudo sysctl -w net.core.wmem_default=62500000
sudo sysctl -w net.core.rmem_default=62500000
sudo ethtool -G enp1s0f0 tx 4096 rx 4096
```
# 4. Run OAI CN5G and OAI gNB
## 4.1 Run OAI CN5G
@@ -191,13 +179,28 @@ python3 core-network.py --type start-basic --scenario 1
## 4.2 Run OAI gNB
### USRP B210
```bash
cd ~/openairinterface5g
source oaienv
cd cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf --sa --usrp-tx-thread-config 1
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --sa -E --continuous-tx
```
### USRP N300
```bash
cd ~/openairinterface5g
source oaienv
cd cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --sa --usrp-tx-thread-config 1
```
### USRP X300
```bash
cd ~/openairinterface5g
source oaienv
cd cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --sa --usrp-tx-thread-config 1 -E --continuous-tx
```
# 5. Testing with Quectel RM500Q
@@ -208,10 +211,9 @@ With [PuTTY](https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe), send th
AT+QMBNCFG="Select","ROW_Commercial"
AT+QMBNCFG="AutoSel",0
AT+CFUN=1,1
AT+CGDCONT=1
AT+CGDCONT=1,"IP","oai"
AT+CGDCONT=2
AT+CGDCONT=3
AT+CGDCONT=1,"IP","oai"
# (Optional, debug only, AT commands) Activate PDP context, retrieve IP address and test with ping
AT+CGACT=1,1
@@ -222,7 +224,7 @@ AT+QPING=1,"openairinterface.org"
## 5.2 Ping test
- UE host
```bash
ping 192.168.70.135 -n 1000 -S 12.1.1.2
ping 192.168.70.135 -t -S 12.1.1.2
```
- CN5G host
```bash
@@ -240,5 +242,11 @@ iperf -s -u -i 1 -B 12.1.1.2
- CN5G host
```bash
docker exec -it oai-ext-dn iperf -u -t 86400 -i 1 -fk -B 192.168.70.135 -b 200M -c 12.1.1.2
docker exec -it oai-ext-dn iperf -u -t 86400 -i 1 -fk -B 192.168.70.135 -b 100M -c 12.1.1.2
```
# 6. Advanced configuration (optional)
- If you get real-time problems on heavy UL traffic, reduce the maximum UL MCS using an additional command-line switch: `--MACRLCs.[0].ul_max_mcs 14`.
- There is noise on the DC carriers on N300 and especially the X300 in UL. To avoid their use or shift them away from the center to use more UL spectrum, use the `--tune-offset <Hz>` command line switch, where `<Hz>` is ideally half the bandwidth, or possibly less.
+2 -5
View File
@@ -1,9 +1,6 @@
## Table of Contents ##
**Table of Contents**
1. [Machines](#machines)
2. [Networked devices](#networked-devices)
3. [Testbenches](#testbenches)
4. [Pipelines](#pipelines)
[[_TOC_]]
## Machines
+2 -9
View File
@@ -12,16 +12,9 @@
</tr>
</table>
**TABLE OF CONTENTS**
**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)
[[_TOC_]]
In the following tutorial we describe how to deploy configure and test the two SA OAI setups:
+2 -14
View File
@@ -1,20 +1,8 @@
STATUS 2020/10/15 : added External Resources section and links
**Table of Contents**
## Table of Contents ##
1. [External Resources](#external-resources)
2. [Configuration Overview](#configuration-overview)
3. [SW Repository / Branch](#repository)
4. [Architecture Setup](#architecture-setup)
5. [Build / Install](#build-and-install)
6. [Run / Test](#run-and-test)
7. [Test case](#test-case)
8. [Log file monitoring](#log-file-monitoring)
9. [Required tools for debug](#required-tools-for-debug)
10. [Status of interoperability](#status-of-interoperability)
11. [CI integration](#ci-integration)
[[_TOC_]]
## External Resources
@@ -343,7 +343,6 @@ Initializing RU threads
[PHY] Starting RU 0 (eNodeB_3GPP,synch_to_ext_device),
waiting for sync (ru_thread,-1/0xff4968,0x17af520,0x16952a0)
channel 0, Setting tx_gain offset 0.000000, rx_gain offset 118.000000, tx_freq 2680000000.000000, rx_freq 2560000000.000000
[HW] thread_top_init() called with affinity>0, but overruled by #ifndef CPU_AFFINITY.
[PHY] Initializing frame parms for N_RB_DL 25, Ncp 0, osf 1
[PHY] lte_parms.c: Setting N_RB_DL to 25, ofdm_symbol_size 512
[PHY] Initializing RU signal buffers (if_south local RF) nb_tx 1
@@ -624,10 +623,8 @@ cnx_id 1 assoc_id 904
[PHY] init_eNB_proc(inst:0) RC.nb_CC[inst]:1
[PHY] Initializing eNB processes instance:0 CC_id 0
[PHY] eNB->single_thread_flag:0
[HW] thread_top_init() called with affinity>0, but overruled by #ifndef CPU_AFFINITY.
[HW] [SCHED][eNB] eNB_thread_prach started on CPU 0, sched_policy = SCHED_FIFO , priority = 99, CPU Affinity= CPU_0 CPU_1 CPU_2 CPU_3
[ENB_APP] ALL RUs ready - ALL eNBs ready
[HW] thread_top_init() called with affinity>0, but overruled by #ifndef CPU_AFFINITY.
[HW] [SCHED][eNB] eNB_thread_prach_br started on CPU 0, sched_policy = SCHED_FIFO , priority = 99, CPU Affinity= CPU_0 CPU_1 CPU_2 CPU_3
[ENB_APP] Sending sync to all threads
[MME_APP] Creating MME_APP eNB Task
@@ -1908,4 +1905,4 @@ len = 336
[X2AP] X2 has 1 process ongoing
[X2AP] X2 has 1 process ongoing
[X2AP] X2 has 1 process ongoing


@@ -181,6 +181,8 @@ services:
- UDM_PORT=80
- UDM_API_VERSION=v2
- UDM_FQDN=oai-udm
- INT_ALGO_LIST=["NIA1", "NIA2"]
- CIPH_ALGO_LIST=["NEA0", "NEA2"]
depends_on:
- mysql
- oai-nrf
@@ -272,7 +274,7 @@ services:
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf
- NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff
- NSSAI_SD_0=0x1
- DNN_0=oai
depends_on:
- oai-nrf
@@ -294,6 +296,11 @@ services:
"ip route add 12.1.1.0/24 via 192.168.70.134 dev eth0; sleep infinity"
depends_on:
- oai-spgwu
healthcheck:
test: /bin/bash -c "ip r | grep 12.1.1"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
ipv4_address: 192.168.70.135
+1 -6
View File
@@ -16,12 +16,7 @@
**Table of Contents**
1. [Build Strategy](#1-build-strategy)
2. [File organization](#2-file-organization)
3. [Building using docker under Ubuntu 18.04](#3-building-using-docker-under-ubuntu-1804)
4. [Building using podman under Red Hat Entreprise Linux 8.2](#4-building-using-podman-under-red-hat-entreprise-linux-82)
5. [Running modems using docker under Ubuntu 18.04](#5-running-modems-using-docker-under-ubuntu-1804)
6. [Running modems using podman under Red Hat Entreprise Linux 8.2](#6-running-modems-using-podman-under-red-hat-entreprise-linux-82)
[[_TOC_]]
---
+1 -2
View File
@@ -53,7 +53,7 @@
#define CONFIG_HLP_DLSHIFT "dynamic shift for LLR compuation for TM3/4 (default 0)\n"
#define CONFIG_HLP_PHYTST "test UE phy layer, mac disabled\n"
#define CONFIG_HLP_DORA "test gNB and UE with RA procedures\n"
#define CONFIG_HLP_DMAMAP "sets flag for improved EXMIMO UE performance\n"
#define CONFIG_HLP_DMAMAP "use DMA memory mapping\n"
#define CONFIG_HLP_EXCCLK "tells hardware to use a clock reference (0:internal(default), 1:external, 2:gpsdo)\n"
#define CONFIG_HLP_USIM "use XOR autentication algo in case of test usim mode\n"
#define CONFIG_HLP_NOSNGLT "Disables single-thread mode in lte-softmodem\n"
@@ -62,7 +62,6 @@
#define CONFIG_HLP_ULOFF "Set the uplink frequnecy offset for all component carriers\n"
#define CONFIG_HLP_CHOFF "Channel id offset\n"
#define CONFIG_HLP_SOFTS "Enable soft scope and L1 and L2 stats (Xforms)\n"
#define CONFIG_HLP_EXMCAL "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n"
#define CONFIG_HLP_ITTIL "Generate ITTI analyzser logs (similar to wireshark logs but with more details)\n"
#define CONFIG_HLP_DLMCS_PHYTEST "Set the downlink MCS for PHYTEST mode\n"
#define CONFIG_HLP_DLNL_PHYTEST "Set the downlink nrOfLayers for PHYTEST mode\n"
-2
View File
@@ -34,8 +34,6 @@
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
}
#include "threads_t.h"
extern threads_t threads;
extern uint32_t target_dl_mcs;
extern uint32_t target_dl_Nl;
extern uint32_t target_ul_Nl;
+2 -2
View File
@@ -572,7 +572,7 @@ static void UE_synch(void *arg) {
openair0_cfg[UE->rf_map.card].rx_freq[0],
openair0_cfg[UE->rf_map.card].tx_freq[0]);
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0);
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0]);
if (UE->UE_scan_carrier == 1) {
UE->UE_scan_carrier = 0;
} else {
@@ -591,7 +591,7 @@ static void UE_synch(void *arg) {
LOG_I(PHY, "Initial sync failed: trying carrier off %d Hz\n", freq_offset);
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0);
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0]);
}
}
break;
-1
View File
@@ -67,7 +67,6 @@ extern "C"
#define CONFIG_HLP_ULF "Set the uplink frequency offset for all component carriers\n"
#define CONFIG_HLP_CHOFF "Channel id offset\n"
#define CONFIG_HLP_SOFTS "Enable soft scope and L1 and L2 stats (Xforms)\n"
#define CONFIG_HLP_EXMCAL "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n"
#define CONFIG_HLP_ITTIL "Generate ITTI analyzser logs (similar to wireshark logs but with more details)\n"
#define CONFIG_HLP_DLMCS "Set the maximum downlink MCS\n"
#define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n"
-21
View File
@@ -1,21 +0,0 @@
#ifndef _EXECUTABLES_THREADS_T_H_
#define _EXECUTABLES_THREADS_T_H_
typedef struct threads_s {
int main;
int sync;
int one;
int two;
int three;
int slot1_proc_one;
int slot1_proc_two;
int slot1_proc_three;
//int dlsch_td_one;
//int dlsch_td_two;
//int dlsch_td_three;
//int dlsch_td1_one;
//int dlsch_td1_two;
//int dlsch_td1_three;
} threads_t;
#endif /* _EXECUTABLES_THREADS_T_H_ */
-12
View File
@@ -81,9 +81,6 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
ue->measurements.n0_power_dB[0],
ue->measurements.n0_power_dB[1]);
*/
#ifdef EXMIMO
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]);
#endif
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",ue->rx_total_gain_dB);
len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz, estimated carrier frequency %f Hz\n",ue->common_vars.freq_offset,openair0_cfg[0].rx_freq[0]-ue->common_vars.freq_offset);
len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[ue->UE_mode[0]],ue->UE_mode[0]);
@@ -496,15 +493,6 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
10*log10(ue->measurements.n0_power_tot),
ue->measurements.n0_power_dB[0],
ue->measurements.n0_power_dB[1]);
#ifdef EXMIMO
ue->rx_total_gain_dB = ((int)(10*log10(ue->measurements.rssi)))-input_level_dBm;
len += sprintf(&buffer[len], "[UE PROC] rxg_mode %d, input level (set by user) %d dBm, VGA gain %d dB ==> total gain %3.2f dB, noise figure %3.2f dB\n",
openair0_cfg[0].rxg_mode[0],
input_level_dBm,
(int)openair0_cfg[0].rx_gain[0],
10*log10(ue->measurements.rssi)-input_level_dBm,
10*log10(ue->measurements.n0_power_tot)-ue->rx_total_gain_dB+105);
#endif
}
len += sprintf(&buffer[len],"EOF\n");
-12
View File
@@ -481,18 +481,6 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
((int16_t *)ue->common_vars.txdata[0])[2*i+1] = prach[2*j+1];
}
#if defined(EXMIMO)
// handle switch before 1st TX subframe, guarantee that the slot prior to transmission is switch on
for (k=prach_start - (ue->frame_parms.samples_per_tti>>1) ; k<prach_start ; k++) {
if (k<0)
ue->common_vars.txdata[0][k+ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
else if (k>(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME))
ue->common_vars.txdata[0][k-ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
else
ue->common_vars.txdata[0][k] &= 0xFFFEFFFE;
}
#endif
#if defined(PRACH_WRITE_OUTPUT_DEBUG)
LOG_M("prach_txF0.m","prachtxF0",prachF,prach_len-Ncp,1,1);
@@ -456,7 +456,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
phich_string[fp->phich_config_common.phich_resource],
fp->nb_antenna_ports_gNB);*/
#if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
#if defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
LOG_I(PHY, "[UE %d] Measured Carrier Frequency %.0f Hz (offset %d Hz)\n",
ue->Mod_id,
openair0_cfg[0].rx_freq[0]+ue->common_vars.freq_offset,
-2
View File
@@ -108,7 +108,6 @@ int main(int argc, char **argv) {
//! timing_source
.time_source=internal, //internal gpsdo external
//! Manual SDR IP address
//#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
.sdr_addrs=usrp_addrs,
//! Auto calibration flag
.autocal={0},
@@ -260,7 +259,6 @@ int main(int argc, char **argv) {
/*! \brief Set RX feaquencies
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
* \param exmimo_dump_config dump EXMIMO configuration
* \returns 0 in success
*/
.trx_set_freq_func=NULL,
-7
View File
@@ -48,13 +48,6 @@
#define MAX_CONFIG_FRAMES 4
unsigned short slen; // sequence length in frames, max is 4
/*
#ifdef EXMIMO
const unsigned short config_frames[MAX_CONFIG_FRAMES];
#else
extern const unsigned short config_frames[MAX_CONFIG_FRAMES];
#endif
*/
// function sends the config file "fname" to SMBV through socket sockfd
int smbv_configure_from_file(int sockfd, const char* fname);
-6
View File
@@ -175,15 +175,9 @@
#define NB_ANTENNA_PORTS_ENB 6 // total number of eNB antenna ports
#ifdef EXMIMO
#define TARGET_RX_POWER 55 // Target digital power for the AGC
#define TARGET_RX_POWER_MAX 55 // Maximum digital power, such that signal does not saturate (value found by simulation)
#define TARGET_RX_POWER_MIN 50 // Minimum digital power, anything below will be discarded (value found by simulation)
#else
#define TARGET_RX_POWER 50 // Target digital power for the AGC
#define TARGET_RX_POWER_MAX 65 // Maximum digital power, such that signal does not saturate (value found by simulation)
#define TARGET_RX_POWER_MIN 35 // Minimum digital power, anything below will be discarded (value found by simulation)
#endif
//the min and max gains have to match the calibrated gain table
//#define MAX_RF_GAIN 160
-6
View File
@@ -179,15 +179,9 @@
#define NB_ANTENNA_PORTS_ENB 6 // total number of eNB antenna ports
#ifdef EXMIMO
#define TARGET_RX_POWER 55 // Target digital power for the AGC
#define TARGET_RX_POWER_MAX 55 // Maximum digital power, such that signal does not saturate (value found by simulation)
#define TARGET_RX_POWER_MIN 50 // Minimum digital power, anything below will be discarded (value found by simulation)
#else
#define TARGET_RX_POWER 50 // Target digital power for the AGC
#define TARGET_RX_POWER_MAX 65 // Maximum digital power, such that signal does not saturate (value found by simulation)
#define TARGET_RX_POWER_MIN 35 // Minimum digital power, anything below will be discarded (value found by simulation)
#endif
//the min and max gains have to match the calibrated gain table
//#define MAX_RF_GAIN 160
-10
View File
@@ -143,16 +143,6 @@ void processSlotTX(void *arg);
@param abstraction_flag Indicator of PHY abstraction
@param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
*/
//void phy_procedures_UE_S_TX(PHY_VARS_NR_UE *ue,uint8_t eNB_id,uint8_t abstraction_flag,relaying_type_t r_type);
/*! \brief Scheduling for UE RX procedures in TDD S-subframes.
@param phy_vars_ue Pointer to UE variables on which to act
@param eNB_id Local id of eNB on which to act
@param abstraction_flag Indicator of PHY abstraction
@param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
*/
//void phy_procedures_UE_S_RX(PHY_VARS_NR_UE *ue,uint8_t eNB_id,uint8_t abstraction_flag, relaying_type_t r_type);
/*! \brief Function to compute subframe type as a function of Frame type and TDD Configuration (implements Table 4.2.2 from 36.211, p.11 from version 8.6) and subframe index.
@param frame_parms Pointer to DL frame parameter descriptor
+1 -9
View File
@@ -78,7 +78,7 @@ fifo_dump_emos_UE emos_dump_UE;
char nr_mode_string[NUM_UE_MODE][20] = {"NOT SYNCHED","PRACH","RAR","RA_WAIT_CR", "PUSCH", "RESYNCH"};
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
#if defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
extern uint64_t downlink_frequency[MAX_NUM_CCs][4];
#endif
@@ -1808,14 +1808,6 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
ue->prach_vars[gNB_id]->amp = AMP;
/* #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
tx_amp = get_tx_amp_prach(ue->tx_power_dBm[nr_slot_tx], ue->tx_power_max_dBm, ue->frame_parms.N_RB_UL);
if (tx_amp != -1)
ue->prach_vars[gNB_id]->amp = tx_amp;
#else
ue->prach_vars[gNB_id]->amp = AMP;
#endif */
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_IN);
prach_power = generate_nr_prach(ue, gNB_id, frame_tx, nr_slot_tx);
-34
View File
@@ -1210,19 +1210,6 @@ void ulsch_common_procedures(PHY_VARS_UE *ue,
((short *)ue->common_vars.txdata[aa])[2*k+1] = ((short *)dummy_tx_buffer)[2*l+1];
}
#if defined(EXMIMO)
// handle switch before 1st TX subframe, guarantee that the slot prior to transmission is switch on
for (k=ulsch_start - (frame_parms->samples_per_tti>>1) ; k<ulsch_start ; k++) {
if (k<0)
ue->common_vars.txdata[aa][k+frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
else if (k>(frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME))
ue->common_vars.txdata[aa][k-frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
else
ue->common_vars.txdata[aa][k] &= 0xFFFEFFFE;
}
#endif
/*
only for debug
LOG_I(PHY,"ul-signal [subframe: %d, ulsch_start %d, TA: %d, rxOffset: %d, timing_advance: %d, hw_timing_advance: %d]\n",subframe_tx, ulsch_start, ue->N_TA_offset, ue->rx_offset, ue->timing_advance, ue->hw_timing_advance);
@@ -2236,27 +2223,6 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,
}
}
void phy_procedures_UE_S_TX(PHY_VARS_UE *ue,
uint8_t eNB_id,
uint8_t abstraction_flag) {
int aa;//i,aa;
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
#if defined(EXMIMO) //this is the EXPRESS MIMO case
int i;
// set the whole tx buffer to RX
for (i=0; i<LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti; i++)
ue->common_vars.txdata[aa][i] = 0x00010001;
#else //this is the normal case
// memset(&ue->common_vars.txdata[aa][0],0,
// (LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti)*sizeof(int32_t));
#endif //else EXMIMO
}
}
void ue_measurement_procedures(uint16_t l, // symbol index of each slot [0..6]
PHY_VARS_UE *ue,
UE_rxtx_proc_t *proc,
-8
View File
@@ -70,14 +70,6 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
void *UE_thread_slot1_dl_processing(void *arg);
#endif
/*! \brief Scheduling for UE TX procedures in TDD S-subframes.
@param phy_vars_ue Pointer to UE variables on which to act
@param eNB_id Local id of eNB on which to act
@param abstraction_flag Indicator of PHY abstraction
@param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
*/
void phy_procedures_UE_S_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstraction_flag);
/*! \brief Scheduling for UE RX procedures in TDD S-subframes.
@param phy_vars_ue Pointer to UE variables on which to act
@param eNB_id Local id of eNB on which to act
-9
View File
@@ -29,10 +29,6 @@
* \email: raymond.knopp@eurecom.fr, navid.nikaein@eurecom.fr javier.morgade@ieee.org
*/
#ifdef EXMIMO
#include <pthread.h>
#endif
#include "mac_extern.h"
#include "mac.h"
#include "mac_proto.h"
@@ -2974,11 +2970,6 @@ ue_scheduler(const module_id_t module_idP,
} while (msg_p != NULL);
}
//Mac_rlc_xface->frameP=frameP;
//Rrc_xface->Frame_index=Mac_rlc_xface->frameP;
//if (subframe%5 == 0)
//LG#ifdef EXMIMO
// data to/from NETLINK is treated in pdcp_run.
// one socket is used in multiple UE's L2 FAPI simulator and
// only first UE need to do this.
@@ -364,9 +364,6 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
sdu_mngt_p->sdu_remaining_size,
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
#endif
//#if !EXMIMO
// assert(1!=1);
//#endif
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
// reduce the size of the PDU
continue_fill_pdu_with_sdu = 0;
+11 -5
View File
@@ -111,13 +111,12 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
entity->rb_id, rcvd_count, entity->is_gnb ? 0 : 1);
if (entity->has_integrity) {
unsigned char integrity[4];
unsigned char integrity[4] = {0};
entity->integrity(entity->integrity_context, integrity,
buffer, size - integrity_size,
entity->rb_id, rcvd_count, entity->is_gnb ? 0 : 1);
if (memcmp(integrity, buffer + size - integrity_size, 4) != 0) {
LOG_E(PDCP, "discard NR PDU, integrity failed\n");
// return;
entity->stats.rxpdu_dd_pkts++;
entity->stats.rxpdu_dd_bytes += size;
@@ -220,20 +219,27 @@ static void nr_pdcp_entity_recv_sdu(nr_pdcp_entity_t *entity,
memcpy(buf + header_size, buffer, size);
if (entity->has_integrity)
if (entity->has_integrity){
uint8_t integrity[4] = {0};
entity->integrity(entity->integrity_context,
(unsigned char *)buf + header_size + size,
integrity,
(unsigned char *)buf, header_size + size,
entity->rb_id, count, entity->is_gnb ? 1 : 0);
memcpy((unsigned char *)buf + header_size + size, integrity, 4);
}
// set MAC-I to 0 for SRBs with integrity not active
else if (integrity_size == 4)
memset(buf + header_size + size, 0, 4);
if (entity->has_ciphering)
if (entity->has_ciphering && (entity->is_gnb || entity->security_mode_completed)){
entity->cipher(entity->security_context,
(unsigned char *)buf + header_size, size + integrity_size,
entity->rb_id, count, entity->is_gnb ? 1 : 0);
} else {
entity->security_mode_completed = true;
}
entity->tx_next++;
+14
View File
@@ -22,6 +22,7 @@
#ifndef _NR_PDCP_ENTITY_H_
#define _NR_PDCP_ENTITY_H_
#include <stdbool.h>
#include <stdint.h>
#include "nr_pdcp_sdu.h"
@@ -150,6 +151,19 @@ typedef struct nr_pdcp_entity_t {
int rx_size;
int rx_maxsize;
nr_pdcp_statistics_t stats;
// WARNING: This is a hack!
// 3GPP TS 38.331 (RRC) version 15.3
// Section 5.3.4.3 Reception of the SecurityModeCommand by the UE
// The UE needs to send the Security Mode Complete message. However, the message
// needs to be sent without being ciphered.
// However:
// 1- The Security Mode Command arrives to the UE with the cipher algo (e.g., nea2).
// 2- The UE is configured with the cipher algo.
// 3- The Security Mode Complete message is sent to the itti task queue.
// 4- The ITTI task, forwards the message ciphering (e.g., nea2) it.
// 5- The gNB cannot understand the ciphered Security Mode Complete message.
bool security_mode_completed;
} nr_pdcp_entity_t;
nr_pdcp_entity_t *new_nr_pdcp_entity(
@@ -1267,6 +1267,7 @@ void pdcp_config_set_security(
ciphering_algorithm = security_modeP & 0x0f;
rb->set_security(rb, integrity_algorithm, (char *)kRRCint_pP,
ciphering_algorithm, (char *)kRRCenc_pP);
rb->security_mode_completed = false;
} else {
LOG_E(PDCP, "%s:%d:%s: TODO\n", __FILE__, __LINE__, __FUNCTION__);
exit(1);
@@ -54,14 +54,13 @@ void nr_pdcp_security_nea2_cipher(void *security_context,
unsigned char *buffer, int length,
int bearer, int count, int direction)
{
unsigned char t[16];
unsigned char t[16] = {0};
t[0] = (count >> 24) & 255;
t[1] = (count >> 16) & 255;
t[2] = (count >> 8) & 255;
t[3] = (count ) & 255;
t[4] = ((bearer-1) << 3) | (direction << 2);
memset(&t[5], 0, 16-5);
nettle_ctr_crypt(security_context, nettle_aes128.encrypt,
nettle_aes128.block_size, t,
-4
View File
@@ -85,11 +85,7 @@ int dump_eNB_l2_stats(char *buffer, int length) {
unsigned int stat_timer_reordering_timed_out;
unsigned int stat_timer_poll_retransmit_timed_out;
unsigned int stat_timer_status_prohibit_timed_out;
#ifdef EXMIMO
number_of_cards=1;
#else
number_of_cards=NB_eNB_INST;
#endif
eNB_MAC_INST *eNB;
UE_info_t *UE_info;
+3 -9
View File
@@ -1908,9 +1908,6 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
(LTE_DRB_ToReleaseList_t *)NULL, // DRB2_list,
(struct LTE_SPS_Config *)NULL, // maybe ue_context_pP->ue_context.sps_Config,
(struct LTE_PhysicalConfigDedicated *)ue_context_pP->ue_context.physicalConfigDedicated,
//#ifdef EXMIMO_IOT
// NULL, NULL, NULL,NULL,
//#else
measurements_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL, // MeasObj_list,
measurements_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL, // ReportConfig_list,
measurements_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL, //quantityConfig,
@@ -2889,7 +2886,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
/* Avoid gcc warnings */
(void)PDCP_rlc_AM;
(void)PDCP_rlc_UM;
#ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
#ifdef RRC_DEFAULT_RAB_IS_AM
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
PDCP_rlc_AM->statusReportRequired = false;
@@ -3652,7 +3649,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
/* Avoid gcc warnings */
(void)PDCP_rlc_AM;
(void)PDCP_rlc_UM;
#ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
#ifdef RRC_DEFAULT_RAB_IS_AM
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
PDCP_rlc_AM->statusReportRequired = 0; // FALSE
@@ -5328,7 +5325,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
/* avoid gcc warnings */
(void)PDCP_rlc_AM;
(void)PDCP_rlc_UM;
#ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
#ifdef RRC_DEFAULT_RAB_IS_AM
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
PDCP_rlc_AM->statusReportRequired = 0; // FALSE
@@ -6084,9 +6081,6 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
NULL, // DRB2_list,
(struct LTE_SPS_Config *)NULL, // *sps_Config,
(struct LTE_PhysicalConfigDedicated *)*physicalConfigDedicated,
//#ifdef EXMIMO_IOT
// NULL, NULL, NULL,NULL,
//#else
measurements_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL,
measurements_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL,
measurements_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL,
-8
View File
@@ -959,14 +959,6 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p).security_key);
{
uint8_t send_security_mode_command = true;
#ifndef EXMIMO_IOT
if ((ue_context_p->ue_context.ciphering_algorithm == SecurityAlgorithmConfig__cipheringAlgorithm_eea0)
&& (ue_context_p->ue_context.integrity_algorithm == INTEGRITY_ALGORITHM_NONE)) {
send_security_mode_command = false;
}
#endif
rrc_pdcp_config_security(
&ctxt,
ue_context_p,
+1 -1
View File
@@ -549,7 +549,7 @@ uint16_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
configuration->scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[i]);
}
asn1cCallocOne(UL->frequencyInfoUL.p_Max, 23);
asn1cCallocOne(UL->frequencyInfoUL.p_Max, *configuration->scc->uplinkConfigCommon->frequencyInfoUL->p_Max);
UL->initialUplinkBWP.genericParameters = configuration->scc->uplinkConfigCommon->initialUplinkBWP->genericParameters;
UL->initialUplinkBWP.rach_ConfigCommon = configuration->scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon;
+8 -1
View File
@@ -1071,7 +1071,14 @@ void config_uplinkBWP(NR_BWP_Uplink_t *ubwp,
ubwp->bwp_Common->rach_ConfigCommon = is_SA ? NULL : scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon;
ubwp->bwp_Common->pusch_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon;
ubwp->bwp_Common->pucch_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon;
ubwp->bwp_Common->pucch_ConfigCommon = CALLOC(1,sizeof(struct NR_SetupRelease_PUCCH_ConfigCommon));
ubwp->bwp_Common->pucch_ConfigCommon->present= NR_SetupRelease_PUCCH_ConfigCommon_PR_setup;
ubwp->bwp_Common->pucch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PUCCH_ConfigCommon));
struct NR_PUCCH_ConfigCommon *pucch_ConfigCommon = ubwp->bwp_Common->pucch_ConfigCommon->choice.setup;
pucch_ConfigCommon->pucch_ResourceCommon = NULL; // for BWP != 0 as per 38.213 section 9.2.1
pucch_ConfigCommon->pucch_GroupHopping = scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_GroupHopping;
pucch_ConfigCommon->hoppingId = scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->hoppingId;
pucch_ConfigCommon->p0_nominal = scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->p0_nominal;
if (!ubwp->bwp_Dedicated) {
ubwp->bwp_Dedicated = calloc(1,sizeof(*ubwp->bwp_Dedicated));
@@ -0,0 +1,192 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "PduSessionEstablishmentAccept.h"
#include "common/utils/LOG/log.h"
#include "nr_nas_msg_sim.h"
#include "openair2/RRC/NAS/nas_config.h"
#include "openair2/SDAP/nr_sdap/nr_sdap.h"
extern char *baseNetAddress;
void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_length)
{
uint8_t offset = 0;
security_protected_nas_5gs_msg_t sec_nas_hdr;
security_protected_plain_nas_5gs_msg_t sec_nas_msg;
pdu_session_establishment_accept_msg_t psea_msg;
sec_nas_hdr.epd = *(buffer + (offset++));
sec_nas_hdr.sht = *(buffer + (offset++));
sec_nas_hdr.mac = htonl(*(uint32_t *)(buffer + offset));
offset+=sizeof(sec_nas_hdr.mac);
sec_nas_hdr.sqn = *(buffer + (offset++));
sec_nas_msg.epd = *(buffer + (offset++));
sec_nas_msg.sht = *(buffer + (offset++));
sec_nas_msg.msg_type = *(buffer + (offset++));
sec_nas_msg.payload_type = *(buffer + (offset++));
sec_nas_msg.payload_len = htons(*(uint16_t *)(buffer + offset));
offset+=sizeof(sec_nas_msg.payload_len);
/* Mandatory Presence IEs */
psea_msg.epd = *(buffer + (offset++));
psea_msg.pdu_id = *(buffer + (offset++));
psea_msg.pti = *(buffer + (offset++));
psea_msg.msg_type = *(buffer + (offset++));
psea_msg.pdu_type = *(buffer + offset) & 0x0f;
psea_msg.ssc_mode = (*(buffer + (offset++)) & 0xf0) >> 4;
psea_msg.qos_rules.length = htons(*(uint16_t *)(buffer + offset));
offset+=sizeof(psea_msg.qos_rules.length);
/* Supports the capture of only one QoS Rule, it should be changed for multiple QoS Rules */
qos_rule_t qos_rule;
qos_rule.id = *(buffer + (offset++));
qos_rule.length = htons(*(uint16_t *)(buffer + offset));
offset+=sizeof(qos_rule.length);
qos_rule.oc = (*(buffer + offset) & 0xE0) >> 5;
qos_rule.dqr = (*(buffer + offset) & 0x10) >> 4;
qos_rule.nb_pf = *(buffer + (offset++)) & 0x0F;
if(qos_rule.nb_pf) {
packet_filter_t pf;
if(qos_rule.oc == ROC_CREATE_NEW_QOS_RULE ||
ROC_MODIFY_QOS_RULE_ADD_PF ||
ROC_MODIFY_QOS_RULE_REPLACE_PF) {
pf.pf_type.type_1.pf_dir = (*(buffer + offset) & 0x30) >> 4;
pf.pf_type.type_1.pf_id = *(buffer + offset++) & 0x0F;
pf.pf_type.type_1.length = *(buffer + offset++);
offset += (qos_rule.nb_pf * pf.pf_type.type_1.length); /* Ommit the Packet filter List */
} else if (qos_rule.oc == ROC_MODIFY_QOS_RULE_DELETE_PF) {
offset += qos_rule.nb_pf;
}
}
qos_rule.prcd = *(buffer + offset++);
qos_rule.qfi = *(buffer + offset++);
psea_msg.sess_ambr.length = *(buffer + offset++);
offset += psea_msg.sess_ambr.length; /* Ommit the Seassion-AMBR */
/* Optional Presence IEs */
uint8_t psea_iei = *(buffer + offset++);
while(offset < msg_length) {
switch (psea_iei) {
case IEI_5GSM_CAUSE: /* Ommited */
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received 5GSM Cause IEI\n");
offset++;
break;
case IEI_PDU_ADDRESS:
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received PDU Address IE\n");
psea_msg.pdu_addr_ie.pdu_length = *(buffer + offset++);
psea_msg.pdu_addr_ie.pdu_type = *(buffer + offset++);
if (psea_msg.pdu_addr_ie.pdu_type == PDU_SESSION_TYPE_IPV4) {
psea_msg.pdu_addr_ie.pdu_addr_oct1 = *(buffer + offset++);
psea_msg.pdu_addr_ie.pdu_addr_oct2 = *(buffer + offset++);
psea_msg.pdu_addr_ie.pdu_addr_oct3 = *(buffer + offset++);
psea_msg.pdu_addr_ie.pdu_addr_oct4 = *(buffer + offset++);
nas_getparams();
sprintf(baseNetAddress, "%d.%d", psea_msg.pdu_addr_ie.pdu_addr_oct1, psea_msg.pdu_addr_ie.pdu_addr_oct2);
nas_config(1, psea_msg.pdu_addr_ie.pdu_addr_oct3, psea_msg.pdu_addr_ie.pdu_addr_oct4, "oaitun_ue");
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received UE IP: %d.%d.%d.%d\n",
psea_msg.pdu_addr_ie.pdu_addr_oct1,
psea_msg.pdu_addr_ie.pdu_addr_oct2,
psea_msg.pdu_addr_ie.pdu_addr_oct3,
psea_msg.pdu_addr_ie.pdu_addr_oct4);
} else {
offset += psea_msg.pdu_addr_ie.pdu_length;
}
psea_iei = *(buffer + offset++);
break;
case IEI_RQ_TIMER_VALUE: /* Ommited */
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received RQ timer value IE\n");
offset++; /* TS 24.008 10.5.7.3 */
psea_iei = *(buffer + offset++);
break;
case IEI_SNSSAI: /* Ommited */
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received S-NSSAI IE\n");
uint8_t snssai_length = *(buffer + offset);
offset += (snssai_length + sizeof(snssai_length));
psea_iei = *(buffer + offset++);
break;
case IEI_ALWAYSON_PDU: /* Ommited */
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received Always-on PDU Session indication IE\n");
offset++;
psea_iei = *(buffer + offset++);
break;
case IEI_MAPPED_EPS: /* Ommited */
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received Mapped EPS bearer context IE\n");
uint16_t mapped_eps_length = htons(*(uint16_t *)(buffer + offset));
offset += mapped_eps_length;
psea_iei = *(buffer + offset++);
break;
case IEI_EAP_MSG: /* Ommited */
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received EAP message IE\n");
uint16_t eap_length = htons(*(uint16_t *)(buffer + offset));
offset += (eap_length + sizeof(eap_length));
psea_iei = *(buffer + offset++);
break;
case IEI_AUTH_QOS_DESC: /* Ommited */
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received Authorized QoS flow descriptions IE\n");
psea_msg.qos_fd_ie.length = htons(*(uint16_t *)(buffer + offset));
offset += (psea_msg.qos_fd_ie.length + sizeof(psea_msg.qos_fd_ie.length));
psea_iei = *(buffer + offset++);
break;
case IEI_EXT_CONF_OPT: /* Ommited */
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received Extended protocol configuration options IE\n");
psea_msg.ext_pp_ie.length = htons(*(uint16_t *)(buffer + offset));
offset += (psea_msg.ext_pp_ie.length + sizeof(psea_msg.ext_pp_ie.length ));
psea_iei = *(buffer + offset++);
break;
case IEI_DNN:
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received DNN IE\n");
psea_msg.dnn_ie.dnn_length = *(buffer + offset++);
uint8_t i=0;
char apn[20];
while (*(buffer + offset + i) != ASCII_ACK) {
apn[i] = *(buffer + offset + i);
++i;
}
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - APN: %s\n", apn);
offset += psea_msg.dnn_ie.dnn_length;
psea_iei = *(buffer + offset++);
break;
default:
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Not known IE\n");
offset = msg_length;
break;
}
}
set_qfi_pduid(qos_rule.qfi, psea_msg.pdu_id);
return;
}
@@ -0,0 +1,162 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef PDU_SESSION_ESTABLISHMENT_ACCEPT_H_
#define PDU_SESSION_ESTABLISHMENT_ACCEPT_H_
#include <stdint.h>
/* PDU Session Establish Accept Optional IE Identifiers - TS 24.501 Table 8.3.2.1.1 */
#define IEI_5GSM_CAUSE 0x59 /* 5GSM cause 9.11.4.2 */
#define IEI_PDU_ADDRESS 0x29 /* PDU address 9.11.4.10 */
#define IEI_RQ_TIMER_VALUE 0x56 /* GPRS timer 9.11.2.3 */
#define IEI_SNSSAI 0x22 /* S-NSSAI 9.11.2.8 */
#define IEI_ALWAYSON_PDU 0x80 /* Always-on PDU session indication 9.11.4.3 */
#define IEI_MAPPED_EPS 0x75 /* Mapped EPS bearer contexts 9.11.4.8 */
#define IEI_EAP_MSG 0x78 /* EAP message 9.11.2.2 */
#define IEI_AUTH_QOS_DESC 0x79 /* QoS flow descriptions 9.11.4.12 */
#define IEI_EXT_CONF_OPT 0x7b /* Extended protocol configuration options 9.11.4.6 */
#define IEI_DNN 0x25 /* DNN 9.11.2.1B */
/* PDU Session type value - TS 24.501 Table 9.11.4.10.1*/
#define PDU_SESSION_TYPE_IPV4 0b001
#define PDU_SESSION_TYPE_IPV6 0b010
#define PDU_SESSION_TYPE_IPV4V6 0b011
/* Rule operation codes - TS 24.501 Table 9.11.4.13.1 */
#define ROC_RESERVED_0 0b000 /* Reserved */
#define ROC_CREATE_NEW_QOS_RULE 0b001 /* Create new QoS rule */
#define ROC_DELETE_QOS_RULE 0b010 /* Delete existing QoS rule */
#define ROC_MODIFY_QOS_RULE_ADD_PF 0b011 /* Modify existing QoS rule and add packet filters */
#define ROC_MODIFY_QOS_RULE_REPLACE_PF 0b100 /* Modify existing QoS rule and replace all packet filters */
#define ROC_MODIFY_QOS_RULE_DELETE_PF 0b101 /* Modify existing QoS rule and delete packet filters */
#define ROC_MODIFY_QOS_RULE_WITHOUT_PF 0b110 /* Modify existing QoS rule without modifying packet filters */
#define ROC_RESERVED_1 0b111 /* Reserved */
/* DNN - ASCII Codes */
#define ASCII_ACK 0x06 /* Delimiter in the DNN IEI */
/* Mandatory Presence IE - TS 24.501 Table 8.3.2.1.1 */
typedef struct packet_filter_create_qos_rule_s {
uint8_t pf_dir; /* Packet filter direction */
uint8_t pf_id; /* Packet filter identifier */
uint8_t length; /* Length of packet filter contents */
} packet_filter_type1_t; /* TS 24.501 Figure 9.11.4.13.3 */
typedef struct packet_filter_modify_qos_rule_s {
uint8_t pf_id; /* Packet filter identifier */
} packet_filter_type2_t; /* TS 24.501 Figure 9.11.4.13.4 */
typedef struct packet_filter_s {
union pf_type {
packet_filter_type1_t type_1;
packet_filter_type2_t type_2;
} pf_type;
} packet_filter_t;
typedef struct qos_rule_s {
uint8_t id; /* QoS rule identifier */
uint16_t length; /* Length of QoS Rule */
uint8_t oc; /* Rule operation code (3bits) */
uint8_t dqr; /* DQR bit (1 bit) */
uint8_t nb_pf; /* Number of packet filters (4 bits) */
uint8_t prcd; /* QoS rule precedence */
uint8_t qfi; /* QoS Flow Identifier */
} qos_rule_t;
typedef struct auth_qos_rules_s {
uint16_t length; /* Length of QoS rules IE */
} auth_qos_rule_t; /* QoS Rule as defined in 24.501 Figure 9.11.4.13.2 */
typedef struct session_ambr_s {
uint8_t length; /* Length of Session-AMBR contents */
uint8_t unit_dl; /* Unit for Session-AMBR for downlink */
uint16_t sess_dl; /* Session-AMBR for downlink */
uint8_t unit_ul; /* Unit for Session-AMBR for uplink */
uint16_t sess_ul; /* Session-AMBR for uplink */
} session_ambr_t; /* TS 24.501 Figure 9.11.4.14.1 */
/* Optional Presence IE - TS 24.501 Table 8.3.2.1.1 */
typedef struct pdu_address_s {
uint8_t pdu_iei; /* PDU Address IEI (0x29) */
uint8_t pdu_length; /* Length of PDU address contents */
uint8_t pdu_type; /* PDU session type value */
uint8_t pdu_addr_oct1; /* PDU address information (1st Octet)*/
uint8_t pdu_addr_oct2; /* PDU address information (2nd Octet)*/
uint8_t pdu_addr_oct3; /* PDU address information (3rd Octet)*/
uint8_t pdu_addr_oct4; /* PDU address information (4th Octet)*/
} pdu_address_t; /* TS 24.501 9.11.4.10 */
typedef struct dnn_s {
uint8_t dnn_iei; /* DNN IEI (0x25) */
uint8_t dnn_length; /* Length of DNN contents */
} dnn_t; /* TS 24.501 9.11.2.1A */
typedef struct ext_pP_t {
uint16_t length;
} ext_pP_t; /* TS 24.008 10.5.6.3A - Ommited, only length is processed*/
typedef struct qos_fd_s {
uint16_t length;
} qos_fd_t; /* TS 24.501 9.11.4.12 - Ommited, only length is processed*/
typedef struct pdu_session_establishment_accept_msg_s {
/* Mandatory presence */
uint8_t epd; /* Extended Protocol Discriminator */
uint8_t pdu_id; /* PDU Session ID */
uint8_t pti; /* Procedure Transaction Identity */
uint8_t msg_type; /* Message Type */
uint8_t pdu_type; /* PDU Session Type */
uint8_t ssc_mode; /* SSC mode */
auth_qos_rule_t qos_rules; /* Authorized QoS rules */
session_ambr_t sess_ambr; /* Session-AMBR */
/* Optional presence */
dnn_t dnn_ie; /* Data Network Name */
pdu_address_t pdu_addr_ie; /* PDU Address */
ext_pP_t ext_pp_ie; /* Extended Protocol Configuration Options */
qos_fd_t qos_fd_ie; /* QoS flow descriptions */
} pdu_session_establishment_accept_msg_t; /* 24.501 Table 8.3.2.1.1 */
typedef struct security_protected_plain_nas_5gs_msg_s {
uint8_t epd; /* Extended Protocol Discriminator */
uint8_t sht; /* Security Header Type */
uint8_t msg_type; /* Message Type */
uint8_t payload_type; /* Payload Container Type */
uint16_t payload_len; /* Payload Container Length */
} security_protected_plain_nas_5gs_msg_t;
typedef struct security_protected_nas_5gs_msg_s {
uint8_t epd; /* Extended Protocol Discriminator */
uint8_t sht; /* Security Header Type */
uint32_t mac; /* Message Authentication Code */
uint8_t sqn; /* Sequence Number */
} security_protected_nas_5gs_msg_t; /* 24.501 Figure 9.1.1.2 */
void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_length);
#endif
+3 -36
View File
@@ -38,6 +38,7 @@
#include "aka_functions.h"
#include "secu_defs.h"
#include "PduSessionEstablishRequest.h"
#include "PduSessionEstablishmentAccept.h"
#include "intertask_interface.h"
#include "openair2/RRC/NAS/nas_config.h"
#include <openair3/UICC/usim_interface.h>
@@ -908,42 +909,8 @@ void *nas_nrue_task(void *args_p)
LOG_I(NAS, "Send NAS_UPLINK_DATA_REQ message(PduSessionEstablishRequest)\n");
}
} else if(msg_type == FGS_PDU_SESSION_ESTABLISHMENT_ACC){
uint8_t offset = 0;
uint8_t *payload_container = NULL;
offset += SECURITY_PROTECTED_5GS_NAS_MESSAGE_HEADER_LENGTH;
uint16_t payload_container_length = htons(((dl_nas_transport_t *)(pdu_buffer + offset))->payload_container_length);
if ((payload_container_length >= PAYLOAD_CONTAINER_LENGTH_MIN) && (payload_container_length <= PAYLOAD_CONTAINER_LENGTH_MAX)) {
offset += (PLAIN_5GS_NAS_MESSAGE_HEADER_LENGTH + 3);
}
if (offset < NAS_CONN_ESTABLI_CNF(msg_p).nasMsg.length) {
payload_container = pdu_buffer + offset;
}
offset = 0;
uint8_t pdu_id = *(pdu_buffer+14);
while(offset < payload_container_length) {
// Fixme: this is not good 'type' 0x29 searching in TLV like structure
// AND fix dirsty code copy hereafter of the same!!!
if (*(payload_container + offset) == 0x29) { // PDU address IEI
if ((*(payload_container+offset+1) == 0x05) && (*(payload_container +offset+2) == 0x01)) { // IPV4
nas_getparams();
sprintf(baseNetAddress, "%d.%d", *(payload_container+offset+3), *(payload_container+offset+4));
int third_octet = *(payload_container+offset+5);
int fourth_octet = *(payload_container+offset+6);
LOG_I(NAS, "Received PDU Session Establishment Accept, UE IP: %d.%d.%d.%d\n",
*(payload_container+offset+3), *(payload_container+offset+4),
*(payload_container+offset+5), *(payload_container+offset+6));
nas_config(1,third_octet,fourth_octet,"oaitun_ue");
}
}
if (*(payload_container + offset) == 0x79) {
uint8_t qfi = *(payload_container+offset+3);
set_qfi_pduid(qfi, pdu_id);
break;
}
offset++;
}
}
capture_pdu_session_establishment_accept_msg(pdu_buffer, NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.length);
}
break;
}
@@ -1,136 +0,0 @@
/* ********** ********** ********** ********** ********** ********** ********** */
Requirements:
-------------
- Previous kernel module/libraries shall be uninstalled !!!
- cf. command line below "SYRTEM_IQ_uninstall_previous_SW.sh"
./SYRTEM_IQ_unload_previous_SW.sh
- You shall have SYRIQ1.4.6nr.tar.gz
- Ubuntu kernel version is restricted to:
- Kernel 4.15.0-20-lowlatency (Ubuntu 18.04)
- Kernel 4.10.0-42-lowlatency (Ubuntu 17.04)
- Kernel 3.19.0-61-lowlatency (Ubuntu 14.04)
- ADRV9371+ZC706 PCIe board shall be switched on
- PC shall be reboot once ADRV9371+ZC706 PCIe board is switched on
mkdir eur_oai_develop-nr
cd eur_oai_develop-nr
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
cd openairinterface5g
git checkout 375-syrtem-sdr-platform
or
git checkout develop-nr (after merge request accepted)
./sdr/ADRV9371_ZC706/SYRTEM_IQ_uninstall_previous_SW.sh
-> Reading package lists... Done
-> Building dependency tree
-> Reading state information... Done
-> linux-headers-4.15.0-20-lowlatency is already the newest version (4.15.0-20.21).
-> 0 upgraded, 0 newly installed, 0 to remove and 327 not upgraded.
-> Previous SYRIQ is loaded!
-> previous SYRIQ is unloaded!
-> previous SYRIQ is uninstall!
-> Previous SYRIQ uninstallation is done
/* ********** ********** ********** ********** ********** ********** ********** */
UE:
---
configuration:
--------------
sudo apt update
sudo apt-get update
tar -xvzf SYRIQ1.4.6nr.tar.gz
./SYRIQplatformR1.4.6nr_install.sh
sudo reboot
sudo lspci -vv | grep Xilinx
sudo lspci -vv -s 02:00.0 | grep LnkSta
sudo lspci -vv -s 03:00.0 | grep LnkSta
sudo lspci -vv -s 02:00.0 | grep Interr
sudo lspci -vv -s 03:00.0 | grep Interr
sudo gedit /usr/local/etc/syriq/cpu-irq.sh
echo '1' > /proc/irq/49/smp_affinity_list
echo '5' > /proc/irq/48/smp_affinity_list
gedit oaienv
export IIOD_REMOTE=192.168.1.11
compilation:
------------
sudo cset shield --reset
cd eur_oai_develop-nr/openairinterface5g/
source oaienv
sudo -E ./cmake_targets/build_oai -c --nrUE -w ADRV9371_ZC706 -I
sudo -E ./cmake_targets/build_oai -c --nrUE -w ADRV9371_ZC706
run:
----
source oaienv
sudo -E /usr/local/etc/syriq/cpu-irq.sh
sudo -E cset shield -e ./cmake_targets/ran_build/nr-uesoftmodem -- --numerology 1 -r 106 -C 3510000000 --loop-memory --rf-config-file /usr/local/etc/syriq/ue.band22.tm1.PRB100.NR40.dat
/* ********** ********** ********** ********** ********** ********** ********** */
gNB:
----
configuration:
--------------
sudo apt update
sudo apt-get update
tar -xvzf SYRIQ1.4.6nr.tar.gz
./SYRIQplatformR1.4.6nr_install.sh
sudo reboot
sudo lspci -vv | grep Xilinx
sudo lspci -vv -s 02:00.0 | grep LnkSta
sudo lspci -vv -s 02:00.0 | grep Interr
sudo gedit /usr/local/etc/syriq/cpu-irq.sh
echo '1' > /proc/irq/46/smp_affinity_list
gedit oaienv
export IIOD_REMOTE=192.168.1.21
compilation:
------------
sudo cset shield --reset
cd eur_oai_develop-nr/openairinterface5g/
source oaienv
sudo -E ./cmake_targets/build_oai -c --gNB -w ADRV9371_ZC706 -I --enable-cpu-affinity
/* CPU available shall be mapped on CPU2 to get_nprocs() number with hyperthreading disabled */
/* because : */
/* - cset shield leave CPU0 for system */
/* - CPU1 is reserved for HwRxTx thread for I/Q acquisition ! */
/* Note: "/usr/local/etc/syriq/cpu-irq.sh" shall be changed if more than 8 cores are used */
/* ie. "cset shield --force --kthread on -c 1-7" where "-c 1-7" reserves CPU1 to CPU7 for application (CPU0 is for system) */
sudo -E ./cmake_targets/build_oai -c --gNB -w ADRV9371_ZC706 --enable-cpu-affinity
run:
----
source oaienv
sudo -E /usr/local/etc/syriq/cpu-irq.sh
sudo -E cset shield -e ./cmake_targets/ran_build/build/nr-softmodem -- -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band22.tm1.106PRB.adrv9371zc706.conf --rf-config-file /usr/local/etc/syriq/gnb.band22.tm1.PRB100.NR40_hwgain15.dat
@@ -1,28 +0,0 @@
# Previous SYRIQ uninstall
#!/bin/sh
MODULE="riffa"
KERNEL_VERSION=$(uname -r)
RHR=/etc/redhat-release
sudo apt-get install -y linux-headers-`uname -r`
if lsmod | grep "$MODULE" &> /dev/null ; then
echo "Previous SYRIQ is loaded!"
sudo rmmod $MODULE
echo " -> previous SYRIQ is unloaded!"
sudo rm -f /usr/local/lib/libriffa.so*
sudo rm -f /usr/local/include/riffa.h
sudo rm -f /usr/local/include/riffa_driver.h
sudo rm -f /etc/ld.so.conf.d/riffa.conf
sudo rm -rf /lib/modules/$KERNEL_VERSION/kernel/drivers/riffa
sudo rm -f /etc/udev/rules.d/99-riffa.rules
sudo sed -i '/riffa/d' /etc/modules
sudo ldconfig
sudo depmod
echo " -> previous SYRIQ is uninstall!"
echo "Previous SYRIQ uninstallation is done"
exit 0
else
echo "Previous SYRIQ is not loaded!"
exit 1
fi
+1 -4
View File
@@ -284,12 +284,9 @@ int trx_brf_stop(openair0_device* device)
/*! \brief Set frequencies (TX/RX)
* \param device the hardware to use
* \param openair0_cfg1 openair0 Config structure (ignored. It is there to comply with RF common API)
* \param exmimo_dump_config (ignored)
* \returns 0 in success
*/
int trx_brf_set_freq(openair0_device* device,
openair0_config_t *openair0_cfg1,
int exmimo_dump_config)
int trx_brf_set_freq(openair0_device* device, openair0_config_t *openair0_cfg1)
{
int status;
brf_state_t *brf = (brf_state_t *)device->priv;
-2
View File
@@ -45,7 +45,6 @@
const char* devtype_names[MAX_RF_DEV_TYPE] = {
"",
"EXMIMO",
"USRP B200",
"USRP X300",
"USRP N300",
@@ -54,7 +53,6 @@ const char* devtype_names[MAX_RF_DEV_TYPE] = {
"LMSSDR",
"IRIS",
"No HW",
"ADRV9371_ZC706",
"UEDv2",
"RFSIMULATOR"
};
+1 -7
View File
@@ -83,8 +83,6 @@ typedef enum {
*/
typedef enum {
MIN_RF_DEV_TYPE = 0,
/*!\brief device is ExpressMIMO */
EXMIMO_DEV,
/*!\brief device is USRP B200/B210*/
USRP_B200_DEV,
/*!\brief device is USRP X300/X310*/
@@ -101,8 +99,6 @@ typedef enum {
IRIS_DEV,
/*!\brief device is NONE*/
NONE_DEV,
/*!\brief device is ADRV9371_ZC706 */
ADRV9371_ZC706_DEV,
/*!\brief device is UEDv2 */
UEDv2_DEV,
RFSIMULATOR,
@@ -226,7 +222,6 @@ typedef struct {
//! timing_source
clock_source_t time_source;
//! Manual SDR IP address
//#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
char *sdr_addrs;
//! Auto calibration flag
int autocal[4];
@@ -500,10 +495,9 @@ struct openair0_device_t {
/*! \brief Set RX feaquencies
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
* \param exmimo_dump_config dump EXMIMO configuration
* \returns 0 in success
*/
int (*trx_set_freq_func)(openair0_device *device, openair0_config_t *openair0_cfg,int exmimo_dump_config);
int (*trx_set_freq_func)(openair0_device *device, openair0_config_t *openair0_cfg);
/*! \brief Set gains
* \param device the hardware to use
+1 -3
View File
@@ -252,9 +252,7 @@ int trx_eth_stop(openair0_device *device) {
}
int trx_eth_set_freq(openair0_device* device,
openair0_config_t *openair0_cfg,
int exmimo_dump_config)
int trx_eth_set_freq(openair0_device* device, openair0_config_t *openair0_cfg)
{
return(0);
}
+1 -3
View File
@@ -57,9 +57,7 @@ int trx_benetel_stop(openair0_device *device)
}
int trx_benetel_set_freq(openair0_device* device,
openair0_config_t *openair0_cfg,
int exmimo_dump_config)
int trx_benetel_set_freq(openair0_device* device, openair0_config_t *openair0_cfg)
{
printf("BENETEL: %s\n", __FUNCTION__);
return(0);
+1 -3
View File
@@ -56,9 +56,7 @@ int trx_benetel_stop(openair0_device *device)
}
int trx_benetel_set_freq(openair0_device* device,
openair0_config_t *openair0_cfg,
int exmimo_dump_config)
int trx_benetel_set_freq(openair0_device* device, openair0_config_t *openair0_cfg)
{
printf("BENETEL: %s\n", __FUNCTION__);
return(0);
+50 -64
View File
@@ -88,7 +88,7 @@ static int trx_iris_start(openair0_device *device) {
for (r = 0; r < s->device_num; r++) {
int ret = s->iris[r]->activateStream(s->rxStream[r], flags, timeNs, 0);
int ret2 = s->iris[r]->activateStream(s->txStream[r]);
if (ret < 0 | ret2 < 0)
if (ret < 0 || ret2 < 0)
return -1;
}
return 0;
@@ -135,12 +135,7 @@ static void trx_iris_end(openair0_device *device) {
static int
trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) {
using namespace std::chrono;
static long long int loop = 0;
static long time_min = 0, time_max = 0, time_avg = 0;
struct timespec tp_start, tp_end;
long time_diff;
int ret = 0, ret_i = 0;
int flag = 0;
iris_state_t *s = (iris_state_t *) device->priv;
@@ -161,20 +156,17 @@ trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buf
}
}
clock_gettime(CLOCK_MONOTONIC_RAW, &tp_start);
// This hack was added by cws to help keep packets flowing
if (flags)
flag |= SOAPY_SDR_HAS_TIME;
else {
long long tempHack = s->iris[0]->getHardwareTime("");
return nsamps;
}
if (flags == 2 || flags == 1) { // start of burst
} else if (flags == 3 | flags == 4) {
} else if (flags == 3 || flags == 4) {
flag |= SOAPY_SDR_END_BURST;
}
@@ -196,7 +188,7 @@ trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buf
printf("\n");
//printf("\nHardware time before write: %lld, tx_time_stamp: %lld\n", s->iris[0]->getHardwareTime(""), timeNs);
#endif
ret = s->iris[r]->writeStream(s->txStream[r], (void **) samps, (size_t)(nsamps), flag, timeNs, 1000000);
const int ret = s->iris[r]->writeStream(s->txStream[r], (void **) samps, (size_t)(nsamps), flag, timeNs, 1000000);
if (ret < 0)
printf("Unable to write stream!\n");
@@ -231,7 +223,7 @@ static int trx_iris_read(openair0_device *device, openair0_timestamp *ptimestamp
bool time_set = false;
long long timeNs = 0;
int flags;
int samples_received;
int samples_received = 0;
uint32_t *samps[2]; //= (uint32_t **)buff;
int r;
@@ -255,7 +247,7 @@ static int trx_iris_read(openair0_device *device, openair0_timestamp *ptimestamp
if (ret < 0) {
if (ret == SOAPY_SDR_TIME_ERROR)
printf("[recv] Time Error in tx stream!\n");
else if (ret == SOAPY_SDR_OVERFLOW | (flags & SOAPY_SDR_END_ABRUPT))
else if (ret == SOAPY_SDR_OVERFLOW || (flags & SOAPY_SDR_END_ABRUPT))
printf("[recv] Overflow occured!\n");
else if (ret == SOAPY_SDR_TIMEOUT)
printf("[recv] Timeout occured!\n");
@@ -344,15 +336,16 @@ void *set_freq_thread(void *arg) {
device->openair0_cfg[0].rx_freq[0]);
// add check for the number of channels in the cfg
for (r = 0; r < s->device_num; r++) {
for (i = 0; i < s->iris[r]->getNumChannels(SOAPY_SDR_RX); i++) {
for (i = 0; i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_RX); i++) {
if (i < s->rx_num_channels)
s->iris[r]->setFrequency(SOAPY_SDR_RX, i, "RF", device->openair0_cfg[0].rx_freq[i]);
}
for (i = 0; i < s->iris[r]->getNumChannels(SOAPY_SDR_TX); i++) {
for (i = 0; i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_TX); i++) {
if (i < s->tx_num_channels)
s->iris[r]->setFrequency(SOAPY_SDR_TX, i, "RF", device->openair0_cfg[0].tx_freq[i]);
}
}
return NULL;
}
/*! \brief Set frequencies (TX/RX)
@@ -361,31 +354,26 @@ void *set_freq_thread(void *arg) {
* \param dummy dummy variable not used
* \returns 0 in success
*/
int trx_iris_set_freq(openair0_device *device, openair0_config_t *openair0_cfg, int dont_block) {
iris_state_t *s = (iris_state_t *) device->priv;
pthread_t f_thread;
if (dont_block)
pthread_create(&f_thread, NULL, set_freq_thread, (void *) device);
else {
int r, i;
for (r = 0; r < s->device_num; r++) {
printf("Setting Iris TX Freq %f, RX Freq %f\n", openair0_cfg[0].tx_freq[0], openair0_cfg[0].rx_freq[0]);
for (i = 0; i < s->iris[r]->getNumChannels(SOAPY_SDR_RX); i++) {
if (i < s->rx_num_channels) {
s->iris[r]->setFrequency(SOAPY_SDR_RX, i, "RF", openair0_cfg[0].rx_freq[i]);
}
}
for (i = 0; i < s->iris[r]->getNumChannels(SOAPY_SDR_TX); i++) {
if (i < s->tx_num_channels) {
s->iris[r]->setFrequency(SOAPY_SDR_TX, i, "RF", openair0_cfg[0].tx_freq[i]);
}
}
}
int trx_iris_set_freq(openair0_device *device, openair0_config_t *openair0_cfg)
{
iris_state_t *s = (iris_state_t *)device->priv;
int r, i;
for (r = 0; r < s->device_num; r++) {
printf("Setting Iris TX Freq %f, RX Freq %f\n", openair0_cfg[0].tx_freq[0], openair0_cfg[0].rx_freq[0]);
for (i = 0; i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_RX); i++) {
if (i < s->rx_num_channels) {
s->iris[r]->setFrequency(SOAPY_SDR_RX, i, "RF", openair0_cfg[0].rx_freq[i]);
}
}
return (0);
for (i = 0; i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_TX); i++) {
if (i < s->tx_num_channels) {
s->iris[r]->setFrequency(SOAPY_SDR_TX, i, "RF", openair0_cfg[0].tx_freq[i]);
}
}
}
return (0);
}
/*! \brief Set Gains (TX/RX)
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
@@ -499,11 +487,9 @@ extern "C" {
*/
int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
size_t i, r, card;
int bw_gain_adjust = 0;
openair0_cfg[0].rx_gain_calib_table = calib_table_iris;
iris_state_t *s = (iris_state_t *) malloc(sizeof(iris_state_t));
memset(s, 0, sizeof(iris_state_t));
iris_state_t *s = (iris_state_t *) calloc(1, sizeof(*s));
std::string devFE("DEV");
std::string cbrsFE("CBRS");
@@ -580,7 +566,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
exit(-1);
}
for (r = 0; r < s->device_num; r++) {
for (int r = 0; r < s->device_num; r++) {
//this is unnecessary -- it will set the correct master clock based on sample rate
/*switch ((int) openair0_cfg[0].sample_rate) {
case 1920000:
@@ -604,7 +590,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
break;
}*/
for (i = 0; i < s->iris[r]->getNumChannels(SOAPY_SDR_RX); i++) {
for (int i = 0; i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_RX); i++) {
if (i < s->rx_num_channels) {
s->iris[r]->setSampleRate(SOAPY_SDR_RX, i, openair0_cfg[0].sample_rate / SAMPLE_RATE_DOWN);
#ifdef MOVE_DC
@@ -637,7 +623,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
s->iris[r]->setDCOffsetMode(SOAPY_SDR_RX, i, true); // move somewhere else
}
}
for (i = 0; i < s->iris[r]->getNumChannels(SOAPY_SDR_TX); i++) {
for (int i = 0; i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_TX); i++) {
if (i < s->tx_num_channels) {
s->iris[r]->setSampleRate(SOAPY_SDR_TX, i, openair0_cfg[0].sample_rate / SAMPLE_RATE_DOWN);
#ifdef MOVE_DC
@@ -686,24 +672,24 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
rx_filt_bw *= 3;
#endif
/* Setting TX/RX BW */
for (i = 0; i < s->tx_num_channels; i++) {
if (i < s->iris[r]->getNumChannels(SOAPY_SDR_TX)) {
for (int i = 0; i < s->tx_num_channels; i++) {
if (i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_TX)) {
s->iris[r]->setBandwidth(SOAPY_SDR_TX, i, tx_filt_bw);
printf("Setting tx bandwidth on channel %zu/%lu: BW %f (readback %f)\n", i,
printf("Setting tx bandwidth on channel %d/%lu: BW %f (readback %f)\n", i,
s->iris[r]->getNumChannels(SOAPY_SDR_TX), tx_filt_bw / 1e6,
s->iris[r]->getBandwidth(SOAPY_SDR_TX, i) / 1e6);
}
}
for (i = 0; i < s->rx_num_channels; i++) {
if (i < s->iris[r]->getNumChannels(SOAPY_SDR_RX)) {
for (int i = 0; i < s->rx_num_channels; i++) {
if (i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_RX)) {
s->iris[r]->setBandwidth(SOAPY_SDR_RX, i, rx_filt_bw);
printf("Setting rx bandwidth on channel %zu/%lu : BW %f (readback %f)\n", i,
printf("Setting rx bandwidth on channel %d/%lu : BW %f (readback %f)\n", i,
s->iris[r]->getNumChannels(SOAPY_SDR_RX), rx_filt_bw / 1e6,
s->iris[r]->getBandwidth(SOAPY_SDR_RX, i) / 1e6);
}
}
for (i = 0; i < s->iris[r]->getNumChannels(SOAPY_SDR_TX); i++) {
for (int i = 0; i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_TX); i++) {
if (i < s->tx_num_channels) {
printf("\nUsing SKLK calibration...\n");
s->iris[r]->writeSetting(SOAPY_SDR_TX, i, "CALIBRATE", "SKLK");
@@ -712,7 +698,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
}
for (i = 0; i < s->iris[r]->getNumChannels(SOAPY_SDR_RX); i++) {
for (int i = 0; i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_RX); i++) {
if (i < s->rx_num_channels) {
printf("\nUsing SKLK calibration...\n");
s->iris[r]->writeSetting(SOAPY_SDR_RX, i, "CALIBRATE", "SKLK");
@@ -722,7 +708,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
}
if (s->iris[r]->getHardwareInfo()["frontend"].compare(devFE) == 0) {
for (i = 0; i < s->iris[r]->getNumChannels(SOAPY_SDR_RX); i++) {
for (int i = 0; i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_RX); i++) {
if (openair0_cfg[0].duplex_mode == 0) {
printf("\nFDD: Setting receive antenna to %s\n", s->iris[r]->listAntennas(SOAPY_SDR_RX, i)[1].c_str());
if (i < s->rx_num_channels)
@@ -745,22 +731,22 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
rxStreamArgs["WIRE"] = SOAPY_SDR_CS16;
std::vector <size_t> channels;
for (i = 0; i < s->rx_num_channels; i++)
if (i < s->iris[r]->getNumChannels(SOAPY_SDR_RX))
for (int i = 0; i < s->rx_num_channels; i++)
if (i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_RX))
channels.push_back(i);
s->rxStream.push_back(s->iris[r]->setupStream(SOAPY_SDR_RX, SOAPY_SDR_CS16, channels));//, rxStreamArgs));
std::vector <size_t> tx_channels = {};
for (i = 0; i < s->tx_num_channels; i++)
if (i < s->iris[r]->getNumChannels(SOAPY_SDR_TX))
for (int i = 0; i < s->tx_num_channels; i++)
if (i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_TX))
tx_channels.push_back(i);
s->txStream.push_back(s->iris[r]->setupStream(SOAPY_SDR_TX, SOAPY_SDR_CS16, tx_channels)); //, arg));
//s->iris[r]->setHardwareTime(0, "");
std::cout << "Front end detected: " << s->iris[r]->getHardwareInfo()["frontend"] << "\n";
for (i = 0; i < s->rx_num_channels; i++) {
if (i < s->iris[r]->getNumChannels(SOAPY_SDR_RX)) {
printf("RX Channel %zu\n", i);
for (int i = 0; i < s->rx_num_channels; i++) {
if (i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_RX)) {
printf("RX Channel %d\n", i);
printf("Actual RX sample rate: %fMSps...\n", (s->iris[r]->getSampleRate(SOAPY_SDR_RX, i) / 1e6));
printf("Actual RX frequency: %fGHz...\n", (s->iris[r]->getFrequency(SOAPY_SDR_RX, i) / 1e9));
printf("Actual RX gain: %f...\n", (s->iris[r]->getGain(SOAPY_SDR_RX, i)));
@@ -776,9 +762,9 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
}
}
for (i = 0; i < s->tx_num_channels; i++) {
if (i < s->iris[r]->getNumChannels(SOAPY_SDR_TX)) {
printf("TX Channel %zu\n", i);
for (int i = 0; i < s->tx_num_channels; i++) {
if (i < (int) s->iris[r]->getNumChannels(SOAPY_SDR_TX)) {
printf("TX Channel %d\n", i);
printf("Actual TX sample rate: %fMSps...\n", (s->iris[r]->getSampleRate(SOAPY_SDR_TX, i) / 1e6));
printf("Actual TX frequency: %fGHz...\n", (s->iris[r]->getFrequency(SOAPY_SDR_TX, i) / 1e9));
printf("Actual TX gain: %f...\n", (s->iris[r]->getGain(SOAPY_SDR_TX, i)));
@@ -795,10 +781,10 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
}
}
s->iris[0]->writeSetting("SYNC_DELAYS", "");
for (r = 0; r < s->device_num; r++)
for (int r = 0; r < s->device_num; r++)
s->iris[r]->setHardwareTime(0, "TRIGGER");
s->iris[0]->writeSetting("TRIGGER_GEN", "");
for (r = 0; r < s->device_num; r++)
for (int r = 0; r < s->device_num; r++)
printf("Device timestamp: %f...\n", (s->iris[r]->getHardwareTime("TRIGGER") / 1e9));
device->priv = s;
+1 -2
View File
@@ -283,10 +283,9 @@ int trx_lms_stop(openair0_device *device) {
/*! \brief Set frequencies (TX/RX)
* \param device the hardware to use
* \param openair0_cfg openair0 Config structure (ignored. It is there to comply with RF common API)
* \param exmimo_dump_config (ignored)
* \returns 0 in success
*/
int trx_lms_set_freq(openair0_device* device, openair0_config_t *openair0_cfg,int exmimo_dump_config) {
int trx_lms_set_freq(openair0_device* device, openair0_config_t *openair0_cfg) {
//Control port must be connected
LMS_SetLOFrequency(lms_device,LMS_CH_TX,0,openair0_cfg->tx_freq[0]);
LMS_SetLOFrequency(lms_device,LMS_CH_RX,0,openair0_cfg->rx_freq[0]);
+7 -14
View File
@@ -794,22 +794,15 @@ void *freq_thread(void *arg) {
* \param dummy dummy variable not used
* \returns 0 in success
*/
int trx_usrp_set_freq(openair0_device *device, openair0_config_t *openair0_cfg, int dont_block) {
int trx_usrp_set_freq(openair0_device *device, openair0_config_t *openair0_cfg)
{
usrp_state_t *s = (usrp_state_t *)device->priv;
pthread_t f_thread;
printf("Setting USRP TX Freq %f, RX Freq %f, tune_offset: %f, dont_block: %d\n",
openair0_cfg[0].tx_freq[0],openair0_cfg[0].rx_freq[0],
openair0_cfg[0].tune_offset, dont_block);
printf("Setting USRP TX Freq %f, RX Freq %f, tune_offset: %f\n", openair0_cfg[0].tx_freq[0], openair0_cfg[0].rx_freq[0], openair0_cfg[0].tune_offset);
// spawn a thread to handle the frequency change to not block the calling thread
if (dont_block == 1)
pthread_create(&f_thread,NULL,freq_thread,(void *)device);
else {
uhd::tune_request_t tx_tune_req(openair0_cfg[0].tx_freq[0], openair0_cfg[0].tune_offset);
uhd::tune_request_t rx_tune_req(openair0_cfg[0].rx_freq[0], openair0_cfg[0].tune_offset);
s->usrp->set_tx_freq(tx_tune_req);
s->usrp->set_rx_freq(rx_tune_req);
}
uhd::tune_request_t tx_tune_req(openair0_cfg[0].tx_freq[0], openair0_cfg[0].tune_offset);
uhd::tune_request_t rx_tune_req(openair0_cfg[0].rx_freq[0], openair0_cfg[0].tune_offset);
s->usrp->set_tx_freq(tx_tune_req);
s->usrp->set_rx_freq(rx_tune_req);
return(0);
}
+1 -1
View File
@@ -916,7 +916,7 @@ static void rfsimulator_end(openair0_device *device) {
static int rfsimulator_stop(openair0_device *device) {
return 0;
}
static int rfsimulator_set_freq(openair0_device *device, openair0_config_t *openair0_cfg,int exmimo_dump_config) {
static int rfsimulator_set_freq(openair0_device *device, openair0_config_t *openair0_cfg) {
return 0;
}
static int rfsimulator_set_gains(openair0_device *device, openair0_config_t *openair0_cfg) {
@@ -1,7 +1,6 @@
#ifndef OPENAIRINTERFACE5G_LIMITS_H_
#define OPENAIRINTERFACE5G_LIMITS_H_
#if 1 /*defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)*/
# define NUMBER_OF_eNB_MAX 1
# define NUMBER_OF_gNB_MAX 1
# define NUMBER_OF_RU_MAX 2
@@ -43,67 +42,5 @@
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# define NUMBER_OF_CONNECTED_gNB_MAX 1
# endif
#else
# define NUMBER_OF_eNB_MAX 7
# define NUMBER_OF_gNB_MAX 7
# define NUMBER_OF_RU_MAX 32
# define NUMBER_OF_NR_RU_MAX 32
# ifndef UE_EXPANSION
/* if the value of MAX_MOBILES_PER_ENB and NUMBER_OF_UE_MAX is different,
eNB process will exit because unexpected access happens.
Now some parts are using NUMBER_OF_UE_MAX
and the other are using MAX_MOBILES_PER_ENB in for-loop.
*/
# define NUMBER_OF_UE_MAX 16
# define NUMBER_OF_UCI_VARS_MAX 56
# define NUMBER_OF_CONNECTED_eNB_MAX 3
# define NUMBER_OF_CONNECTED_gNB_MAX 3
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_UCI_VARS_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# define NUMBER_OF_CONNECTED_gNB_MAX 1
# endif
# if defined(STANDALONE) && STANDALONE==1
# undef NUMBER_OF_eNB_MAX
# undef NUMBER_OF_gNB_MAX
# undef NUMBER_OF_UE_MAX
# undef NUMBER_OF_RU_MAX
# undef NUMBER_OF_NR_RU_MAX
# define NUMBER_OF_eNB_MAX 3
# define NUMBER_OF_gNB_MAX 3
# define NUMBER_OF_UE_MAX 3
# define NUMBER_OF_RU_MAX 3
# define NUMBER_OF_NR_RU_MAX 3
# endif
# if defined(LARGE_SCALE) && LARGE_SCALE
# undef NUMBER_OF_eNB_MAX
# undef NUMBER_OF_gNB_MAX
# undef NUMBER_OF_UE_MAX
# undef NUMBER_OF_CONNECTED_eNB_MAX
# undef NUMBER_OF_CONNECTED_gNB_MAX
# undef NUMBER_OF_RU_MAX
# undef NUMBER_OF_NR_RU_MAX
# define NUMBER_OF_eNB_MAX 2
# define NUMBER_OF_gNB_MAX 2
# define NUMBER_OF_UE_MAX 120
# define NUMBER_OF_RU_MAX 16
# define NUMBER_OF_NR_RU_MAX 16
# define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
# define NUMBER_OF_CONNECTED_gNB_MAX 1
# endif
#endif
#endif /* OPENAIRINTERFACE5G_LIMITS_H_ */
-21
View File
@@ -1,21 +0,0 @@
#ifndef _TARGETS_COMMON_THREADS_T_H_
#define _TARGETS_COMMON_THREADS_T_H_
typedef struct threads_s {
int main;
int sync;
int one;
int two;
int three;
int slot1_proc_one;
int slot1_proc_two;
int slot1_proc_three;
//int dlsch_td_one;
//int dlsch_td_two;
//int dlsch_td_three;
//int dlsch_td1_one;
//int dlsch_td1_two;
//int dlsch_td1_three;
} threads_t;
#endif /* _TARGETS_COMMON_THREADS_T_H_ */
@@ -10,7 +10,7 @@ gNBs = (
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1 }); });
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1; sd = 0x1; }); });
nr_cellid = 12345678L;
@@ -11,7 +11,7 @@ gNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1 }) });
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1; sd = 0x1; }) });
nr_cellid = 12345678L;
@@ -155,64 +155,6 @@ gNBs =
);
# Dedicated Serving Cell Configuration
servingCellConfigDedicated = ({
# BWP-Downlink
# BWP 1 Configuration
dl_bwp-Id_1 = 1;
dl_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_bwp1_subcarrierSpacing = 1;
# BWP 2 Configuration
dl_bwp-Id_2 = 2;
dl_bwp2_locationAndBandwidth = 13750; // RBstart=0, L=51 (20 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_bwp2_subcarrierSpacing = 1;
# BWP 3 Configuration
dl_bwp-Id_3 = 3;
dl_bwp3_locationAndBandwidth = 6325; // RBstart=0, L=24 (10 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_bwp3_subcarrierSpacing = 1;
firstActiveDownlinkBWP-Id = 1; #BWP-Id
defaultDownlinkBWP-Id = 1; #BWP-Id
# bwp-InactivityTimer ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30,
# ms40,ms50, ms60, ms80,ms100, ms200,ms300, ms500,
# ms750, ms1280, ms1920, ms2560, spare10, spare9, spare8,
# spare7, spare6, spare5, spare4, spare3, spare2, spare1 }
# UplinkConfig
# BWP-Uplink
# BWP 1 Configuration
ul_bwp-Id_1 = 1;
ul_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_bwp1_subcarrierSpacing = 1;
# BWP 2 Configuration
ul_bwp-Id_2 = 2;
ul_bwp2_locationAndBandwidth = 13750; // RBstart=0, L=51 (20 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_bwp2_subcarrierSpacing = 1;
# BWP 3 Configuration
ul_bwp-Id_3 = 3;
ul_bwp3_locationAndBandwidth = 6325; // RBstart=0, L=24 (10 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_bwp3_subcarrierSpacing = 1;
firstActiveUplinkBWP-Id = 1; #BWP-Id
}
);
# ------- SCTP definitions
SCTP :
-1
View File
@@ -4,7 +4,6 @@
This directory contains different targets for OpenAirInterface.org implementations
ARCH/EXMIMO - Kernel driver for EXMIMO1+2
RTAI/USER - Target to run .11p (uses openairITS) or LTE modem (uses openair1 and openair2) for x86 in RTAI user-space
SIMU - Simulator/Emulator target for x86
DOCS - Doxygen documentation generation for openair1/openair2
-7
View File
@@ -1,7 +0,0 @@
sh /opt/XIO2000/xio_script.sh
cd ../USERSPACE_TOOLS/OPENAIR_RF
./openair_rf_cbmimo1_lte 0 4 1
rmmod -f openair_rf
cd ../..
make install_cbmimo1_softmodem_lte_emos_l2
cd LAUNCH_SCRIPTS
-21
View File
@@ -1,21 +0,0 @@
#!/bin/sh
echo "start setting up eNB interface"
cd $OPENAIR2_DIR
sudo rmmod nasmesh
#make nasmesh_netlink_address_fix.ko
#make nasmesh_netlink.ko
#make nasmesh.ko
#make rb_tool
#route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
cd -
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 11
echo "end setting up NAS interface"
-18
View File
@@ -1,18 +0,0 @@
#!/bin/sh
echo "setting up UE NAS interface"
cd $OPENAIR2_DIR
sudo rmmod nasmesh
#make nasmesh_netlink_address_fix.ko
#make nasmesh_netlink.ko
#make nasmesh.ko
#make rb_tool
#route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
cd -
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
sudo ifconfig oai0 10.0.1.2 netmask 255.255.255.0 broadcast 10.0.1.255
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.2 -t 10.0.1.1 -r 3
echo "end setting up NAS interface"
-18
View File
@@ -1,18 +0,0 @@
#!/bin/sh
echo "setting up UE NAS interface"
cd $OPENAIR2_DIR
sudo rmmod nasmesh
#make nasmesh_netlink_address_fix.ko
#make nasmesh_netlink.ko
#make nasmesh.ko
#make rb_tool
#route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
cd -
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
sudo ifconfig oai0 10.0.1.3 netmask 255.255.255.0 broadcast 10.0.1.255
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.3 -t 10.0.1.1 -r 3
echo "end setting up NAS interface"
@@ -1,13 +0,0 @@
sudo sh $OPENAIR1_DIR/xio_script.sh
sh stop_rf.sh
sh start_rf.sh
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 0 0 1 # dump Config
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 6 110 110 100 100 #Set TX gains
#$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 2 26 100 #Card v2_10 synched to v2_19
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 14 0 #SET RX RF Mode
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 32 1 #Set DLSCH Transmission Mod
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 1 0 0 #Start Primary Clusterhead
#$OPENAIR1_DIR/USERSPACE_TOOLS/SCOPE/lte_scope_ul 0 0 &
#$OPENAIR1_DIR/USERSPACE_TOOLS/SCOPE/lte_scope_ul 0 1 &
@@ -1,10 +0,0 @@
sudo sh $OPENAIR1_DIR/xio_script.sh
sh stop_rf.sh
sh start_rf.sh
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 0 1 1
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 6 110 110 100 100
#$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 2 26 100 #Card v2_10 synched to v2_19
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 14 0
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 32 2
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 1 1 0
@@ -1,13 +0,0 @@
cd USERSPACE_TOOLS/OPENAIR_RF
./openair_rf_cbmimo1_lte 0 4 1
rmmod -f openair_rf
cd ../..
make install_cbmimo1_softmodem_lte_emos_l2
cd USERSPACE_TOOLS/OPENAIR_RF
./openair_rf_cbmimo1_lte 0 0 1 1
./openair_rf_cbmimo1_lte 0 6 137 137 140 140
./openair_rf_cbmimo1_lte 0 14 2
./openair_rf_cbmimo1_lte 0 32 6
source /opt/XIO2000/xio_script.sh
./openair_rf_cbmimo1_lte 0 1 1 0
cd ../..
-10
View File
@@ -1,10 +0,0 @@
gpsd /dev/ttyUSB0
cd USERSPACE_TOOLS/OPENAIR_RF
./openair_rf_cbmimo1_lte 0 4 1
rmmod -f openair_rf
cd ../..
make install_cbmimo1_softmodem_lte_emos_l2
cd EMOS/LTE/GUI
./emos_gui &
-2
View File
@@ -1,2 +0,0 @@
sudo insmod $OPENAIR2_DIR/RRC/LITE/MESSAGES/asn1_msg_kern.ko
sudo insmod $OPENAIR1_DIR/ARCH/CBMIMO1/DEVICE_DRIVER/openair_rf_softmodem.ko
@@ -1,13 +0,0 @@
sh $OPENAIR1_DIR/xio_script.sh
cd ../USERSPACE_TOOLS/OPENAIR_RF
./openair_rf_cbmimo1_lte 0 4 1
rmmod -f openair_rf
cd ../..
make install_cbmimo1_softmodem
cd USERSPACE_TOOLS/OPENAIR_RF
./openair_rf_cbmimo1_lte 0 0 1 1
./openair_rf_cbmimo1_lte 0 26 100
./openair_rf_cbmimo1_lte 0 6 150 150 140 140
./openair_rf_cbmimo1_lte 0 14 0
./openair_rf_cbmimo1_lte 0 8 1
cd ../../LAUNCH_SCRIPTS
-18
View File
@@ -1,18 +0,0 @@
sudo sh $OPENAIR1_DIR/xio_script.sh
sh stop_rf.sh
sh start_rf.sh
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 0 0 1 # dump config
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 6 100 100 100 100 #Set TX gains
#./openair_rf_cbmimo1_lte 0 25 0
#./openair_rf_cbmimo1_lte 0 15 101 # Card v15 synched to card v38
#./openair_rf_cbmimo1_lte 0 15 117 # Card v15 synched to card v5
#./openair_rf_cbmimo1_lte 0 15 135 # Card v37 synched to card v5
#$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 15 89 # Card v42 synched to card v43
#$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 15 85 # Card v47 synched to card v43
#./openair_rf_cbmimo1_lte 0 26 400
#$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 15 103 # Card v47 synched to card v42
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 15 110 # Card v42 synched to card v47
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 14 0 #RF mode 0 = mixer low gain, lna off
#./openair_rf_cbmimo1_lte 0 14 1 #RF mode 1 = mixer low gain, lna on
#./openair_rf_cbmimo1_lte 0 14 2 #RF mode 2 = mixer high gain, lna on
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 3 1 0 #Start Node - param 0/1
-14
View File
@@ -1,14 +0,0 @@
sudo sh $OPENAIR1_DIR/xio_script.sh
sh stop_rf.sh
sh start_rf.sh
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 0 0 1
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 6 100 100 100 100
#./openair_rf_cbmimo1_lte 0 25 0
#./openair_rf_cbmimo1_lte 0 15 101 # Card v15 synched to card v38
#./openair_rf_cbmimo1_lte 0 15 117 # Card v15 synched to card v5
#./openair_rf_cbmimo1_lte 0 15 135 # Card v37 synched to card v5
#./openair_rf_cbmimo1_lte 0 26 400
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 14 0 #RF mode 0 = mixer low gain, lna off
#./openair_rf_cbmimo1_lte 0 14 1 #RF mode 1 = mixer low gain, lna on
#./openair_rf_cbmimo1_lte 0 14 2 #RF mode 2 = mixer high gain, lna on
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 3 1 1
-7
View File
@@ -1,7 +0,0 @@
killall lte_scope
killall lte_scope_ul
$OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF/openair_rf_cbmimo1_lte 0 4 1
sudo rmmod -f nasmesh
sudo rmmod -f openair_rf
sudo rmmod -f asn1_msg_kern
-40
View File
@@ -1,40 +0,0 @@
sleeptest:lxrt+sem+mbx+msg+fifos:!./sleeptest;sleep 1;popall:control_c
synctest:lxrt+sem+mbx+msg+fifos:!./synctest -V;sleep 1;popall:control_c
condtest:lxrt+sem+mbx+msg+fifos:!sudo ./condtest;sleep 1;popall:control_c
msg_test:lxrt+sem+mbx+msg+fifos:!sudo ./msg_test;sleep 1;popall:control_c
msg_many:lxrt+sem+mbx+msg+fifos:!sudo ./msg_test;sleep 1;popall:control_c
eNB:lxrt+sem+mbx+msg+fifos:!sudo ./synctest;sleep 1;popall:control_c
eNB_test:lxrt+sem+mbx+msg+smi:!sudo ./lte-softmodem -S -F enb2tx;sleep 1;popall:control_c
UE:lxrt+sem+mbx+msg+fifos:!sudo ./synctest -U -d -T 108;sleep 1;popall:control_c
UE0:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 2680000000 -V -K /tmp/itti_UE0.log;sleep 1;popall:control_c
#EXMIMO2 card 5
#UE0_smbv:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1907598252 -V;sleep 1;popall:control_c
#EXMIMO2 card 24
#UE0_smbv:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1907595776 -V;sleep 1;popall:control_c
#EXMIMO2 card 38
#UE0_smbv:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1907592704 -V;sleep 1;popall:control_c
#EXMIMO2 card 39
UE0_smbv:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 2679998592 -V;sleep 1;popall:control_c
UE850:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 859498000 -F ex2_850;sleep 1;popall:control_c
eNB850:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -d -C 859500000 -F ex2_850;sleep 1;popall:control_c
UE0noL2:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1907600480 --no-L2-connect;sleep 1;popall:control_c
UE0calib:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1912600000 --calib-ue-rx -70 ;sleep 1;popall:control_c
UE0calibmed:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1912600000 --calib-ue-rx-med -70 ;sleep 1;popall:control_c
UE0calibbyp:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1912600000 --calib-ue-rx-byp -70 ;sleep 1;popall:control_c
UE0prach:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1912606900 -F ue1 --debug-ue-prach;sleep 1;popall:control_c
UE1:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1907600000 -F ue1 ;sleep 1;popall:control_c
UE1prach:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1907600000 -F ue1 --debug-ue-prach;sleep 1;popall:control_c
UE1noL2:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1907600000 -F ue1 --no-L2-connect;sleep 1;popall:control_c
UE2:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1907600000 -F ue2;sleep 1;popall:control_c
UE2prach:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1907600000 -F ue2 --debug-ue-prach;sleep 1;popall:control_c
UE2noL2:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -U -d -C 1907600000 -F ue2 --no-L2-connect;sleep 1;popall:control_c
#eNB0:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -C 1907600000 -d -V;sleep 1;popall:control_c
#eNB0:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -C 1907598252 -d -V;sleep 1;popall:control_c
eNB0:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -d -O../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.conf -V -K /tmp/itti_eNB0.log;sleep 1;popall:control_c
eNB1:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -C 2680000000 -r 50 -d -V;sleep 1;popall:control_c
eNB2:lxrt+sem+mbx+msg+fifos:!sudo ./lte-softmodem -C 2680000000 -r 100 -d -V;sleep 1;popall:control_c
dot11:lxrt+sem+mbx+msg+fifos:!sudo ./dot11 -C 1907600000 -d;sleep 1;popall:control_c
dot11_tx_test: lxrt+sem+mbx+msg+fifos:!sudo ./dot11 -C 1907600000 -d -t;sleep 1;popall:control_c
eNB2_750:lxrt+sem+mbx+msg+fifos:!sudo ./synctest_eNB -C 746000000 -F enb1tx_750 -d;sleep 1;popall:control_c
eNB2_1900:lxrt+sem+mbx+msg+fifos:!sudo ./synctest_eNB -C 19076000000 -F enb1tx_1900 -d;sleep 1;popall:control_c
emos-raw:lxrt+sem+mbx+msg+fifos:!sudo ./emos-raw -d -V;sleep 1;popall:control_c
-64
View File
@@ -1,64 +0,0 @@
[*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
[*] Wed Sep 9 13:46:33 2015
[*]
[dumpfile] "/homes/kaltenbe/openair_dump_eNB_exmimo2_sequans.vcd"
[dumpfile_mtime] "Mon Sep 7 15:31:31 2015"
[dumpfile_size] 894802540
[savefile] "/homes/kaltenbe/Devel/openair/openair4G/trunk/targets/RT/USER/eNB_exmimo2.gtkw"
[timestart] 362571890000
[size] 1855 1056
[pos] -176 -45
*-21.066544 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[sst_width] 257
[signals_width] 230
[sst_expanded] 1
[sst_vpaned_height] 262
@420
variables.daq_mbox[63:0]
variables.diff2[63:0]
@28
functions.rt_sleep
@24
variables.missed_slot_enb[63:0]
variables.hw_subframe[63:0]
variables.hw_frame[63:0]
variables.frame_number_TX_eNB[63:0]
variables.frame_number_RX_eNB[63:0]
@28
functions.eNB_thread_rx0
functions.eNB_thread_tx0
functions.eNB_thread_rx1
functions.eNB_thread_tx1
functions.eNB_thread_rx2
functions.eNB_thread_tx2
functions.eNB_thread_rx3
functions.eNB_thread_tx3
functions.eNB_thread_rx4
functions.eNB_thread_tx4
functions.eNB_thread_rx5
functions.eNB_thread_tx5
functions.eNB_thread_rx6
functions.eNB_thread_tx6
functions.eNB_thread_rx7
functions.eNB_thread_tx7
functions.eNB_thread_rx8
functions.eNB_thread_tx8
functions.eNB_thread_rx9
functions.eNB_thread_tx9
functions.phy_procedures_eNb_tx
functions.phy_procedures_eNb_rx
functions.phy_enb_prach_rx
functions.phy_eNB_dlsch_encoding
functions.phy_eNB_dlsch_modulation
functions.phy_eNB_dlsch_scrambling
functions.phy_enb_pdcch_tx
@29
functions.phy_enb_ulsch_decoding
@28
functions.phy_enb_rs_tx
functions.rrc_mac_config_req
functions.rlc_data_req
functions.udp_enb_task
[pattern_trace] 1
[pattern_trace] 0
-10
View File
@@ -1,10 +0,0 @@
# this file contains the calibration values to compute the RSSI
# we can use three different gain stages (high, low, med) as well as a gain factor for fine tuning
# the three lines in this file gives the total rx gain in dB for the three gain stages if the rx gain is set to 30dB
# this is for Express MIMO2 without any additional RF frontend
# high gain
103 107 106 104
# med gain
98 101 100 98
# low gain (byp)
94 97 96 94
-10
View File
@@ -1,10 +0,0 @@
# this file contains the calibration values to compute the RSSI
# we can use three different gain stages (high, low, med) as well as a gain factor for fine tuning
# the three lines in this file gives the total rx gain in dB for the three gain stages if the rx gain is set to 30dB
# this is for Express MIMO2 without any additional RF frontend
# high gain
128 128 128 126
# med gain
122 123 123 120
# low gain (byp)
116 117 116 116
-12
View File
@@ -1,12 +0,0 @@
sudo rmmod openair_rf
sudo insmod $OPENAIR1_DIR/ARCH/CBMIMO1/DEVICE_DRIVER/openair_rf_softmodem.ko
sudo mknod /dev/openair0 c 127 0
sudo chmod a+rw /dev/openair0
$OPENAIR1_DIR/USERSPACE_TOOLS/OAI_FW_INIT/updatefw -f $OPENAIR1_DIR/USERSPACE_TOOLS/OAI_FW_INIT/main -s 0x43fffff0
sudo rmmod openair_rf
sudo insmod $OPENAIR1_DIR/ARCH/CBMIMO1/DEVICE_DRIVER/openair_rf_softmodem.ko
sudo rmmod nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
-69
View File
@@ -1,69 +0,0 @@
#!/bin/bash
PCI=`lspci -m | grep Xilinx`
if [ -z "$PCI" ]; then
echo "No card found. Stopping!"
return
fi
## This part corrects the wrong configuration of the endpoint done by the bios in some machines
echo "$PCI" | while read config_reg; do
SLOT_NUMBER=`echo $config_reg | awk -F\" '{print $1}'`
sudo setpci -s $SLOT_NUMBER 60.b=10
done
load_module() {
mod_name=${1##*/}
mod_name=${mod_name%.*}
if awk "/$mod_name/ {found=1 ;exit} END {if (found!=1) exit 1}" /proc/modules
then
echo "module $mod_name already loaded: I remove it first"
sudo rmmod $mod_name
fi
echo loading $mod_name
sudo insmod $1
}
load_module $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom/openair_rf.ko
sleep 1
if [ ! -e /dev/openair0 ]; then
sudo mknod /dev/openair0 c 127 0
sudo chmod a+rw /dev/openair0
fi
DEVICE=`echo $PCI | awk -F\" '{print $(NF-1)}' | awk '{print $2}'`
DEVICE_SWID=${DEVICE:2:2}
if [ $DEVICE_SWID == '08' ]; then
echo "Using firmware version 8"
$OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw -s 0x43fffff0 -b -f $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2
else
if [ $DEVICE_SWID == '09' ]; then
echo "Using firmware version 9"
$OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw -s 0x43fffff0 -b -f $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v9
else
if [ $DEVICE_SWID == '0a' ]; then
echo "Using firware version 10"
#$OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw -s 0x43fffff0 -b -f $OPENAIR0_DIR/express-mimo/software/sdr/exmimo2/sdr_expressmimo2
#$OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw -s 0x43fffff0 -b -f $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10_spectra
$OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw -s 0x43fffff0 -b -f $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10
else
echo 'No corresponding firmware found'
return
fi
fi
fi
#load_module $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
#if [ "$1" = "eNB" ]; then
# echo "bring up oai0 interface for enb"
# sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
# $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.9 -r 1
#else
# if [ "$1" = "UE" ]; then
# echo "bring up oai0 interface for UE"
# sudo ifconfig oai0 10.0.1.9 netmask 255.255.255.0 broadcast 10.0.1.255
# $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.9 -t 10.0.1.1 -r 1
# fi
#fi
-8
View File
@@ -917,14 +917,6 @@ void init_eNB_proc(int inst) {
pthread_mutex_init( &proc->mutex_RU_PRACH_br,NULL);
pthread_cond_init( &proc->cond_prach_br, NULL);
pthread_attr_init( &proc->attr_prach_br);
#ifndef DEADLINE_SCHEDULER
attr0 = &L1_proc->attr;
attr1 = &L1_proc_tx->attr;
attr_prach = &proc->attr_prach;
attr_prach_br = &proc->attr_prach_br;
// attr_td = &proc->attr_td;
// attr_te = &proc->attr_te;
#endif
if(get_thread_worker_conf() == WORKER_ENABLE) {
init_te_thread(eNB);

Some files were not shown because too many files have changed in this diff Show More