Commit bafd82a9 authored by Eurecom's avatar Eurecom

Merge remote-tracking branch 'origin/NR_UE_SA' into bandwidth-testing

Conflicts:
	executables/nr-ru.c
	openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
	openair1/SCHED_NR/phy_procedures_nr_gNB.c
	openair2/LAYER2/NR_MAC_gNB/config.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
	openair2/RRC/NR/MESSAGES/asn1_msg.c
	openair2/RRC/NR/nr_rrc_proto.h
	openair2/RRC/NR/rrc_gNB.c
	openair2/RRC/NR/rrc_gNB_reconfig.c
parents f41890b3 8fbc5a71
......@@ -198,6 +198,26 @@ pipeline {
}
}
}
stage ("RF Simulators") {
when { expression {doMandatoryTests} }
steps {
script {
triggerSlaveJob ('RAN-RF-Sim-Test', 'Test-RF-Sim-Container')
}
}
post {
always {
script {
finalizeSlaveJob('RAN-RF-Sim-Test')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
}
}
}
......
......@@ -369,7 +369,7 @@ pipeline {
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
......
......@@ -266,6 +266,9 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM):
elif re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE)
PHYSIM.OCProjectName = matchReg.group(1)
elif re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
RAN.BuildId = matchReg.group(1)
else:
HELP.GenericHelp(CONST.Version)
sys.exit('Invalid Parameter: ' + myArgv)
......
This diff is collapsed.
......@@ -6,10 +6,8 @@ eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
eNB_ID = 0xe01;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
......@@ -128,24 +126,25 @@ eNBs =
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
*/
// Parameters for SIB19
discRxPool_cp_Len = "normal"
discRxPool_discPeriod = "rf32"
discRxPool_numRetx = 1;
discRxPool_numRepetition = 2;
discRxPool_ResourceConfig_prb_Num = 5;
discRxPool_ResourceConfig_prb_Start = 3;
discRxPool_ResourceConfig_prb_End = 21;
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size= 5;
discRxPool_cp_Len = "normal"
discRxPool_discPeriod = "rf32"
discRxPool_numRetx = 1;
discRxPool_numRepetition = 2;
discRxPool_ResourceConfig_prb_Num = 5;
discRxPool_ResourceConfig_prb_Start = 3;
discRxPool_ResourceConfig_prb_End = 21;
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
//SSB central frequency of NR secondary cell group (for ENDC NSA)
nr_scg_ssb_freq = 641272;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
......@@ -175,6 +174,7 @@ eNBs =
SCTP_OUTSTREAMS = 2;
};
enable_measurement_reports = "no";
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
......@@ -185,10 +185,8 @@ eNBs =
}
);
enable_measurement_reports = "no";
///X2
enable_x2 = "no";
enable_x2 = "no";
t_reloc_prep = 1000; /* unit: millisecond */
tx2_reloc_overall = 2000; /* unit: millisecond */
t_dc_prep = 1000; /* unit: millisecond */
......
......@@ -8,7 +8,6 @@ gNBs =
{
////////// Identification parameters:
gNB_ID = 0xe00;
cell_type = "CELL_MACRO_GNB";
gNB_name = "gNB-Eurecom-5GNRBox";
......@@ -185,102 +184,101 @@ gNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
);
# mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
# ipv6 = "192:168:30::17";
# port = 36412 ;
# active = "yes";
# preference = "ipv4";
# }
# );
///X2
enable_x2 = "yes";
enable_x2 = "yes";
t_reloc_prep = 1000; /* unit: millisecond */
tx2_reloc_overall = 2000; /* unit: millisecond */
t_dc_prep = 1000; /* unit: millisecond */
t_dc_overall = 2000; /* unit: millisecond */
target_enb_x2_ip_address = (
{ ipv4 = "CI_FR1_CTL_ENB_IP_ADDR";
ipv6 = "192:168:30::17";
preference = "ipv4";
}
);
target_enb_x2_ip_address = ( { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR";
ipv6 = "192:168:30::17";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR";
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR";
GNB_PORT_FOR_X2C = 36422; # Spec 36422
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR";
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR";
GNB_PORT_FOR_X2C = 36422; # Spec 36422
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
}
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 6;
}
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 6;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 3
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 111;
eNB_instances = [0];
# clock_src = "external";
}
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 3
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 111;
eNB_instances = [0];
# clock_src = "external";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
//parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
uicc: {
opc = "testopc";
opc = "testopc";
};
uicc0 = {
imsi = "@FULL_IMSI@";
key = "@FULL_KEY@";
opc= "@OPC@";
dnn= "@DNN@";
nssai_sst=@NSSAI_SST@;
nssai_sd=@NSSAI_SD@;
}
......@@ -182,9 +182,12 @@ class HTMLManagement():
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' </table>\n')
if (ADBIPAddress != 'none'):
if (ADBIPAddress != 'none') and (ADBIPAddress != 'modules'):
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(self.htmlNb_Smartphones) + ' UE(s) is(are) connected to ADB bench server</h2>\n')
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(self.htmlNb_CATM_Modules) + ' CAT-M UE(s) is(are) connected to bench server</h2>\n')
elif (ADBIPAddress == 'modules'):
self.htmlUEConnected = 1
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> 1 commercial module is connected to CI bench</h2>\n')
else:
self.htmlUEConnected = 1
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> 1 OAI UE(s) is(are) connected to CI bench</h2>\n')
......
......@@ -65,6 +65,7 @@ import xml.etree.ElementTree as ET
import logging
import datetime
import signal
import subprocess
from multiprocessing import Process, Lock, SimpleQueue
logging.basicConfig(
level=logging.DEBUG,
......@@ -372,6 +373,41 @@ def GetParametersFromXML(action):
if (string_field is not None):
CONTAINERS.yamlPath[CONTAINERS.eNB_instance] = string_field
elif action == 'DeployGenObject' or action == 'UndeployGenObject':
string_field=test.findtext('yaml_path')
if (string_field is not None):
CONTAINERS.yamlPath[0] = string_field
string_field=test.findtext('services')
if (string_field is not None):
CONTAINERS.services[0] = string_field
string_field=test.findtext('nb_healthy')
if (string_field is not None):
CONTAINERS.nb_healthy[0] = int(string_field)
elif action == 'PingFromContainer':
string_field = test.findtext('container_name')
if (string_field is not None):
CONTAINERS.pingContName = string_field
string_field = test.findtext('options')
if (string_field is not None):
CONTAINERS.pingOptions = string_field
string_field = test.findtext('loss_threshold')
if (string_field is not None):
CONTAINERS.pingLossThreshold = string_field
elif action == 'IperfFromContainer':
string_field = test.findtext('server_container_name')
if (string_field is not None):
CONTAINERS.svrContName = string_field
string_field = test.findtext('server_options')
if (string_field is not None):
CONTAINERS.svrOptions = string_field
string_field = test.findtext('client_container_name')
if (string_field is not None):
CONTAINERS.cliContName = string_field
string_field = test.findtext('client_options')
if (string_field is not None):
CONTAINERS.cliOptions = string_field
else: # ie action == 'Run_PhySim':
ldpc.runargs = test.findtext('physim_run_args')
......@@ -479,6 +515,8 @@ if re.match('^TerminateeNB$', mode, re.IGNORECASE):
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
if RAN.eNBIPAddress == 'none':
sys.exit(0)
RAN.eNB_instance=0
RAN.eNB_serverId[0]='0'
RAN.eNBSourceCodePath='/tmp/'
......@@ -514,11 +552,18 @@ elif re.match('^LogCollectBuild$', mode, re.IGNORECASE):
if (RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '') and (CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '' or CiTestObj.UESourceCodePath == ''):
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
if RAN.eNBIPAddress == 'none':
sys.exit(0)
CiTestObj.LogCollectBuild(RAN)
elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
if RAN.eNBIPAddress == 'none':
cmd = 'zip -r enb.log.' + RAN.BuildId + '.zip cmake_targets/log'
logging.debug(cmd)
zipStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=60)
sys.exit(0)
RAN.LogCollecteNB()
elif re.match('^LogCollectHSS$', mode, re.IGNORECASE):
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
......@@ -573,7 +618,7 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
if foundCount != HTML.nbTestXMLfiles:
HTML.nbTestXMLfiles=foundCount
if (CiTestObj.ADBIPAddress != 'none'):
if (CiTestObj.ADBIPAddress != 'none') and (CiTestObj.ADBIPAddress != 'modules'):
terminate_ue_flag = False
CiTestObj.GetAllUEDevices(terminate_ue_flag)
CiTestObj.GetAllCatMDevices(terminate_ue_flag)
......@@ -677,10 +722,12 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
signal.signal(signal.SIGUSR1, receive_signal)
if (CiTestObj.ADBIPAddress != 'none'):
if (CiTestObj.ADBIPAddress != 'none') and (CiTestObj.ADBIPAddress != 'modules'):
terminate_ue_flag = False
CiTestObj.GetAllUEDevices(terminate_ue_flag)
CiTestObj.GetAllCatMDevices(terminate_ue_flag)
elif (CiTestObj.ADBIPAddress == 'modules'):
CiTestObj.UEDevices.append('COTS-Module')
else:
CiTestObj.UEDevices.append('OAI-UE')
HTML.SethtmlUEConnected(len(CiTestObj.UEDevices) + len(CiTestObj.CatMDevices))
......@@ -714,7 +761,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
CiTestObj.ShowTestID()
GetParametersFromXML(action)
if action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Ping' or action == 'Iperf' or action == 'Reboot_UE' or action == 'DataDisable_UE' or action == 'DataEnable_UE' or action == 'CheckStatusUE':
if (CiTestObj.ADBIPAddress != 'none'):
if (CiTestObj.ADBIPAddress != 'none') and (CiTestObj.ADBIPAddress != 'modules'):
#in these cases, having no devices is critical, GetAllUEDevices function has to manage it as a critical error, reason why terminate_ue_flag is set to True
terminate_ue_flag = True
# Now we stop properly the test-suite --> clean reporting
......@@ -799,7 +846,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
CiTestObj.Perform_X2_Handover(HTML,RAN,EPC)
elif action == 'Build_PhySim':
HTML=ldpc.Build_PhySim(HTML,CONST)
if ldpc.exitStatus==1:sys.exit()
if ldpc.exitStatus==1:
RAN.prematureExit = True
elif action == 'Run_PhySim':
HTML=ldpc.Run_PhySim(HTML,CONST,id)
elif action == 'Build_Image':
......@@ -812,9 +860,25 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
SCA.CppCheckAnalysis(HTML)
elif action == 'Deploy_Run_PhySim':
PHYSIM.Deploy_PhySim(HTML, RAN)
elif action == 'DeployGenObject':
CONTAINERS.DeployGenObject(HTML)
if CONTAINERS.exitStatus==1:
RAN.prematureExit = True
elif action == 'UndeployGenObject':
CONTAINERS.UndeployGenObject(HTML)
if CONTAINERS.exitStatus==1:
RAN.prematureExit = True
elif action == 'PingFromContainer':
CONTAINERS.PingFromContainer(HTML)
if CONTAINERS.exitStatus==1:
RAN.prematureExit = True
elif action == 'IperfFromContainer':
CONTAINERS.IperfFromContainer(HTML)
if CONTAINERS.exitStatus==1:
RAN.prematureExit = True
else:
sys.exit('Invalid class (action) from xml')
if not RAN.prematureExit:
if RAN.prematureExit:
if CiTestObj.testCase_id == CiTestObj.testMinStableId:
logging.debug('Scenario has reached minimal stability point')
CiTestObj.testStabilityPointReached = True
......
......@@ -41,3 +41,7 @@
- Undeploy_Object
- Cppcheck_Analysis
- Deploy_Run_PhySim
- DeployGenObject
- UndeployGenObject
- PingFromContainer
- IperfFromContainer
<!--
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
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr</htmlTabRef>
<htmlTabName>Testing 5G NR RF sim in containers</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
000001
000002
000003
020001
020002
030001
030002
100001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G CoreNetwork</desc>
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
<services>mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
<nb_healthy>6</nb_healthy>
</testCase>
<testCase id="000002">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G gNB RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
<services>oai-gnb</services>
<nb_healthy>7</nb_healthy>
</testCase>
<testCase id="000003">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
<services>oai-nr-ue</services>
<nb_healthy>8</nb_healthy>
</testCase>
<testCase id="020001">
<class>PingFromContainer</class>
<desc>Ping ext-dn from NR-UE</desc>
<container_name>rfsim5g-oai-nr-ue</container_name>
<options>-I oaitun_ue1 -c 20 192.168.72.135</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="020002">
<class>PingFromContainer</class>
<desc>Ping NR-UE from ext-dn</desc>
<container_name>rfsim5g-oai-ext-dn</container_name>
<options>-c 20 12.1.1.2</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="030001">
<class>IperfFromContainer</class>
<desc>Iperf UDP Downlink</desc>
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
<client_container_name>rfsim5g-oai-ext-dn</client_container_name>
<server_options>-B 12.1.1.2 -u -i 1 -s</server_options>
<client_options>-c 12.1.1.2 -u -i 1 -t 30 -b 400K</client_options>
</testCase>
<testCase id="030002">
<class>IperfFromContainer</class>
<desc>Iperf UDP Uplink</desc>
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
<server_options>-u -i 1 -s</server_options>
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 30 -b 20K</client_options>
</testCase>
<testCase id="100001">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
</testCase>
</testCaseList>
<!--
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
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-down</htmlTabRef>
<htmlTabName>CleanUp 5G RF</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100002
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100002">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
</testCase>
</testCaseList>
This diff is collapsed.
......@@ -32,7 +32,7 @@ services:
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
oai_hss:
image: oai-hss:develop-2021-06-14
image: oai-hss:latest
container_name: rfsim4g-oai-hss
privileged: true
depends_on: [cassandra]
......@@ -59,7 +59,7 @@ services:
retries: 5
oai_mme:
image: oai-mme:production
image: oai-mme:latest
container_name: rfsim4g-oai-mme
privileged: true
depends_on: [oai_hss]
......@@ -116,7 +116,7 @@ services:
retries: 5
oai_spgwc:
image: oai-spgwc:develop-2021-06-14
image: oai-spgwc:latest
privileged: true
depends_on: [oai_mme]
container_name: rfsim4g-oai-spgwc
......@@ -148,7 +148,7 @@ services:
retries: 5
oai_spgwu:
image: oai-spgwu-tiny:develop-2021-06-14
image: oai-spgwu-tiny:latest
privileged: true
container_name: rfsim4g-oai-spgwu-tiny
depends_on: [oai_spgwc]
......@@ -177,19 +177,6 @@ services:
timeout: 5s
retries: 5
flexran_rtc:
image: flexran-rtc:production
privileged: true
container_name: rfsim4g-flexran-rtc
networks:
public_net:
ipv4_address: 192.168.61.10
healthcheck:
test: /bin/bash -c "pgrep rt_controller"
interval: 10s
timeout: 5s
retries: 5
trf_gen:
image: trf-gen:production
privileged: true
......@@ -235,6 +222,11 @@ services:
FLEXRAN_INTERFACE_NAME: eth0
FLEXRAN_IPV4_ADDRESS: 192.168.61.10
USE_ADDITIONAL_OPTIONS: --rfsim
healthcheck:
test: /bin/bash -c "pgrep lte-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai_ue0:
image: oai-lte-ue:develop
......@@ -257,6 +249,11 @@ services:
MSISDN: '001011234561010'
HPLMN: 20896
USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1
healthcheck:
test: /bin/bash -c "pgrep lte-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
networks:
private_net:
......@@ -264,9 +261,12 @@ networks:
ipam:
config:
- subnet: 192.168.68.0/26
driver_opts:
com.docker.network.bridge.name: "rfsim4g-private"
public_net:
name: rfsim4g-oai-public-net
ipam:
config:
- subnet: 192.168.61.0/26
driver_opts:
com.docker.network.bridge.name: "rfsim4g-public"
This diff is collapsed.
#!/bin/bash
set -eo pipefail
STATUS=0
AMF_PORT_FOR_NGAP=38412
AMF_PORT_FOR_N11_HTTP=80
AMF_IP_NGAP_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_NGAP | grep inet | awk {'print $2'})
AMF_IP_N11_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_N11 | grep inet | awk {'print $2'})
N2_PORT_STATUS=$(netstat -Snpl | grep -o "$AMF_IP_NGAP_INTERFACE:$AMF_PORT_FOR_NGAP")
N11_PORT_STATUS=$(netstat -tnpl | grep -o "$AMF_IP_N11_INTERFACE:$AMF_PORT_FOR_N11_HTTP")
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
NB_UNREPLACED_AT=`cat /openair-amf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
if [ $NB_UNREPLACED_AT -ne 0 ]; then
STATUS=1
echo "Healthcheck error: configuration file is not configured properly"
fi
if [[ -z $N2_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: N2 SCTP port $AMF_PORT_FOR_NGAP is not listening"
fi
if [[ -z $N11_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: N11/SBI TCP/HTTP port $AMF_PORT_FOR_N11_HTTP is not listening"
fi
#host="${MYSQL_SERVER}"
#user="${MYSQL_USER:-root}"
#export MYSQL_PWD="${MYSQL_PASS}"
#args=(
# -h"$host"
# -u"$user"
# --silent
#)
#if ! command -v mysql &> /dev/null; then
# echo "Installing mysql command"
# apt update
# apt-get -y install mysql-client
#else
# if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
# database_check=$(mysql -h$host -u$user -D oai_db --silent -e "SELECT * FROM users;")
# if [[ -z $database_check ]]; then
# echo "Healthcheck error: oai_db not populated"
# STATUS=1
# fi
# STATUS=0
# else
# echo "Healthcheck error: Mysql port inactive"
# STATUS=1
# fi
#fi
exit $STATUS
version: '3.8'
services:
oai-nrf:
container_name: "rfsim5g-oai-nrf"
image: oai-nrf:latest
environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks:
public_net:
ipv4_address: 192.168.71.130
volumes:
- ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql:
container_name: "rfsim5g-mysql"
image: mysql:5.7
volumes:
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
environment:
- TZ=Europe/Paris
- MYSQL_DATABASE=oai_db
- MYSQL_USER=test
- MYSQL_PASSWORD=test
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
ipv4_address: 192.168.71.131
oai-amf:
container_name: "rfsim5g-oai-amf"
image: oai-amf:latest
environment:
- TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208
- MNC=99
- REGION_ID=128
- AMF_SET_ID=1
- SERVED_GUAMI_MCC_0=208
- SERVED_GUAMI_MNC_0=99
- SERVED_GUAMI_REGION_ID_0=128
- SERVED_GUAMI_AMF_SET_ID_0=1
- SERVED_GUAMI_MCC_1=460
- SERVED_GUAMI_MNC_1=11
- SERVED_GUAMI_REGION_ID_1=10
- SERVED_GUAMI_AMF_SET_ID_1=1
- PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001
- SST_0=1
- SD_0=1
- SST_1=1
- SD_1=12
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0
- SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true
- SMF_INSTANCE_ID_1=2
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.71.131
- MYSQL_USER=root
- MYSQL_PASS=linux
- MYSQL_DB=oai_db
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1
- NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NF_REGISTRATION=yes
- SMF_SELECTION=yes
- USE_FQDN_DNS=yes
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf
- AUSF_IPV4_ADDRESS=127.0.0.1
- AUSF_PORT=80
- AUSF_API_VERSION=v1
depends_on:
- oai-nrf
volumes:
- ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks:
public_net:
ipv4_address: 192.168.71.132
oai-smf:
container_name: "rfsim5g-oai-smf"
image: oai-smf:latest
entrypoint: /bin/bash -c "/openair-smf/bin/oai_smf -c /openair-smf/bin/oai-smf.conf -o"
environment:
- TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
- AMF_IPV4_ADDRESS=0.0.0.0
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.71.134
- UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf
- REGISTER_NRF=yes
- DISCOVER_UPF=yes
- USE_FQDN_DNS=yes
depends_on:
- oai-nrf
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
- ./oai-smf.conf:/openair-smf/bin/oai-smf.conf
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
ipv4_address: 192.168.71.133
oai-spgwu:
container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:latest
environment:
- TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- 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.1.0/24
- SPGWC0_IP_ADDRESS=192.168.71.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=99
- MNC03=099
- TAC=1
- GTP_EXTENSION_HEADER_PRESENT=yes
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes
- USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf
- NSSAI_SST_0=1
- NSSAI_SD_0=1
- DNN_0=oai
depends_on:
- oai-nrf
cap_add:
- NET_ADMIN
- SYS_ADMIN
cap_drop:
- ALL
privileged: true
volumes:
- ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
ipv4_address: 192.168.71.134
traffic_net:
ipv4_address: 192.168.72.134
oai-ext-dn:
image: ubuntu:bionic
privileged: true
container_name: rfsim5g-oai-ext-dn
entrypoint: /bin/bash -c \
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
depends_on:
- oai-spgwu
networks:
traffic_net:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
interval: 10s
timeout: 5s
retries: 5
oai-gnb:
image: oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
environment:
RFSIMULATOR: server
USE_SA_TDD_MONO: 'yes'
GNB_NAME: gnb-rfsim
TAC: 1
MCC: '208'
MNC: '99'
MNC_LENGTH: 2
NSSAI_SST: 1
NSSAI_SD0: 1
NSSAI_SD1: 112233
AMF_IP_ADDRESS: 192.168.71.132
GNB_NGA_IF_NAME: eth0
GNB_NGA_IP_ADDRESS: 192.168.71.136
GNB_NGU_IF_NAME: eth0
GNB_NGU_IP_ADDRESS: 192.168.71.136
USE_ADDITIONAL_OPTIONS: --sa -E --rfsim
depends_on:
- oai-ext-dn
networks:
public_net:
ipv4_address: 192.168.71.136
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue:
image: oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
environment:
RFSIMULATOR: 192.168.71.136
FULL_IMSI: '208990100001100'
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
DNN: oai
NSSAI_SST: 1
NSSAI_SD: 1
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.137
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
driver: bridge
name: rfsim5g-oai-public-net
ipam:
config:
- subnet: 192.168.71.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-public"
traffic_net:
driver: bridge
name: rfsim5g-oai-traffic_net-net
ipam:
config:
- subnet: 192.168.72.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-traffic"
#!/bin/bash
set -eo pipefail
if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
exit 0
fi
host="$(hostname --ip-address || echo '127.0.0.1')"
user="${MYSQL_USER:-root}"
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
args=(
# force mysql to not use the local "mysqld.sock" (test "external" connectivity)
-h"$host"
-u"$user"
--silent
)
STATUS=0
if command -v mysqladmin &> /dev/null; then
if mysqladmin "${args[@]}" ping > /dev/null; then
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
if [[ -z $database_check ]]; then
echo "Healthcheck error: oai_db not populated"
STATUS=1
fi
STATUS=0
else
echo "Healthcheck error: Mysql port inactive"
STATUS=1
fi
else
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
if [[ -z $database_check ]]; then
echo "Healthcheck error: oai_db not populated"
STATUS=1
fi
STATUS=0
else
echo "Healthcheck error: Mysql port inactive"
STATUS=1
fi
fi
exit $STATUS
#!/bin/bash
set -eo pipefail
STATUS=0
NRF_IP_SBI_INTERFACE=$(ifconfig $NRF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
NRF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$NRF_IP_SBI_INTERFACE:$NRF_INTERFACE_PORT_FOR_SBI")
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
NB_UNREPLACED_AT=`cat /openair-nrf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
if [ $NB_UNREPLACED_AT -ne 0 ]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
fi
if [[ -z $NRF_SBI_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $NRF_INTERFACE_PORT_FOR_SBI is not listening."
fi
exit $STATUS
\ No newline at end of file
################################################################################
# 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
################################################################################
SMF =
{
FQDN = "oai-smf-svc";
INSTANCE = 0; # 0 is the default
PID_DIRECTORY = "/var/run"; # /var/run is the default
INTERFACES :
{
N4 :
{
# SMF binded interface for N4 communication (UPF)
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
};
SBI :
{
# SMF binded interface for SBI interface (e.g., communication with AMF, UDM)
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
HTTP2_PORT = 9090; # YOUR NETWORK CONFIG HERE
API_VERSION = "v1"; # YOUR SMF API VERSION CONFIG HERE
};
};
# Pool of UE assigned IP addresses
# Do not make IP pools overlap
# first IPv4 address X.Y.Z.1 is reserved for GTP network device on UPF
IP_ADDRESS_POOL :
{
IPV4_LIST = (
{RANGE = "12.1.1.2 - 12.1.1.128";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
{RANGE = "12.1.1.129 - 12.1.1.224";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
{RANGE = "10.10.10.2 - 10.10.10.253";} # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
);
IPV6_LIST = (
{PREFIX = "2001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
{PREFIX = "3001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
{PREFIX = "4001:1:2::/64";} # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
);
};
DNN_LIST = (
# IPV4_POOL, IPV6_POOL are index in IPV4_LIST, IPV6_LIST, PDU_SESSION_TYPE choice in {IPv4, IPv6, IPv4v6}
{DNN_NI = "default"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 2; IPV6_POOL = -1},
{DNN_NI = "carrier.com"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 1; IPV6_POOL = -1},
{DNN_NI = "oai"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 0; IPV6_POOL = -1}
);
# DNS address communicated to UEs
DEFAULT_DNS_IPV4_ADDRESS = "192.168.18.129"; # YOUR DNS CONFIG HERE
DEFAULT_DNS_SEC_IPV4_ADDRESS = "192.168.18.129"; # YOUR DNS CONFIG HERE
DEFAULT_DNS_IPV6_ADDRESS = "2001:4860:4860::8888"; # YOUR DNS CONFIG HERE
DEFAULT_DNS_SEC_IPV6_ADDRESS = "2001:4860:4860::8844"; # YOUR DNS CONFIG HERE
SUPPORT_FEATURES:
{
# STRING, {"yes", "no"},
REGISTER_NRF = "yes"; # Set to yes if SMF resgisters to an NRF
DISCOVER_UPF = "yes"; # Set to yes to enable UPF discovery and selection
FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS = "no"; # Non standard feature, normally should be set to "no",
# but you may need to set to yes for UE that do not explicitly request a PDN address through NAS signalling
USE_LOCAL_SUBSCRIPTION_INFO = "yes"; # Set to yes if SMF uses local subscription information instead of from an UDM
USE_FQDN_DNS = "yes"; # Set to yes if AMF/UDM/NRF/UPF will relying on a DNS to resolve FQDN
}
AMF :
{
IPV4_ADDRESS = "0.0.0.0"; # YOUR AMF CONFIG HERE
PORT = 80; # YOUR AMF CONFIG HERE (default: 80)
API_VERSION = "v1"; # YOUR AMF API VERSION FOR SBI CONFIG HERE
FQDN = "oai-amf" # YOUR AMF FQDN CONFIG HERE
};
UDM :
{
IPV4_ADDRESS = "127.0.0.1"; # YOUR UDM CONFIG HERE
PORT = 80; # YOUR UDM CONFIG HERE (default: 80)
API_VERSION = "v1"; # YOUR UDM API VERSION FOR SBI CONFIG HERE
FQDN = "localhost" # YOUR UDM FQDN CONFIG HERE
};
NRF :
{
IPV4_ADDRESS = "192.168.71.130"; # YOUR NRF CONFIG HERE
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
FQDN = "oai-nrf" # YOUR NRF FQDN CONFIG HERE
};
UPF_LIST = (
{IPV4_ADDRESS = "192.168.71.134" ; FQDN = "oai-spgwu"} # YOUR UPF CONFIG HERE
);
LOCAL_CONFIGURATION :
{
SESSION_MANAGEMENT_SUBSCRIPTION_LIST = (
{ NSSAI_SST = 222, NSSAI_SD = "123", DNN = "default", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
QOS_PROFILE_5QI = 7, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"},
{ NSSAI_SST = 1; NSSAI_SD = "1", DNN = "oai", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
QOS_PROFILE_5QI = 6, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"}
);
};
};
This diff is collapsed.
#!/bin/bash
set -eo pipefail
STATUS=0
SMF_IP_SBI_INTERFACE=$(ifconfig $SMF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
SMF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$SMF_IP_SBI_INTERFACE:$SMF_INTERFACE_PORT_FOR_SBI")
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
#NB_UNREPLACED_AT=`cat /openair-smf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
#if [ $NB_UNREPLACED_AT -ne 0 ]; then
# STATUS=-1
# echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
#fi
#
if [[ -z $SMF_SBI_PORT_STATUS ]]; then
STATUS=-1
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $SMF_INTERFACE_PORT_FOR_SBI is not listening."
fi
exit $STATUS
#!/bin/bash
set -eo pipefail
STATUS=0
SGW_PORT_FOR_S1U_S12_S4_UP=2152
SGW_PORT_FOR_SX=8805
SGW_IP_S1U_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP | grep inet | awk {'print $2'})
SGW_IP_SX_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_SX | grep inet | awk {'print $2'})
S1U_S12_S4_UP_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_S1U_INTERFACE:$SGW_PORT_FOR_S1U_S12_S4_UP")
SX_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_SX_INTERFACE:$SGW_PORT_FOR_SX")
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
NB_UNREPLACED_AT=`cat /openair-spgwu/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
if [ $NB_UNREPLACED_AT -ne 0 ]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
fi
if [[ -z $S1U_S12_S4_UP_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY S1U port $SGW_PORT_FOR_S1U_S12_S4_UP is not listening."
fi
if [[ -z $SX_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY SX port $SGW_PORT_FOR_SX is not listening."
fi
exit $STATUS
\ No newline at end of file
This diff is collapsed.
......@@ -83,9 +83,14 @@ char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) {
}
if (*ptr == NULL) {
*ptr = malloc(length>40?length:40);
// LTS: dummy fix, waiting Francois full fix in 4G branch
// the issue is we don't know at this point the size we will get
// for parmeters on the command line,
// The length sould probably managed, in a later version
// 100 is a very large value for a string parameter of today OAI
if (length<100)
length=100;
*ptr = malloc(length);
if ( *ptr != NULL) {
memset(*ptr,0,length);
......
......@@ -106,6 +106,40 @@ nr_bandentry_t nr_bandtable[] = {
{261,27500040,28350000,27500040,28350000, 2,2070833, 120}
};
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex)
{
const uint64_t dl_freq_khz = downlink_frequency / 1000;
const int32_t delta_duplex_khz = delta_duplex / 1000;
uint64_t center_freq_diff_khz = 999999999999999999; // 2^64
uint16_t current_band = 0;
for (int ind = 0; ind < nr_bandtable_size; ind++) {
if (dl_freq_khz < nr_bandtable[ind].dl_min || dl_freq_khz > nr_bandtable[ind].dl_max)
continue;
int32_t current_offset_khz = nr_bandtable[ind].ul_min - nr_bandtable[ind].dl_min;
if (current_offset_khz != delta_duplex_khz)
continue;
uint64_t center_frequency_khz = (nr_bandtable[ind].dl_max + nr_bandtable[ind].dl_min) / 2;
if (abs(dl_freq_khz - center_frequency_khz) < center_freq_diff_khz){
current_band = nr_bandtable[ind].band;
center_freq_diff_khz = abs(dl_freq_khz - center_frequency_khz);
}
}
printf("DL frequency %"PRIu64": band %d, UL frequency %"PRIu64"\n",
downlink_frequency, current_band, downlink_frequency+delta_duplex);
AssertFatal(current_band != 0, "Can't find EUTRA band for frequency %"PRIu64" and duplex_spacing %u\n", downlink_frequency, delta_duplex);
return current_band;
}
const size_t nr_bandtable_size = sizeof(nr_bandtable) / sizeof(nr_bandentry_t);
int NRRIV2BW(int locationAndBandwidth,int N_RB) {
......@@ -196,6 +230,26 @@ uint32_t nr_get_code_rate(uint8_t Imcs, uint8_t table_idx) {
}
}
int get_dmrs_port(int nl, uint16_t dmrs_ports) {
if (dmrs_ports == 0) return 0; // dci 1_0
int p = -1;
int found = -1;
for (int i=0; i<12; i++) { // loop over dmrs ports
if((dmrs_ports>>i)&0x01) { // check if current bit is 1
found++;
if (found == nl) { // found antenna port number corresponding to current layer
p = i;
break;
}
}
}
AssertFatal(p>-1,"No dmrs port corresponding to layer %d found\n",nl);
return p;
}
int get_subband_size(int NPRB,int size) {
// implements table 5.2.1.4-2 from 36.214
//
......
......@@ -50,6 +50,7 @@ typedef struct nr_bandentry_s {
extern const size_t nr_bandtable_size;
extern nr_bandentry_t nr_bandtable[];
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex);
int NRRIV2BW(int locationAndBandwidth,int N_RB);
int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB);
int PRBalloc_to_locationandbandwidth0(int NPRB,int RBstart,int BWPsize);
......@@ -62,7 +63,7 @@ uint8_t nr_get_Qm(uint8_t Imcs, uint8_t table_idx);
uint32_t nr_get_code_rate(uint8_t Imcs, uint8_t table_idx);
int get_subband_size(int NPRB,int size);
void SLIV2SL(int SLIV,int *S,int *L);
int get_dmrs_port(int nl, uint16_t dmrs_ports);
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
......
......@@ -37,9 +37,7 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
./build_oai --eNB --ninja -w USRP --verbose-ci
RUN yum install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb
......@@ -48,6 +46,7 @@ RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \
nettle \
procps-ng \
atlas \
net-tools \
iputils \
......
......@@ -37,9 +37,7 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
./build_oai --eNB --ninja -w USRP --verbose-ci
RUN apt-get install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
#start from scratch for target executable
FROM ubuntu:bionic as oai-enb
......@@ -51,6 +49,7 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \
procps \
libsctp1 \
libnettle6 \
libblas3 \
......
......@@ -25,7 +25,7 @@
#
#---------------------------------------------------------------------
FROM localhost/ran-build:latest AS gnb-build
FROM ran-build:latest AS gnb-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
......@@ -37,11 +37,7 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
./build_oai --gNB --ninja -w USRP --verbose-ci
#debug
#RUN ldconfig -v
#RUN ldd /oai-ran/targets/bin/nr-softmodem.Rel15
#RUN ls -lst /oai-ran/targets/bin
#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
......@@ -49,6 +45,7 @@ FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
RUN yum repolist --disablerepo=* && \
yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
procps-ng \
libXpm \
libX11 \
atlas \
......@@ -62,6 +59,7 @@ RUN yum repolist --disablerepo=* && \
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 .
COPY --from=gnb-build /oai-ran/docker/scripts/gnb_entrypoint.sh entrypoint.sh
WORKDIR /usr/local/lib/
COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
......@@ -99,23 +97,10 @@ COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=gnb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
RUN ldconfig
#debug
#RUN ldd /opt/oai-gnb/bin/nr-softmodem.Rel15
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
#RUN ldd /usr/local/lib/libcoding.so
#RUN ldd /usr/local/lib/libparams_libconfig.so
#RUN ldd /usr/local/lib/libdfts.so
#RUN ldd /usr/local/lib/libldpc.so
#RUN ldd /usr/local/lib/libldpc_optim.so
#RUN ldd /usr/local/lib/libldpc_optim8seg.so
#RUN ldd /usr/local/lib/libldpc_orig.so
# Copy the relevant configuration files for gNB
WORKDIR /opt/oai-gnb/etc
COPY --from=gnb-build /oai-ran/ci-scripts/conf_files/gnb.* .
COPY --from=gnb-build /oai-ran/docker/etc .
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
......@@ -125,6 +110,5 @@ WORKDIR /opt/oai-gnb
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
#CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem.Rel15", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -25,7 +25,7 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS gnb-build
FROM ran-build:latest AS gnb-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
......@@ -37,23 +37,20 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
./build_oai --gNB --ninja -w USRP --verbose-ci
#debug
RUN ldconfig -v
RUN ldd /oai-ran/targets/bin/nr-softmodem.Rel15
RUN ls -lst /oai-ran/targets/bin
RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml
#start from scratch for target executable
FROM ubuntu:bionic as oai-gnb
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \
procps \
libsctp1 \
tzdata \
libnettle6 \
libblas3 \
libatlas3-base \
......@@ -76,6 +73,7 @@ RUN apt-get update && \
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 .
COPY --from=gnb-build /oai-ran/docker/scripts/gnb_entrypoint.sh entrypoint.sh
WORKDIR /usr/local/lib/
COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
......@@ -96,23 +94,10 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
RUN ldconfig
#debug
#RUN ldd /opt/oai-gnb/bin/nr-softmodem.Rel15
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
#RUN ldd /usr/local/lib/libcoding.so
#RUN ldd /usr/local/lib/libparams_libconfig.so
#RUN ldd /usr/local/lib/libdfts.so
#RUN ldd /usr/local/lib/libldpc.so
#RUN ldd /usr/local/lib/libldpc_optim.so
#RUN ldd /usr/local/lib/libldpc_optim8seg.so
#RUN ldd /usr/local/lib/libldpc_orig.so
# Copy the relevant configuration files for gNB
WORKDIR /opt/oai-gnb/etc
COPY --from=gnb-build /oai-ran/ci-scripts/conf_files/gnb.* ./
COPY --from=gnb-build /oai-ran/docker/etc .
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
......@@ -122,6 +107,5 @@ WORKDIR /opt/oai-gnb
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
#CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem.Rel15", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -37,9 +37,7 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
./build_oai --RU --ninja -w USRP --verbose-ci
RUN yum install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ru
......@@ -48,6 +46,7 @@ ENV TZ=Europe/Paris
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
tzdata \
procps-ng \
atlas \
net-tools \
iputils \
......
......@@ -37,9 +37,7 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
./build_oai --RU --ninja -w USRP --verbose-ci
RUN apt-get install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
#start from scratch for target executable
FROM ubuntu:bionic as oai-lte-ru
......@@ -50,6 +48,7 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
tzdata \
procps \
software-properties-common \
libblas3 \
libatlas3-base \
......
......@@ -48,6 +48,7 @@ FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \
procps-ng \
nettle \
atlas \
iproute \
......
......@@ -52,6 +52,7 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \
procps \
libsctp1 \
libnettle6 \
liblapacke \
......
......@@ -25,7 +25,7 @@
#
#---------------------------------------------------------------------
FROM localhost/ran-build:latest AS nr-ue-build
FROM ran-build:latest AS nr-ue-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
......@@ -37,18 +37,15 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
./build_oai --nrUE --ninja -w USRP --verbose-ci
# debug
#RUN ldconfig -v
#RUN ldd /oai-ran/targets/bin/nr-uesoftmodem.Rel15
#RUN ls -lst /oai-ran/targets/bin
#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-nr-ue
ENV TZ=Europe/Paris
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \
procps-ng \
tzdata \
nettle \
net-tools \
iputils \
......@@ -61,6 +58,10 @@ RUN yum update -y && \
WORKDIR /opt/oai-nr-ue/bin
COPY --from=nr-ue-build /oai-ran/targets/bin/nr-uesoftmodem.Rel15 .
COPY --from=nr-ue-build /oai-ran/docker/scripts/nr_ue_entrypoint.sh entrypoint.sh
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf .
WORKDIR /usr/local/lib/
COPY --from=nr-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
......@@ -98,24 +99,11 @@ COPY --from=nr-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
RUN ldconfig
#RUN ldd /opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
#RUN ldd /usr/local/lib/libcoding.so
#RUN ldd /usr/local/lib/libparams_libconfig.so
#RUN ldd /usr/local/lib/libdfts.so
#RUN ldd /usr/local/lib/libldpc.so
#RUN ldd /usr/local/lib/libldpc_optim.so
#RUN ldd /usr/local/lib/libldpc_optim8seg.so
#RUN ldd /usr/local/lib/libldpc_orig.so
# Copy the relevant configuration files for eNB
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
WORKDIR /opt/oai-nr-ue
#CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue-sim.conf"]
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
......@@ -25,7 +25,7 @@
#
#---------------------------------------------------------------------
FROM ran-build:latest AS nr-ue-build
FROM ran-build:latest AS nr-ue-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
......@@ -37,23 +37,18 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
./build_oai --nrUE --ninja -w USRP --verbose-ci
# debug
#RUN ldconfig -v
#RUN ldd /oai-ran/targets/bin/nr-uesoftmodem.Rel15
#RUN ls -lst /oai-ran/targets/bin
#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
#start from scratch for target executable
FROM ubuntu:bionic as oai-nr-ue
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV TZ=Europe/Paris
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \
libsctp1 \
procps \
tzdata \
libnettle6 \
liblapacke \
libatlas3-base \
......@@ -62,6 +57,7 @@ RUN apt-get update && \
net-tools \
iputils-ping \
iproute2 \
iperf \
libyaml-0-2 && \
# Install UHD driver from ettus ppa
# At time of writing, it is 3.14
......@@ -76,6 +72,10 @@ RUN apt-get update && \
WORKDIR /opt/oai-nr-ue/bin
COPY --from=nr-ue-build /oai-ran/targets/bin/nr-uesoftmodem.Rel15 .
COPY --from=nr-ue-build /oai-ran/docker/scripts/nr_ue_entrypoint.sh entrypoint.sh
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf .
WORKDIR /usr/local/lib/
COPY --from=nr-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
......@@ -96,25 +96,7 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 .
RUN ldconfig
#debug
#RUN ldd /opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
#RUN ldd /usr/local/lib/libcoding.so
#RUN ldd /usr/local/lib/libparams_libconfig.so
#RUN ldd /usr/local/lib/libdfts.so
#RUN ldd /usr/local/lib/libldpc.so
#RUN ldd /usr/local/lib/libldpc_optim.so
#RUN ldd /usr/local/lib/libldpc_optim8seg.so
#RUN ldd /usr/local/lib/libldpc_orig.so
# Copy the relevant configuration files for eNB
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
WORKDIR /opt/oai-nr-ue
#CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue-sim.conf"]
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
......@@ -25,7 +25,7 @@
#
#---------------------------------------------------------------------
FROM localhost/ran-build:develop AS phy-sim-build
FROM ran-build:develop AS phy-sim-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
......
......@@ -44,8 +44,11 @@ RUN rm -f /etc/rhsm-host && \
file \
psmisc \
git \
# python3-pip and pyyaml are used for conf template generation
python3-pip \
#unzip is needed for protobuf
unzip && \
pip3 install --ignore-installed pyyaml && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
......
......@@ -42,7 +42,10 @@ RUN apt-get update && \
git \
xxd \
#unzip is needed for protobuf
unzip
unzip \
# python3-pip for conf template generation
python3-pip && \
pip3 install --ignore-installed pyyaml
# In some network environments, GIT proxy is required
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
......@@ -56,4 +59,3 @@ RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -I -w USRP
......@@ -4,6 +4,8 @@ set -euo pipefail
PREFIX=/opt/oai-enb
RRC_INACTIVITY_THRESHOLD=${RRC_INACTIVITY_THRESHOLD:-0}
ENABLE_MEASUREMENT_REPORTS=${ENABLE_MEASUREMENT_REPORTS:-no}
ENABLE_X2=${ENABLE_X2:-no}
# Based another env var, pick one template to use
if [[ -v USE_FDD_CU ]]; then ln -s $PREFIX/etc/cu.fdd.conf $PREFIX/etc/enb.conf; fi
......
......@@ -123,7 +123,7 @@
- key: bands
env: "@UTRA_BAND_ID@"
- filePrefix: enb.band7.tm1.25PRB.usrpb210
- filePrefix: enb.band7.tm1.fr1.25PRB.usrpb210.conf
outputfilename: "enb.fdd.conf"
config:
- key: Active_eNBs
......@@ -147,6 +147,10 @@
env: "@NID_CELL@"
- key: N_RB_DL
env: "@NB_PRB@"
- key: enable_measurement_reports
env: "@ENABLE_MEASUREMENT_REPORTS@"
- key: enable_x2
env: "@ENABLE_X2@"
- key: ipv4
env: "@MME_S1C_IP_ADDRESS@"
- key: ENB_INTERFACE_NAME_FOR_S1_MME
......
......@@ -48,18 +48,20 @@ def main():
"du.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rru.fdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rru.tdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"enb.band7.tm1.25PRB.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"enb.band7.tm1.fr1.25PRB.usrpb210.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"enb.band40.tm1.25PRB.FairScheduler.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band7.tm1.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band7.tm1.if4p5.lo.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band40.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"gnb.band78.tm1.fr1.106PRB.usrpb210.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"gnb.band78.sa.fr1.106PRB.usrpn310.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}'
}
print('inputfile = ' + inputfile)
if filePrefix in prefix_outputfile:
outputfile1 = prefix_outputfile[filePrefix]
directory = f'{data[0]["paths"]["dest_dir"]}'
if not os.path.exists(directory):
os.makedirs(directory, exist_ok=True)
......@@ -71,11 +73,21 @@ def main():
if re.search(r'EHPLMN_LIST', line):
outputfile.write(line)
continue
if re.search(r'sd = 0x1;', line):
templine = re.sub(r'sd = 0x1;', 'sd = 0x@NSSAI_SD0@;', line)
outputfile.write(templine)
continue
if re.search(r'sd = 0x112233;', line):
templine = re.sub(r'sd = 0x112233;', 'sd = 0x@NSSAI_SD1@;', line)
outputfile.write(templine)
continue
for key in config["config"]:
if line.find(key["key"]) >= 0:
count += 1
if re.search(r'preference', line):
templine = line
elif re.search(r'mnc_length', line) and key["key"] == "mnc":
continue
elif re.search(r'plmn_list', line):
templine = re.sub(r'[0-9]+', '""', line)
templine = re.sub(r'\"\"', key["env"]["mcc"], templine, 1)
......
#!/bin/bash
set -euo pipefail
PREFIX=/opt/oai-gnb
ENABLE_X2=${ENABLE_X2:-yes}
# Based another env var, pick one template to use
if [[ -v USE_NSA_TDD_MONO ]]; then ln -s $PREFIX/etc/gnb.nsa.tdd.conf $PREFIX/etc/gnb.conf; fi
if [[ -v USE_SA_TDD_MONO ]]; then ln -s $PREFIX/etc/gnb.sa.tdd.conf $PREFIX/etc/gnb.conf; fi
# Only this template will be manipulated
CONFIG_FILES=`ls $PREFIX/etc/gnb.conf || true`
for c in ${CONFIG_FILES}; do
# grep variable names (format: ${VAR}) from template to be rendered
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
# create sed expressions for substituting each occurrence of ${VAR}
# with the value of the environment variable "VAR"
EXPRESSIONS=""
for v in ${VARS}; do
NEW_VAR=`echo $v | sed -e "s#@##g"`
if [[ "${!NEW_VAR}x" == "x" ]]; then
echo "Error: Environment variable '${NEW_VAR}' is not set." \
"Config file '$(basename $c)' requires all of $VARS."
exit 1
fi
EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g"
done
EXPRESSIONS="${EXPRESSIONS#';'}"
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
done
# Load the USRP binaries
if [[ -v USE_B2XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
elif [[ -v USE_N3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
fi
echo "=================================="
echo "== Starting gNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
new_args=()
while [[ $# -gt 0 ]]; do
new_args+=("$1")
shift
done
for word in ${USE_ADDITIONAL_OPTIONS}; do
new_args+=("$word")
done
echo "${new_args[@]}"
exec "${new_args[@]}"
else
echo "$@"
exec "$@"
fi
#/*
# * 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
# */
---
- paths:
source_dir: "ci-scripts/conf_files/"
dest_dir: docker/etc
- configurations:
- filePrefix: gnb.band78.tm1.fr1.106PRB.usrpb210.conf
outputfilename: "gnb.nsa.tdd.conf"
config:
- key: Active_gNBs
env: "@GNB_NAME@"
- key: gNB_name
env: "@GNB_NAME@"
- key: plmn_list
env:
mcc: "@MCC@"
mnc: "@MNC@"
mnc_length: "@MNC_LENGTH@"
- key: tracking_area_code
env: "@TAC@"
- key: enable_x2
env: "@ENABLE_X2@"
- key: ipv4
env: "@ENB_X2_IP_ADDRESS@"
- key: GNB_INTERFACE_NAME_FOR_S1_MME
env: "@GNB_S1C_IF_NAME@"
- key: GNB_IPV4_ADDRESS_FOR_S1_MME
env: "@GNB_S1C_IP_ADDRESS@"
- key: GNB_INTERFACE_NAME_FOR_S1U
env: "@GNB_S1U_IF_NAME@"
- key: GNB_IPV4_ADDRESS_FOR_S1U
env: "@GNB_S1U_IP_ADDRESS@"
- key: GNB_IPV4_ADDRESS_FOR_X2C
env: "@GNB_X2_IP_ADDRESS@"
- key: rrc_inactivity_threshold
env: "@RRC_INACTIVITY_THRESHOLD@"
- key: FLEXRAN_ENABLED
env: "@FLEXRAN_ENABLED@"
- key: FLEXRAN_INTERFACE_NAME
env: "@FLEXRAN_INTERFACE_NAME@"
- key: FLEXRAN_IPV4_ADDRESS
env: "@FLEXRAN_IPV4_ADDRESS@"
- filePrefix: gnb.band78.sa.fr1.106PRB.usrpn310.conf
outputfilename: "gnb.sa.tdd.conf"
config:
- key: Active_gNBs
env: "@GNB_NAME@"
- key: gNB_name
env: "@GNB_NAME@"
- key: mcc
env: "@MCC@"
- key: mnc
env: "@MNC@"
- key: mnc_length
env: "@MNC_LENGTH@"
- key: tracking_area_code
env: "@TAC@"
- key: sst
env: "@NSSAI_SST@"
- key: ipv4
env: "@AMF_IP_ADDRESS@"
- key: GNB_INTERFACE_NAME_FOR_NG_AMF
env: "@GNB_NGA_IF_NAME@"
- key: GNB_IPV4_ADDRESS_FOR_NG_AMF
env: "@GNB_NGA_IP_ADDRESS@"
- key: GNB_INTERFACE_NAME_FOR_NGU
env: "@GNB_NGU_IF_NAME@"
- key: GNB_IPV4_ADDRESS_FOR_NGU
env: "@GNB_NGU_IP_ADDRESS@"
#!/bin/bash
set -euo pipefail
PREFIX=/opt/oai-nr-ue
# Based another env var, pick one template to use
#if [[ -v USE_NFAPI ]]; then ln -s $PREFIX/etc/ue.nfapi.conf $PREFIX/etc/ue.conf; fi
# Only this template will be manipulated and the USIM one!
CONFIG_FILES=`ls $PREFIX/etc/ue.conf $PREFIX/etc/nr-ue-sim.conf || true`
for c in ${CONFIG_FILES}; do
# grep variable names (format: ${VAR}) from template to be rendered
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
# create sed expressions for substituting each occurrence of ${VAR}
# with the value of the environment variable "VAR"
EXPRESSIONS=""
for v in ${VARS}; do
NEW_VAR=`echo $v | sed -e "s#@##g"`
if [[ "${!NEW_VAR}x" == "x" ]]; then
echo "Error: Environment variable '${NEW_VAR}' is not set." \
"Config file '$(basename $c)' requires all of $VARS."
exit 1
fi
EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g"
done
EXPRESSIONS="${EXPRESSIONS#';'}"
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
done
# Load the USRP binaries
if [[ -v USE_B2XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
elif [[ -v USE_N3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
fi
# in case we have conf file, append
new_args=()
while [[ $# -gt 0 ]]; do
new_args+=("$1")
shift
done
echo "=================================="
echo "== Starting NR UE soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
for word in ${USE_ADDITIONAL_OPTIONS}; do
new_args+=("$word")
done
echo "${new_args[@]}"
exec "${new_args[@]}"
else
echo "${new_args[@]}"
exec "${new_args[@]}"
fi
This diff is collapsed.
......@@ -64,6 +64,7 @@
#define CONFIG_HLP_NOSNGLT "Disables single-thread mode in lte-softmodem\n"
#define CONFIG_HLP_TADV "Set timing_advance\n"
#define CONFIG_HLP_DLF "Set the downlink frequency for all component carriers\n"
#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"
......@@ -71,13 +72,14 @@
#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"
#define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n"
#define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n"
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
#define CONFIG_HLP_ULMCS_PHYTEST "Set the uplink MCS for PHYTEST mode\n"
#define CONFIG_HLP_DLBW_PHYTEST "Set the number of PRBs used for DLSCH in PHYTEST mode\n"
#define CONFIG_HLP_ULBW_PHYTEST "Set the number of PRBs used for ULSCH in PHYTEST mode\n"
#define CONFIG_HLP_PRB_SA "Set the number of PRBs for SA\n"
#define CONFIG_HLP_DLBM_PHYTEST "Bitmap for DLSCH slots (slot 0 starts at LSB)\n"
#define CONFIG_HLP_ULBM_PHYTEST "Bitmap for ULSCH slots (slot 0 starts at LSB)\n"
#define CONFIG_HLP_SSC "Set the start subcarrier \n"
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
......@@ -119,7 +121,7 @@
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
{"G" , CONFIG_HLP_LOGV, 0, uptr:&glog_verbosity, defintval:0, TYPE_UINT16, 0}, \
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
}
#define CMDLINE_ONLINELOG_IDX 0
......@@ -155,7 +157,4 @@ extern int emulate_rf;
extern int numerology;
extern int usrp_tx_thread;
extern volatile int start_eNB;
extern volatile int start_UE;
#endif
This diff is collapsed.
......@@ -220,17 +220,16 @@ static void UE_synch(void *arg) {
LOG_I(PHY, "[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode);
uint64_t dl_carrier, ul_carrier;
double rx_gain_off = 0;
nr_get_carrier_frequencies(&UE->frame_parms, &dl_carrier, &ul_carrier);
if (nr_initial_sync(&syncD->proc, UE, 2) == 0) {
if (nr_initial_sync(&syncD->proc, UE, 2, get_softmodem_params()->sa, get_nrUE_params()->nr_dlsch_parallel) == 0) {
freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync
hw_slot_offset = ((UE->rx_offset<<1) / UE->frame_parms.samples_per_subframe * UE->frame_parms.slots_per_subframe) +
round((float)((UE->rx_offset<<1) % UE->frame_parms.samples_per_subframe)/UE->frame_parms.samples_per_slot0);
// rerun with new cell parameters and frequency-offset
// todo: the freq_offset computed on DL shall be scaled before being applied to UL
nr_rf_card_config(&openair0_cfg[UE->rf_map.card], rx_gain_off, ul_carrier, dl_carrier, freq_offset);
nr_rf_card_config_freq(&openair0_cfg[UE->rf_map.card], ul_carrier, dl_carrier, freq_offset);
LOG_I(PHY,"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %f (DL %f Hz, UL %f Hz)\n",
hw_slot_offset,
......@@ -264,7 +263,7 @@ static void UE_synch(void *arg) {
freq_offset *= -1;
nr_rf_card_config(&openair0_cfg[UE->rf_map.card], rx_gain_off, ul_carrier, dl_carrier, freq_offset);
nr_rf_card_config_freq(&openair0_cfg[UE->rf_map.card], ul_carrier, dl_carrier, freq_offset);
LOG_I(PHY, "Initial sync failed: trying carrier off %d Hz\n", freq_offset);
......@@ -307,11 +306,12 @@ void processSlotTX(void *arg) {
ul_indication.frame_tx = proc->frame_tx;
ul_indication.slot_tx = proc->nr_slot_tx;
ul_indication.thread_id = proc->thread_id;
ul_indication.ue_sched_mode = rxtxD->ue_sched_mode;
UE->if_inst->ul_indication(&ul_indication);
}
if (UE->mode != loop_through_memory) {
if ((UE->mode != loop_through_memory) && (rxtxD->ue_sched_mode != NOT_PUSCH)) {
phy_procedures_nrUE_TX(UE,proc,0);
}
}
......@@ -358,6 +358,9 @@ void processSlotRX(void *arg) {
nr_pdcp_tick(proc->frame_rx, proc->nr_slot_rx / UE->frame_parms.slots_per_subframe);
}
}
// calling UL_indication to schedule things other than PUSCH (eg, PUCCH)
rxtxD->ue_sched_mode = NOT_PUSCH;
processSlotTX(rxtxD);
// Wait for PUSCH processing to finish
notifiedFIFO_elt_t *res;
......@@ -365,6 +368,7 @@ void processSlotRX(void *arg) {
delNotifiedFIFO_elt(res);
} else {
rxtxD->ue_sched_mode = SCHED_ALL;
processSlotTX(rxtxD);
}
......@@ -373,8 +377,7 @@ void processSlotRX(void *arg) {
if (get_softmodem_params()->usim_test==0) {
pucch_procedures_ue_nr(UE,
gNB_id,
proc,
FALSE);
proc);
}
LOG_D(PHY, "Sending Uplink data \n");
......@@ -714,15 +717,18 @@ void *UE_thread(void *arg) {
if (openair0_cfg[0].duplex_mode == duplex_mode_TDD) {
uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
int nrofUplinkSlots = 0;
if (mac->scc_SIB)
nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
else if (mac->scc)
nrofUplinkSlots = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
int nrofUplinkSlots, nrofUplinkSymbols;
if (mac->scc) {
nrofUplinkSlots = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
nrofUplinkSymbols = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols;
}
else {
nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
nrofUplinkSymbols = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols;
}
uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSymbols != 0);
uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSlots != 0);
uint8_t first_tx_slot = tdd_period - num_UL_slots;
if (slot_tx_usrp % tdd_period == first_tx_slot)
......
......@@ -33,6 +33,7 @@
//#include "common/utils/threadPool/thread-pool.h"
#include "common/utils/load_module_shlib.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "common/utils/nr/nr_common.h"
#include "../../ARCH/COMMON/common_lib.h"
#include "../../ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
......@@ -105,8 +106,6 @@ int config_sync_var=-1;
RAN_CONTEXT_t RC;
volatile int start_eNB = 0;
volatile int start_UE = 0;
volatile int oai_exit = 0;
......@@ -280,7 +279,7 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
UE->mode = normal_txrx;
config_process_cmdline( cmdline_params,numparams,NULL);
config_get(cmdline_params,numparams,NULL);
int pindex = config_paramidx_fromname(cmdline_params,numparams, CALIBRX_OPT);
if ( (cmdline_params[pindex].paramflags & PARAMFLAG_PARAMSET) != 0) UE->mode = rx_calib_ue;
......@@ -319,22 +318,16 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
UE->rf_map.card = card_offset;
UE->rf_map.chain = CC_id + chain_offset;
LOG_I(PHY,"Set UE mode %d, UE_fo_compensation %d, UE_scan_carrier %d, UE_no_timing_correction %d \n",
UE->mode, UE->UE_fo_compensation, UE->UE_scan_carrier, UE->no_timing_correction);
// Set FP variables
if (tddflag){
fp->frame_type = TDD;
LOG_I(PHY, "Set UE frame_type %d\n", fp->frame_type);
}
fp->N_RB_DL = N_RB_DL;
LOG_I(PHY, "Set UE N_RB_DL %d\n", N_RB_DL);
LOG_I(PHY, "Set UE nb_rx_antenna %d, nb_tx_antenna %d, threequarter_fs %d\n", fp->nb_antennas_rx, fp->nb_antennas_tx, fp->threequarter_fs);
}
......@@ -372,7 +365,8 @@ void init_openair0(void) {
nr_get_carrier_frequencies(frame_parms, &dl_carrier, &ul_carrier);
nr_rf_card_config(&openair0_cfg[card], rx_gain_off, ul_carrier, dl_carrier, freq_off);
nr_rf_card_config_freq(&openair0_cfg[card], ul_carrier, dl_carrier, freq_off);
nr_rf_card_config_gain(&openair0_cfg[card], rx_gain_off);
openair0_cfg[card].configFilename = get_softmodem_params()->rf_config_file;
......@@ -467,34 +461,30 @@ int main( int argc, char **argv ) {
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
PHY_vars_UE_g[0][CC_id] = (PHY_VARS_NR_UE *)malloc(sizeof(PHY_VARS_NR_UE));
UE[CC_id] = PHY_vars_UE_g[0][CC_id];
memset(UE[CC_id],0,sizeof(PHY_VARS_NR_UE));
set_options(CC_id, UE[CC_id]);
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
if(mac->if_module != NULL && mac->if_module->phy_config_request != NULL)
mac->if_module->phy_config_request(&mac->phy_config);
fapi_nr_config_request_t *nrUE_config = &UE[CC_id]->nrUE_config;
if (get_softmodem_params()->sa) { // set frame config to initial values from command line and assume that the SSB is centered on the grid
nrUE_config->ssb_config.scs_common = get_softmodem_params()->numerology;
nrUE_config->carrier_config.dl_grid_size[nrUE_config->ssb_config.scs_common] = UE[CC_id]->frame_parms.N_RB_DL;
nrUE_config->carrier_config.ul_grid_size[nrUE_config->ssb_config.scs_common] = UE[CC_id]->frame_parms.N_RB_DL;
nrUE_config->carrier_config.dl_frequency = (downlink_frequency[0][0] -(6*UE[CC_id]->frame_parms.N_RB_DL*(15000<<nrUE_config->ssb_config.scs_common)))/1000;
nrUE_config->carrier_config.uplink_frequency = (downlink_frequency[0][0] -(6*UE[CC_id]->frame_parms.N_RB_DL*(15000<<nrUE_config->ssb_config.scs_common)))/1000;
nrUE_config->ssb_table.ssb_offset_point_a = (UE[CC_id]->frame_parms.N_RB_DL - 20)>>1;
// Initialize values, will be updated upon SIB1 reception
nrUE_config->cell_config.frame_duplex_type = TDD;
nrUE_config->ssb_table.ssb_mask_list[0].ssb_mask = 0xFFFFFFFF;
nrUE_config->ssb_table.ssb_period = 1;
if (get_softmodem_params()->sa) {
uint16_t nr_band = get_band(downlink_frequency[CC_id][0],uplink_frequency_offset[CC_id][0]);
mac->nr_band = nr_band;
nr_init_frame_parms_ue_sa(&UE[CC_id]->frame_parms,
downlink_frequency[CC_id][0],
uplink_frequency_offset[CC_id][0],
get_softmodem_params()->numerology,
nr_band);
}
else{
if(mac->if_module != NULL && mac->if_module->phy_config_request != NULL)
mac->if_module->phy_config_request(&mac->phy_config);
fapi_nr_config_request_t *nrUE_config = &UE[CC_id]->nrUE_config;
nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config, *mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]);
}
nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config,
mac->scc == NULL ? 78 : *mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]);
init_symbol_rotation(&UE[CC_id]->frame_parms);
init_nr_ue_vars(UE[CC_id], 0, abstraction_flag);
......
This diff is collapsed.
......@@ -137,8 +137,8 @@ extern int usrp_tx_thread;
{"time-source", CONFIG_HLP_TME, 0, uptr:&TIMING_SOURCE, defintval:0, TYPE_UINT, 0}, \
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \
{"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:3619200000, TYPE_UINT64, 0}, \
{"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:0, TYPE_INT, 0}, \
{"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0, TYPE_UINT64, 0}, \
{"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:0, TYPE_INT, 0}, \
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms, defintval:0, TYPE_INT8, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
......@@ -153,9 +153,9 @@ extern int usrp_tx_thread;
{"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_INT, 0}, \
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, uptr:&nonbiot, defuintval:0, TYPE_INT, 0}, \
{"use-256qam-table", CONFIG_HLP_256QAM, PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE, defintval:0, TYPE_INT, 0}, \
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
{"usrp-tx-thread-config",CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
{"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, iptr:&NON_STOP, defintval:0, TYPE_INT, 0}, \
{"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, iptr:&NON_STOP, defintval:0, TYPE_INT, 0}, \
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment