Commit 5729f153 authored by laurent's avatar laurent

merge develop

parents 7d1d8744 05f052cc
...@@ -66,7 +66,8 @@ pipeline { ...@@ -66,7 +66,8 @@ pipeline {
"Test-IF4p5-TDD-Band38-Multi-RRU", "Test-IF4p5-TDD-Band38-Multi-RRU",
"Test-eNB-OAI-UE-FDD-Band7", "Test-eNB-OAI-UE-FDD-Band7",
"Test-Mono-FDD-Band13-X2-HO", "Test-Mono-FDD-Band13-X2-HO",
"Test-TDD-Band78-gNB-NR-UE" "Test-TDD-Band78-gNB-NR-UE",
"Test-OCP-FDD-Band7"
]) ])
ansiColor('xterm') ansiColor('xterm')
} }
...@@ -683,6 +684,25 @@ pipeline { ...@@ -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 { post {
always { 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(): ...@@ -66,38 +66,6 @@ class EPCManagement():
self.MmeIPAddress = '' self.MmeIPAddress = ''
self.containerPrefix = 'prod' 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 # EPC management functions
......
...@@ -82,73 +82,14 @@ class HTMLManagement(): ...@@ -82,73 +82,14 @@ class HTMLManagement():
#----------------------------------------------------------- #-----------------------------------------------------------
# Setters and Getters # 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): def SethtmlUEConnected(self, nbUEs):
if nbUEs > 0: if nbUEs > 0:
self.htmlUEConnected = nbUEs self.htmlUEConnected = nbUEs
else: else:
self.htmlUEConnected = 1 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 # 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(): ...@@ -101,6 +101,18 @@ class SSHConnection():
else: else:
sys.exit('SSH Connection Failed') 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): def command(self, commandline, expectedline, timeout):
logging.debug(commandline) logging.debug(commandline)
self.ssh.timeout = timeout 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 @@ ...@@ -34,7 +34,7 @@
<mode>TesteNB</mode> <mode>TesteNB</mode>
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build gNB (USRP)</desc> <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> <forced_workspace_cleanup>True</forced_workspace_cleanup>
</testCase> </testCase>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<mode>TestUE</mode> <mode>TestUE</mode>
<class>Build_OAI_UE</class> <class>Build_OAI_UE</class>
<desc>Build NR UE (USRP)</desc> <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> <clean_repository>false</clean_repository>
</testCase> </testCase>
......
...@@ -2482,8 +2482,8 @@ add_library(uescope MODULE ${XFORMS_SOURCE} ${XFORMS_SOURCE_SOFTMODEM} ${XFORMS_ ...@@ -2482,8 +2482,8 @@ add_library(uescope MODULE ${XFORMS_SOURCE} ${XFORMS_SOURCE_SOFTMODEM} ${XFORMS_
target_link_libraries(enbscope ${XFORMS_LIBRARIES}) target_link_libraries(enbscope ${XFORMS_LIBRARIES})
target_link_libraries(uescope ${XFORMS_LIBRARIES}) target_link_libraries(uescope ${XFORMS_LIBRARIES})
add_library(gnbscope MODULE ${XFORMS_SOURCE_NR}) add_library(nrscope MODULE ${XFORMS_SOURCE_NR})
target_link_libraries(gnbscope ${XFORMS_LIBRARIES}) target_link_libraries(nrscope ${XFORMS_LIBRARIES})
add_library(rfsimulator MODULE add_library(rfsimulator MODULE
...@@ -2632,7 +2632,7 @@ add_executable(ocp-enb ...@@ -2632,7 +2632,7 @@ add_executable(ocp-enb
${CONFIG_SOURCES} ${CONFIG_SOURCES}
${SHLIB_LOADER_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 target_link_libraries (ocp-enb
-Wl,--start-group -Wl,--start-group
...@@ -2739,7 +2739,7 @@ add_executable(nr-softmodem ...@@ -2739,7 +2739,7 @@ add_executable(nr-softmodem
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c
${GTPU_need_ITTI} ${GTPU_need_ITTI}
${XFORMS_SOURCE_NR} ${XFORMSINTERFACE_SOURCE}
${T_SOURCE} ${T_SOURCE}
${CONFIG_SOURCES} ${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES} ${SHLIB_LOADER_SOURCES}
...@@ -2821,7 +2821,7 @@ add_executable(nr-uesoftmodem ...@@ -2821,7 +2821,7 @@ add_executable(nr-uesoftmodem
${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c
${XFORMS_SOURCE_NR} ${XFORMSINTERFACE_SOURCE}
${T_SOURCE} ${T_SOURCE}
${UTIL_SRC} ${UTIL_SRC}
${CONFIG_SOURCES} ${CONFIG_SOURCES}
......
...@@ -67,7 +67,7 @@ UE_TIMING_TRACE="False" ...@@ -67,7 +67,7 @@ UE_TIMING_TRACE="False"
USRP_REC_PLAY="False" USRP_REC_PLAY="False"
BUILD_ECLIPSE=0 BUILD_ECLIPSE=0
NR="False" NR="False"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope msc" OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope msc"
trap handle_ctrl_c INT trap handle_ctrl_c INT
function print_help() { function print_help() {
...@@ -96,7 +96,9 @@ Options ...@@ -96,7 +96,9 @@ Options
enable cmake debugging messages enable cmake debugging messages
--eNB --eNB
Makes the LTE softmodem Makes the LTE softmodem
--gNB --eNBocp
Makes the OCP LTE softmodem
-gNB
Makes the NR softmodem Makes the NR softmodem
--nrUE --nrUE
Makes the NR UE softmodem Makes the NR UE softmodem
...@@ -237,6 +239,10 @@ function main() { ...@@ -237,6 +239,10 @@ function main() {
eNB=1 eNB=1
echo_info "Will compile eNB" echo_info "Will compile eNB"
shift;; shift;;
--eNBocp)
eNBocp=1
echo_info "Will compile OCP eNB"
shift;;
--gNB) --gNB)
gNB=1 gNB=1
NR="True" NR="True"
...@@ -443,7 +449,7 @@ function main() { ...@@ -443,7 +449,7 @@ function main() {
######################################################## ########################################################
# to be discussed # 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 if [ "$HW" = "None" -a "$TP" = "None" ] ; then
echo_info "No local radio head and no transport protocol selected" echo_info "No local radio head and no transport protocol selected"
fi fi
...@@ -569,7 +575,7 @@ function main() { ...@@ -569,7 +575,7 @@ function main() {
config_libconfig_shlib=params_libconfig config_libconfig_shlib=params_libconfig
# first generate the CMakefile in the right directory # 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 # softmodem compilation
...@@ -602,6 +608,9 @@ function main() { ...@@ -602,6 +608,9 @@ function main() {
if [ "$eNB" = "1" ] ; then if [ "$eNB" = "1" ] ; then
execlist="$execlist lte-softmodem" execlist="$execlist lte-softmodem"
fi fi
if [ "$eNBocp" = "1" ] ; then
execlist="$execlist ocp-enb"
fi
if [ "$gNB" = "1" ] ; then if [ "$gNB" = "1" ] ; then
execlist="$execlist nr-softmodem" execlist="$execlist nr-softmodem"
fi fi
...@@ -817,7 +826,7 @@ function main() { ...@@ -817,7 +826,7 @@ function main() {
#################################################### ####################################################
# Build RF device and transport protocol libraries # # 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 # build RF device libraries
if [ "$HW" != "None" ] ; then if [ "$HW" != "None" ] ; then
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <sys/resource.h> #include <sys/resource.h>
#include "common/utils/load_module_shlib.h" #include "common/utils/load_module_shlib.h"
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
#include "common/utils/threadPool/thread-pool.h"
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include <readline/history.h> #include <readline/history.h>
...@@ -507,12 +508,22 @@ int process_command(char *buf) { ...@@ -507,12 +508,22 @@ int process_command(char *buf) {
} }
rt= CMDSTATUS_FOUND; 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); rt= setgetvar(i,cmd[0],cmdb);
} else { } else {
for (k=0 ; telnetparams.CmdParsers[i].cmd[k].cmdfunc != NULL ; k++) { 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 (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); telnetparams.CmdParsers[i].cmd[k].cmdfunc(cmdb, telnetparams.telnetdbg, client_printf);
}
rt= CMDSTATUS_FOUND; rt= CMDSTATUS_FOUND;
} }
} /* for k */ } /* for k */
...@@ -673,6 +684,16 @@ void run_telnetsrv(void) { ...@@ -673,6 +684,16 @@ void run_telnetsrv(void) {
return; 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 /* load the commands delivered with the telnet server
* *
...@@ -758,6 +779,7 @@ int telnetsrv_autoinit(void) { ...@@ -758,6 +779,7 @@ int telnetsrv_autoinit(void) {
*/ */
int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd) { int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd) {
int i; int i;
notifiedFIFO_t *afifo=NULL;
if( modulename == NULL || var == NULL || cmd == NULL) { if( modulename == NULL || var == NULL || cmd == NULL) {
fprintf(stderr,"[TELNETSRV] Telnet server, add_telnetcmd: invalid parameters\n"); 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 ...@@ -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); strncpy(telnetparams.CmdParsers[i].module,modulename,sizeof(telnetparams.CmdParsers[i].module)-1);
telnetparams.CmdParsers[i].cmd = cmd; telnetparams.CmdParsers[i].cmd = cmd;
telnetparams.CmdParsers[i].var = var; 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", printf("[TELNETSRV] Telnet server: module %i = %s added to shell\n",
i,telnetparams.CmdParsers[i].module); i,telnetparams.CmdParsers[i].module);
break; break;
...@@ -797,8 +826,10 @@ int telnetsrv_checkbuildver(char *mainexec_buildversion, char **shlib_buildvers ...@@ -797,8 +826,10 @@ int telnetsrv_checkbuildver(char *mainexec_buildversion, char **shlib_buildvers
} }
int telnetsrv_getfarray(loader_shlibfunc_t **farray) { 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].fname=TELNET_ADDCMD_FNAME;
(*farray)[0].fptr=(int (*)(void) )add_telnetcmd; (*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 @@ ...@@ -53,13 +53,26 @@
/* to add a set of new command to the telnet server shell */ /* to add a set of new command to the telnet server shell */
typedef void(*telnet_printfunc_t)(const char* format, ...); typedef void(*telnet_printfunc_t)(const char* format, ...);
typedef int(*cmdfunc_t)(char*, int, telnet_printfunc_t prnt); 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 { typedef struct cmddef {
char cmdname[TELNET_CMD_MAXSIZE]; char cmdname[TELNET_CMD_MAXSIZE];
char helpstr[TELNET_HELPSTR_SIZE]; char helpstr[TELNET_HELPSTR_SIZE];
cmdfunc_t cmdfunc; cmdfunc_t cmdfunc;
unsigned int cmdflags;
void *qptr;
} telnetshell_cmddef_t; } 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 */ /*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 */ /* This is the first parameter of the add_telnetcmd function, which can be used */
...@@ -111,9 +124,6 @@ typedef struct { ...@@ -111,9 +124,6 @@ typedef struct {
} telnetsrv_params_t; } telnetsrv_params_t;
typedef int(*addcmdfunc_t)(char*, telnetshell_vardef_t*, telnetshell_cmddef_t*);
typedef void(*settelnetmodule_t)(char *name, void *ptr); typedef void(*settelnetmodule_t)(char *name, void *ptr);
/*-------------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------------*/
...@@ -133,7 +143,9 @@ VT escape sequence definition, for smarter display.... ...@@ -133,7 +143,9 @@ VT escape sequence definition, for smarter display....
/*---------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------*/
#define TELNET_ADDCMD_FNAME "add_telnetcmd" #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 int(*add_telnetcmd_func_t)(char *, telnetshell_vardef_t *, telnetshell_cmddef_t *);
typedef void(*poll_telnetcmdq_func_t)(void *qid,void *arg);
#ifdef TELNETSERVERCODE #ifdef TELNETSERVERCODE
int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd); int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd);
void set_sched(pthread_t tid, int pid,int priority); void set_sched(pthread_t tid, int pid,int priority);
......
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 ## ## Table of Contents ##
...@@ -78,16 +79,16 @@ https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master-documentation/do ...@@ -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. 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\> 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: The **REFERENCE** files for eNB and gNB, **used by the CI**, can be found here:
https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/develop/targets/PROJECTS/GENERIC-LTE-EPC/CONF [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: These files have to be updated manually to set the IP addresses and frequency.
[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)
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** : 1- In the **eNB configuration file** :
- look for MME IP address, and update the **ipv4 field** with the IP address of the **EPC** server - 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. ...@@ -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 ///X2
...@@ -146,11 +147,11 @@ These files have to be updated manually to set the IP addresses and frequency. ...@@ -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_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_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_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 GNB_PORT_FOR_X2C = 36422; # Spec 36422
}; };
...@@ -215,26 +216,20 @@ Execute: ...@@ -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) - **gNB** (on the gNB host)
Execute: 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: **ATTENTION** : for the gNB execution,
``` The -E option is required to enable the tri-quarter sampling rate when using a B2xx serie USRP
~/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 The -E opton is not needed when using a a N300 USRP
```
## Test Case ## Test Case
......
...@@ -1137,6 +1137,7 @@ int main ( int argc, char **argv ) { ...@@ -1137,6 +1137,7 @@ int main ( int argc, char **argv ) {
T_Config_Init(); T_Config_Init();
#endif #endif
configure_linux(); configure_linux();
set_softmodem_sighandler();
cpuf=get_cpu_freq_GHz(); cpuf=get_cpu_freq_GHz();
set_taus_seed (0); set_taus_seed (0);
...@@ -1319,8 +1320,9 @@ int main ( int argc, char **argv ) { ...@@ -1319,8 +1320,9 @@ int main ( int argc, char **argv ) {
// end of CI modifications // end of CI modifications
//getchar(); //getchar();
if(IS_SOFTMODEM_DOFORMS) if(IS_SOFTMODEM_DOFORMS) {
load_softscope("enb"); load_softscope("enb",NULL);
}
itti_wait_tasks_end(); itti_wait_tasks_end();
oai_exit=1; oai_exit=1;
......
...@@ -75,7 +75,7 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -75,7 +75,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "system.h" #include "system.h"
#include <openair2/GNB_APP/gnb_app.h> #include <openair2/GNB_APP/gnb_app.h>
#include "PHY/TOOLS/phy_scope_interface.h"
#include "PHY/TOOLS/nr_phy_scope.h" #include "PHY/TOOLS/nr_phy_scope.h"
#include "stats.h" #include "stats.h"
#include "nr-softmodem.h" #include "nr-softmodem.h"
...@@ -156,7 +156,6 @@ char channels[128] = "0"; ...@@ -156,7 +156,6 @@ char channels[128] = "0";
int rx_input_level_dBm; int rx_input_level_dBm;
uint32_t do_forms=0;
int otg_enabled; int otg_enabled;
//int number_of_cards = 1; //int number_of_cards = 1;
...@@ -454,7 +453,11 @@ static void get_options(void) { ...@@ -454,7 +453,11 @@ static void get_options(void) {
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC_GNB ; 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_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
...@@ -817,7 +820,6 @@ int main( int argc, char **argv ) ...@@ -817,7 +820,6 @@ int main( int argc, char **argv )
configure_linux(); configure_linux();
printf("Reading in command-line options\n"); printf("Reading in command-line options\n");
get_options (); get_options ();
get_common_options(SOFTMODEM_GNB_BIT );
if (CONFIG_ISFLAGSET(CONFIG_ABORT) ) { if (CONFIG_ISFLAGSET(CONFIG_ABORT) ) {
fprintf(stderr,"Getting configuration failed\n"); fprintf(stderr,"Getting configuration failed\n");
...@@ -959,14 +961,14 @@ if(!IS_SOFTMODEM_NOS1) ...@@ -959,14 +961,14 @@ if(!IS_SOFTMODEM_NOS1)
printf("RC.nb_RU:%d\n", RC.nb_RU); 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) // 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"); printf("ALL RUs ready - init gNBs\n");
if(IS_SOFTMODEM_DOFORMS) {
if (do_forms==1) {
scopeParms_t p; scopeParms_t p;
p.argc=&argc; p.argc=&argc;
p.argv=argv; p.argv=argv;
p.gNB=RC.gNB[0]; p.gNB=RC.gNB[0];
p.ru=RC.ru[0]; p.ru=RC.ru[0];
gNBinitScope(&p); load_softscope("nr",&p);
} }
if (nfapi_mode != 1 && nfapi_mode != 2) { if (nfapi_mode != 1 && nfapi_mode != 2) {
......
...@@ -19,21 +19,12 @@ ...@@ -19,21 +19,12 @@
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_PARAMS_DESC_GNB { \ #define CMDLINE_PARAMS_DESC_GNB { \
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
} }
......
...@@ -79,12 +79,10 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -79,12 +79,10 @@ unsigned short config_frames[4] = {2,9,11,13};
/* Callbacks, globals and object handlers */ /* Callbacks, globals and object handlers */
#include "PHY/TOOLS/nr_phy_scope.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/nr-uesoftmodem.h>
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include "executables/thread-common.h" #include "executables/thread-common.h"
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
// Raphael : missing // Raphael : missing
pthread_cond_t nfapi_sync_cond; pthread_cond_t nfapi_sync_cond;
...@@ -151,14 +149,11 @@ char ref[128] = "internal"; ...@@ -151,14 +149,11 @@ char ref[128] = "internal";
char channels[128] = "0"; char channels[128] = "0";
static char *parallel_config = NULL;
static char *worker_config = NULL;
int rx_input_level_dBm; int rx_input_level_dBm;
//static int online_log_messages=0; //static int online_log_messages=0;
uint32_t do_forms=0;
int otg_enabled; int otg_enabled;
//int number_of_cards = 1; //int number_of_cards = 1;
...@@ -761,8 +756,10 @@ int main( int argc, char **argv ) { ...@@ -761,8 +756,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); memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*NUMBER_OF_UE_MAX*MAX_NUM_CCs);
configure_linux(); configure_linux();
mlockall(MCL_CURRENT | MCL_FUTURE); 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; number_of_cards = 1;
for(int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for(int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
......
...@@ -61,19 +61,11 @@ ...@@ -61,19 +61,11 @@
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&UE_no_timing_correction, defintval:0, TYPE_INT, 0}, \
......
...@@ -119,8 +119,6 @@ int restart_L1L2(module_id_t gnb_id) { ...@@ -119,8 +119,6 @@ int restart_L1L2(module_id_t gnb_id) {
static int wait_for_sync = 0; static int wait_for_sync = 0;
static char *itti_dump_file = NULL; static char *itti_dump_file = NULL;
static char *parallel_config = NULL;
static char *worker_config = NULL;
static double snr_dB=20; static double snr_dB=20;
static int DEFBANDS[] = {7}; static int DEFBANDS[] = {7};
static int DEFENBS[] = {0}; static int DEFENBS[] = {0};
......
...@@ -364,7 +364,7 @@ typedef struct ...@@ -364,7 +364,7 @@ typedef struct
//table 3-22 //table 3-22
typedef struct 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_uint8_tlv_t frame_duplex_type;//Frame duplex type Value: 0 = FDD 1 = TDD
} nfapi_nr_cell_config_t; } 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 ...@@ -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 preamble_index = ue->prach_resources[eNB_id]->ra_PreambleIndex;
uint8_t tdd_mapindex = ue->prach_resources[eNB_id]->ra_TDD_map_index; uint8_t tdd_mapindex = ue->prach_resources[eNB_id]->ra_TDD_map_index;
int16_t *prachF = ue->prach_vars[eNB_id]->prachF; 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 *prach = prach_tmp;
int16_t *prach2; int16_t *prach2;
int16_t amp = ue->prach_vars[eNB_id]->amp; int16_t amp = ue->prach_vars[eNB_id]->amp;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "nr_phy_scope.h" #include "nr_phy_scope.h"
#include "executables/nr-softmodem-common.h" #include "executables/nr-softmodem-common.h"
#include "executables/softmodem-common.h"
#include <forms.h> #include <forms.h>
#define TPUT_WINDOW_LENGTH 100 #define TPUT_WINDOW_LENGTH 100
...@@ -768,6 +769,15 @@ void nrUEinitScope(PHY_VARS_NR_UE *ue) { ...@@ -768,6 +769,15 @@ void nrUEinitScope(PHY_VARS_NR_UE *ue) {
threadCreate(&forms_thread, nrUEscopeThread, ue, "scope", -1, OAI_PRIORITY_RT_LOW); 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 // Kept to put back the functionality soon
#if 0 #if 0
//FD_stats_form *form_stats=NULL,*form_stats_l2=NULL; //FD_stats_form *form_stats=NULL,*form_stats_l2=NULL;
...@@ -795,6 +805,8 @@ static void reset_stats_gNB(FL_OBJECT *button, ...@@ -795,6 +805,8 @@ static void reset_stats_gNB(FL_OBJECT *button,
} }
} }
static FD_stats_form *create_form_stats_form(int ID) { static FD_stats_form *create_form_stats_form(int ID) {
FL_OBJECT *obj; FL_OBJECT *obj;
FD_stats_form *fdui = calloc(( sizeof *fdui ),1); FD_stats_form *fdui = calloc(( sizeof *fdui ),1);
......
...@@ -40,8 +40,6 @@ typedef struct { ...@@ -40,8 +40,6 @@ typedef struct {
PHY_VARS_gNB *gNB; PHY_VARS_gNB *gNB;
} scopeParms_t; } scopeParms_t;
void gNBinitScope(scopeParms_t *p);
void nrUEinitScope(PHY_VARS_NR_UE *ue);
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
#endif #endif
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
#define SOFTSCOPE_ENDFUNC_IDX 0 #define SOFTSCOPE_ENDFUNC_IDX 0
static loader_shlibfunc_t scope_fdesc[]= {{"end_forms",NULL}}; static loader_shlibfunc_t scope_fdesc[]= {{"end_forms",NULL}};
int load_softscope(char *exectype) { int load_softscope(char *exectype, void *initarg) {
char libname[64]; char libname[64];
sprintf(libname,"%.10sscope",exectype); 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) { int end_forms(void) {
......
...@@ -31,5 +31,5 @@ ...@@ -31,5 +31,5 @@
*/ */
int load_softscope(char *exectype); int load_softscope(char *exectype, void *initarg);
int end_forms(void) ; int end_forms(void) ;
This diff is collapsed.
...@@ -40,6 +40,16 @@ The present clause specifies several numerical functions for testing of digital ...@@ -40,6 +40,16 @@ The present clause specifies several numerical functions for testing of digital
#define NB_SAMPLES_CHANNEL_OFFSET 4 #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 { typedef struct {
///Number of tx antennas ///Number of tx antennas
uint8_t nb_tx; uint8_t nb_tx;
...@@ -92,6 +102,14 @@ typedef struct { ...@@ -92,6 +102,14 @@ typedef struct {
time_stats_t interp_time; time_stats_t interp_time;
time_stats_t interp_freq; time_stats_t interp_freq;
time_stats_t convolution; 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; } channel_desc_t;
typedef struct { typedef struct {
...@@ -214,8 +232,9 @@ typedef enum { ...@@ -214,8 +232,9 @@ typedef enum {
#define CONFIG_HLP_SNR "Set average SNR in dB (for --siml1 option)\n" #define CONFIG_HLP_SNR "Set average SNR in dB (for --siml1 option)\n"
#define CHANNELMOD_SECTION "channelmod" #define CHANNELMOD_SECTION "channelmod"
#define CHANNELMOD_PARAMS_DESC { \ #define CHANNELMOD_PARAMS_DESC { \
{"s" , CONFIG_HLP_SNR, PARAMFLAG_CMDLINE_NOPREFIXENABLED, dblptr:&snr_dB , defdblval:25, 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},\ {"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" #include "platform_constants.h"
...@@ -273,9 +292,18 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, ...@@ -273,9 +292,18 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
double forgetting_factor, double forgetting_factor,
int32_t channel_offset, int32_t channel_offset,
double path_loss_dB); 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) /** \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. \brief This routine generates a random channel response (time domain) according to a tapped delay line model.
\param desc Pointer to the channel descriptor \param desc Pointer to the channel descriptor
......
...@@ -547,7 +547,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) { ...@@ -547,7 +547,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
ul_req_tmp->ul_config_request_body.number_of_pdus = 0; ul_req_tmp->ul_config_request_body.number_of_pdus = 0;
if (ul_req->ul_config_request_body.number_of_pdus>0) { if (ul_req->ul_config_request_body.number_of_pdus>0) {
LOG_D(PHY, "%s() active NOW (frameP:%d subframeP:%d) pdus:%d\n", __FUNCTION__, frameP, subframeP, ul_req->ul_config_request_body.number_of_pdus); LOG_D(MAC, "%s() active NOW (frameP:%d subframeP:%d) pdus:%d\n", __FUNCTION__, frameP, subframeP, ul_req->ul_config_request_body.number_of_pdus);
} }
memcpy((void *)ul_req->ul_config_request_body.ul_config_pdu_list, memcpy((void *)ul_req->ul_config_request_body.ul_config_pdu_list,
...@@ -556,6 +556,11 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) { ...@@ -556,6 +556,11 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
} }
} }
extern int16_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
extern int16_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
extern void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
extern void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch);
void void
eNB_dlsch_ulsch_scheduler(module_id_t module_idP, eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
frame_t frameP, frame_t frameP,
...@@ -843,6 +848,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -843,6 +848,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
} }
/* Note: This should not be done in the MAC! */ /* Note: This should not be done in the MAC! */
/*
for (int ii=0; ii<MAX_MOBILES_PER_ENB; ii++) { for (int ii=0; ii<MAX_MOBILES_PER_ENB; ii++) {
LTE_eNB_ULSCH_t *ulsch = RC.eNB[module_idP][CC_id]->ulsch[ii]; LTE_eNB_ULSCH_t *ulsch = RC.eNB[module_idP][CC_id]->ulsch[ii];
...@@ -862,6 +868,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -862,6 +868,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
clean_eNb_dlsch(dlsch); clean_eNb_dlsch(dlsch);
} }
} }
*/
int id;
// clean ULSCH entries for rnti
id = find_ulsch(rnti,RC.eNB[module_idP][CC_id],SEARCH_EXIST);
if (id>=0) clean_eNb_ulsch(RC.eNB[module_idP][CC_id]->ulsch[id]);
// clean DLSCH entries for rnti
id = find_dlsch(rnti,RC.eNB[module_idP][CC_id],SEARCH_EXIST);
if (id>=0) clean_eNb_dlsch(RC.eNB[module_idP][CC_id]->dlsch[id][0]);
for (int j = 0; j < 10; j++) { for (int j = 0; j < 10; j++) {
nfapi_ul_config_request_body_t *ul_req_tmp = NULL; nfapi_ul_config_request_body_t *ul_req_tmp = NULL;
......
...@@ -3198,6 +3198,42 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, ...@@ -3198,6 +3198,42 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list, ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list,
&rat); &rat);
/* request NR configuration */
LTE_UECapabilityEnquiry_r8_IEs_t *r8 = &dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8;
LTE_UECapabilityEnquiry_v8a0_IEs_t r8_a0;
LTE_UECapabilityEnquiry_v1180_IEs_t r11_80;
LTE_UECapabilityEnquiry_v1310_IEs_t r13_10;
LTE_UECapabilityEnquiry_v1430_IEs_t r14_30;
LTE_UECapabilityEnquiry_v1510_IEs_t r15_10;
memset(&r8_a0, 0, sizeof(r8_a0));
memset(&r11_80, 0, sizeof(r11_80));
memset(&r13_10, 0, sizeof(r13_10));
memset(&r14_30, 0, sizeof(r14_30));
memset(&r15_10, 0, sizeof(r15_10));
r8->nonCriticalExtension = &r8_a0;
r8_a0.nonCriticalExtension = &r11_80;
r11_80.nonCriticalExtension = &r13_10;
r13_10.nonCriticalExtension = &r14_30;
r14_30.nonCriticalExtension = &r15_10;
/* TODO: no hardcoded values here */
OCTET_STRING_t req_freq;
unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x02, 0x68 }; // bands 7 & nr78
//unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x08, 0x18 }; // bands 7 & nr260
//unsigned char req_freq_buf[13] = { 0x00, 0xc0, 0x18, 0x01, 0x01, 0x30, 0x4b, 0x04, 0x0e, 0x08, 0x24, 0x04, 0xd0 };
// unsigned char req_freq_buf[21] = {
//0x01, 0x60, 0x18, 0x05, 0x80, 0xc0, 0x04, 0x04, 0xc1, 0x2c, 0x10, 0x08, 0x20, 0x30, 0x40, 0xe0, 0x82, 0x40, 0x28, 0x80, 0x9a
// };
req_freq.buf = req_freq_buf;
req_freq.size = 5;
// req_freq.size = 21;
r15_10.requestedFreqBandsNR_MRDC_r15 = &req_freq;
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_LTE_DL_DCCH_Message, (void *)&dl_dcch_msg); xer_fprint(stdout, &asn_DEF_LTE_DL_DCCH_Message, (void *)&dl_dcch_msg);
} }
...@@ -3276,17 +3312,17 @@ uint8_t do_NR_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, ...@@ -3276,17 +3312,17 @@ uint8_t do_NR_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
/* TODO: no hardcoded values here */ /* TODO: no hardcoded values here */
OCTET_STRING_t req_freq; OCTET_STRING_t req_freq;
//unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x02, 0x68 }; // bands 7 & nr78 unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x02, 0x68 }; // bands 7 & nr78
//unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x08, 0x18 }; // bands 7 & nr260 //unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x08, 0x18 }; // bands 7 & nr260
//unsigned char req_freq_buf[13] = { 0x00, 0xc0, 0x18, 0x01, 0x01, 0x30, 0x4b, 0x04, 0x0e, 0x08, 0x24, 0x04, 0xd0 }; //unsigned char req_freq_buf[13] = { 0x00, 0xc0, 0x18, 0x01, 0x01, 0x30, 0x4b, 0x04, 0x0e, 0x08, 0x24, 0x04, 0xd0 };
unsigned char req_freq_buf[21] = { // unsigned char req_freq_buf[21] = {
0x01, 0x60, 0x18, 0x05, 0x80, 0xc0, 0x04, 0x04, 0xc1, 0x2c, 0x10, 0x08, 0x20, 0x30, 0x40, 0xe0, 0x82, 0x40, 0x28, 0x80, 0x9a //0x01, 0x60, 0x18, 0x05, 0x80, 0xc0, 0x04, 0x04, 0xc1, 0x2c, 0x10, 0x08, 0x20, 0x30, 0x40, 0xe0, 0x82, 0x40, 0x28, 0x80, 0x9a
}; // };
req_freq.buf = req_freq_buf; req_freq.buf = req_freq_buf;
req_freq.size = 5; req_freq.size = 5;
req_freq.size = 21; // req_freq.size = 21;
r15_10.requestedFreqBandsNR_MRDC_r15 = &req_freq; r15_10.requestedFreqBandsNR_MRDC_r15 = &req_freq;
......
This diff is collapsed.
...@@ -182,7 +182,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration ...@@ -182,7 +182,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__); LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
rrc->carrier.MIB = (uint8_t *) malloc16(4); rrc->carrier.MIB = (uint8_t *) malloc16(4);
rrc->carrier.sizeof_MIB = do_MIB_NR(rrc,0); rrc->carrier.sizeof_MIB = do_MIB_NR(rrc,0);
rrc->carrier.sizeof_SIB1 = do_SIB1_NR(rrc,configuration); rrc->carrier.sizeof_SIB1 = do_SIB1_NR(&rrc->carrier,configuration);
LOG_I(NR_RRC,"Done init_NR_SI\n"); LOG_I(NR_RRC,"Done init_NR_SI\n");
rrc_mac_config_req_gNB(rrc->module_id, rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.ssb_SubcarrierOffset, rrc->carrier.ssb_SubcarrierOffset,
......
...@@ -917,7 +917,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -917,7 +917,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
srs_res0->resourceMapping.repetitionFactor=NR_SRS_Resource__resourceMapping__repetitionFactor_n1; srs_res0->resourceMapping.repetitionFactor=NR_SRS_Resource__resourceMapping__repetitionFactor_n1;
srs_res0->freqDomainPosition=0; srs_res0->freqDomainPosition=0;
srs_res0->freqDomainShift=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_SRS=0;
srs_res0->freqHopping.b_hop=0; srs_res0->freqHopping.b_hop=0;
srs_res0->groupOrSequenceHopping=NR_SRS_Resource__groupOrSequenceHopping_neither; srs_res0->groupOrSequenceHopping=NR_SRS_Resource__groupOrSequenceHopping_neither;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -765,7 +765,7 @@ int main( int argc, char **argv ) { ...@@ -765,7 +765,7 @@ int main( int argc, char **argv ) {
} }
if(IS_SOFTMODEM_DOFORMS) if(IS_SOFTMODEM_DOFORMS)
load_softscope("ue"); load_softscope("ue",NULL);
config_check_unknown_cmdlineopt(CONFIG_CHECKALLSECTIONS); config_check_unknown_cmdlineopt(CONFIG_CHECKALLSECTIONS);
printf("Sending sync to all threads (%p,%p,%p)\n",&sync_var,&sync_cond,&sync_mutex); printf("Sending sync to all threads (%p,%p,%p)\n",&sync_var,&sync_cond,&sync_mutex);
......
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