From be08184fbe79e0ab6fdf7fff2239f21bae6cc76e Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 11 Jan 2024 14:06:51 +0000 Subject: [PATCH 1/7] Tutorials: update UHD to v4.6.0.0 and update dependencies as described in the official Ettus website --- doc/NR_SA_Tutorial_COTS_UE.md | 4 ++-- doc/NR_SA_Tutorial_OAI_nrUE.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/NR_SA_Tutorial_COTS_UE.md b/doc/NR_SA_Tutorial_COTS_UE.md index acb5a36507..fe4fdbee36 100644 --- a/doc/NR_SA_Tutorial_COTS_UE.md +++ b/doc/NR_SA_Tutorial_COTS_UE.md @@ -58,11 +58,11 @@ sudo ./program_uicc --adm 12345678 --imsi 001010000000001 --isdn 00000001 --acc ### 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 +sudo apt install -y autoconf automake build-essential ccache cmake cpufrequtils doxygen ethtool g++ git inetutils-tools libboost-all-dev libncurses5 libncurses5-dev libusb-1.0-0 libusb-1.0-0-dev libusb-dev python3-dev python3-mako python3-numpy python3-requests python3-scipy python3-setuptools python3-ruamel.yaml git clone https://github.com/EttusResearch/uhd.git ~/uhd cd ~/uhd -git checkout v4.5.0.0 +git checkout v4.6.0.0 cd host mkdir build cd build diff --git a/doc/NR_SA_Tutorial_OAI_nrUE.md b/doc/NR_SA_Tutorial_OAI_nrUE.md index a956dd84f5..e7d0d15006 100644 --- a/doc/NR_SA_Tutorial_OAI_nrUE.md +++ b/doc/NR_SA_Tutorial_OAI_nrUE.md @@ -46,11 +46,11 @@ Please install and configure OAI CN5G as described here: ### 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 +sudo apt install -y autoconf automake build-essential ccache cmake cpufrequtils doxygen ethtool g++ git inetutils-tools libboost-all-dev libncurses5 libncurses5-dev libusb-1.0-0 libusb-1.0-0-dev libusb-dev python3-dev python3-mako python3-numpy python3-requests python3-scipy python3-setuptools python3-ruamel.yaml git clone https://github.com/EttusResearch/uhd.git ~/uhd cd ~/uhd -git checkout v4.5.0.0 +git checkout v4.6.0.0 cd host mkdir build cd build From 6ec491818771d282ddacc60e4597c822378ce613 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 11 Jan 2024 14:23:18 +0000 Subject: [PATCH 2/7] Tutorials: update the OAI nrUE SIM card description This tutorial aims to achieve end-to-end connectivity as simple as possible. Let's remove this complex topic from here. Also, if a user copy-paste the section as it was, nrUE gets a segfault because there is no imeisv here, tutorial is out-dated. --- doc/NR_SA_Tutorial_OAI_nrUE.md | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/doc/NR_SA_Tutorial_OAI_nrUE.md b/doc/NR_SA_Tutorial_OAI_nrUE.md index e7d0d15006..f6d8be4341 100644 --- a/doc/NR_SA_Tutorial_OAI_nrUE.md +++ b/doc/NR_SA_Tutorial_OAI_nrUE.md @@ -129,20 +129,7 @@ sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band # 5. OAI UE ## 5.1 SIM Card -Edit openair3/UICC/usim_interface.c -```bash -#define UICC_PARAMS_DESC {\ - {"imsi", "USIM IMSI\n", 0, strptr:&(uicc->imsiStr), defstrval:"001010000000001", TYPE_STRING, 0 },\ - {"nmc_size" "number of digits in NMC", 0, iptr:&(uicc->nmc_size), defintval:2, TYPE_INT, 0 },\ - {"key", "USIM Ki\n", 0, strptr:&(uicc->keyStr), defstrval:"fec86ba6eb707ed08905757b1bb44b8f", TYPE_STRING, 0 },\ - {"opc", "USIM OPc\n", 0, strptr:&(uicc->opcStr), defstrval:"c42449363bbad02b66d16bc975d77cc1", TYPE_STRING, 0 },\ - {"amf", "USIM amf\n", 0, strptr:&(uicc->amfStr), defstrval:"8000", TYPE_STRING, 0 },\ - {"sqn", "USIM sqn\n", 0, strptr:&(uicc->sqnStr), defstrval:"000000", TYPE_STRING, 0 },\ - {"dnn", "UE dnn (apn)\n", 0, strptr:&(uicc->dnnStr), defstrval:"oai", TYPE_STRING, 0 },\ - {"nssai_sst", "UE nssai\n", 0, iptr:&(uicc->nssai_sst), defintval:1, TYPE_INT, 0 }, \ - {"nssai_sd", "UE nssai\n", 0, iptr:&(uicc->nssai_sd), defintval:0xffffff, TYPE_INT, 0 }, \ -}; -``` +For this tutorial, there is no need to adjust any of the default OAI nrUE SIM card values. However, they can be checked and changed in [UICC_PARAMS_DESC](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/openair3/UICC/usim_interface.c?ref_type=heads#L40) ## 5.2 Testing OAI nrUE with USRP B210 From 99f3ef1a61fa0a0474e3584e3e920450fd1bfc9d Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 11 Jan 2024 14:44:43 +0000 Subject: [PATCH 3/7] Tutorials: add FR2 SA configuration file and instructions for RFsimulator --- doc/NR_SA_Tutorial_OAI_nrUE.md | 35 ++- .../CONF/gnb.sa.band257.32prb.usrpx410.conf | 272 ++++++++++++++++++ 2 files changed, 300 insertions(+), 7 deletions(-) create mode 100644 targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.32prb.usrpx410.conf diff --git a/doc/NR_SA_Tutorial_OAI_nrUE.md b/doc/NR_SA_Tutorial_OAI_nrUE.md index f6d8be4341..dfb15875e4 100644 --- a/doc/NR_SA_Tutorial_OAI_nrUE.md +++ b/doc/NR_SA_Tutorial_OAI_nrUE.md @@ -126,18 +126,26 @@ cd cmake_targets/ran_build/build sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim --sa ``` +### RFsimulator in FR2 +```bash +cd ~/openairinterface5g +source oaienv +cd cmake_targets/ran_build/build +sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.32prb.usrpx410.conf --rfsim +``` + # 5. OAI UE ## 5.1 SIM Card For this tutorial, there is no need to adjust any of the default OAI nrUE SIM card values. However, they can be checked and changed in [UICC_PARAMS_DESC](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/openair3/UICC/usim_interface.c?ref_type=heads#L40) -## 5.2 Testing OAI nrUE with USRP B210 - +## 5.2 Run OAI nrUE +### USRP B210 Important notes: - This should be run in a second Ubuntu 22.04 host, other than gNB - It only applies when running OAI gNB with USRP B210 -Run OAI nrUE +Run OAI nrUE with USRP B210 ```bash cd ~/openairinterface5g source oaienv @@ -145,7 +153,7 @@ cd cmake_targets/ran_build/build sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --ue-fo-compensation --sa -E --uicc0.imsi 001010000000001 ``` -## 5.2 Testing OAI nrUE with RFsimulator +### RFsimulator Important notes: - This should be run on the same host as the OAI gNB - It only applies when running OAI gNB with RFsimulator @@ -155,11 +163,24 @@ Run OAI nrUE with RFsimulator cd ~/openairinterface5g source oaienv cd cmake_targets/ran_build/build -sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --uicc0.imsi 001010000000001 --rfsimulator.serveraddr 127.0.0.1 +sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --sa --uicc0.imsi 001010000000001 --rfsim ``` -### 5.2.1 Ping test -- UE host +### RFsimulator in FR2 +Important notes: +- This should be run on the same host as the OAI gNB +- It only applies when running OAI gNB with RFsimulator in FR2 + +Run OAI nrUE with RFsimulator in FR2 +```bash +cd ~/openairinterface5g +source oaienv +cd cmake_targets/ran_build/build +sudo ./nr-uesoftmodem -r 32 --numerology 3 --band 257 -C 27533280000 --sa --uicc0.imsi 001010000000001 --ssb 72 --rfsim +``` + +## 5.3 End-to-end connectivity test +- Ping test from the UE host to the CN5G ```bash ping 192.168.70.135 -I oaitun_ue1 ``` diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.32prb.usrpx410.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.32prb.usrpx410.conf new file mode 100644 index 0000000000..f8ae069f61 --- /dev/null +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.32prb.usrpx410.conf @@ -0,0 +1,272 @@ +Active_gNBs = ( "gNB-OAI"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +sa = 1; + +gNBs = +( + { + ////////// Identification parameters: + gNB_ID = 0xe00; + gNB_name = "gNB-OAI"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; }) }); + + nr_cellid = 12345678L; + + ////////// Physical parameters: + + pdsch_AntennaPorts_XP = 1; + pusch_AntennaPorts = 1; + do_CSIRS = 1; + do_SRS = 1; + sib1_tda = 15; + min_rxtxtime = 6; + + servingCellConfigCommon = ( + { + #spCellConfigCommon + + physCellId = 0; + +# downlinkConfigCommon + #frequencyInfoDL + # This is 27510.240 MHz + 16 * 12 * 120e3 MHz = 27533.280 MHz (GSCN: 22446) + absoluteFrequencySSB = 2071387; + dl_frequencyBand = 257; + # This is 27510.240 MHz + dl_absoluteFrequencyPointA = 2071003; + #scs-SpecificCarrierList + dl_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + dl_subcarrierSpacing = 3; + dl_carrierBandwidth = 32; + #initialDownlinkBWP + #genericParameters + # This is RBstart = 0, L = 32: (275 * (L - 1)) + RBstart + initialDLBWPlocationAndBandwidth = 8525; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialDLBWPsubcarrierSpacing = 3; + #pdcch-ConfigCommon + initialDLBWPcontrolResourceSetZero = 0; + initialDLBWPsearchSpaceZero = 0; + + #uplinkConfigCommon + #frequencyInfoUL + ul_frequencyBand = 257; + #scs-SpecificCarrierList + ul_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing = 3; + ul_carrierBandwidth = 32; + pMax = 20; + #initialUplinkBWP + #genericParameters + initialULBWPlocationAndBandwidth = 8525; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialULBWPsubcarrierSpacing = 3; + #rach-ConfigCommon + #rach-ConfigGeneric + prach_ConfigurationIndex = 59; +#prach_msg1_FDM +#0 = one, 1=two, 2=four, 3=eight + prach_msg1_FDM = 0; + prach_msg1_FrequencyStart = 0; + zeroCorrelationZoneConfig = 12; + preambleReceivedTargetPower = -96; +#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) + preambleTransMax = 6; +#powerRampingStep +# 0=dB0,1=dB2,2=dB4,3=dB6 + powerRampingStep = 1; +#ra_ReponseWindow +#1,2,4,8,10,20,40,80 + ra_ResponseWindow = 5; +#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR +#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; +#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; +#ra_ContentionResolutionTimer +#(0..7) 8,16,24,32,40,48,56,64 + ra_ContentionResolutionTimer = 7; + rsrp_ThresholdSSB = 19; +#prach-RootSequenceIndex_PR +#1 = 839, 2 = 139 + prach_RootSequenceIndex_PR = 2; + prach_RootSequenceIndex = 1; + # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex + # + msg1_SubcarrierSpacing = 3; +# restrictedSetConfig +# 0=unrestricted, 1=restricted type A, 2=restricted type B + restrictedSetConfig = 0, + + msg3_DeltaPreamble = 1; + p0_NominalWithGrant =-90; + +# pucch-ConfigCommon setup : +# pucchGroupHopping +# 0 = neither, 1= group hopping, 2=sequence hopping + pucchGroupHopping = 0; + hoppingId = 40; + p0_nominal = -70; +# ssb_PositionsInBurs_BitmapPR +# 1=short, 2=medium, 3=long + ssb_PositionsInBurst_PR = 3; + ssb_PositionsInBurst_Bitmap = 1; + +# ssb_periodicityServingCell +# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 + ssb_periodicityServingCell = 2; + +# dmrs_TypeA_position +# 0 = pos2, 1 = pos3 + dmrs_TypeA_Position = 0; + +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + subcarrierSpacing = 3; + + + #tdd-UL-DL-ConfigurationCommon +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + referenceSubcarrierSpacing = 3; + # pattern1 + # dl_UL_TransmissionPeriodicity + # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 + dl_UL_TransmissionPeriodicity = 3; + nrofDownlinkSlots = 7; + nrofDownlinkSymbols = 6; + nrofUplinkSlots = 2; + nrofUplinkSymbols = 4; + + ssPBCH_BlockPower = -25; + } + + ); + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// AMF parameters: + amf_ip_address = ( { ipv4 = "192.168.70.132"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + + NETWORK_INTERFACES : + { + GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; + GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; + GNB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + } +); + +MACRLCs = ( +{ + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + #pusch_TargetSNRx10 = 150; + #pucch_TargetSNRx10 = 200; +} +); + +L1s = ( +{ + num_cc = 1; + tr_n_preference = "local_mac"; + prach_dtx_threshold = 120; + #pucch0_dtx_threshold = 120; +} +); + +RUs = ( +{ + local_rf = "yes"; + nb_tx = 1; + nb_rx = 1; + att_tx = 0; + att_rx = 0; + sl_ahead = 12; + bands = [257]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 60; + eNB_instances = [0]; + #if_freq = 2650000000L; + ##beamforming 1x2 matrix: 1 layer x 2 antennas + bf_weights = [0x00007fff, 0x0000]; + #clock_src = "internal"; + sdr_addrs = "mgmt_addr=192.168.10.2,addr=192.168.10.2,clock_source=internal,time_source=internal" +} +); + +THREAD_STRUCT = ( +{ + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_SINGLE_THREAD"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; +} +); + +rfsimulator : +{ + serveraddr = "server"; + serverport = 4043; + options = (); #("saviq"); or/and "chanmod" + modelname = "AWGN"; + IQfile = "/tmp/rfsimulator.iqs"; +}; + +security = { + # preferred ciphering algorithms + # the first one of the list that an UE supports in chosen + # valid values: nea0, nea1, nea2, nea3 + ciphering_algorithms = ( "nea0" ); + + # preferred integrity algorithms + # the first one of the list that an UE supports in chosen + # valid values: nia0, nia1, nia2, nia3 + integrity_algorithms = ( "nia2", "nia0" ); + + # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter + # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' + drb_ciphering = "yes"; + drb_integrity = "no"; +}; + +log_config : +{ + global_log_level ="info"; + hw_log_level ="info"; + phy_log_level ="info"; + mac_log_level ="info"; + rlc_log_level ="info"; + pdcp_log_level ="info"; + rrc_log_level ="info"; + ngap_log_level ="info"; + f1ap_log_level ="info"; +}; From e29c938130316bb49db442c951452c73cf505aa6 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 30 Jan 2024 10:20:48 +0000 Subject: [PATCH 4/7] Tutorials: simplify the pull section for the CN5G images No need to pull every single image independently, we can pull all the images with the corresponding tag that is in the 'docker-compose.yaml' with the 'docker compose pull' command --- doc/NR_SA_Tutorial_OAI_CN5G.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/doc/NR_SA_Tutorial_OAI_CN5G.md b/doc/NR_SA_Tutorial_OAI_CN5G.md index 1f65aa3002..a07cf85631 100644 --- a/doc/NR_SA_Tutorial_OAI_CN5G.md +++ b/doc/NR_SA_Tutorial_OAI_CN5G.md @@ -58,16 +58,8 @@ rm -r ~/openairinterface5g-develop-doc-tutorial_resources-oai-cn5g ~/oai-cn5g.zi ## 2.3 Pull OAI CN5G docker images ```bash -docker pull mysql:8.0 -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:jammy -docker pull oaisoftwarealliance/ims:latest +cd ~/oai-cn5g +docker compose pull ``` # 3. Run OAI CN5G From 7ee0cfc28c7ee7bdcd8e3abe88535d8345f2e079 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 30 Jan 2024 10:24:14 +0000 Subject: [PATCH 5/7] Tutorials: remove OAI UE SIM section The main goal of this tutorial is to get 5G end-to-end connectivity as simple and fast as possible. For advanced topic the user should search for specific documentation. --- doc/NR_SA_Tutorial_OAI_nrUE.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/NR_SA_Tutorial_OAI_nrUE.md b/doc/NR_SA_Tutorial_OAI_nrUE.md index dfb15875e4..8d107af6a0 100644 --- a/doc/NR_SA_Tutorial_OAI_nrUE.md +++ b/doc/NR_SA_Tutorial_OAI_nrUE.md @@ -136,10 +136,7 @@ sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band # 5. OAI UE -## 5.1 SIM Card -For this tutorial, there is no need to adjust any of the default OAI nrUE SIM card values. However, they can be checked and changed in [UICC_PARAMS_DESC](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/openair3/UICC/usim_interface.c?ref_type=heads#L40) - -## 5.2 Run OAI nrUE +## 5.1 Run OAI nrUE ### USRP B210 Important notes: - This should be run in a second Ubuntu 22.04 host, other than gNB @@ -179,7 +176,7 @@ cd cmake_targets/ran_build/build sudo ./nr-uesoftmodem -r 32 --numerology 3 --band 257 -C 27533280000 --sa --uicc0.imsi 001010000000001 --ssb 72 --rfsim ``` -## 5.3 End-to-end connectivity test +## 5.2 End-to-end connectivity test - Ping test from the UE host to the CN5G ```bash ping 192.168.70.135 -I oaitun_ue1 From 05babdfc5c278545c369911c7192d4f1a30a13cc Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 30 Jan 2024 10:54:49 +0000 Subject: [PATCH 6/7] Tutorials: add link for Ettus UHD installation page and remove 'source oaienv' from instructions --- doc/NR_SA_Tutorial_COTS_UE.md | 17 +++++----------- doc/NR_SA_Tutorial_OAI_nrUE.md | 37 +++++++++------------------------- 2 files changed, 15 insertions(+), 39 deletions(-) diff --git a/doc/NR_SA_Tutorial_COTS_UE.md b/doc/NR_SA_Tutorial_COTS_UE.md index fe4fdbee36..5f1dd97cec 100644 --- a/doc/NR_SA_Tutorial_COTS_UE.md +++ b/doc/NR_SA_Tutorial_COTS_UE.md @@ -58,6 +58,7 @@ sudo ./program_uicc --adm 12345678 --imsi 001010000000001 --isdn 00000001 --acc ### Build UHD from source ```bash +# https://files.ettus.com/manual/page_build_guide.html sudo apt install -y autoconf automake build-essential ccache cmake cpufrequtils doxygen ethtool g++ git inetutils-tools libboost-all-dev libncurses5 libncurses5-dev libusb-1.0-0 libusb-1.0-0-dev libusb-dev python3-dev python3-mako python3-numpy python3-requests python3-scipy python3-setuptools python3-ruamel.yaml git clone https://github.com/EttusResearch/uhd.git ~/uhd @@ -87,9 +88,7 @@ cd ~/openairinterface5g/cmake_targets ./build_oai -I # Build OAI gNB -cd ~/openairinterface5g -source oaienv -cd cmake_targets +cd ~/openairinterface5g/cmake_targets ./build_oai -w USRP --ninja --gNB -C ``` @@ -106,24 +105,18 @@ docker compose up -d ### USRP B210 ```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build +cd ~/openairinterface5g/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 ``` ### USRP N300 ```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build +cd ~/openairinterface5g/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 +cd ~/openairinterface5g/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 ``` diff --git a/doc/NR_SA_Tutorial_OAI_nrUE.md b/doc/NR_SA_Tutorial_OAI_nrUE.md index 8d107af6a0..d82343c684 100644 --- a/doc/NR_SA_Tutorial_OAI_nrUE.md +++ b/doc/NR_SA_Tutorial_OAI_nrUE.md @@ -46,6 +46,7 @@ Please install and configure OAI CN5G as described here: ### Build UHD from source ```bash +# https://files.ettus.com/manual/page_build_guide.html sudo apt install -y autoconf automake build-essential ccache cmake cpufrequtils doxygen ethtool g++ git inetutils-tools libboost-all-dev libncurses5 libncurses5-dev libusb-1.0-0 libusb-1.0-0-dev libusb-dev python3-dev python3-mako python3-numpy python3-requests python3-scipy python3-setuptools python3-ruamel.yaml git clone https://github.com/EttusResearch/uhd.git ~/uhd @@ -78,9 +79,7 @@ cd ~/openairinterface5g/cmake_targets sudo apt install -y libforms-dev libforms-bin # Build OAI gNB -cd ~/openairinterface5g -source oaienv -cd cmake_targets +cd ~/openairinterface5g/cmake_targets ./build_oai -w USRP --ninja --nrUE --gNB --build-lib "nrscope" -C ``` @@ -97,40 +96,30 @@ docker compose up -d ### USRP B210 ```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build +cd ~/openairinterface5g/cmake_targets/ran_build/build sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --sa -E --continuous-tx ``` ### USRP N300 ```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build +cd ~/openairinterface5g/cmake_targets/ran_build/build sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --gNBs.[0].min_rxtxtime 6 --sa --usrp-tx-thread-config 1 ``` ### USRP X300 ```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build +cd ~/openairinterface5g/cmake_targets/ran_build/build sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --gNBs.[0].min_rxtxtime 6 --sa --usrp-tx-thread-config 1 -E --continuous-tx ``` ### RFsimulator ```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build +cd ~/openairinterface5g/cmake_targets/ran_build/build sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim --sa ``` ### RFsimulator in FR2 ```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build +cd ~/openairinterface5g/cmake_targets/ran_build/build sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.32prb.usrpx410.conf --rfsim ``` @@ -144,9 +133,7 @@ Important notes: Run OAI nrUE with USRP B210 ```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build +cd ~/openairinterface5g/cmake_targets/ran_build/build sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --ue-fo-compensation --sa -E --uicc0.imsi 001010000000001 ``` @@ -157,9 +144,7 @@ Important notes: Run OAI nrUE with RFsimulator ```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build +cd ~/openairinterface5g/cmake_targets/ran_build/build sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --sa --uicc0.imsi 001010000000001 --rfsim ``` @@ -170,9 +155,7 @@ Important notes: Run OAI nrUE with RFsimulator in FR2 ```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build +cd ~/openairinterface5g/cmake_targets/ran_build/build sudo ./nr-uesoftmodem -r 32 --numerology 3 --band 257 -C 27533280000 --sa --uicc0.imsi 001010000000001 --ssb 72 --rfsim ``` From 60af0f1af25d485ce572ab37480badd291e45683 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 30 Jan 2024 11:09:32 +0000 Subject: [PATCH 7/7] Tutorials: replace oai-spgwu-tiny by oai-upf Replace oai-spgwu-tiny by the new oai-upf Change UE IP network address blocks for a 'Private-Use' range. Address block 12.1.0.0/16 is for public use, so we should not use it for the UEs (https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml) --- .../oai-cn5g/conf/config.yaml | 83 ++++++++++++++++--- .../oai-cn5g/docker-compose.yaml | 40 ++------- 2 files changed, 78 insertions(+), 45 deletions(-) diff --git a/doc/tutorial_resources/oai-cn5g/conf/config.yaml b/doc/tutorial_resources/oai-cn5g/conf/config.yaml index a3951fdc01..ffa9fbf55f 100644 --- a/doc/tutorial_resources/oai-cn5g/conf/config.yaml +++ b/doc/tutorial_resources/oai-cn5g/conf/config.yaml @@ -59,6 +59,23 @@ nfs: n4: interface_name: eth0 port: 8805 + upf: + host: oai-upf + sbi: + port: 8080 + api_version: v1 + interface_name: eth0 + n3: + interface_name: eth0 + port: 2152 + n4: + interface_name: eth0 + port: 8805 + n6: + interface_name: eth0 + n9: + interface_name: eth0 + port: 2152 udm: host: oai-udm sbi: @@ -94,6 +111,16 @@ database: generate_random: true connection_timeout: 300 # seconds +## general single_nssai configuration +## Defines YAML anchors, which are reused in the config file +snssais: + - &embb_slice1 + sst: 1 + - &embb_slice2 + sst: 1 + - &embb_slice3 + sst: 1 + ############## NF-specific configuration amf: pid_directory: "/var/run" @@ -110,7 +137,7 @@ amf: served_guami_list: - mcc: 001 mnc: 01 - amf_region_id: 80 + amf_region_id: 01 amf_set_id: 001 amf_pointer: 01 plmn_support_list: @@ -118,7 +145,9 @@ amf: mnc: 01 tac: 0x0001 nssai: - - sst: 1 + - *embb_slice1 + - *embb_slice2 + - *embb_slice3 supported_integrity_algorithms: - "NIA1" - "NIA2" @@ -134,7 +163,7 @@ smf: use_local_pcc_rules: yes # Use infos from local_pcc_rules or from PCF # we resolve from NRF, this is just to configure usage_reporting upfs: - - host: oai-spgwu + - host: oai-upf config: enable_usage_reporting: no ue_dns: @@ -145,40 +174,68 @@ smf: ims: pcscf_ipv4: "192.168.70.139" pcscf_ipv6: "fe80::7915:f408:1787:db8b" - # the DNN you configure here should be configured in "dnns" + # the DNN you configure here should be configured in "dnns" + # follows the SmfInfo datatype from 3GPP TS 29.510 + smf_info: + sNssaiSmfInfoList: + - sNssai: *embb_slice1 + dnnSmfInfoList: + - dnn: "oai" + - sNssai: *embb_slice2 + dnnSmfInfoList: + - dnn: "openairinterface" + - sNssai: *embb_slice3 + dnnSmfInfoList: + - dnn: "ims" local_subscription_infos: - - single_nssai: - sst: 1 + - single_nssai: *embb_slice1 dnn: "oai" qos_profile: 5qi: 9 session_ambr_ul: "10Gbps" session_ambr_dl: "10Gbps" - - single_nssai: - sst: 1 + - single_nssai: *embb_slice2 dnn: "openairinterface" qos_profile: 5qi: 9 session_ambr_ul: "10Gbps" session_ambr_dl: "10Gbps" - - single_nssai: - sst: 1 + - single_nssai: *embb_slice3 dnn: "ims" qos_profile: 5qi: 9 session_ambr_ul: "10Gbps" session_ambr_dl: "10Gbps" +upf: + support_features: + enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off + enable_snat: yes # If "on": Source natting is done for UE, DEFAULT= off + remote_n6_gw: localhost # Dummy host since simple-switch does not use N6 GW + smfs: + - host: oai-smf # To be used for PFCP association in case of no-NRF + upf_info: + sNssaiUpfInfoList: + - sNssai: *embb_slice1 + dnnUpfInfoList: + - dnn: "oai" + - sNssai: *embb_slice2 + dnnUpfInfoList: + - dnn: "openairinterface" + - sNssai: *embb_slice3 + dnnUpfInfoList: + - dnn: "ims" + ## DNN configuration dnns: - dnn: "oai" pdu_session_type: "IPV4" - ipv4_subnet: "12.1.1.2/24" + ipv4_subnet: "10.0.0.0/24" - dnn: "openairinterface" pdu_session_type: "IPV4V6" - ipv4_subnet: "12.1.2.2/24" + ipv4_subnet: "10.0.1.0/24" ipv6_prefix: "2001:1:2::/64" - dnn: "ims" pdu_session_type: "IPV4V6" - ipv4_subnet: "12.1.9.2/24" + ipv4_subnet: "10.0.9.0/24" ipv6_prefix: "2001:1:2::/64" diff --git a/doc/tutorial_resources/oai-cn5g/docker-compose.yaml b/doc/tutorial_resources/oai-cn5g/docker-compose.yaml index 9837983ed8..64e3174219 100644 --- a/doc/tutorial_resources/oai-cn5g/docker-compose.yaml +++ b/doc/tutorial_resources/oai-cn5g/docker-compose.yaml @@ -22,7 +22,7 @@ services: ipv4_address: 192.168.70.131 ims: - container_name: "asterisk-ims" + container_name: "ims" image: oaisoftwarealliance/ims:latest volumes: - ./conf/sip.conf:/etc/asterisk/sip.conf @@ -129,40 +129,16 @@ services: networks: public_net: ipv4_address: 192.168.70.133 - oai-spgwu: - container_name: "oai-spgwu" - image: oaisoftwarealliance/oai-spgwu-tiny:develop + oai-upf: + container_name: "oai-upf" + image: oaisoftwarealliance/oai-upf:develop expose: - 2152/udp - 8805/udp - - 8080/tcp - # TODO: oai-spgwu-tiny will not support the new common yaml config file feature - # waiting for the new oai-upf NF + volumes: + - ./conf/config.yaml:/openair-upf/etc/config.yaml environment: - TZ=Europe/Paris - - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - - SGW_INTERFACE_NAME_FOR_SX=eth0 - - PGW_INTERFACE_NAME_FOR_SGI=eth0 - - NETWORK_UE_NAT_OPTION=yes - - NETWORK_UE_IP=12.1.0.0/16 - - ENABLE_5G_FEATURES=yes - - REGISTER_NRF=yes - - USE_FQDN_NRF=yes - - UPF_FQDN_5G=oai-spgwu - - NRF_IPV4_ADDRESS=192.168.70.130 - - NRF_FQDN=oai-nrf - # Mandatory to set the NRF PORT to 8080 (it is set to default to 80 otherwise) - - HTTP_VERSION=2 - - NRF_PORT=8080 - # Slice 0 (1, 0xFFFFFF) - - NSSAI_SST_0=1 - - DNN_0=oai - # Slice 1 (1, 0xFFFFFF) - - NSSAI_SST_1=1 - - DNN_1=openairinterface - # Slice 2 (1, 0xFFFFFF) - - NSSAI_SST_2=1 - - DNN_2=ims depends_on: - oai-nrf - oai-smf @@ -181,10 +157,10 @@ services: container_name: oai-ext-dn image: oaisoftwarealliance/trf-gen-cn5g:jammy entrypoint: /bin/bash -c \ - "ip route add 12.1.0.0/16 via 192.168.70.134 dev eth0; ip route; sleep infinity" + "ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0; ip route; sleep infinity" command: ["/bin/bash", "-c", "trap : SIGTERM SIGINT; sleep infinity & wait"] healthcheck: - test: /bin/bash -c "ip r | grep 12.1.0" + test: /bin/bash -c "ip r | grep 10.0.0" interval: 5s timeout: 2s retries: 10