Commit f42291a4 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Merge branch 'develop' into improve_nr_modulation

parents 923070e6 05f052cc
......@@ -66,7 +66,8 @@ pipeline {
"Test-IF4p5-TDD-Band38-Multi-RRU",
"Test-eNB-OAI-UE-FDD-Band7",
"Test-Mono-FDD-Band13-X2-HO",
"Test-TDD-Band78-gNB-NR-UE"
"Test-TDD-Band78-gNB-NR-UE",
"Test-OCP-FDD-Band7"
])
ansiColor('xterm')
}
......@@ -683,6 +684,25 @@ pipeline {
}
}
}
stage ("Test OAI OCP-eNB - FDD - Band 7 - B210") {
steps {
script {
triggerSlaveJob ('OCPeNB-FDD-Band7-B210', 'Test-OCP-FDD-Band7')
}
}
post {
always {
script {
finalizeSlaveJob('OCPeNB-FDD-Band7-B210')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
}
post {
always {
......
This diff is collapsed.
# * 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
# */
#---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE
#
# Required Python Version
# Python 3.x
#
# Required Python Package
# pexpect
#---------------------------------------------------------------------
#to use logging.info()
import logging
#to create a SSH object locally in the methods
import sshconnection
#time.sleep
import time
class CotsUe:
def __init__(self,model,UEIPAddr,UEUserName,UEPassWord):
self.model = model
self.UEIPAddr = UEIPAddr
self.UEUserName = UEUserName
self.UEPassWord = UEPassWord
self.runargs = '' #on of off to toggle airplane mode on/off
self.__SetAirplaneRetry = 3
#-----------------$
#PUBLIC Methods$
#-----------------$
def Check_Airplane(self):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.UEIPAddr, self.UEUserName, self.UEPassWord)
status=mySSH.cde_check_value('sudo adb shell settings get global airplane_mode_on ', ['0','1'],5)
mySSH.close()
return status
def Set_Airplane(self,target_state_str):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.UEIPAddr, self.UEUserName, self.UEPassWord)
mySSH.command('sudo adb start-server','$',5)
logging.info("Toggling COTS UE Airplane mode to : "+target_state_str)
current_state = self.Check_Airplane()
if target_state_str.lower()=="on":
target_state=1
else:
target_state=0
if current_state != target_state:
#toggle state
retry = 0
while (current_state!=target_state) and (retry < self.__SetAirplaneRetry):
mySSH.command('sudo adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS', '\$', 5)
mySSH.command('sudo adb shell input keyevent 20', '\$', 5)
mySSH.command('sudo adb shell input tap 968 324', '\$', 5)
time.sleep(1)
current_state = self.Check_Airplane()
retry+=1
if current_state != target_state:
logging.error("ATTENTION : Could not toggle to : "+target_state_str)
logging.error("Current state is : "+ str(current_state))
else:
print("Airplane mode is already "+ target_state_str)
mySSH.command('sudo adb kill-server','$',5)
mySSH.close()
This diff is collapsed.
This diff is collapsed.
......@@ -66,38 +66,6 @@ class EPCManagement():
self.MmeIPAddress = ''
self.containerPrefix = 'prod'
#-----------------------------------------------------------
# Setter and Getters on Public Members
#-----------------------------------------------------------
def SetIPAddress(self, ipaddress):
self.IPAddress = ipaddress
def GetIPAddress(self):
return self.IPAddress
def SetUserName(self, username):
self.UserName = username
def GetUserName(self):
return self.UserName
def SetPassword(self, password):
self.Password = password
def GetPassword(self):
return self.Password
def SetSourceCodePath(self, sourcecodepath):
self.SourceCodePath = sourcecodepath
def GetSourceCodePath(self):
return self.SourceCodePath
def SetType(self, kind):
self.Type = kind
def GetType(self):
return self.Type
def SetHtmlObj(self, obj):
self.htmlObj = obj
def SetTestCase_id(self, idx):
self.testCase_id = idx
def GetMmeIPAddress(self):
return self.MmeIPAddress
def SetContainerPrefix(self, prefix):
self.containerPrefix = prefix
#-----------------------------------------------------------
# EPC management functions
......
......@@ -82,73 +82,14 @@ class HTMLManagement():
#-----------------------------------------------------------
# Setters and Getters
#-----------------------------------------------------------
def SethtmlUEFailureMsg(self,huefa):
self.htmlUEFailureMsg = huefa
def GethtmlUEFailureMsg(self):
return self.htmlUEFailureMsg
def SetHmleNBFailureMsg(self, msg):
self.htmleNBFailureMsg = msg
def Setdesc(self, dsc):
self.desc = dsc
def SetstartTime(self, sttime):
self.startTime = sttime
def SettestCase_id(self, tcid):
self.testCase_id = tcid
def GettestCase_id(self):
return self.testCase_id
def SetranRepository(self, repository):
self.ranRepository = repository
def SetranAllowMerge(self, merge):
self.ranAllowMerge = merge
def SetranBranch(self, branch):
self.ranBranch = branch
def SetranCommitID(self, commitid):
self.ranCommitID = commitid
def SetranTargetBranch(self, tbranch):
self.ranTargetBranch = tbranch
def SethtmlUEConnected(self, nbUEs):
if nbUEs > 0:
self.htmlUEConnected = nbUEs
else:
self.htmlUEConnected = 1
def SethtmlNb_Smartphones(self, nbUEs):
self.htmlNb_Smartphones = nbUEs
def SethtmlNb_CATM_Modules(self, nbUEs):
self.htmlNb_CATM_Modules = nbUEs
def SetnbTestXMLfiles(self, nb):
self.nbTestXMLfiles = nb
def GetnbTestXMLfiles(self):
return self.nbTestXMLfiles
def SettestXMLfiles(self, xmlFile):
self.testXMLfiles.append(xmlFile)
def SethtmlTabRefs(self, tabRef):
self.htmlTabRefs.append(tabRef)
def SethtmlTabNames(self, tabName):
self.htmlTabNames.append(tabName)
def SethtmlTabIcons(self, tabIcon):
self.htmlTabIcons.append(tabIcon)
def SetOsVersion(self, version, idx):
self.OsVersion[idx] = version
def SetKernelVersion(self, version, idx):
self.KernelVersion[idx] = version
def SetUhdVersion(self, version, idx):
self.UhdVersion[idx] = version
def SetUsrpBoard(self, version, idx):
self.UsrpBoard[idx] = version
def SetCpuNb(self, nb, idx):
self.CpuNb[idx] = nb
def SetCpuModel(self, model, idx):
self.CpuModel[idx] = model
def SetCpuMHz(self, freq, idx):
self.CpuMHz[idx] = freq
#-----------------------------------------------------------
# HTML structure creation functions
......
This diff is collapsed.
eNBRepository : b
ranRepository : c
eNB_AllowMerge :
ranAllowMerge :
eNBBranch : f
ranBranch : g
eNBCommitID :
ranCommitID : i
eNBTargetBranch : j
ranTargetBranch : k
nodes :
- type : eNB
IPAddress : 001.1.1
UserName : toto
Password : qwe
SourceCodePath : l
- type : gNB
IPAddress : 002.2.2
UserName : tata
Password : asd
SourceCodePath : m
- type : eNB
IPAddress : 003.3.3
UserName : titi
Password : zxc
SourceCodePath : n
- type : gNB
IPAddress : 004.4.4
UserName : caca
Password : pepe
SourceCodePath : o
EPCIPAddress : p
EPCUserName : q
EPCPassword : r
EPCSourceCodePath : s
EPCType : t
EPCContainerPrefix : u
ADBIPAddress : v
ADBUserName : w
ADBType : x
ADBPassword : y
XMLTestFile : z
UEIPAddress : qqq
UEUserName : www
UEPassword : eee
UESourceCodePath : yyy
finalStatus : bbb
\ No newline at end of file
eNBRepository : b
ranRepository : c
eNB_AllowMerge :
ranAllowMerge :
eNBBranch : f
ranBranch : g
eNBCommitID :
ranCommitID : i
eNBTargetBranch : j
ranTargetBranch : k
RAN:
RAN_inst_0:
name : RAN_1
nodes :
- type : eNB
IPAddress : 001.1.1
UserName : toto
Password : qwe
SourceCodePath : l
- type : gNB
IPAddress : 002.2.2
UserName : tata
Password : asd
SourceCodePath : m
- type : eNB
IPAddress : 003.3.3
UserName : titi
Password : zxc
SourceCodePath : n
- type : gNB
IPAddress : 004.4.4
UserName : caca
Password : pepe
SourceCodePath : o
RAN_inst_1:
name : RAN_2
nodes :
- type : eNB
IPAddress : 101.1.1
UserName : toto
Password : qwe
SourceCodePath : l
- type : gNB
IPAddress : 102.2.2
UserName : zaza
Password : asd
SourceCodePath : m
- type : eNB
IPAddress : 103.3.3
UserName : zizi
Password : zxc
SourceCodePath : n
- type : gNB
IPAddress : 104.4.4
UserName : aaaa
Password : pepe
SourceCodePath : o
EPC:
EPC_inst_0:
EPCIPAddress : p
EPCUserName : q
EPCPassword : r
EPCSourceCodePath : s
EPCType : t
EPCContainerPrefix : u
ADB:
ADBIPAddress : v
ADBUserName : w
ADBType : x
ADBPassword : y
UE:
UE_inst_0:
name : UE_1
type :
UEIPAddress : qqq
UEUserName : www
UEPassword : eee
UESourceCodePath : yyy
UE_inst_1:
name : UE_2
type :
UEIPAddress : bloblob
UEUserName : gwou
UEPassword : zebu
UESourceCodePath : pop
XMLTestFile : z
finalStatus : bbb
\ No newline at end of file
This diff is collapsed.
......@@ -101,6 +101,18 @@ class SSHConnection():
else:
sys.exit('SSH Connection Failed')
def cde_check_value(self, commandline, expected, timeout):
logging.debug(commandline)
self.ssh.timeout = timeout
self.ssh.sendline(commandline)
expected.append(pexpect.EOF)
expected.append(pexpect.TIMEOUT)
self.sshresponse = self.ssh.expect(expected)
return self.sshresponse
def command(self, commandline, expectedline, timeout):
logging.debug(commandline)
self.ssh.timeout = timeout
......
- COTS_UE_Airplane
- Build_PhySim
- Run_PhySim
- Build_eNB
- WaitEndBuild_eNB
- Initialize_eNB
- Terminate_eNB
- Initialize_UE
- Terminate_UE
- Attach_UE
- Detach_UE
- Build_OAI_UE
- Initialize_OAI_UE
- Terminate_OAI_UE
- DataDisable_UE
- DataEnable_UE
- CheckStatusUE
- Ping
- Iperf
- Reboot_UE
- Initialize_FlexranCtrl
- Terminate_FlexranCtrl
- Initialize_HSS
- Terminate_HSS
- Initialize_MME
- Terminate_MME
- Initialize_SPGW
- Terminate_SPGW
- Initialize_CatM_module
- Terminate_CatM_module
- Attach_CatM_module
- Detach_CatM_module
- Ping_CatM_module
- IdleSleep
- Perform_X2_Handover
<!--
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>test-05-tm1</htmlTabRef>
<htmlTabName>Test-05MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201
040101
030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="030101">
<class>Initialize_eNB</class>
<desc>Initialize OCP-eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf</Initialize_eNB_args>
<air_interface>ocp</air_interface>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate OCP-eNB</desc>
<air_interface>ocp</air_interface>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040501">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040603">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040604">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040605">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040606">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040607">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)(balanced profile)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040641">
<class>Iperf</class>
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040642">
<class>Iperf</class>
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040643">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040644">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)(balanced profile)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</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>build-tab</htmlTabRef>
<htmlTabName>Build</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
010101
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010101">
<class>Build_eNB</class>
<desc>Build eNB OCP (USRP)</desc>
<Build_eNB_args>-w USRP -c --eNBocp --ninja</Build_eNB_args>
</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>build-tab</htmlTabRef>
<htmlTabName>Build</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
000001 000002
000003 000004
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>Build_eNB</class>
<desc>Build eNB</desc>
<Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<backgroundBuild>True</backgroundBuild>
</testCase>
<testCase id="000004">
<class>WaitEndBuild_eNB</class>
<desc>Wait for end of Build eNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="000002">
<class>Build_eNB</class>
<desc>Build gNB</desc>
<Build_eNB_args>-w USRP -c --gNB --ninja</Build_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<backgroundBuild>True</backgroundBuild>
</testCase>
<testCase id="000003">
<class>WaitEndBuild_eNB</class>
<desc>Wait for end of Build gNB</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</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>test-fr1-tm1</htmlTabRef>
<htmlTabName>Test-FR1-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
070001
070000
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="070000">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="070001">
<class>Terminate_eNB</class>
<desc>Terminate gNB</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</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>test-fr1-tm1</htmlTabRef>
<htmlTabName>Test-FR1-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
030000
040000
000001
070001
070000
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="030000">
<class>Initialize_eNB</class>
<desc>Initialize eNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>lte</air_interface>
</testCase>
<testCase id="040000">
<class>Initialize_eNB</class>
<desc>Initialize gNB (3/4 sampling rate)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<air_interface>nr</air_interface>
</testCase>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec>
</testCase>
<testCase id="070000">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="070001">
<class>Terminate_eNB</class>
<desc>Terminate gNB</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</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>test-airplane-mode</htmlTabRef>
<htmlTabName>AirplaneToggle</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
010000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000">
<class>COTS_UE_Airplane</class>
<desc>Toggle COTS Airplane mode ON</desc>
<cots_ue_airplane_args>ON</cots_ue_airplane_args>
</testCase>
</testCaseList>
......@@ -34,7 +34,7 @@
<mode>TesteNB</mode>
<class>Build_eNB</class>
<desc>Build gNB (USRP)</desc>
<Build_eNB_args>--gNB -w USRP</Build_eNB_args>
<Build_eNB_args>--gNB -w USRP --ninja</Build_eNB_args>
<forced_workspace_cleanup>True</forced_workspace_cleanup>
</testCase>
......
......@@ -34,7 +34,7 @@
<mode>TestUE</mode>
<class>Build_OAI_UE</class>
<desc>Build NR UE (USRP)</desc>
<Build_OAI_UE_args>--nrUE -w USRP</Build_OAI_UE_args>
<Build_OAI_UE_args>--nrUE -w USRP --ninja</Build_OAI_UE_args>
<clean_repository>false</clean_repository>
</testCase>
......
......@@ -27,6 +27,10 @@ cmake_minimum_required (VERSION 3.0)
# Base directories, compatible with legacy OAI building #
#########################################################
set (OPENAIR_DIR $ENV{OPENAIR_DIR})
if("${OPENAIR_DIR}" STREQUAL "")
string(REGEX REPLACE "/cmake_targets.*$" "" OPENAIR_DIR ${CMAKE_CURRENT_BINARY_DIR})
endif()
set (NFAPI_DIR ${OPENAIR_DIR}/nfapi/open-nFAPI)
set (NFAPI_USER_DIR ${OPENAIR_DIR}/nfapi/oai_integration)
set (OPENAIR1_DIR ${OPENAIR_DIR}/openair1)
......@@ -2475,8 +2479,8 @@ add_library(uescope MODULE ${XFORMS_SOURCE} ${XFORMS_SOURCE_SOFTMODEM} ${XFORMS_
target_link_libraries(enbscope ${XFORMS_LIBRARIES})
target_link_libraries(uescope ${XFORMS_LIBRARIES})
add_library(gnbscope MODULE ${XFORMS_SOURCE_NR})
target_link_libraries(gnbscope ${XFORMS_LIBRARIES})
add_library(nrscope MODULE ${XFORMS_SOURCE_NR})
target_link_libraries(nrscope ${XFORMS_LIBRARIES})
add_library(rfsimulator MODULE
......@@ -2625,7 +2629,7 @@ add_executable(ocp-enb
${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES}
)
add_dependencies(ocp-enb rrc_flag s1ap_flag x2_flag oai_iqplayer)
add_dependencies(ocp-enb rrc_flag s1ap_flag x2_flag oai_iqplayer coding params_libconfig rfsimulator)
target_link_libraries (ocp-enb
-Wl,--start-group
......@@ -2732,7 +2736,7 @@ add_executable(nr-softmodem
${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${GTPU_need_ITTI}
${XFORMS_SOURCE_NR}
${XFORMSINTERFACE_SOURCE}
${T_SOURCE}
${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES}
......@@ -2774,7 +2778,7 @@ add_executable(nr-uesoftmodem
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${XFORMS_SOURCE_NR}
${XFORMSINTERFACE_SOURCE}
${T_SOURCE}
${UTIL_SRC}
${CONFIG_SOURCES}
......
......@@ -67,7 +67,7 @@ UE_TIMING_TRACE="False"
USRP_REC_PLAY="False"
BUILD_ECLIPSE=0
NR="False"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope msc"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope msc"
trap handle_ctrl_c INT
function print_help() {
......@@ -96,7 +96,9 @@ Options
enable cmake debugging messages
--eNB
Makes the LTE softmodem
--gNB
--eNBocp
Makes the OCP LTE softmodem
-gNB
Makes the NR softmodem
--nrUE
Makes the NR UE softmodem
......@@ -237,6 +239,10 @@ function main() {
eNB=1
echo_info "Will compile eNB"
shift;;
--eNBocp)
eNBocp=1
echo_info "Will compile OCP eNB"
shift;;
--gNB)
gNB=1
NR="True"
......@@ -443,7 +449,7 @@ function main() {
########################################################
# to be discussed
if [ "$eNB" = "1" -o "$gNB" = "1" ] ; then
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$gNB" = "1" ] ; then
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
echo_info "No local radio head and no transport protocol selected"
fi
......@@ -574,12 +580,13 @@ function main() {
config_libconfig_shlib=params_libconfig
# first generate the CMakefile in the right directory
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" ] ; then
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" ] ; then
# softmodem compilation
cmake_file=$DIR/$build_dir/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "project (OpenAirInterface)" >> $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
......@@ -606,6 +613,9 @@ function main() {
if [ "$eNB" = "1" ] ; then
execlist="$execlist lte-softmodem"
fi
if [ "$eNBocp" = "1" ] ; then
execlist="$execlist ocp-enb"
fi
if [ "$gNB" = "1" ] ; then
execlist="$execlist nr-softmodem"
fi
......@@ -821,7 +831,7 @@ function main() {
####################################################
# Build RF device and transport protocol libraries #
####################################################
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HWLAT" = "1" ] ; then
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HWLAT" = "1" ] ; then
# build RF device libraries
if [ "$HW" != "None" ] ; then
......
......@@ -80,7 +80,7 @@ task_list_t tasks[TASK_MAX];
void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size) {
void *ptr = NULL;
AssertFatal ((ptr=malloc (size)) != NULL, "Memory allocation of %zu bytes failed (%d -> %d)!\n",
AssertFatal ((ptr=calloc (size, 1)) != NULL, "Memory allocation of %zu bytes failed (%d -> %d)!\n",
size, origin_task_id, destination_task_id);
return ptr;
}
......
......@@ -53,6 +53,7 @@
#include <sys/resource.h>
#include "common/utils/load_module_shlib.h"
#include "common/config/config_userapi.h"
#include "common/utils/threadPool/thread-pool.h"
#include "executables/softmodem-common.h"
#include <readline/history.h>
......@@ -507,12 +508,22 @@ int process_command(char *buf) {
}
rt= CMDSTATUS_FOUND;
} else if (strncasecmp(cmd,"get",3) == 0 || strncasecmp(cmd,"set",3) == 0) {
} else if (strcasecmp(cmd,"get") == 0 || strcasecmp(cmd,"set") == 0) {
rt= setgetvar(i,cmd[0],cmdb);
} else {
for (k=0 ; telnetparams.CmdParsers[i].cmd[k].cmdfunc != NULL ; k++) {
if (strncasecmp(cmd, telnetparams.CmdParsers[i].cmd[k].cmdname,sizeof(telnetparams.CmdParsers[i].cmd[k].cmdname)) == 0) {
if (telnetparams.CmdParsers[i].cmd[k].qptr != NULL) {
notifiedFIFO_elt_t *msg =newNotifiedFIFO_elt(sizeof(telnetsrv_qmsg_t),0,NULL,NULL);
telnetsrv_qmsg_t *cmddata=NotifiedFifoData(msg);
cmddata->cmdfunc=(qcmdfunc_t)telnetparams.CmdParsers[i].cmd[k].cmdfunc;
cmddata->prnt=client_printf;
cmddata->debug=telnetparams.telnetdbg;
cmddata->cmdbuff=strdup(cmdb);
pushNotifiedFIFO(telnetparams.CmdParsers[i].cmd[k].qptr, msg);
} else {
telnetparams.CmdParsers[i].cmd[k].cmdfunc(cmdb, telnetparams.telnetdbg, client_printf);
}
rt= CMDSTATUS_FOUND;
}
} /* for k */
......@@ -673,6 +684,16 @@ void run_telnetsrv(void) {
return;
}
void poll_telnetcmdq(void *qid, void *arg) {
notifiedFIFO_elt_t *msg = pollNotifiedFIFO((notifiedFIFO_t *)qid);
if (msg != NULL) {
telnetsrv_qmsg_t *msgdata=NotifiedFifoData(msg);
msgdata->cmdfunc(msgdata->cmdbuff,msgdata->debug,msgdata->prnt,arg);
free(msgdata->cmdbuff);
delNotifiedFIFO_elt(msg);
}
}
/*------------------------------------------------------------------------------------------------*/
/* load the commands delivered with the telnet server
*
......@@ -758,6 +779,7 @@ int telnetsrv_autoinit(void) {
*/
int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd) {
int i;
notifiedFIFO_t *afifo=NULL;
if( modulename == NULL || var == NULL || cmd == NULL) {
fprintf(stderr,"[TELNETSRV] Telnet server, add_telnetcmd: invalid parameters\n");
......@@ -769,6 +791,13 @@ int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmdde
strncpy(telnetparams.CmdParsers[i].module,modulename,sizeof(telnetparams.CmdParsers[i].module)-1);
telnetparams.CmdParsers[i].cmd = cmd;
telnetparams.CmdParsers[i].var = var;
if (cmd->cmdflags & TELNETSRV_CMDFLAG_PUSHINTPOOLQ) {
if (afifo == NULL) {
afifo = malloc(sizeof(notifiedFIFO_t));
initNotifiedFIFO(afifo);
}
cmd->qptr = afifo;
}
printf("[TELNETSRV] Telnet server: module %i = %s added to shell\n",
i,telnetparams.CmdParsers[i].module);
break;
......@@ -797,8 +826,10 @@ int telnetsrv_checkbuildver(char *mainexec_buildversion, char **shlib_buildvers
}
int telnetsrv_getfarray(loader_shlibfunc_t **farray) {
*farray=malloc(sizeof(loader_shlibfunc_t));
*farray=malloc(sizeof(loader_shlibfunc_t)*2);
(*farray)[0].fname=TELNET_ADDCMD_FNAME;
(*farray)[0].fptr=(int (*)(void) )add_telnetcmd;
return 1;
(*farray)[1].fname=TELNET_POLLCMDQ_FNAME;
(*farray)[1].fptr=(int (*)(void) )poll_telnetcmdq;
return ( 2);
}
......@@ -53,13 +53,26 @@
/* to add a set of new command to the telnet server shell */
typedef void(*telnet_printfunc_t)(const char* format, ...);
typedef int(*cmdfunc_t)(char*, int, telnet_printfunc_t prnt);
typedef int(*qcmdfunc_t)(char*, int, telnet_printfunc_t prnt,void *arg);
#define TELNETSRV_CMDFLAG_PUSHINTPOOLQ (1<<0) // ask the telnet server to push the command in a thread pool queue
typedef struct cmddef {
char cmdname[TELNET_CMD_MAXSIZE];
char helpstr[TELNET_HELPSTR_SIZE];
cmdfunc_t cmdfunc;
unsigned int cmdflags;
void *qptr;
} telnetshell_cmddef_t;
/*----------------------------------------------------------------------------*/
/* structure used to send a command via a message queue to enable */
/* executing a command in a thread different from the telnet server thread */
typedef struct telnetsrv_qmsg {
qcmdfunc_t cmdfunc;
telnet_printfunc_t prnt;
int debug;
char *cmdbuff;
} telnetsrv_qmsg_t;
/*----------------------------------------------------------------------------*/
/*structure to be used when adding a module to the telnet server */
/* This is the first parameter of the add_telnetcmd function, which can be used */
......@@ -111,9 +124,6 @@ typedef struct {
} telnetsrv_params_t;
typedef int(*addcmdfunc_t)(char*, telnetshell_vardef_t*, telnetshell_cmddef_t*);
typedef void(*settelnetmodule_t)(char *name, void *ptr);
/*-------------------------------------------------------------------------------------------*/
......@@ -133,7 +143,9 @@ VT escape sequence definition, for smarter display....
/*---------------------------------------------------------------------------------------------*/
#define TELNET_ADDCMD_FNAME "add_telnetcmd"
#define TELNET_POLLCMDQ_FNAME "poll_telnetcmdq"
typedef int(*add_telnetcmd_func_t)(char *, telnetshell_vardef_t *, telnetshell_cmddef_t *);
typedef void(*poll_telnetcmdq_func_t)(void *qid,void *arg);
#ifdef TELNETSERVERCODE
int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd);
void set_sched(pthread_t tid, int pid,int priority);
......
......@@ -111,9 +111,10 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
pool->activated=true;
initNotifiedFIFO(&pool->incomingFifo);
char *saveptr, * curptr;
char *parms_cpy=strdup(params);
pool->nbThreads=0;
pool->restrictRNTI=false;
curptr=strtok_r(params,",",&saveptr);
curptr=strtok_r(parms_cpy,",",&saveptr);
struct one_thread * ptr;
while ( curptr!=NULL ) {
int c=toupper(curptr[0]);
......@@ -145,7 +146,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
curptr=strtok_r(NULL,",",&saveptr);
}
free(parms_cpy);
if (pool->activated && pool->nbThreads==0) {
printf("No servers created in the thread pool, exit\n");
exit(1);
......
STATUS 2020/06/26 : information is up to date, but under continuous improvement
STATUS 2020/07/30 : under continuous improvement ; updated the configuration files links with CI approved reference files
## Table of Contents ##
......@@ -78,16 +79,16 @@ https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master-documentation/do
Each component (EPC, eNB, gNB) has its own configuration file.
These config files are passed as arguments of the run command line, using the option -O \<conf file\>
Some config examples can be found in the following folder:
https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/targets/PROJECTS/GENERIC-LTE-EPC/CONF
The **REFERENCE** files for eNB and gNB, **used by the CI**, can be found here:
[enb conf file](../ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf)
[gnb conf file](../ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf)
Also base config files can be found here:
[enb conf file](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/rh_doc_update_3/doc/testing_gnb_w_cots_ue_resources/enb.conf)
[gnb conf file](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/rh_doc_update_3/doc/testing_gnb_w_cots_ue_resources/gnb.conf)
These files have to be updated manually to set the IP addresses and frequency.
TO DO : attach base confif files
These files have to be updated manually to set the IP addresses and frequency.
**ATTENTION** : an **EXTERNAL** clock is used to sync the eNB and gNB,
whether the clock is internal or external is defined in the configuration files (!! details needed !!)
1- In the **eNB configuration file** :
- look for MME IP address, and update the **ipv4 field** with the IP address of the **EPC** server
......@@ -128,7 +129,7 @@ These files have to be updated manually to set the IP addresses and frequency.
}
);
```
- look for X2 IP address, and update the **4 fields** with the IP address of the **eNB** server (notice : even if -in principle- S1 MME is not required for gNB setting)
- look for X2 IP address, and update the **4 fields** with the IP address of the **eNB** server / **gNB** server as below (notice : even if -in principle- S1 MME is not required for gNB setting)
```
///X2
......@@ -146,11 +147,11 @@ These files have to be updated manually to set the IP addresses and frequency.
{
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
GNB_IPV4_ADDRESS_FOR_S1_MME = "**YOUR_ENB_IP_ADDR**";
GNB_IPV4_ADDRESS_FOR_S1_MME = "**YOUR_GNB_IP_ADDR**";
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
GNB_IPV4_ADDRESS_FOR_S1U = "**YOUR_ENB_IP_ADDR**";
GNB_IPV4_ADDRESS_FOR_S1U = "**YOUR_GNB_IP_ADDR**";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
GNB_IPV4_ADDRESS_FOR_X2C = "**YOUR_ENB_IP_ADDR**";
GNB_IPV4_ADDRESS_FOR_X2C = "**YOUR_GNB_IP_ADDR**";
GNB_PORT_FOR_X2C = 36422; # Spec 36422
};
......@@ -215,26 +216,20 @@ Execute:
```
For example:
```
~/openairinterface5g/cmake_targets/ran_build/build$ sudo ./lte-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf | tee mylogfile.log
```
- **gNB** (on the gNB host)
Execute:
```
~/openairinterface5g/cmake_targets/ran_build/build$ sudo ./nr-softmodem -O **YOUR_GNB_CONF_FILE** | tee **YOUR_LOG_FILE**
~/openairinterface5g/cmake_targets/ran_build/build$ sudo ./nr-softmodem -O **YOUR_GNB_CONF_FILE** -E | tee **YOUR_LOG_FILE**
```
For example:
```
~/openairinterface5g/cmake_targets/ran_build/build$ sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf | tee mylogfile.log
```
**ATTENTION** : for the gNB execution,
The -E option is required to enable the tri-quarter sampling rate when using a B2xx serie USRP
The -E opton is not needed when using a a N300 USRP
## Test Case
......
......@@ -401,7 +401,7 @@ void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_
hULUE(newUDPheader)->O_ACK=eNB->ulsch[UE_id]->harq_processes[harq_pid]->O_ACK;
memcpy(hULUE(newUDPheader)->o_ACK, eNB->ulsch[UE_id]->harq_processes[harq_pid]->o_ACK,
sizeof(eNB->ulsch[UE_id]->harq_processes[harq_pid]->o_ACK));
hULUE(newUDPheader)->ta=lte_est_timing_advance_pusch(eNB, UE_id);
hULUE(newUDPheader)->ta=lte_est_timing_advance_pusch(&eNB->frame_parms, eNB->pusch_vars[UE_id]->drs_ch_estimates_time);
hULUE(newUDPheader)->segment=segmentID;
memcpy(hULUE(newUDPheader)->o, eNB->ulsch[UE_id]->harq_processes[harq_pid]->o,
sizeof(eNB->ulsch[UE_id]->harq_processes[harq_pid]->o));
......
......@@ -1167,6 +1167,7 @@ int main ( int argc, char **argv ) {
T_Config_Init();
#endif
configure_linux();
set_softmodem_sighandler();
cpuf=get_cpu_freq_GHz();
set_taus_seed (0);
......
......@@ -75,7 +75,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "system.h"
#include <openair2/GNB_APP/gnb_app.h>
#include "PHY/TOOLS/phy_scope_interface.h"
#include "PHY/TOOLS/nr_phy_scope.h"
#include "stats.h"
#include "nr-softmodem.h"
......@@ -153,7 +153,6 @@ char channels[128] = "0";
int rx_input_level_dBm;
uint32_t do_forms=0;
int otg_enabled;
//int number_of_cards = 1;
......@@ -451,7 +450,11 @@ static void get_options(void) {
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC_GNB ;
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
get_common_options(SOFTMODEM_GNB_BIT );
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
......@@ -814,7 +817,6 @@ int main( int argc, char **argv )
configure_linux();
printf("Reading in command-line options\n");
get_options ();
get_common_options(SOFTMODEM_GNB_BIT );
if (CONFIG_ISFLAGSET(CONFIG_ABORT) ) {
fprintf(stderr,"Getting configuration failed\n");
......@@ -956,14 +958,14 @@ if(!IS_SOFTMODEM_NOS1)
printf("RC.nb_RU:%d\n", RC.nb_RU);
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
printf("ALL RUs ready - init gNBs\n");
if(IS_SOFTMODEM_DOFORMS) {
if (do_forms==1) {
scopeParms_t p;
p.argc=&argc;
p.argv=argv;
p.gNB=RC.gNB[0];
p.ru=RC.ru[0];
gNBinitScope(&p);
load_softscope("nr",&p);
}
if (nfapi_mode != 1 && nfapi_mode != 2) {
......
......@@ -19,21 +19,12 @@
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_PARAMS_DESC_GNB { \
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&wait_for_sync, defintval:0, TYPE_INT, 0}, \
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:DEFAULT_DLF, TYPE_UINT64, 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}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
{"parallel-config", CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)&parallel_config, defstrval:NULL, TYPE_STRING, 0}, \
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
}
......
......@@ -75,12 +75,12 @@ unsigned short config_frames[4] = {2,9,11,13};
#include <openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h>
#include <openair1/SCHED_NR_UE/fapi_nr_ue_l1.h>
/* Callbacks, globals and object handlers */
//#include "stats.h"
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
#include "PHY/TOOLS/phy_scope_interface.h"
#include "PHY/TOOLS/nr_phy_scope.h"
// at eNB 0, an UL scope for every UE
//FD_lte_phy_scope_enb *form_enb[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
#include <executables/nr-uesoftmodem.h>
#include "executables/softmodem-common.h"
#include "executables/thread-common.h"
......@@ -150,14 +150,11 @@ char ref[128] = "internal";
char channels[128] = "0";
static char *parallel_config = NULL;
static char *worker_config = NULL;
int rx_input_level_dBm;
//static int online_log_messages=0;
uint32_t do_forms=0;
int otg_enabled;
//int number_of_cards = 1;
......@@ -760,8 +757,10 @@ int main( int argc, char **argv ) {
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*NUMBER_OF_UE_MAX*MAX_NUM_CCs);
configure_linux();
mlockall(MCL_CURRENT | MCL_FUTURE);
if (do_forms)
nrUEinitScope(PHY_vars_UE_g[0][0]);
if(IS_SOFTMODEM_DOFORMS) {
load_softscope("nr",PHY_vars_UE_g[0][0]);
}
number_of_cards = 1;
for(int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
......
......@@ -61,19 +61,11 @@
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0,TYPE_UINT64, 0}, \
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&chain_offset, defintval:0, TYPE_INT, 0}, \
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:&do_forms, defintval:0, TYPE_INT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0}, \
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, 0, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
{"parallel-config", CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)&parallel_config, defstrval:NULL, TYPE_STRING, 0}, \
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 0}, \
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&UE_no_timing_correction, defintval:0, TYPE_INT, 0}, \
......
......@@ -28,6 +28,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <openair1/PHY/defs_eNB.h>
#include <common/utils/telnetsrv/telnetsrv_proccmd.h>
#define CU_PORT "7878"
#define DU_PORT "8787"
......@@ -325,5 +326,6 @@ void fep_full(RU_t *ru, int subframe);
void feptx_prec(RU_t *ru,int frame,int subframe);
void feptx_ofdm(RU_t *ru, int frame, int subframe);
void oai_subframe_ind(uint16_t sfn, uint16_t sf);
void softmodem_printresources(int sig, telnet_printfunc_t pf);
extern uint16_t sf_ahead;
#endif
......@@ -364,7 +364,7 @@ typedef struct
//table 3-22
typedef struct
{
nfapi_uint8_tlv_t phy_cell_id;//Physical Cell ID, 𝑁_{𝐼𝐷}^{𝑐𝑒𝑙𝑙} [38.211, sec 7.4.2.1] Value: 0 ->1007
nfapi_uint16_tlv_t phy_cell_id;//Physical Cell ID, 𝑁_{𝐼𝐷}^{𝑐𝑒𝑙𝑙} [38.211, sec 7.4.2.1] Value: 0 ->1007
nfapi_uint8_tlv_t frame_duplex_type;//Frame duplex type Value: 0 = FDD 1 = TDD
} nfapi_nr_cell_config_t;
......
......@@ -55,7 +55,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
uint8_t preamble_index = ue->prach_resources[eNB_id]->ra_PreambleIndex;
uint8_t tdd_mapindex = ue->prach_resources[eNB_id]->ra_TDD_map_index;
int16_t *prachF = ue->prach_vars[eNB_id]->prachF;
static int16_t prach_tmp[45600*2] __attribute__((aligned(32)));
static int16_t prach_tmp[45600*4] __attribute__((aligned(32)));
int16_t *prach = prach_tmp;
int16_t *prach2;
int16_t amp = ue->prach_vars[eNB_id]->amp;
......
......@@ -540,7 +540,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
uint16_t rootSequenceIndex;
int numrootSequenceIndex;
uint8_t restricted_set;
uint8_t n_ra_prb;
uint8_t n_ra_prb=0xFF;
int16_t *prachF=NULL;
int nb_rx;
......
......@@ -26,6 +26,7 @@
#include <stdlib.h>
#include "nr_phy_scope.h"
#include "executables/nr-softmodem-common.h"
#include "executables/softmodem-common.h"
#include <forms.h>
#define TPUT_WINDOW_LENGTH 100
......@@ -768,6 +769,15 @@ void nrUEinitScope(PHY_VARS_NR_UE *ue) {
threadCreate(&forms_thread, nrUEscopeThread, ue, "scope", -1, OAI_PRIORITY_RT_LOW);
}
void nrscope_autoinit(void *dataptr) {
AssertFatal( (IS_SOFTMODEM_GNB_BIT||IS_SOFTMODEM_5GUE_BIT),"Scope cannot find NRUE or GNB context");
if (IS_SOFTMODEM_GNB_BIT)
gNBinitScope(dataptr);
else
nrUEinitScope(dataptr);
}
// Kept to put back the functionality soon
#if 0
//FD_stats_form *form_stats=NULL,*form_stats_l2=NULL;
......@@ -795,6 +805,8 @@ static void reset_stats_gNB(FL_OBJECT *button,
}
}
static FD_stats_form *create_form_stats_form(int ID) {
FL_OBJECT *obj;
FD_stats_form *fdui = calloc(( sizeof *fdui ),1);
......
......@@ -40,8 +40,6 @@ typedef struct {
PHY_VARS_gNB *gNB;
} scopeParms_t;
void gNBinitScope(scopeParms_t *p);
void nrUEinitScope(PHY_VARS_NR_UE *ue);
extern RAN_CONTEXT_t RC;
#endif
......@@ -37,10 +37,10 @@
#define SOFTSCOPE_ENDFUNC_IDX 0
static loader_shlibfunc_t scope_fdesc[]= {{"end_forms",NULL}};
int load_softscope(char *exectype) {
int load_softscope(char *exectype, void *initarg) {
char libname[64];
sprintf(libname,"%.10sscope",exectype);
return load_module_shlib(libname,scope_fdesc,1,NULL);
return load_module_shlib(libname,scope_fdesc,1,initarg);
}
int end_forms(void) {
......
......@@ -31,5 +31,5 @@
*/
int load_softscope(char *exectype);
int load_softscope(char *exectype, void *initarg);
int end_forms(void) ;
To use the scope, run the xNB or the UE with option "-d"
Usage in gdb
In gdb, when you break, you can refresh immediatly the scope view by calling the display function.
The first paramter is the graph context, nevertheless we keep the last value for a dirty call in gdb (so you can use '0')
Example with no variable known
phy_scope_nrUE(0, PHY_vars_UE_g[0][0], 0, 0, 0)
or
phy_scope_gNB(0, phy_vars_gnb, phy_vars_ru, UE_id)
......@@ -59,10 +59,10 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
unsigned char NB_RU=0;
#ifndef OPENAIR2
unsigned char NB_eNB_INST=0;
uint16_t NB_UE_INST=0;
unsigned char NB_RN_INST=0;
unsigned char NB_INST=0;
//unsigned char NB_eNB_INST=0;
//uint16_t NB_UE_INST=0;
//unsigned char NB_RN_INST=0;
//unsigned char NB_INST=0;
#endif
int number_of_cards;
......
......@@ -138,4 +138,4 @@ uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
uint8_t max_ldpc_iterations=4;
uint8_t max_turbo_iterations=4;
#endif /*__PHY_VARS_H__ */
#endif
......@@ -424,7 +424,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
for (int ULSCH_id=0;ULSCH_id<NUMBER_OF_NR_ULSCH_MAX;ULSCH_id++) {
NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id][0];
int harq_pid;
int no_sig;
//int no_sig;
NR_UL_gNB_HARQ_t *ulsch_harq;
if ((ulsch) &&
......
This diff is collapsed.
......@@ -40,6 +40,16 @@ The present clause specifies several numerical functions for testing of digital
#define NB_SAMPLES_CHANNEL_OFFSET 4
typedef enum {
UNSPECIFIED_MODID=0,
RFSIMU_MODULEID=1
} channelmod_moduleid_t;
#define MODULEID_STR_INIT {"","rfsimulator"}
#define CHANMODEL_FREE_DELAY 1<<0
#define CHANMODEL_FREE_RSQRT_6 1<<1
#define CHANMODEL_FREE_RSQRT_NTAPS 1<<2
#define CHANMODEL_FREE_AMPS 1<<3
typedef struct {
///Number of tx antennas
uint8_t nb_tx;
......@@ -92,6 +102,14 @@ typedef struct {
time_stats_t interp_time;
time_stats_t interp_freq;
time_stats_t convolution;
/// index in the channel descriptors array
unsigned int chan_idx;
/// id of the channel modeling algorithm
int modelid;
/// identifies channel descriptor owner (the module which created this descriptor)
channelmod_moduleid_t module_id;
/// flags to properly trigger memory free
unsigned int free_flags;
} channel_desc_t;
typedef struct {
......@@ -214,8 +232,9 @@ typedef enum {
#define CONFIG_HLP_SNR "Set average SNR in dB (for --siml1 option)\n"
#define CHANNELMOD_SECTION "channelmod"
#define CHANNELMOD_PARAMS_DESC { \
{"s" , CONFIG_HLP_SNR, PARAMFLAG_CMDLINE_NOPREFIXENABLED, dblptr:&snr_dB , defdblval:25, TYPE_DOUBLE, 0},\
{"sinr_dB", NULL , 0 , dblptr:&sinr_dB, defdblval:0 , TYPE_DOUBLE, 0},\
{"s" , CONFIG_HLP_SNR, PARAMFLAG_CMDLINE_NOPREFIXENABLED, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0},\
{"sinr_dB", NULL, 0 , dblptr:&sinr_dB, defdblval:0 , TYPE_DOUBLE, 0},\
{"max_chan, CONFIG_HLP_MAX_CHAN", 0, uptr:&max_chan, defintval:10, TYPE_UINT, 0},\
}
#include "platform_constants.h"
......@@ -273,9 +292,18 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
double forgetting_factor,
int32_t channel_offset,
double path_loss_dB);
/**
\brief free memory allocated for a model descriptor
\param ch points to the model, which cannot be used after calling this fuction
*/
void free_channel_desc_scm(channel_desc_t *ch);
/**
\brief This set the ownerid of a model descriptor, can be later used to check what module created a channel model
\param cdesc points to the model descriptor
\param module_id identifies the channel model. should be define as a macro in simu.h
*/
void set_channeldesc_owner(channel_desc_t *cdesc, channelmod_moduleid_t module_id);
/** \fn void random_channel(channel_desc_t *desc)
\brief This routine generates a random channel response (time domain) according to a tapped delay line model.
\param desc Pointer to the channel descriptor
......
......@@ -44,8 +44,6 @@ AGENT_PHY_xface *flexran_agent_get_phy_xface(mid_t mod_id);
extern AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
#define flexran_agent_get_mac_xface(mod_id) (agent_mac_xface[mod_id])
/* Control module interface for the communication of the RRC Control Module with the agent */
/* Control module interface for the communication of the RRC Control Module with the agent */
// AGENT_RRC_xface *flexran_agent_get_rrc_xface(mid_t mod_id);
extern AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
......
This diff is collapsed.
......@@ -360,7 +360,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
uint8_t sdu_lcids[NB_RB_MAX] = {0};
uint16_t sdu_lengths[NB_RB_MAX] = {0};
int TBS_bytes = 848, header_length_total, num_sdus, offset, preambleTransMax, mac_ce_len;
int TBS_bytes = 848, header_length_total=0, num_sdus, offset, preambleTransMax, mac_ce_len;
AssertFatal(CC_id == 0,"Transmission on secondary CCs is not supported yet\n");
......
This diff is collapsed.
This diff is collapsed.
......@@ -917,7 +917,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
srs_res0->resourceMapping.repetitionFactor=NR_SRS_Resource__resourceMapping__repetitionFactor_n1;
srs_res0->freqDomainPosition=0;
srs_res0->freqDomainShift=0;
srs_res0->freqHopping.c_SRS = 61;
srs_res0->freqHopping.c_SRS = 0;
srs_res0->freqHopping.b_SRS=0;
srs_res0->freqHopping.b_hop=0;
srs_res0->groupOrSequenceHopping=NR_SRS_Resource__groupOrSequenceHopping_neither;
......
......@@ -116,7 +116,9 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
/* some sanity check - to be refined at some point */
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED, what to do?\n");
abort();
// Allow for a gracious exit when we kill first the gNB, then the eNB
//abort();
return;
}
x2ap_enb_data_p->in_streams = sctp_new_association_resp->in_streams;
......
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