Commit 2deec7fa authored by rmagueta's avatar rmagueta

Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements

# Conflicts:
#	openair1/PHY/INIT/nr_init_ue.c
#	openair2/GNB_APP/gnb_config.c
#	openair2/GNB_APP/gnb_paramdef.h
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
#	openair2/RRC/NR/rrc_gNB_reconfig.c
parents bc2ea375 25614263
...@@ -222,7 +222,7 @@ pipeline { ...@@ -222,7 +222,7 @@ pipeline {
when { expression {doMandatoryTests} } when { expression {doMandatoryTests} }
steps { steps {
script { script {
triggerSlaveJob ('RAN-RF-Sim-Test-5G', 'Test-RF-Sim-Container-4G') triggerSlaveJob ('RAN-RF-Sim-Test-5G', 'Test-RF-Sim-Container-5G')
} }
} }
post { post {
......
...@@ -55,7 +55,9 @@ pipeline { ...@@ -55,7 +55,9 @@ pipeline {
stage ("Push to DockerHub") { stage ("Push to DockerHub") {
steps { steps {
script { script {
WEEK_TAG = sh returnStdout: true, script: 'date +"%Y.w%U"' WEEK_REF = sh returnStdout: true, script: 'date +"%Y.w%V"'
WEEK_REF = WEEK_REF.trim()
WEEK_TAG = sh returnStdout: true, script: 'python3 ./ci-scripts/provideUniqueImageTag.py --start_tag ' + WEEK_REF
WEEK_TAG = WEEK_TAG.trim() WEEK_TAG = WEEK_TAG.trim()
withCredentials([ withCredentials([
......
...@@ -31,7 +31,7 @@ nrmodule2_quectel: ...@@ -31,7 +31,7 @@ nrmodule2_quectel:
DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach
LogStore : /media/ci_qlogs LogStore : /media/ci_qlogs
PLMN : 20897 PLMN : 20897
UENetwork : wwan1 UENetwork : wwan0
HostIPAddress : 192.168.18.189 HostIPAddress : 192.168.18.189
HostUsername : nrmodule2 HostUsername : nrmodule2
HostPassword : linux HostPassword : linux
......
...@@ -606,6 +606,8 @@ class Containerize(): ...@@ -606,6 +606,8 @@ class Containerize():
if containerToKill: if containerToKill:
mySSH.command('docker kill --signal INT ' + containerName, '\$', 30) mySSH.command('docker kill --signal INT ' + containerName, '\$', 30)
time.sleep(5) time.sleep(5)
mySSH.command('docker kill --signal KILL ' + containerName, '\$', 30)
time.sleep(5)
mySSH.command('docker logs ' + containerName + ' > ' + lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '\$', 30) mySSH.command('docker logs ' + containerName + ' > ' + lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '\$', 30)
mySSH.command('docker rm -f ' + containerName, '\$', 30) mySSH.command('docker rm -f ' + containerName, '\$', 30)
# Forcing the down now to remove the networks and any artifacts # Forcing the down now to remove the networks and any artifacts
......
...@@ -76,7 +76,8 @@ class Module_UE: ...@@ -76,7 +76,8 @@ class Module_UE:
logging.debug('Starting ' + self.Process['Name']) logging.debug('Starting ' + self.Process['Name'])
mySSH = sshconnection.SSHConnection() mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S ' + self.Process['Cmd'] + ' ' + self.Process['Apn'][CNType] + ' > /dev/null 2>&1 &','\$',5) mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -f /tmp/quectel-cm.log','\$',5)
mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S stdbuf -o0 ' + self.Process['Cmd'] + ' ' + self.Process['Apn'][CNType] + ' > /tmp/quectel-cm.log 2>&1 &','\$',5)
mySSH.close() mySSH.close()
#checking the process #checking the process
time.sleep(5) time.sleep(5)
......
...@@ -122,6 +122,7 @@ def GetPingTimeAnalysis(RAN,ping_log_file,ping_rttavg_threshold): ...@@ -122,6 +122,7 @@ def GetPingTimeAnalysis(RAN,ping_log_file,ping_rttavg_threshold):
try: try:
mySSH = sshconnection.SSHConnection() mySSH = sshconnection.SSHConnection()
mySSH.copyout(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, ping_log_file+'.png', RAN.eNBSourceCodePath + '/cmake_targets/') mySSH.copyout(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, ping_log_file+'.png', RAN.eNBSourceCodePath + '/cmake_targets/')
mySSH.copyout(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, ping_log_file, RAN.eNBSourceCodePath + '/cmake_targets/')
except: except:
logging.debug('\u001B[1;37;41m Ping PNG SCP to eNB FAILED\u001B[0m') logging.debug('\u001B[1;37;41m Ping PNG SCP to eNB FAILED\u001B[0m')
...@@ -1598,7 +1599,7 @@ class OaiCiTest(): ...@@ -1598,7 +1599,7 @@ class OaiCiTest():
else: else:
if launchfromModule == False: if launchfromModule == False:
#ping log file is on the python executor #ping log file is on the python executor
cmd = 'ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + device_id + '.log' cmd = 'ping ' + self.ping_args + ' ' + UE_IPAddress + ' > ping_' + self.testCase_id + '_' + device_id + '.log 2>&1'
message = cmd + '\n' message = cmd + '\n'
logging.debug(cmd) logging.debug(cmd)
ret = subprocess.run(cmd, shell=True) ret = subprocess.run(cmd, shell=True)
...@@ -1623,7 +1624,7 @@ class OaiCiTest(): ...@@ -1623,7 +1624,7 @@ class OaiCiTest():
else: else:
Target = EPC.IPAddress Target = EPC.IPAddress
#ping from module NIC rather than IP address to make sure round trip is over the air #ping from module NIC rather than IP address to make sure round trip is over the air
cmd = 'ping -I ' + Module_UE.UENetwork + ' ' + self.ping_args + ' ' + Target + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' cmd = 'ping -I ' + Module_UE.UENetwork + ' ' + self.ping_args + ' ' + Target + ' > ping_' + self.testCase_id + '_' + self.ue_id + '.log 2>&1'
SSH.command(cmd,'\$',int(ping_time[0])*1.5) SSH.command(cmd,'\$',int(ping_time[0])*1.5)
#copy the ping log file to have it locally for analysis (ping stats) #copy the ping log file to have it locally for analysis (ping stats)
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'ping_' + self.testCase_id + '_' + self.ue_id + '.log', '.') SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'ping_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
...@@ -2084,7 +2085,8 @@ class OaiCiTest(): ...@@ -2084,7 +2085,8 @@ class OaiCiTest():
statusQueue.put(UE_IPAddress) statusQueue.put(UE_IPAddress)
statusQueue.put(report_msg) statusQueue.put(report_msg)
logging.debug('\u001B[1;37;45m TCP Bidir Iperf Result (' + UE_IPAddress + ') \u001B[0m') logging.debug('\u001B[1;37;45m TCP Bidir Iperf Result (' + UE_IPAddress + ') \u001B[0m')
logging.debug('\u001B[1;35m ' + report_msg + '\u001B[0m') for rLine in report_msg.split('\n'):
logging.debug('\u001B[1;35m ' + rLine + '\u001B[0m')
lock.release() lock.release()
else: else:
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Could not analyze from Log file') self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Could not analyze from Log file')
...@@ -2379,10 +2381,12 @@ class OaiCiTest(): ...@@ -2379,10 +2381,12 @@ class OaiCiTest():
SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts') SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
def Iperf_Module(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC, Module_UE): def Iperf_Module(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC, Module_UE, RAN):
SSH = sshconnection.SSHConnection()
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
if (re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE)) or (re.match('OAICN5G', EPC.Type, re.IGNORECASE)): if (re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE)) or (re.match('OAICN5G', EPC.Type, re.IGNORECASE)):
#retrieve trf-gen container IP address #retrieve trf-gen container IP address
SSH = sshconnection.SSHConnection()
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('docker inspect --format="TRF_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" prod-trf-gen', '\$', 5) SSH.command('docker inspect --format="TRF_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" prod-trf-gen', '\$', 5)
result = re.search('TRF_IP_ADDR = (?P<trf_ip_addr>[0-9\.]+)', SSH.getBefore()) result = re.search('TRF_IP_ADDR = (?P<trf_ip_addr>[0-9\.]+)', SSH.getBefore())
...@@ -2404,20 +2408,18 @@ class OaiCiTest(): ...@@ -2404,20 +2408,18 @@ class OaiCiTest():
if self.iperf_direction=="DL": if self.iperf_direction=="DL":
logging.debug("Iperf for Module in DL mode detected") logging.debug("Iperf for Module in DL mode detected")
##server side UE ##server side UE
server_filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'rm ' + server_filename cmd = 'rm ' + server_filename
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > ' + server_filename + ' &' cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u -i 1 > ' + server_filename + ' 2>&1 &'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.close() SSH.close()
##client side EPC ##client side EPC
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
#remove old client file in EPC.SourceCodePath #remove old client file in EPC.SourceCodePath
cmd = 'rm ' + EPC.SourceCodePath + '/' + client_filename cmd = 'rm ' + EPC.SourceCodePath + '/' + client_filename
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
iperf_cmd = 'bin/iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > ' + client_filename iperf_cmd = 'bin/iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' > ' + client_filename + ' 2>&1'
cmd = 'docker exec -w /iperf-2.0.13 -it prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"' cmd = 'docker exec -w /iperf-2.0.13 -it prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
SSH.command(cmd,'\$',int(iperf_time)*5.0) SSH.command(cmd,'\$',int(iperf_time)*5.0)
SSH.command('docker cp prod-trf-gen:/iperf-2.0.13/'+ client_filename + ' ' + EPC.SourceCodePath, '\$', 5) SSH.command('docker cp prod-trf-gen:/iperf-2.0.13/'+ client_filename + ' ' + EPC.SourceCodePath, '\$', 5)
...@@ -2433,19 +2435,17 @@ class OaiCiTest(): ...@@ -2433,19 +2435,17 @@ class OaiCiTest():
logging.debug("Iperf for Module in UL mode detected") logging.debug("Iperf for Module in UL mode detected")
#server side EPC #server side EPC
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
iperf_cmd = 'echo $USER; nohup bin/iperf -s -u 2>&1 > ' + server_filename iperf_cmd = 'echo $USER; nohup bin/iperf -s -u -i 1 > ' + server_filename + ' 2>&1'
cmd = 'docker exec -d -w /iperf-2.0.13 prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"' cmd = 'docker exec -d -w /iperf-2.0.13 prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.close() SSH.close()
#client side UE #client side UE
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
cmd = 'rm '+ client_filename cmd = 'rm '+ client_filename
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.command('iperf -B ' + UE_IPAddress + ' -c ' + trf_gen_IP + ' ' + self.iperf_args + ' 2>&1 > ' + client_filename, '\$', int(iperf_time)*5.0) SSH.command('iperf -B ' + UE_IPAddress + ' -c ' + trf_gen_IP + ' ' + self.iperf_args + ' > ' + client_filename + ' 2>&1', '\$', int(iperf_time)*5.0)
SSH.close() SSH.close()
#once client is done, retrieve the server file from container to EPC Host #once client is done, retrieve the server file from container to EPC Host
...@@ -2461,12 +2461,10 @@ class OaiCiTest(): ...@@ -2461,12 +2461,10 @@ class OaiCiTest():
elif self.iperf_direction=="BIDIR": elif self.iperf_direction=="BIDIR":
logging.debug("Iperf for Module in BIDIR mode detected") logging.debug("Iperf for Module in BIDIR mode detected")
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
#server side EPC #server side EPC
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
iperf_cmd = 'echo $USER; nohup /usr/local/bin/iperf3 -s 2>&1 > ' + server_filename iperf_cmd = 'echo $USER; nohup /usr/local/bin/iperf3 -s -i 1 > ' + server_filename + ' 2>&1'
cmd = 'docker exec -d -w /iperf-2.0.13 prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"' cmd = 'docker exec -d -w /iperf-2.0.13 prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.close() SSH.close()
...@@ -2475,7 +2473,7 @@ class OaiCiTest(): ...@@ -2475,7 +2473,7 @@ class OaiCiTest():
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'rm '+ client_filename cmd = 'rm '+ client_filename
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.command('iperf3 -B ' + UE_IPAddress + ' -c ' + trf_gen_IP + ' ' + self.iperf_args + ' 2>&1 > ' + client_filename, '\$', int(iperf_time)*5.0) SSH.command('iperf3 -B ' + UE_IPAddress + ' -c ' + trf_gen_IP + ' ' + self.iperf_args + ' > ' + client_filename + ' 2>&1', '\$', int(iperf_time)*5.0)
SSH.close() SSH.close()
#once client is done, retrieve the server file from container to EPC Host #once client is done, retrieve the server file from container to EPC Host
...@@ -2499,8 +2497,6 @@ class OaiCiTest(): ...@@ -2499,8 +2497,6 @@ class OaiCiTest():
else: #default is ltebox else: #default is ltebox
SSH = sshconnection.SSHConnection()
#kill iperf processes before (in case there are still some remaining) #kill iperf processes before (in case there are still some remaining)
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'killall --signal=SIGKILL iperf' cmd = 'killall --signal=SIGKILL iperf'
...@@ -2524,14 +2520,14 @@ class OaiCiTest(): ...@@ -2524,14 +2520,14 @@ class OaiCiTest():
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
cmd = 'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log &' cmd = 'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B ' + UE_IPAddress + ' -u -i 1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log 2>&1 &'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.close() SSH.close()
#client side EPC #client side EPC
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log 2>&1'
SSH.command(cmd,'\$',int(iperf_time)*5.0) SSH.command(cmd,'\$',int(iperf_time)*5.0)
SSH.close() SSH.close()
#copy the 2 resulting files locally #copy the 2 resulting files locally
...@@ -2547,7 +2543,7 @@ class OaiCiTest(): ...@@ -2547,7 +2543,7 @@ class OaiCiTest():
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
cmd = 'echo $USER; nohup iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log &' cmd = 'echo $USER; nohup iperf -s -u -i 1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log 2>&1 &'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.close() SSH.close()
...@@ -2555,7 +2551,7 @@ class OaiCiTest(): ...@@ -2555,7 +2551,7 @@ class OaiCiTest():
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.command('/opt/iperf-2.0.10/iperf -c 192.172.0.1 ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', int(iperf_time)*5.0) SSH.command('/opt/iperf-2.0.10/iperf -c 192.172.0.1 ' + self.iperf_args + ' > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log 2>&1', '\$', int(iperf_time)*5.0)
SSH.close() SSH.close()
#copy the 2 resulting files locally #copy the 2 resulting files locally
...@@ -2566,15 +2562,13 @@ class OaiCiTest(): ...@@ -2566,15 +2562,13 @@ class OaiCiTest():
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1) self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)
elif self.iperf_direction=="BIDIR": elif self.iperf_direction=="BIDIR":
logging.debug("Iperf for Module in BIDIR mode detected") logging.debug("Iperf for Module in BIDIR mode detected")
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
#server side EPC #server side EPC
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
cmd = 'rm ' + server_filename cmd = 'rm ' + server_filename
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
cmd = 'echo $USER; nohup iperf3 -s 2>&1 > '+server_filename+' &' cmd = 'echo $USER; nohup iperf3 -s -i 1 > '+server_filename+' 2>&1 &'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.close() SSH.close()
...@@ -2582,7 +2576,7 @@ class OaiCiTest(): ...@@ -2582,7 +2576,7 @@ class OaiCiTest():
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'rm ' + client_filename cmd = 'rm ' + client_filename
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.command('iperf3 -c 192.172.0.1 ' + self.iperf_args + ' 2>&1 > '+client_filename, '\$', int(iperf_time)*5.0) SSH.command('iperf3 -c 192.172.0.1 ' + self.iperf_args + ' > '+client_filename + ' 2>&1', '\$', int(iperf_time)*5.0)
SSH.close() SSH.close()
#copy the 2 resulting files locally #copy the 2 resulting files locally
...@@ -2593,6 +2587,7 @@ class OaiCiTest(): ...@@ -2593,6 +2587,7 @@ class OaiCiTest():
else : else :
logging.debug("Incorrect or missing IPERF direction in XML") logging.debug("Incorrect or missing IPERF direction in XML")
#kill iperf processes after to be clean #kill iperf processes after to be clean
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
cmd = 'killall --signal=SIGKILL iperf' cmd = 'killall --signal=SIGKILL iperf'
...@@ -2606,7 +2601,12 @@ class OaiCiTest(): ...@@ -2606,7 +2601,12 @@ class OaiCiTest():
cmd = 'killall --signal=SIGKILL iperf3' cmd = 'killall --signal=SIGKILL iperf3'
SSH.command(cmd,'\$',5) SSH.command(cmd,'\$',5)
SSH.close() SSH.close()
return
# Copying to xNB server for Jenkins artifacting
if (os.path.isfile(server_filename)):
SSH.copyout(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, server_filename, RAN.eNBSourceCodePath + '/cmake_targets/')
if (os.path.isfile(client_filename)):
SSH.copyout(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, client_filename, RAN.eNBSourceCodePath + '/cmake_targets/')
def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC): def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC):
try: try:
...@@ -2804,12 +2804,12 @@ class OaiCiTest(): ...@@ -2804,12 +2804,12 @@ class OaiCiTest():
else: else:
SSH.copyin(self.ADBIPAddress, self.ADBUserName, self.ADBPassword, EPC.SourceCodePath + '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.') SSH.copyin(self.ADBIPAddress, self.ADBUserName, self.ADBPassword, EPC.SourceCodePath + '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.')
# fromdos has to be called on the python executor not on ADB server # fromdos has to be called on the python executor not on ADB server
cmd = 'fromdos -o iperf_server_' + self.testCase_id + '_' + device_id + '.log 2>&1 > /dev/null' cmd = 'fromdos -o iperf_server_' + self.testCase_id + '_' + device_id + '.log > /dev/null 2>&1'
try: try:
subprocess.run(cmd, shell=True) subprocess.run(cmd, shell=True)
except: except:
pass pass
cmd = 'dos2unix -o iperf_server_' + self.testCase_id + '_' + device_id + '.log 2>&1 > /dev/null' cmd = 'dos2unix -o iperf_server_' + self.testCase_id + '_' + device_id + '.log > /dev/null 2>&1'
try: try:
subprocess.run(cmd, shell=True) subprocess.run(cmd, shell=True)
except: except:
...@@ -2995,7 +2995,7 @@ class OaiCiTest(): ...@@ -2995,7 +2995,7 @@ class OaiCiTest():
#special quick and dirty treatment for modules, iperf to be restructured #special quick and dirty treatment for modules, iperf to be restructured
if self.ue_id!="": #is module if self.ue_id!="": #is module
device_id = Module_UE.ID + "-" + Module_UE.Kind device_id = Module_UE.ID + "-" + Module_UE.Kind
p = Process(target = self.Iperf_Module ,args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, Module_UE,)) p = Process(target = self.Iperf_Module ,args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, Module_UE, RAN, ))
else: #legacy code else: #legacy code
p = Process(target = self.Iperf_common, args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, )) p = Process(target = self.Iperf_common, args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, ))
p.daemon = True p.daemon = True
......
...@@ -35,6 +35,7 @@ import sys # arg ...@@ -35,6 +35,7 @@ import sys # arg
import re # reg import re # reg
import logging import logging
import os import os
from pathlib import Path
import time import time
#----------------------------------------------------------- #-----------------------------------------------------------
...@@ -51,7 +52,7 @@ class CppCheckResults(): ...@@ -51,7 +52,7 @@ class CppCheckResults():
def __init__(self): def __init__(self):
self.variants = ['xenial', 'bionic'] self.variants = ['bionic', 'focal']
self.versions = ['',''] self.versions = ['','']
self.nbErrors = [0,0] self.nbErrors = [0,0]
self.nbWarnings = [0,0] self.nbWarnings = [0,0]
...@@ -116,12 +117,22 @@ class StaticCodeAnalysis(): ...@@ -116,12 +117,22 @@ class StaticCodeAnalysis():
# if the commit ID is provided use it to point to it # if the commit ID is provided use it to point to it
if self.ranCommitID != '': if self.ranCommitID != '':
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
# if the branch is not develop, then it is a merge request and we need to do
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:xenial || true', '\$', 60) # the potential merge. Note that merge conflicts should already been checked earlier
mySSH.command('docker build --tag oai-cppcheck:xenial --file ci-scripts/docker/Dockerfile.cppcheck.xenial . > cmake_targets/log/cppcheck-xenial.txt 2>&1', '\$', 600) if (self.ranAllowMerge):
if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:focal || true', '\$', 60)
mySSH.command('sed -e "s@xenial@bionic@" ci-scripts/docker/Dockerfile.cppcheck.xenial > ci-scripts/docker/Dockerfile.cppcheck.bionic', '\$', 6) mySSH.command('sed -e "s@xenial@bionic@" ci-scripts/docker/Dockerfile.cppcheck.xenial > ci-scripts/docker/Dockerfile.cppcheck.bionic', '\$', 6)
mySSH.command('docker build --tag oai-cppcheck:bionic --file ci-scripts/docker/Dockerfile.cppcheck.bionic . > cmake_targets/log/cppcheck-bionic.txt 2>&1', '\$', 600) mySSH.command('docker build --tag oai-cppcheck:bionic --file ci-scripts/docker/Dockerfile.cppcheck.bionic . > cmake_targets/log/cppcheck-bionic.txt 2>&1', '\$', 600)
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:xenial || true', '\$', 30) mySSH.command('sed -e "s@xenial@focal@" ci-scripts/docker/Dockerfile.cppcheck.xenial > ci-scripts/docker/Dockerfile.cppcheck.focal', '\$', 6)
mySSH.command('docker build --tag oai-cppcheck:focal --file ci-scripts/docker/Dockerfile.cppcheck.focal . > cmake_targets/log/cppcheck-focal.txt 2>&1', '\$', 600)
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:focal || true', '\$', 30)
# Analyzing the logs # Analyzing the logs
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5) mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
...@@ -131,8 +142,22 @@ class StaticCodeAnalysis(): ...@@ -131,8 +142,22 @@ class StaticCodeAnalysis():
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '/*', '.') mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '/*', '.')
CCR = CppCheckResults() CCR = CppCheckResults()
CCR_ref = CppCheckResults()
vId = 0 vId = 0
for variant in CCR.variants: for variant in CCR.variants:
refAvailable = False
if self.ranAllowMerge:
refFolder = str(Path.home()) + '/cppcheck-references'
if (os.path.isfile(refFolder + '/cppcheck-'+ variant + '.txt')):
refAvailable = True
with open(refFolder + '/cppcheck-'+ variant + '.txt', 'r') as refFile:
for line in refFile:
ret = re.search(' (?P<nb_errors>[0-9\.]+) errors', str(line))
if ret is not None:
CCR_ref.nbErrors[vId] = int(ret.group('nb_errors'))
ret = re.search(' (?P<nb_warnings>[0-9\.]+) warnings', str(line))
if ret is not None:
CCR_ref.nbWarnings[vId] = int(ret.group('nb_warnings'))
if (os.path.isfile('./cppcheck-'+ variant + '.txt')): if (os.path.isfile('./cppcheck-'+ variant + '.txt')):
xmlStart = False xmlStart = False
with open('./cppcheck-'+ variant + '.txt', 'r') as logfile: with open('./cppcheck-'+ variant + '.txt', 'r') as logfile:
...@@ -167,21 +192,43 @@ class StaticCodeAnalysis(): ...@@ -167,21 +192,43 @@ class StaticCodeAnalysis():
CCR.nbPtrAddNotNull[vId] += 1 CCR.nbPtrAddNotNull[vId] += 1
if re.search('id="oppositeInnerCondition"', str(line)) is not None: if re.search('id="oppositeInnerCondition"', str(line)) is not None:
CCR.nbOppoInnerCondition[vId] += 1 CCR.nbOppoInnerCondition[vId] += 1
logging.debug('======== Variant ' + variant + ' - ' + CCR.versions[vId] + ' ========') vMsg = ''
logging.debug(' ' + str(CCR.nbErrors[vId]) + ' errors') vMsg += '======== Variant ' + variant + ' - ' + CCR.versions[vId] + ' ========\n'
logging.debug(' ' + str(CCR.nbWarnings[vId]) + ' warnings') vMsg += ' ' + str(CCR.nbErrors[vId]) + ' errors\n'
logging.debug(' -- Details --') vMsg += ' ' + str(CCR.nbWarnings[vId]) + ' warnings\n'
logging.debug(' Memory leak: ' + str(CCR.nbMemLeaks[vId])) vMsg += ' -- Details --\n'
logging.debug(' Possible null pointer deference: ' + str(CCR.nbNullPtrs[vId])) vMsg += ' Memory leak: ' + str(CCR.nbMemLeaks[vId]) + '\n'
logging.debug(' Uninitialized variable: ' + str(CCR.nbUninitVars[vId])) vMsg += ' Possible null pointer deference: ' + str(CCR.nbNullPtrs[vId]) + '\n'
logging.debug(' Undefined behaviour shifting: ' + str(CCR.nbTooManyBitsShift[vId])) vMsg += ' Uninitialized variable: ' + str(CCR.nbUninitVars[vId]) + '\n'
logging.debug(' Signed integer overflow: ' + str(CCR.nbIntegerOverflow[vId])) vMsg += ' Undefined behaviour shifting: ' + str(CCR.nbTooManyBitsShift[vId]) + '\n'
logging.debug('') vMsg += ' Signed integer overflow: ' + str(CCR.nbIntegerOverflow[vId]) + '\n'
logging.debug(' Printf formatting issue: ' + str(CCR.nbInvalidPrintf[vId])) vMsg += '\n'
logging.debug(' Modulo result is predetermined: ' + str(CCR.nbModuloAlways[vId])) vMsg += ' Printf formatting issue: ' + str(CCR.nbInvalidPrintf[vId]) + '\n'
logging.debug(' Opposite Condition -> dead code: ' + str(CCR.nbOppoInnerCondition[vId])) vMsg += ' Modulo result is predetermined: ' + str(CCR.nbModuloAlways[vId]) + '\n'
logging.debug(' Wrong Scanf Nb Args: ' + str(CCR.nbWrongScanfArg[vId])) vMsg += ' Opposite Condition -> dead code: ' + str(CCR.nbOppoInnerCondition[vId]) + '\n'
logging.debug('') vMsg += ' Wrong Scanf Nb Args: ' + str(CCR.nbWrongScanfArg[vId]) + '\n'
for vLine in vMsg.split('\n'):
logging.debug(vLine)
if self.ranAllowMerge and refAvailable:
if CCR_ref.nbErrors[vId] == CCR.nbErrors[vId]:
logging.debug(' No change in number of errors')
elif CCR_ref.nbErrors[vId] > CCR.nbErrors[vId]:
logging.debug(' Good! Decrease in number of errors')
else:
logging.debug(' Bad! increase in number of errors')
if CCR_ref.nbWarnings[vId] == CCR.nbWarnings[vId]:
logging.debug(' No change in number of warnings')
elif CCR_ref.nbWarnings[vId] > CCR.nbWarnings[vId]:
logging.debug(' Good! Decrease in number of warnings')
else:
logging.debug(' Bad! increase in number of warnings')
# Create new reference file
if not self.ranAllowMerge:
refFolder = str(Path.home()) + '/cppcheck-references'
if not os.path.isdir(refFolder):
os.mkdir(refFolder)
with open(refFolder + '/cppcheck-'+ variant + '.txt', 'w') as refFile:
refFile.write(vMsg)
vId += 1 vId += 1
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
......
...@@ -85,7 +85,7 @@ gNBs = ...@@ -85,7 +85,7 @@ gNBs =
#initialDownlinkBWP #initialDownlinkBWP
#genericParameters #genericParameters
# this is RBstart=0,L=106 (275*(L-1))+RBstart # this is RBstart=0,L=106 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 31899; initialDLBWPlocationAndBandwidth = 31624;
# subcarrierSpacing # subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1; initialDLBWPsubcarrierSpacing = 1;
...@@ -105,7 +105,7 @@ gNBs = ...@@ -105,7 +105,7 @@ gNBs =
pMax = 20; pMax = 20;
#initialUplinkBWP #initialUplinkBWP
#genericParameters #genericParameters
initialULBWPlocationAndBandwidth = 31899; initialULBWPlocationAndBandwidth = 31624;
# subcarrierSpacing # subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1; initialULBWPsubcarrierSpacing = 1;
......
...@@ -219,8 +219,7 @@ RUs = ( ...@@ -219,8 +219,7 @@ RUs = (
## beamforming 4x4 matrix: ## beamforming 4x4 matrix:
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
sdr_addrs = "addr=192.168.30.2,mgmt_addr=192.168.30.2,second_addr=192.168.50.2"; sdr_addrs = "addr=192.168.20.2";
clock_src = "external";
} }
); );
......
import argparse
import os
import re
import subprocess
import sys
AUTH_SERVICE = 'registry.docker.io'
AUTH_SCOPE = 'repository:rdefosseoai/oai-enb:pull'
def main() -> None:
args = _parse_args()
cmd = 'curl -fsSL "https://auth.docker.io/token?service=' + AUTH_SERVICE + '&scope=' + AUTH_SCOPE + '" | jq --raw-output ".token"'
token = subprocess.check_output(cmd, shell=True, universal_newlines=True)
token = str(token).strip()
cmd = 'curl -fsSL -H "Authorization: Bearer ' + token + '" "https://index.docker.io/v2/rdefosseoai/oai-enb/tags/list" | jq .'
listOfTags = subprocess.check_output(cmd, shell=True, universal_newlines=True)
foundTag = False
for tag in listOfTags.split('\n'):
if re.search('"' + args.start_tag + '"', tag) is not None:
foundTag = True
if not foundTag:
print (args.start_tag)
sys.exit(0)
proposedVariants = ['a', 'b', 'c', 'd']
for variant in proposedVariants:
foundTag = False
currentVariant = variant
for tag in listOfTags.split('\n'):
if re.search('"' + args.start_tag + variant + '"', tag) is not None:
foundTag = True
break
if not foundTag:
break
if not foundTag:
print (args.start_tag + currentVariant)
def _parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description='Provides an unique new image tag for DockerHub')
parser.add_argument(
'--start_tag', '-st',
action='store',
required=True,
help='Proposed Starting Tag',
)
return parser.parse_args()
if __name__ == '__main__':
main()
...@@ -756,11 +756,11 @@ class RANManagement(): ...@@ -756,11 +756,11 @@ class RANManagement():
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/enb_*.pcap .','\$',20) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/enb_*.pcap .','\$',20)
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/gnb_*.pcap .','\$',20) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/gnb_*.pcap .','\$',20)
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5)
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png ping*.log.png log/*/*.log log/*/*.pcap', '\$', 60) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png ping*.log* iperf*.log log/*/*.log log/*/*.pcap', '\$', 60)
result = re.search('core.\d+', mySSH.getBefore()) result = re.search('core.\d+', mySSH.getBefore())
if result is not None: if result is not None:
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip core* ran_build/build/{lte,nr}-softmodem', '\$', 60) # add core and executable to zip mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip core* ran_build/build/{lte,nr}-softmodem', '\$', 60) # add core and executable to zip
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png ping*.log.png log/*/*.log log/*/*.pcap', '\$', 15) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png ping*.log* iperf*.log log/*/*.log log/*/*.pcap', '\$', 15)
mySSH.close() mySSH.close()
def AnalyzeLogFile_eNB(self, eNBlogFile, HTML, checkers={}): def AnalyzeLogFile_eNB(self, eNBlogFile, HTML, checkers={}):
......
...@@ -39,8 +39,9 @@ ...@@ -39,8 +39,9 @@
050001 050001
070001 070001
070000 070000
050000 070002
050001 050002
050003
010002 010002
000001 000001
030202 030202
...@@ -117,10 +118,28 @@ ...@@ -117,10 +118,28 @@
<ping_rttavg_threshold>15</ping_rttavg_threshold> <ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase> </testCase>
<testCase id="050002">
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="050003">
<class>Ping</class>
<desc>Ping: 100pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="070000"> <testCase id="070000">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (DL/40Mbps/UDP)(60 sec)(single-ue profile)</desc> <desc>iperf (DL/40Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 40M -t 60</iperf_args> <iperf_args>-u -b 40M -t 60 -i 1 -fm</iperf_args>
<direction>DL</direction> <direction>DL</direction>
<id>idefix</id> <id>idefix</id>
<iperf_packetloss_threshold>20</iperf_packetloss_threshold> <iperf_packetloss_threshold>20</iperf_packetloss_threshold>
...@@ -131,7 +150,7 @@ ...@@ -131,7 +150,7 @@
<testCase id="070001"> <testCase id="070001">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)</desc> <desc>iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 3M -t 60</iperf_args> <iperf_args>-u -b 3M -t 60 -i 1 -fm</iperf_args>
<direction>UL</direction> <direction>UL</direction>
<id>idefix</id> <id>idefix</id>
<iperf_packetloss_threshold>1</iperf_packetloss_threshold> <iperf_packetloss_threshold>1</iperf_packetloss_threshold>
...@@ -139,6 +158,15 @@ ...@@ -139,6 +158,15 @@
<iperf_profile>single-ue</iperf_profile> <iperf_profile>single-ue</iperf_profile>
</testCase> </testCase>
<testCase id="070002">
<class>Iperf</class>
<desc>iperf (BIDIR TCP)(10 sec)(single-ue profile)</desc>
<iperf_args>-t 10 --bidir</iperf_args>
<direction>BIDIR</direction>
<id>idefix</id>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="030201"> <testCase id="030201">
<class>Undeploy_Object</class> <class>Undeploy_Object</class>
<desc>Undeploy eNB</desc> <desc>Undeploy eNB</desc>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<desc>Initialize gNB USRP</desc> <desc>Initialize gNB USRP</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test -q -U 787200 -T 106 -t 28 -D 130175 -m 28 -M 106 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test -q -U 787200 -T 106 -t 28 -D 130175 -m 28 -M 106 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<air_interface>NR</air_interface> <air_interface>NR</air_interface>
<USRP_IPAddress>192.168.30.2</USRP_IPAddress> <USRP_IPAddress>192.168.20.2</USRP_IPAddress>
</testCase> </testCase>
<testCase id="000001"> <testCase id="000001">
......
...@@ -234,7 +234,7 @@ Making sure the OAI UE is connected: ...@@ -234,7 +234,7 @@ Making sure the OAI UE is connected:
$ docker exec -it rfsim5g-oai-nr-ue /bin/bash $ docker exec -it rfsim5g-oai-nr-ue /bin/bash
root@bb4d400a832d:/opt/oai-nr-ue# ifconfig root@bb4d400a832d:/opt/oai-nr-ue# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.71.137 netmask 255.255.255.192 broadcast 192.168.71.191 inet 192.168.71.150 netmask 255.255.255.192 broadcast 192.168.71.191
ether 02:42:c0:a8:47:89 txqueuelen 0 (Ethernet) ether 02:42:c0:a8:47:89 txqueuelen 0 (Ethernet)
RX packets 224259 bytes 5821372018 (5.8 GB) RX packets 224259 bytes 5821372018 (5.8 GB)
RX errors 0 dropped 0 overruns 0 frame 0 RX errors 0 dropped 0 overruns 0 frame 0
...@@ -270,7 +270,7 @@ Create entry for Second UE in docker-compose.yaml file as follows: ...@@ -270,7 +270,7 @@ Create entry for Second UE in docker-compose.yaml file as follows:
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue2 container_name: rfsim5g-oai-nr-ue2
environment: environment:
RFSIMULATOR: 192.168.71.136 RFSIMULATOR: 192.168.71.140
FULL_IMSI: '208990100001101' FULL_IMSI: '208990100001101'
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f' FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'C42449363BBAD02B66D16BC975D77CC1' OPC: 'C42449363BBAD02B66D16BC975D77CC1'
...@@ -282,7 +282,7 @@ Create entry for Second UE in docker-compose.yaml file as follows: ...@@ -282,7 +282,7 @@ Create entry for Second UE in docker-compose.yaml file as follows:
- oai-gnb - oai-gnb
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.138 ipv4_address: 192.168.71.151
healthcheck: healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem" test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s interval: 10s
...@@ -326,7 +326,7 @@ Making sure the Second OAI UE is connected: ...@@ -326,7 +326,7 @@ Making sure the Second OAI UE is connected:
$ docker exec -it rfsim5g-oai-nr-ue2 /bin/bash $ docker exec -it rfsim5g-oai-nr-ue2 /bin/bash
root@bb4d400a832d:/opt/oai-nr-ue# ifconfig root@bb4d400a832d:/opt/oai-nr-ue# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.71.138 netmask 255.255.255.192 broadcast 192.168.71.191 inet 192.168.71.151 netmask 255.255.255.192 broadcast 192.168.71.191
ether 02:42:c0:a8:47:8a txqueuelen 0 (Ethernet) ether 02:42:c0:a8:47:8a txqueuelen 0 (Ethernet)
RX packets 3192021 bytes 67784900946 (67.7 GB) RX packets 3192021 bytes 67784900946 (67.7 GB)
RX errors 0 dropped 0 overruns 0 frame 0 RX errors 0 dropped 0 overruns 0 frame 0
......
...@@ -279,6 +279,30 @@ services: ...@@ -279,6 +279,30 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-nr-ue2:
image: oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue2
environment:
RFSIMULATOR: 192.168.71.140
FULL_IMSI: '208990100001101'
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
DNN: oai
NSSAI_SST: 1
NSSAI_SD: 1
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.151
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
driver: bridge driver: bridge
......
...@@ -192,6 +192,7 @@ LOCK TABLES `users` WRITE; ...@@ -192,6 +192,7 @@ LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */; /*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES ('20834123456789','380561234567','35609204079300',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,'+�E��ų\0�,IH��H',0,0,00000000000000000096,'Px�X \Z1��x��','^��K�����FeU���'),('20810000001234','33611123456','35609204079299',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000281454575616225,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','�4�s@���z��~�'),('31002890832150','33638060059','35611302209414',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012416,'`�F�݆��D��ϛ���','�4�s@���z��~�'),('001010123456789','33600101789','35609204079298',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'\0 \n \r',1,0,00000000000000000351,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','L�*\\�����^��]� '),('208930000000001','33638030001','35609204079301',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208950000000002','33638050002','35609204079502',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000020471,'\0 \n \r','�4�s@���z��~�'),('208950000000003','33638050003','35609204079503',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012343,'\0 \n \r','�4�s@���z��~�'),('208950000000004','33638050004','35609204079504',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000005','33638050005','35609204079505',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000001','33638050001','35609204079501',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208950000000006','33638050006','35609204079506',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000007','33638050007','35609204079507',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208930000000002','33638030002','35609204079302',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208930000000003','33638030003','35609204079303',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208930000000004','33638030004','35609204079304',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208930000000005','33638030005','35609204079305',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208930000000006','33638030006','35609204079306',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208930000000007','33638030007','35609204079307',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000007','33638040007','35609204079407',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000006','33638040006','35609204079406',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000005','33638040005','35609204079405',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000004','33638040004','35609204079404',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000003','33638040003','35609204079403',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000002','33638040002','35609204079402',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000001','33638040001','35609204079401',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208920100001100','33638020001','35609204079201',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001101','33638020001','35609204079201',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204937234,'\0 \n \r','�$I6;��+f�k�u�|�'),('208920100001102','33638020002','35609204079202',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001103','33638020003','35609204079203',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001104','33638020004','35609204079204',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001105','33638020005','35609204079205',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001106','33638020006','35609204079206',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000000000000006103,'ebd07771ace8677a','�$I6;��+f�k�u�|�'),('208920100001107','33638020007','35609204079207',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001108','33638020008','35609204079208',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001109','33638020009','35609204079209',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001110','33638020010','35609204079210',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208930100001111','33638030011','35609304079211',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208930100001112','33638030012','35609304079212',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208930100001113','33638030013','35609304079213',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006263,'�SNܒ�Iv��e�6','�4�s@���z��~�'),('208950000000008','33638050008','35609204079508',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000009','33638050009','35609204079509',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000010','33638050010','35609204079510',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000011','33638050011','35609204079511',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000012','33638050012','35609204079512',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000013','33638050013','35609204079513',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000014','33638050014','35609204079514',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000015','33638050015','35609204079515',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000000000,'3536663032363164','�4�s@���z��~�'),('208920100001118','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204934762,'~?03�u-%�ey�y�','�$I6;��+f�k�u�|�'),('208920100001121','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204935293,'&��@xg�]���\n��Vp','�$I6;��+f�k�u�|�'),('208920100001119','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204935293,'269482407867805d','�$I6;��+f�k�u�|�'),('208920100001120','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204935293,'3236393438323430','�$I6;��+f�k�u�|�'); INSERT INTO `users` VALUES ('20834123456789','380561234567','35609204079300',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,'+�E��ų\0�,IH��H',0,0,00000000000000000096,'Px�X \Z1��x��','^��K�����FeU���'),('20810000001234','33611123456','35609204079299',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000281454575616225,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','�4�s@���z��~�'),('31002890832150','33638060059','35611302209414',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012416,'`�F�݆��D��ϛ���','�4�s@���z��~�'),('001010123456789','33600101789','35609204079298',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'\0 \n \r',1,0,00000000000000000351,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','L�*\\�����^��]� '),('208930000000001','33638030001','35609204079301',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208950000000002','33638050002','35609204079502',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000020471,'\0 \n \r','�4�s@���z��~�'),('208950000000003','33638050003','35609204079503',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012343,'\0 \n \r','�4�s@���z��~�'),('208950000000004','33638050004','35609204079504',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000005','33638050005','35609204079505',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000001','33638050001','35609204079501',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208950000000006','33638050006','35609204079506',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000007','33638050007','35609204079507',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208930000000002','33638030002','35609204079302',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208930000000003','33638030003','35609204079303',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208930000000004','33638030004','35609204079304',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208930000000005','33638030005','35609204079305',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208930000000006','33638030006','35609204079306',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208930000000007','33638030007','35609204079307',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000007','33638040007','35609204079407',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000006','33638040006','35609204079406',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000005','33638040005','35609204079405',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000004','33638040004','35609204079404',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000003','33638040003','35609204079403',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000002','33638040002','35609204079402',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208940000000001','33638040001','35609204079401',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'��wq��gzW�Ё��Z]','�4�s@���z��~�'),('208920100001100','33638020001','35609204079201',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001101','33638020001','35609204079201',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204937234,'\0 \n \r','�$I6;��+f�k�u�|�'),('208920100001102','33638020002','35609204079202',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001103','33638020003','35609204079203',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001104','33638020004','35609204079204',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001105','33638020005','35609204079205',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001106','33638020006','35609204079206',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000000000000006103,'ebd07771ace8677a','�$I6;��+f�k�u�|�'),('208920100001107','33638020007','35609204079207',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001108','33638020008','35609204079208',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001109','33638020009','35609204079209',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001110','33638020010','35609204079210',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208930100001111','33638030011','35609304079211',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208930100001112','33638030012','35609304079212',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208930100001113','33638030013','35609304079213',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000006263,'�SNܒ�Iv��e�6','�4�s@���z��~�'),('208950000000008','33638050008','35609204079508',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000009','33638050009','35609204079509',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000010','33638050010','35609204079510',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000011','33638050011','35609204079511',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000012','33638050012','35609204079512',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000013','33638050013','35609204079513',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000014','33638050014','35609204079514',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000015','33638050015','35609204079515',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/�Д���� |hb',1,0,00000000000000000000,'3536663032363164','�4�s@���z��~�'),('208920100001118','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204934762,'~?03�u-%�ey�y�','�$I6;��+f�k�u�|�'),('208920100001121','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204935293,'&��@xg�]���\n��Vp','�$I6;��+f�k�u�|�'),('208920100001119','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204935293,'269482407867805d','�$I6;��+f�k�u�|�'),('208920100001120','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204935293,'3236393438323430','�$I6;��+f�k�u�|�');
INSERT INTO `users` VALUES ('208990100001100','1','55000000000000',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0xfec86ba6eb707ed08905757b1bb44b8f,0,0,0x40,'ebd07771ace8677a',0xc42449363bbad02b66d16bc975d77cc1); INSERT INTO `users` VALUES ('208990100001100','1','55000000000000',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0xfec86ba6eb707ed08905757b1bb44b8f,0,0,0x40,'ebd07771ace8677a',0xc42449363bbad02b66d16bc975d77cc1);
INSERT INTO `users` VALUES ('208990100001101','1','55000000000000',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0xfec86ba6eb707ed08905757b1bb44b8f,0,0,0x40,'ebd07771ace8677a',0xc42449363bbad02b66d16bc975d77cc1);
INSERT INTO `users` VALUES ('208950000000031','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); INSERT INTO `users` VALUES ('208950000000031','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
INSERT INTO `users` VALUES ('208950000000032','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); INSERT INTO `users` VALUES ('208950000000032','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
INSERT INTO `users` VALUES ('208950000000033','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); INSERT INTO `users` VALUES ('208950000000033','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
......
...@@ -797,7 +797,14 @@ int main(int argc, char **argv) ...@@ -797,7 +797,14 @@ int main(int argc, char **argv)
N_RB_DL,g_mcsTableIdx); N_RB_DL,g_mcsTableIdx);
// TODO do a UECAP for phy-sim // TODO do a UECAP for phy-sim
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, UE_Capability_nr, 0, 1, pdsch_AntennaPorts, 6, 0, 0, 0); const gNB_RrcConfigurationReq conf = {
.pdsch_AntennaPorts = pdsch_AntennaPorts,
.minRXTXTIME = 6,
.do_CSIRS = 0,
.do_SRS = 0,
.force_256qam_off = false
};
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, UE_Capability_nr, 0, 1, &conf, 0);
/* RRC parameter validation for secondaryCellGroup */ /* RRC parameter validation for secondaryCellGroup */
fix_scd(scd); fix_scd(scd);
......
...@@ -730,12 +730,15 @@ int main(int argc, char **argv) ...@@ -730,12 +730,15 @@ int main(int argc, char **argv)
prepare_scd(scd); prepare_scd(scd);
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts; // TODO do a UECAP for phy-sim
pdsch_AntennaPorts.N1 = n_tx; const gNB_RrcConfigurationReq conf = {
pdsch_AntennaPorts.N2 = 1; .pdsch_AntennaPorts = { .N1 = n_tx, .N2 = 1, .XP = 1 },
pdsch_AntennaPorts.XP = 1; .minRXTXTIME = 0,
.do_CSIRS = 0,
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, NULL, 0, 1, pdsch_AntennaPorts, 0, 0, 0, 0); .do_SRS = 0,
.force_256qam_off = false
};
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, NULL, 0, 1, &conf, 0);
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup); // xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
...@@ -746,9 +749,9 @@ int main(int argc, char **argv) ...@@ -746,9 +749,9 @@ int main(int argc, char **argv)
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request; gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
// common configuration // common configuration
rrc_mac_config_req_gNB(0,0, pdsch_AntennaPorts, n_rx, 0, 6, scc, &rrc.carrier.mib,0, 0, NULL); rrc_mac_config_req_gNB(0,0, conf.pdsch_AntennaPorts, n_rx, 0, 6, scc, &rrc.carrier.mib,0, 0, NULL);
// UE dedicated configuration // UE dedicated configuration
rrc_mac_config_req_gNB(0,0, pdsch_AntennaPorts, n_rx, 0, 6, scc, &rrc.carrier.mib,1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup); rrc_mac_config_req_gNB(0,0, conf.pdsch_AntennaPorts, n_rx, 0, 6, scc, &rrc.carrier.mib,1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
frame_parms->nb_antennas_tx = n_tx; frame_parms->nb_antennas_tx = n_tx;
frame_parms->nb_antennas_rx = n_rx; frame_parms->nb_antennas_rx = n_rx;
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config; nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
......
...@@ -401,6 +401,12 @@ typedef struct NbIoTRrcConfigurationReq_s { ...@@ -401,6 +401,12 @@ typedef struct NbIoTRrcConfigurationReq_s {
long ue_TimersAndConstants_n311_NB; long ue_TimersAndConstants_n311_NB;
} NbIoTRrcConfigurationReq; } NbIoTRrcConfigurationReq;
typedef struct {
int N1;
int N2;
int XP;
} rrc_pdsch_AntennaPorts_t;
// gNB: GNB_APP -> RRC messages // gNB: GNB_APP -> RRC messages
typedef struct NRRrcConfigurationReq_s { typedef struct NRRrcConfigurationReq_s {
uint64_t cell_identity; uint64_t cell_identity;
...@@ -413,13 +419,12 @@ typedef struct NRRrcConfigurationReq_s { ...@@ -413,13 +419,12 @@ typedef struct NRRrcConfigurationReq_s {
NR_ServingCellConfig_t *scd; NR_ServingCellConfig_t *scd;
int ssb_SubcarrierOffset; int ssb_SubcarrierOffset;
int sib1_tda; int sib1_tda;
int pdsch_AntennaPorts_N1; rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts;
int pdsch_AntennaPorts_N2;
int pdsch_AntennaPorts_XP;
int pusch_AntennaPorts; int pusch_AntennaPorts;
int minRXTXTIME; int minRXTXTIME;
int do_CSIRS; int do_CSIRS;
int do_SRS; int do_SRS;
bool force_256qam_off;
int pusch_TargetSNRx10; int pusch_TargetSNRx10;
int pucch_TargetSNRx10; int pucch_TargetSNRx10;
} gNB_RrcConfigurationReq; } gNB_RrcConfigurationReq;
......
...@@ -1172,21 +1172,23 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { ...@@ -1172,21 +1172,23 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
LOG_I(GNB_APP,"SSB SCO %d\n",*GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr); LOG_I(GNB_APP,"SSB SCO %d\n",*GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).ssb_SubcarrierOffset = *GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr; NRRRC_CONFIGURATION_REQ (msg_p).ssb_SubcarrierOffset = *GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr;
LOG_I(GNB_APP,"pdsch_AntennaPorts N1 %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_N1_IDX].iptr); LOG_I(GNB_APP,"pdsch_AntennaPorts N1 %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_N1_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts_N1 = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_N1_IDX].iptr; NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts.N1 = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_N1_IDX].iptr;
LOG_I(GNB_APP,"pdsch_AntennaPorts N2 %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_N2_IDX].iptr); LOG_I(GNB_APP,"pdsch_AntennaPorts N2 %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_N2_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts_N2 = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_N2_IDX].iptr; NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts.N2 = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_N2_IDX].iptr;
LOG_I(GNB_APP,"pdsch_AntennaPorts XP %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_XP_IDX].iptr); LOG_I(GNB_APP,"pdsch_AntennaPorts XP %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_XP_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts_XP = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_XP_IDX].iptr; NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts.XP = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_XP_IDX].iptr;
LOG_I(GNB_APP,"pusch_AntennaPorts %d\n",*GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr); LOG_I(GNB_APP,"pusch_AntennaPorts %d\n",*GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).pusch_AntennaPorts = *GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr; NRRRC_CONFIGURATION_REQ (msg_p).pusch_AntennaPorts = *GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr;
LOG_I(GNB_APP,"minTXRXTIME %d\n",*GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr); LOG_I(GNB_APP,"minTXRXTIME %d\n",*GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).minRXTXTIME = *GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr; NRRRC_CONFIGURATION_REQ (msg_p).minRXTXTIME = *GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr;
LOG_I(RRC,"SIB1 TDA %d\n",*GNBParamList.paramarray[i][GNB_SIB1_TDA_IDX].iptr); LOG_I(GNB_APP,"SIB1 TDA %d\n",*GNBParamList.paramarray[i][GNB_SIB1_TDA_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).sib1_tda = *GNBParamList.paramarray[i][GNB_SIB1_TDA_IDX].iptr; NRRRC_CONFIGURATION_REQ (msg_p).sib1_tda = *GNBParamList.paramarray[i][GNB_SIB1_TDA_IDX].iptr;
LOG_I(GNB_APP,"Do CSI-RS %d\n",*GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr); LOG_I(GNB_APP,"Do CSI-RS %d\n",*GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).do_CSIRS = *GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr; NRRRC_CONFIGURATION_REQ (msg_p).do_CSIRS = *GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr;
printf("Do SRS %d\n",*GNBParamList.paramarray[i][GNB_DO_SRS_IDX].iptr); LOG_I(GNB_APP, "Do SRS %d\n",*GNBParamList.paramarray[i][GNB_DO_SRS_IDX].iptr);
NRRRC_CONFIGURATION_REQ (msg_p).do_SRS = *GNBParamList.paramarray[i][GNB_DO_SRS_IDX].iptr; NRRRC_CONFIGURATION_REQ (msg_p).do_SRS = *GNBParamList.paramarray[i][GNB_DO_SRS_IDX].iptr;
NRRRC_CONFIGURATION_REQ (msg_p).force_256qam_off = *GNBParamList.paramarray[i][GNB_FORCE256QAMOFF_IDX].iptr;
LOG_I(GNB_APP, "256 QAM: %s\n", NRRRC_CONFIGURATION_REQ (msg_p).force_256qam_off ? "force off" : "may be on");
NRRRC_CONFIGURATION_REQ (msg_p).scc = scc; NRRRC_CONFIGURATION_REQ (msg_p).scc = scc;
NRRRC_CONFIGURATION_REQ (msg_p).scd = scd; NRRRC_CONFIGURATION_REQ (msg_p).scd = scd;
...@@ -2050,13 +2052,9 @@ void configure_gnb_du_mac(int inst) { ...@@ -2050,13 +2052,9 @@ void configure_gnb_du_mac(int inst) {
gNB_RRC_INST *rrc = RC.nrrrc[inst]; gNB_RRC_INST *rrc = RC.nrrrc[inst];
// LOG_I(GNB_APP,"Configuring MAC/L1 %d, carrier->sib2 %p\n", inst, &carrier->sib2->radioResourceConfigCommon); // LOG_I(GNB_APP,"Configuring MAC/L1 %d, carrier->sib2 %p\n", inst, &carrier->sib2->radioResourceConfigCommon);
LOG_I(GNB_APP,"Configuring gNB DU MAC/L1 %d \n", inst); LOG_I(GNB_APP,"Configuring gNB DU MAC/L1 %d \n", inst);
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts;
pdsch_AntennaPorts.N1 = rrc->configuration.pdsch_AntennaPorts_N1;
pdsch_AntennaPorts.N2 = rrc->configuration.pdsch_AntennaPorts_N2;
pdsch_AntennaPorts.XP = rrc->configuration.pdsch_AntennaPorts_XP;
rrc_mac_config_req_gNB(rrc->module_id, rrc_mac_config_req_gNB(rrc->module_id,
rrc->configuration.ssb_SubcarrierOffset, rrc->configuration.ssb_SubcarrierOffset,
pdsch_AntennaPorts, rrc->configuration.pdsch_AntennaPorts,
rrc->configuration.pusch_AntennaPorts, rrc->configuration.pusch_AntennaPorts,
rrc->configuration.sib1_tda, rrc->configuration.sib1_tda,
rrc->configuration.minRXTXTIME, rrc->configuration.minRXTXTIME,
...@@ -2064,8 +2062,7 @@ void configure_gnb_du_mac(int inst) { ...@@ -2064,8 +2062,7 @@ void configure_gnb_du_mac(int inst) {
NULL, NULL,
0, 0,
0, // rnti 0, // rnti
(NR_CellGroupConfig_t *)NULL (NR_CellGroupConfig_t *)NULL);
);
} }
......
...@@ -125,6 +125,10 @@ typedef enum { ...@@ -125,6 +125,10 @@ typedef enum {
#define GNB_CONFIG_STRING_MINRXTXTIME "min_rxtxtime" #define GNB_CONFIG_STRING_MINRXTXTIME "min_rxtxtime"
#define GNB_CONFIG_STRING_ULPRBBLACKLIST "ul_prbblacklist" #define GNB_CONFIG_STRING_ULPRBBLACKLIST "ul_prbblacklist"
#define GNB_CONFIG_STRING_UMONDEFAULTDRB "um_on_default_drb" #define GNB_CONFIG_STRING_UMONDEFAULTDRB "um_on_default_drb"
#define GNB_CONFIG_STRING_FORCE256QAMOFF "force_256qam_off"
#define GNB_CONFIG_HLP_FORCE256QAMOFF "suppress activation of 256 QAM despite UE support"
/*-----------------------------------------------------------------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------------------------------------------------------------*/
/* cell configuration parameters */ /* cell configuration parameters */
...@@ -156,7 +160,8 @@ typedef enum { ...@@ -156,7 +160,8 @@ typedef enum {
{GNB_CONFIG_STRING_NRCELLID, NULL, 0, u64ptr:NULL, defint64val:1, TYPE_UINT64, 0}, \ {GNB_CONFIG_STRING_NRCELLID, NULL, 0, u64ptr:NULL, defint64val:1, TYPE_UINT64, 0}, \
{GNB_CONFIG_STRING_MINRXTXTIME, NULL, 0, iptr:NULL, defintval:2, TYPE_INT, 0}, \ {GNB_CONFIG_STRING_MINRXTXTIME, NULL, 0, iptr:NULL, defintval:2, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_ULPRBBLACKLIST, NULL, 0, strptr:NULL, defstrval:"", TYPE_STRING, 0}, \ {GNB_CONFIG_STRING_ULPRBBLACKLIST, NULL, 0, strptr:NULL, defstrval:"", TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_UMONDEFAULTDRB, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0} \ {GNB_CONFIG_STRING_UMONDEFAULTDRB, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0} \
{GNB_CONFIG_STRING_FORCE256QAMOFF, GNB_CONFIG_HLP_FORCE256QAMOFF, PARAMFLAG_BOOL, iptr:NULL, defintval:0, TYPE_INT, 0} \
} }
#define GNB_GNB_ID_IDX 0 #define GNB_GNB_ID_IDX 0
...@@ -185,6 +190,7 @@ typedef enum { ...@@ -185,6 +190,7 @@ typedef enum {
#define GNB_MINRXTXTIME_IDX 23 #define GNB_MINRXTXTIME_IDX 23
#define GNB_ULPRBBLACKLIST_IDX 24 #define GNB_ULPRBBLACKLIST_IDX 24
#define GNB_UMONDEFAULTDRB_IDX 25 #define GNB_UMONDEFAULTDRB_IDX 25
#define GNB_FORCE256QAMOFF_IDX 26
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD} #define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
#define GNBPARAMS_CHECK { \ #define GNBPARAMS_CHECK { \
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
} }
*/ */
#pragma once #ifndef __OPENAIR2_PHY_INTERFACE_QUEUE_T__H__
#define __OPENAIR2_PHY_INTERFACE_QUEUE_T__H__
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
...@@ -62,3 +63,5 @@ typedef bool queue_matcher_t(void *wanted, void *candidate); ...@@ -62,3 +63,5 @@ typedef bool queue_matcher_t(void *wanted, void *candidate);
Look only at the last `max_depth` items on the queue, at most. Look only at the last `max_depth` items on the queue, at most.
Returns the candidate item, or NULL if none matches */ Returns the candidate item, or NULL if none matches */
void *unqueue_matching(queue_t *q, size_t max_depth, queue_matcher_t *matcher, void *wanted); void *unqueue_matching(queue_t *q, size_t max_depth, queue_matcher_t *matcher, void *wanted);
#endif /* __OPENAIR2_PHY_INTERFACE_QUEUE_T__H__ */
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr * \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
*/ */
#ifndef __RRC_LTE_MESSAGES_ASN1_MSG__H__
#define __RRC_LTE_MESSAGES_ASN1_MSG__H__
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdlib.h> /* for atoi(3) */ #include <stdlib.h> /* for atoi(3) */
...@@ -405,3 +408,5 @@ uint8_t do_SecurityModeCommand( ...@@ -405,3 +408,5 @@ uint8_t do_SecurityModeCommand(
const uint8_t Transaction_id, const uint8_t Transaction_id,
const uint8_t cipheringAlgorithm, const uint8_t cipheringAlgorithm,
const uint8_t integrityProtAlgorithm); const uint8_t integrityProtAlgorithm);
#endif /* __RRC_LTE_MESSAGES_ASN1_MSG__H__ */
...@@ -321,7 +321,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, ...@@ -321,7 +321,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
ue_context_p->ue_context.Srb0.Active = 1; ue_context_p->ue_context.Srb0.Active = 1;
RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[module_idP]->rrc_ue_head, ue_context_p); RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[module_idP]->rrc_ue_head, ue_context_p);
fill_initial_cellGroupConfig(ue_context_p->local_uid,&cellGroupConfig,scc,&RC.nrrrc[module_idP]->carrier); fill_initial_cellGroupConfig(ue_context_p->local_uid,&cellGroupConfig,scc, &RC.nrrrc[module_idP]->configuration);
MessageDef* tmp=itti_alloc_new_message_sized(TASK_RRC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE, sizeof(f1ap_initial_ul_rrc_message_t) + sdu_lenP); MessageDef* tmp=itti_alloc_new_message_sized(TASK_RRC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE, sizeof(f1ap_initial_ul_rrc_message_t) + sdu_lenP);
f1ap_initial_ul_rrc_message_t *msg = &F1AP_INITIAL_UL_RRC_MESSAGE(tmp); f1ap_initial_ul_rrc_message_t *msg = &F1AP_INITIAL_UL_RRC_MESSAGE(tmp);
......
...@@ -198,6 +198,7 @@ uint8_t do_MIB_NR(gNB_RRC_INST *rrc,uint32_t frame) { ...@@ -198,6 +198,7 @@ uint8_t do_MIB_NR(gNB_RRC_INST *rrc,uint32_t frame) {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
rrc_gNB_carrier_data_t *carrier = &rrc->carrier; rrc_gNB_carrier_data_t *carrier = &rrc->carrier;
const gNB_RrcConfigurationReq *configuration = &rrc->configuration;
NR_BCCH_BCH_Message_t *mib = &carrier->mib; NR_BCCH_BCH_Message_t *mib = &carrier->mib;
NR_ServingCellConfigCommon_t *scc = carrier->servingcellconfigcommon; NR_ServingCellConfigCommon_t *scc = carrier->servingcellconfigcommon;
...@@ -221,7 +222,7 @@ uint8_t do_MIB_NR(gNB_RRC_INST *rrc,uint32_t frame) { ...@@ -221,7 +222,7 @@ uint8_t do_MIB_NR(gNB_RRC_INST *rrc,uint32_t frame) {
mib->message.choice.mib->spare.size = 1; mib->message.choice.mib->spare.size = 1;
mib->message.choice.mib->spare.bits_unused = 7; // This makes a spare of 1 bits mib->message.choice.mib->spare.bits_unused = 7; // This makes a spare of 1 bits
mib->message.choice.mib->ssb_SubcarrierOffset = (carrier->ssb_SubcarrierOffset)&15; mib->message.choice.mib->ssb_SubcarrierOffset = (configuration->ssb_SubcarrierOffset)&15;
/* /*
* The SIB1 will be sent in this allocation (Type0-PDCCH) : 38.213, 13-4 Table and 38.213 13-11 to 13-14 tables * The SIB1 will be sent in this allocation (Type0-PDCCH) : 38.213, 13-4 Table and 38.213 13-11 to 13-14 tables
...@@ -1005,10 +1006,10 @@ long rrc_get_max_nr_csrs(uint8_t max_rbs, long b_SRS) { ...@@ -1005,10 +1006,10 @@ long rrc_get_max_nr_csrs(uint8_t max_rbs, long b_SRS) {
void fill_default_csi_MeasConfig(int uid, void fill_default_csi_MeasConfig(int uid,
NR_SetupRelease_CSI_MeasConfig_t *setupRelease_csi_MeasConfig, NR_SetupRelease_CSI_MeasConfig_t *setupRelease_csi_MeasConfig,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
rrc_gNB_carrier_data_t *carrier) { const gNB_RrcConfigurationReq* configuration) {
int curr_bwp = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth,MAX_BWP_SIZE); int curr_bwp = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth,MAX_BWP_SIZE);
int dl_antenna_ports = carrier->pdsch_AntennaPorts.N1 * carrier->pdsch_AntennaPorts.N2 * carrier->pdsch_AntennaPorts.XP; int dl_antenna_ports = configuration->pdsch_AntennaPorts.N1 * configuration->pdsch_AntennaPorts.N2 * configuration->pdsch_AntennaPorts.XP;
setupRelease_csi_MeasConfig->present = NR_SetupRelease_CSI_MeasConfig_PR_setup; setupRelease_csi_MeasConfig->present = NR_SetupRelease_CSI_MeasConfig_PR_setup;
NR_CSI_MeasConfig_t *csi_MeasConfig = calloc(1,sizeof(*csi_MeasConfig)); NR_CSI_MeasConfig_t *csi_MeasConfig = calloc(1,sizeof(*csi_MeasConfig));
...@@ -1045,7 +1046,7 @@ void fill_default_csi_MeasConfig(int uid, ...@@ -1045,7 +1046,7 @@ void fill_default_csi_MeasConfig(int uid,
csi_MeasConfig->nzp_CSI_RS_ResourceSetToReleaseList = NULL; csi_MeasConfig->nzp_CSI_RS_ResourceSetToReleaseList = NULL;
config_csirs(scc, csi_MeasConfig, uid, dl_antenna_ports, curr_bwp, carrier->do_CSIRS); config_csirs(scc, csi_MeasConfig, uid, dl_antenna_ports, curr_bwp, configuration->do_CSIRS);
csi_MeasConfig->csi_SSB_ResourceSetToAddModList = calloc(1,sizeof(*csi_MeasConfig->csi_SSB_ResourceSetToAddModList)); csi_MeasConfig->csi_SSB_ResourceSetToAddModList = calloc(1,sizeof(*csi_MeasConfig->csi_SSB_ResourceSetToAddModList));
csi_MeasConfig->csi_SSB_ResourceSetToReleaseList = NULL; csi_MeasConfig->csi_SSB_ResourceSetToReleaseList = NULL;
...@@ -1095,7 +1096,6 @@ void fill_default_csi_MeasConfig(int uid, ...@@ -1095,7 +1096,6 @@ void fill_default_csi_MeasConfig(int uid,
csires0->resourceType = NR_CSI_ResourceConfig__resourceType_periodic; csires0->resourceType = NR_CSI_ResourceConfig__resourceType_periodic;
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires0); ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires0);
NR_CSI_ResourceConfig_t *csires1 = calloc(1,sizeof(*csires1)); NR_CSI_ResourceConfig_t *csires1 = calloc(1,sizeof(*csires1));
csires1->csi_ResourceConfigId=1; csires1->csi_ResourceConfigId=1;
csires1->csi_RS_ResourceSetList.present = NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_nzp_CSI_RS_SSB; csires1->csi_RS_ResourceSetList.present = NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_nzp_CSI_RS_SSB;
...@@ -1223,8 +1223,8 @@ void fill_default_csi_MeasConfig(int uid, ...@@ -1223,8 +1223,8 @@ void fill_default_csi_MeasConfig(int uid,
void fill_initial_SpCellConfig(int uid, void fill_initial_SpCellConfig(int uid,
NR_SpCellConfig_t *SpCellConfig, NR_SpCellConfig_t *SpCellConfig,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
rrc_gNB_carrier_data_t *carrier) { const gNB_RrcConfigurationReq *configuration)
{
// This assert will never happen in the current implementation because NUMBER_OF_UE_MAX = 4. // This assert will never happen in the current implementation because NUMBER_OF_UE_MAX = 4.
// However, if in the future NUMBER_OF_UE_MAX is increased, it will be necessary to improve the allocation of SRS resources, // However, if in the future NUMBER_OF_UE_MAX is increased, it will be necessary to improve the allocation of SRS resources,
// where the startPosition = 2 or 3 and sl160 = 17, 17, 27 ... 157 only give us 30 different allocations. // where the startPosition = 2 or 3 and sl160 = 17, 17, 27 ... 157 only give us 30 different allocations.
...@@ -1406,7 +1406,7 @@ void fill_initial_SpCellConfig(int uid, ...@@ -1406,7 +1406,7 @@ void fill_initial_SpCellConfig(int uid,
ASN_SEQUENCE_ADD(&srs_resset0->srs_ResourceIdList->list,srs_resset0_id); ASN_SEQUENCE_ADD(&srs_resset0->srs_ResourceIdList->list,srs_resset0_id);
srs_Config->srs_ResourceToReleaseList=NULL; srs_Config->srs_ResourceToReleaseList=NULL;
if(carrier->do_SRS) { if (configuration->do_SRS) {
srs_resset0->resourceType.present = NR_SRS_ResourceSet__resourceType_PR_periodic; srs_resset0->resourceType.present = NR_SRS_ResourceSet__resourceType_PR_periodic;
srs_resset0->resourceType.choice.periodic = calloc(1,sizeof(*srs_resset0->resourceType.choice.periodic)); srs_resset0->resourceType.choice.periodic = calloc(1,sizeof(*srs_resset0->resourceType.choice.periodic));
srs_resset0->resourceType.choice.periodic->associatedCSI_RS = NULL; srs_resset0->resourceType.choice.periodic->associatedCSI_RS = NULL;
...@@ -1450,7 +1450,7 @@ void fill_initial_SpCellConfig(int uid, ...@@ -1450,7 +1450,7 @@ void fill_initial_SpCellConfig(int uid,
srs_res0->freqHopping.b_SRS); srs_res0->freqHopping.b_SRS);
srs_res0->groupOrSequenceHopping=NR_SRS_Resource__groupOrSequenceHopping_neither; srs_res0->groupOrSequenceHopping=NR_SRS_Resource__groupOrSequenceHopping_neither;
if(carrier->do_SRS) { if (configuration->do_SRS) {
srs_res0->resourceType.present= NR_SRS_Resource__resourceType_PR_periodic; srs_res0->resourceType.present= NR_SRS_Resource__resourceType_PR_periodic;
srs_res0->resourceType.choice.periodic=calloc(1,sizeof(*srs_res0->resourceType.choice.periodic)); srs_res0->resourceType.choice.periodic=calloc(1,sizeof(*srs_res0->resourceType.choice.periodic));
srs_res0->resourceType.choice.periodic->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl160; srs_res0->resourceType.choice.periodic->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl160;
...@@ -1487,9 +1487,9 @@ void fill_initial_SpCellConfig(int uid, ...@@ -1487,9 +1487,9 @@ void fill_initial_SpCellConfig(int uid,
long *delay[8]; long *delay[8];
for (int i=0;i<8;i++) { for (int i=0;i<8;i++) {
delay[i] = calloc(1,sizeof(*delay[i])); delay[i] = calloc(1,sizeof(*delay[i]));
AssertFatal(carrier->minRXTXTIME >=2 && carrier->minRXTXTIME <7, AssertFatal(configuration->minRXTXTIME >= 2 && configuration->minRXTXTIME < 7,
"check minRXTXTIME %d\n",carrier->minRXTXTIME); "minRXTXTIME is %d but should be within [2,7)\n", configuration->minRXTXTIME);
*delay[i] = (i+carrier->minRXTXTIME); *delay[i] = i + configuration->minRXTXTIME;
ASN_SEQUENCE_ADD(&pucch_Config->dl_DataToUL_ACK->list,delay[i]); ASN_SEQUENCE_ADD(&pucch_Config->dl_DataToUL_ACK->list,delay[i]);
} }
...@@ -1726,8 +1726,9 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr ...@@ -1726,8 +1726,9 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
rrc_gNB_carrier_data_t *carrier, rrc_gNB_carrier_data_t *carrier,
int uid, int uid,
NR_UE_NR_Capability_t *uecap) { NR_UE_NR_Capability_t *uecap,
const gNB_RrcConfigurationReq* configuration)
{
NR_SpCellConfig_t *SpCellConfig = cellGroupConfig->spCellConfig; NR_SpCellConfig_t *SpCellConfig = cellGroupConfig->spCellConfig;
if (SpCellConfig == NULL) return; if (SpCellConfig == NULL) return;
...@@ -1735,7 +1736,7 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, ...@@ -1735,7 +1736,7 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
// Config CSI-RS // Config CSI-RS
/* /*
if (carrier->do_CSIRS) { if (configuration->do_CSIRS) {
struct NR_PUCCH_Config__spatialRelationInfoToAddModList *spatialRelationInfoToAddModList = calloc(1,sizeof(*spatialRelationInfoToAddModList)); struct NR_PUCCH_Config__spatialRelationInfoToAddModList *spatialRelationInfoToAddModList = calloc(1,sizeof(*spatialRelationInfoToAddModList));
NR_PUCCH_SpatialRelationInfo_t *pucchspatial = calloc(1,sizeof(*pucchspatial)); NR_PUCCH_SpatialRelationInfo_t *pucchspatial = calloc(1,sizeof(*pucchspatial));
pucchspatial->pucch_SpatialRelationInfoId = 1; pucchspatial->pucch_SpatialRelationInfoId = 1;
...@@ -1750,21 +1751,21 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, ...@@ -1750,21 +1751,21 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
if(!SpCellConfig->spCellConfigDedicated->csi_MeasConfig) { if(!SpCellConfig->spCellConfigDedicated->csi_MeasConfig) {
SpCellConfig->spCellConfigDedicated->csi_MeasConfig=calloc(1,sizeof(*SpCellConfig->spCellConfigDedicated->csi_MeasConfig)); SpCellConfig->spCellConfigDedicated->csi_MeasConfig=calloc(1,sizeof(*SpCellConfig->spCellConfigDedicated->csi_MeasConfig));
} }
fill_default_csi_MeasConfig(uid, SpCellConfig->spCellConfigDedicated->csi_MeasConfig, scc, carrier); fill_default_csi_MeasConfig(uid, SpCellConfig->spCellConfigDedicated->csi_MeasConfig, scc, configuration);
} }
*/ */
// Set DL MCS table // Set DL MCS table
NR_BWP_DownlinkDedicated_t *bwp_Dedicated = SpCellConfig->spCellConfigDedicated->initialDownlinkBWP; NR_BWP_DownlinkDedicated_t *bwp_Dedicated = SpCellConfig->spCellConfigDedicated->initialDownlinkBWP;
set_dl_mcs_table(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing, set_dl_mcs_table(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing,
uecap, SpCellConfig, bwp_Dedicated, scc); configuration->force_256qam_off ? NULL : uecap, bwp_Dedicated, scc);
struct NR_ServingCellConfig__downlinkBWP_ToAddModList *DL_BWP_list = SpCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList; struct NR_ServingCellConfig__downlinkBWP_ToAddModList *DL_BWP_list = SpCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList;
if (DL_BWP_list) { if (DL_BWP_list) {
for (int i=0; i<DL_BWP_list->list.count; i++){ for (int i=0; i<DL_BWP_list->list.count; i++){
NR_BWP_Downlink_t *bwp = DL_BWP_list->list.array[i]; NR_BWP_Downlink_t *bwp = DL_BWP_list->list.array[i];
int scs = bwp->bwp_Common->genericParameters.subcarrierSpacing; int scs = bwp->bwp_Common->genericParameters.subcarrierSpacing;
set_dl_mcs_table(scs, uecap, SpCellConfig,bwp->bwp_Dedicated, carrier->servingcellconfigcommon); set_dl_mcs_table(scs, configuration->force_256qam_off ? NULL : uecap, bwp->bwp_Dedicated, carrier->servingcellconfigcommon);
} }
} }
} }
...@@ -1772,8 +1773,8 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, ...@@ -1772,8 +1773,8 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
void fill_initial_cellGroupConfig(int uid, void fill_initial_cellGroupConfig(int uid,
NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *cellGroupConfig,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
rrc_gNB_carrier_data_t *carrier) { const gNB_RrcConfigurationReq *configuration)
{
NR_RLC_BearerConfig_t *rlc_BearerConfig = NULL; NR_RLC_BearerConfig_t *rlc_BearerConfig = NULL;
NR_RLC_Config_t *rlc_Config = NULL; NR_RLC_Config_t *rlc_Config = NULL;
NR_LogicalChannelConfig_t *logicalChannelConfig = NULL; NR_LogicalChannelConfig_t *logicalChannelConfig = NULL;
...@@ -1863,7 +1864,7 @@ void fill_initial_cellGroupConfig(int uid, ...@@ -1863,7 +1864,7 @@ void fill_initial_cellGroupConfig(int uid,
cellGroupConfig->spCellConfig = calloc(1,sizeof(*cellGroupConfig->spCellConfig)); cellGroupConfig->spCellConfig = calloc(1,sizeof(*cellGroupConfig->spCellConfig));
fill_initial_SpCellConfig(uid,cellGroupConfig->spCellConfig,scc,carrier); fill_initial_SpCellConfig(uid,cellGroupConfig->spCellConfig,scc,configuration);
cellGroupConfig->sCellToAddModList = NULL; cellGroupConfig->sCellToAddModList = NULL;
cellGroupConfig->sCellToReleaseList = NULL; cellGroupConfig->sCellToReleaseList = NULL;
...@@ -1875,7 +1876,7 @@ int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, ...@@ -1875,7 +1876,7 @@ int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
const uint8_t transaction_id, const uint8_t transaction_id,
OCTET_STRING_t *masterCellGroup_from_DU, OCTET_STRING_t *masterCellGroup_from_DU,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
rrc_gNB_carrier_data_t *carrier) const gNB_RrcConfigurationReq *configuration)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
...@@ -1942,7 +1943,7 @@ int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, ...@@ -1942,7 +1943,7 @@ int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
} }
else { else {
cellGroupConfig = calloc(1, sizeof(NR_CellGroupConfig_t)); cellGroupConfig = calloc(1, sizeof(NR_CellGroupConfig_t));
fill_initial_cellGroupConfig(ue_context_pP->local_uid,cellGroupConfig,scc,carrier); fill_initial_cellGroupConfig(ue_context_pP->local_uid, cellGroupConfig, scc, configuration);
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig,
NULL, NULL,
...@@ -2190,6 +2191,7 @@ int16_t do_RRCReconfiguration( ...@@ -2190,6 +2191,7 @@ int16_t do_RRCReconfiguration(
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList, struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
rrc_gNB_ue_context_t *const ue_context_pP, rrc_gNB_ue_context_t *const ue_context_pP,
rrc_gNB_carrier_data_t *carrier, rrc_gNB_carrier_data_t *carrier,
const gNB_RrcConfigurationReq *configuration,
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig, NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
NR_CellGroupConfig_t *cellGroupConfig) NR_CellGroupConfig_t *cellGroupConfig)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -2244,7 +2246,8 @@ int16_t do_RRCReconfiguration( ...@@ -2244,7 +2246,8 @@ int16_t do_RRCReconfiguration(
update_cellGroupConfig(cellGroupConfig, update_cellGroupConfig(cellGroupConfig,
carrier, carrier,
ue_context_pP->local_uid, ue_context_pP->local_uid,
ue_context_pP->ue_context.UE_Capability_nr); ue_context_pP->ue_context.UE_Capability_nr,
configuration);
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig,
NULL, NULL,
(void *)cellGroupConfig, (void *)cellGroupConfig,
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr, kroempa@gmail.com * \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr, kroempa@gmail.com
*/ */
#pragma once #ifndef __RRC_NR_MESSAGES_ASN1_MSG__H__
#define __RRC_NR_MESSAGES_ASN1_MSG__H__
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -101,19 +102,20 @@ uint8_t do_RRCReject(uint8_t Mod_id, ...@@ -101,19 +102,20 @@ uint8_t do_RRCReject(uint8_t Mod_id,
uint8_t *const buffer); uint8_t *const buffer);
void fill_initial_SpCellConfig(int uid, void fill_initial_SpCellConfig(int uid,
NR_SpCellConfig_t *SpCellConfig, NR_SpCellConfig_t *SpCellConfig,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
rrc_gNB_carrier_data_t *carrier); const gNB_RrcConfigurationReq *configuration);
void fill_initial_cellGroupConfig(int uid, void fill_initial_cellGroupConfig(int uid,
NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *cellGroupConfig,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
rrc_gNB_carrier_data_t *carrier); const gNB_RrcConfigurationReq *configuration);
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
rrc_gNB_carrier_data_t *carrier, rrc_gNB_carrier_data_t *carrier,
int uid, int uid,
NR_UE_NR_Capability_t *uecap); NR_UE_NR_Capability_t *uecap,
const gNB_RrcConfigurationReq *configuration);
void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *ue_context_mastercellGroup,int use_rlc_um_for_drb); void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *ue_context_mastercellGroup,int use_rlc_um_for_drb);
...@@ -122,7 +124,7 @@ int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, ...@@ -122,7 +124,7 @@ int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
const uint8_t transaction_id, const uint8_t transaction_id,
OCTET_STRING_t *masterCellGroup_from_DU, OCTET_STRING_t *masterCellGroup_from_DU,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
rrc_gNB_carrier_data_t *carrier); const gNB_RrcConfigurationReq *configuration);
uint8_t do_NR_SecurityModeCommand( uint8_t do_NR_SecurityModeCommand(
const protocol_ctxt_t *const ctxt_pP, const protocol_ctxt_t *const ctxt_pP,
...@@ -152,6 +154,7 @@ int16_t do_RRCReconfiguration( ...@@ -152,6 +154,7 @@ int16_t do_RRCReconfiguration(
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList, struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
rrc_gNB_ue_context_t *const ue_context_pP, rrc_gNB_ue_context_t *const ue_context_pP,
rrc_gNB_carrier_data_t *carrier, rrc_gNB_carrier_data_t *carrier,
const gNB_RrcConfigurationReq *configuration,
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig, NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
NR_CellGroupConfig_t *cellGroupConfig); NR_CellGroupConfig_t *cellGroupConfig);
...@@ -206,3 +209,4 @@ do_RRCReestablishmentComplete( ...@@ -206,3 +209,4 @@ do_RRCReestablishmentComplete(
uint8_t *buffer, size_t buffer_size, uint8_t *buffer, size_t buffer_size,
int64_t rrc_TransactionIdentifier); int64_t rrc_TransactionIdentifier);
#endif /* __RRC_NR_MESSAGES_ASN1_MSG__H__ */
...@@ -424,12 +424,6 @@ typedef struct rrc_gNB_ue_context_s { ...@@ -424,12 +424,6 @@ typedef struct rrc_gNB_ue_context_s {
struct gNB_RRC_UE_s ue_context; struct gNB_RRC_UE_s ue_context;
} rrc_gNB_ue_context_t; } rrc_gNB_ue_context_t;
typedef struct {
int N1;
int N2;
int XP;
} rrc_pdsch_AntennaPorts_t;
typedef struct { typedef struct {
// buffer that contains the encoded messages // buffer that contains the encoded messages
...@@ -454,13 +448,6 @@ typedef struct { ...@@ -454,13 +448,6 @@ typedef struct {
NR_SIB2_t *sib2; NR_SIB2_t *sib2;
NR_SIB3_t *sib3; NR_SIB3_t *sib3;
NR_BCCH_DL_SCH_Message_t systemInformation; // SIB23 NR_BCCH_DL_SCH_Message_t systemInformation; // SIB23
int ssb_SubcarrierOffset;
int sib1_tda;
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts;
int pusch_AntennaPorts;
int minRXTXTIME;
int do_CSIRS;
int do_SRS;
NR_BCCH_DL_SCH_Message_t *siblock1; NR_BCCH_DL_SCH_Message_t *siblock1;
NR_ServingCellConfigCommon_t *servingcellconfigcommon; NR_ServingCellConfigCommon_t *servingcellconfigcommon;
NR_PDCCH_ConfigSIB1_t *pdcch_ConfigSIB1; NR_PDCCH_ConfigSIB1_t *pdcch_ConfigSIB1;
......
...@@ -79,10 +79,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -79,10 +79,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_UE_NR_Capability_t *uecap, NR_UE_NR_Capability_t *uecap,
int scg_id, int scg_id,
int servCellIndex, int servCellIndex,
rrc_pdsch_AntennaPorts_t dl_antenna_ports, const gNB_RrcConfigurationReq *configuration,
int minRXTXTIMEpdsch,
int do_csirs,
int do_srs,
int uid); int uid);
void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon, void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
...@@ -90,10 +87,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon ...@@ -90,10 +87,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
NR_RRCReconfiguration_IEs_t *reconfig, NR_RRCReconfiguration_IEs_t *reconfig,
NR_CellGroupConfig_t *secondaryCellGroup, NR_CellGroupConfig_t *secondaryCellGroup,
NR_UE_NR_Capability_t *uecap, NR_UE_NR_Capability_t *uecap,
rrc_pdsch_AntennaPorts_t dl_antenna_ports, const gNB_RrcConfigurationReq *configuration,
int minRXTXTIMEpdsch,
int do_csirs,
int do_srs,
int uid); int uid);
void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig, void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig,
......
...@@ -166,17 +166,16 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration ...@@ -166,17 +166,16 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
if (NODE_IS_MONOLITHIC(rrc->node_type)){ if (NODE_IS_MONOLITHIC(rrc->node_type)){
rrc_mac_config_req_gNB(rrc->module_id, rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.ssb_SubcarrierOffset, rrc->configuration.ssb_SubcarrierOffset,
rrc->carrier.pdsch_AntennaPorts, rrc->configuration.pdsch_AntennaPorts,
rrc->carrier.pusch_AntennaPorts, rrc->configuration.pusch_AntennaPorts,
rrc->carrier.sib1_tda, rrc->configuration.sib1_tda,
rrc->carrier.minRXTXTIME, rrc->configuration.minRXTXTIME,
(NR_ServingCellConfigCommon_t *)rrc->carrier.servingcellconfigcommon, rrc->carrier.servingcellconfigcommon,
&rrc->carrier.mib, &rrc->carrier.mib,
0, 0,
0, // WIP hardcoded rnti 0, // WIP hardcoded rnti
(NR_CellGroupConfig_t *)NULL NULL);
);
} }
/* set flag to indicate that cell information is configured. This is required /* set flag to indicate that cell information is configured. This is required
...@@ -216,16 +215,8 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu ...@@ -216,16 +215,8 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
rrc->s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); rrc->s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
rrc->initial_id2_ngap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); rrc->initial_id2_ngap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
rrc->ngap_id2_ngap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); rrc->ngap_id2_ngap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
rrc->configuration = *configuration;
rrc->carrier.servingcellconfigcommon = configuration->scc; rrc->carrier.servingcellconfigcommon = configuration->scc;
rrc->carrier.ssb_SubcarrierOffset = configuration->ssb_SubcarrierOffset;
rrc->carrier.pdsch_AntennaPorts.N1 = configuration->pdsch_AntennaPorts_N1;
rrc->carrier.pdsch_AntennaPorts.N2 = configuration->pdsch_AntennaPorts_N2;
rrc->carrier.pdsch_AntennaPorts.XP = configuration->pdsch_AntennaPorts_XP;
rrc->carrier.pusch_AntennaPorts = configuration->pusch_AntennaPorts;
rrc->carrier.minRXTXTIME = configuration->minRXTXTIME;
rrc->carrier.sib1_tda = configuration->sib1_tda;
rrc->carrier.do_CSIRS = configuration->do_CSIRS;
rrc->carrier.do_SRS = configuration->do_SRS;
nr_rrc_config_ul_tda(configuration->scc,configuration->minRXTXTIME); nr_rrc_config_ul_tda(configuration->scc,configuration->minRXTXTIME);
/// System Information INIT /// System Information INIT
pthread_mutex_init(&rrc->cell_info_mutex,NULL); pthread_mutex_init(&rrc->cell_info_mutex,NULL);
...@@ -281,24 +272,25 @@ void apply_macrlc_config(gNB_RRC_INST *rrc, ...@@ -281,24 +272,25 @@ void apply_macrlc_config(gNB_RRC_INST *rrc,
rrc_gNB_ue_context_t *const ue_context_pP, rrc_gNB_ue_context_t *const ue_context_pP,
const protocol_ctxt_t *const ctxt_pP ) { const protocol_ctxt_t *const ctxt_pP ) {
rrc_mac_config_req_gNB(rrc->module_id, NR_CellGroupConfig_t *cgc = get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup : NULL;
rrc->carrier.ssb_SubcarrierOffset, rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.pdsch_AntennaPorts, rrc->configuration.ssb_SubcarrierOffset,
rrc->carrier.pusch_AntennaPorts, rrc->configuration.pdsch_AntennaPorts,
rrc->carrier.sib1_tda, rrc->configuration.pusch_AntennaPorts,
rrc->carrier.minRXTXTIME, rrc->configuration.sib1_tda,
NULL, rrc->configuration.minRXTXTIME,
NULL, NULL,
0, NULL,
ue_context_pP->ue_context.rnti, 0,
get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup : (NR_CellGroupConfig_t *)NULL); ue_context_pP->ue_context.rnti,
cgc);
nr_rrc_rlc_config_asn1_req(ctxt_pP, nr_rrc_rlc_config_asn1_req(ctxt_pP,
ue_context_pP->ue_context.SRB_configList, ue_context_pP->ue_context.SRB_configList,
ue_context_pP->ue_context.DRB_configList, ue_context_pP->ue_context.DRB_configList,
NULL, NULL,
NULL, NULL,
get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL); get_softmodem_params()->sa ? cgc->rlc_BearerToAddModList : NULL);
} }
...@@ -342,10 +334,11 @@ rrc_gNB_generate_RRCSetup( ...@@ -342,10 +334,11 @@ rrc_gNB_generate_RRCSetup(
gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id];
ue_p->Srb0.Tx_buffer.payload_size = do_RRCSetup(ue_context_pP, ue_p->Srb0.Tx_buffer.payload_size = do_RRCSetup(ue_context_pP,
(uint8_t *) ue_p->Srb0.Tx_buffer.Payload, (uint8_t *) ue_p->Srb0.Tx_buffer.Payload,
rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id), rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id),
masterCellGroup_from_DU, masterCellGroup_from_DU,
scc,&rrc->carrier); scc,
&rrc->configuration);
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, LOG_DUMPMSG(NR_RRC, DEBUG_RRC,
(char *)(ue_p->Srb0.Tx_buffer.Payload), (char *)(ue_p->Srb0.Tx_buffer.Payload),
...@@ -452,10 +445,11 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest( ...@@ -452,10 +445,11 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
ue_p->Srb0.Tx_buffer.payload_size = do_RRCSetup(ue_context_pP, ue_p->Srb0.Tx_buffer.payload_size = do_RRCSetup(ue_context_pP,
(uint8_t *) ue_p->Srb0.Tx_buffer.Payload, (uint8_t *) ue_p->Srb0.Tx_buffer.Payload,
rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id), rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id),
NULL, NULL,
scc,&rrc_instance_p->carrier); scc,
&rrc_instance_p->configuration);
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, LOG_DUMPMSG(NR_RRC, DEBUG_RRC,
(char *)(ue_p->Srb0.Tx_buffer.Payload), (char *)(ue_p->Srb0.Tx_buffer.Payload),
...@@ -467,17 +461,16 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest( ...@@ -467,17 +461,16 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP));
rrc_mac_config_req_gNB(rrc_instance_p->module_id, rrc_mac_config_req_gNB(rrc_instance_p->module_id,
rrc_instance_p->carrier.ssb_SubcarrierOffset, rrc_instance_p->configuration.ssb_SubcarrierOffset,
rrc_instance_p->carrier.pdsch_AntennaPorts, rrc_instance_p->configuration.pdsch_AntennaPorts,
rrc_instance_p->carrier.pusch_AntennaPorts, rrc_instance_p->configuration.pusch_AntennaPorts,
rrc_instance_p->carrier.sib1_tda, rrc_instance_p->configuration.sib1_tda,
rrc_instance_p->carrier.minRXTXTIME, rrc_instance_p->configuration.minRXTXTIME,
(NR_ServingCellConfigCommon_t *)rrc_instance_p->carrier.servingcellconfigcommon, rrc_instance_p->carrier.servingcellconfigcommon,
&rrc_instance_p->carrier.mib, &rrc_instance_p->carrier.mib,
0, 0,
ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti,
(NR_CellGroupConfig_t *)NULL NULL);
);
LOG_I(NR_RRC, LOG_I(NR_RRC,
PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCSetup (bytes %d)\n", PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCSetup (bytes %d)\n",
...@@ -725,6 +718,7 @@ rrc_gNB_generate_defaultRRCReconfiguration( ...@@ -725,6 +718,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
dedicatedNAS_MessageList, dedicatedNAS_MessageList,
ue_context_pP, ue_context_pP,
&rrc->carrier, &rrc->carrier,
&rrc->configuration,
NULL, NULL,
ue_p->masterCellGroup); ue_p->masterCellGroup);
...@@ -989,6 +983,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( ...@@ -989,6 +983,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
dedicatedNAS_MessageList, dedicatedNAS_MessageList,
ue_context_pP, ue_context_pP,
&rrc->carrier, &rrc->carrier,
&rrc->configuration,
NULL, NULL,
cellGroupConfig); cellGroupConfig);
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Reconfiguration\n"); LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Reconfiguration\n");
...@@ -1162,6 +1157,7 @@ rrc_gNB_modify_dedicatedRRCReconfiguration( ...@@ -1162,6 +1157,7 @@ rrc_gNB_modify_dedicatedRRCReconfiguration(
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,
NULL); NULL);
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)buffer, size, "[MSG] RRC Reconfiguration\n"); LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)buffer, size, "[MSG] RRC Reconfiguration\n");
...@@ -1262,6 +1258,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( ...@@ -1262,6 +1258,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,
NULL); NULL);
ue_context_pP->ue_context.pdu_session_release_command_flag = 1; ue_context_pP->ue_context.pdu_session_release_command_flag = 1;
...@@ -1365,17 +1362,16 @@ rrc_gNB_process_RRCReconfigurationComplete( ...@@ -1365,17 +1362,16 @@ rrc_gNB_process_RRCReconfigurationComplete(
if (!NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type)) { if (!NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type)) {
rrc_mac_config_req_gNB(rrc->module_id, rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.ssb_SubcarrierOffset, rrc->configuration.ssb_SubcarrierOffset,
rrc->carrier.pdsch_AntennaPorts, rrc->configuration.pdsch_AntennaPorts,
rrc->carrier.pusch_AntennaPorts, rrc->configuration.pusch_AntennaPorts,
rrc->carrier.sib1_tda, rrc->configuration.sib1_tda,
rrc->carrier.minRXTXTIME, rrc->configuration.minRXTXTIME,
NULL, NULL,
NULL, NULL,
0, 0,
ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti,
ue_context_pP->ue_context.masterCellGroup ue_context_pP->ue_context.masterCellGroup);
);
LOG_D(NR_RRC,"Configuring RLC DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti); LOG_D(NR_RRC,"Configuring RLC DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti);
nr_rrc_rlc_config_asn1_req(ctxt_pP, nr_rrc_rlc_config_asn1_req(ctxt_pP,
SRB_configList, // NULL, SRB_configList, // NULL,
...@@ -1813,6 +1809,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete( ...@@ -1813,6 +1809,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,
NULL); NULL);
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,
"[MSG] RRC Reconfiguration\n"); "[MSG] RRC Reconfiguration\n");
......
...@@ -116,6 +116,7 @@ RB_PROTOTYPE(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s, entries, ...@@ -116,6 +116,7 @@ RB_PROTOTYPE(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s, entries,
void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_p, x2ap_ENDC_sgnb_addition_req_t *m) { void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_p, x2ap_ENDC_sgnb_addition_req_t *m) {
// generate nr-Config-r15 containers for LTE RRC : inside message for X2 EN-DC (CG-Config Message from 38.331) // generate nr-Config-r15 containers for LTE RRC : inside message for X2 EN-DC (CG-Config Message from 38.331)
rrc_gNB_carrier_data_t *carrier=&rrc->carrier; rrc_gNB_carrier_data_t *carrier=&rrc->carrier;
const gNB_RrcConfigurationReq *configuration = &rrc->configuration;
MessageDef *msg; MessageDef *msg;
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_ADDITION_REQ_ACK); msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_ADDITION_REQ_ACK);
gtpv1u_enb_create_tunnel_req_t create_tunnel_req; gtpv1u_enb_create_tunnel_req_t create_tunnel_req;
...@@ -240,29 +241,16 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ...@@ -240,29 +241,16 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
cipher_algo, cipher_algo,
NR_SecurityConfig__keyToUse_secondary); NR_SecurityConfig__keyToUse_secondary);
} }
if (ue_context_p->ue_context.spCellConfig) { NR_ServingCellConfig_t *scc = ue_context_p->ue_context.spCellConfig
fill_default_reconfig(carrier->servingcellconfigcommon, ? ue_context_p->ue_context.spCellConfig->spCellConfigDedicated
ue_context_p->ue_context.spCellConfig->spCellConfigDedicated, : NULL;
reconfig_ies, fill_default_reconfig(carrier->servingcellconfigcommon,
ue_context_p->ue_context.secondaryCellGroup, scc,
ue_context_p->ue_context.UE_Capability_nr, reconfig_ies,
carrier->pdsch_AntennaPorts, ue_context_p->ue_context.secondaryCellGroup,
carrier->minRXTXTIME, ue_context_p->ue_context.UE_Capability_nr,
carrier->do_CSIRS, configuration,
carrier->do_SRS, ue_context_p->local_uid);
ue_context_p->local_uid);
} else {
fill_default_reconfig(carrier->servingcellconfigcommon,
NULL,
reconfig_ies,
ue_context_p->ue_context.secondaryCellGroup,
ue_context_p->ue_context.UE_Capability_nr,
carrier->pdsch_AntennaPorts,
carrier->minRXTXTIME,
carrier->do_CSIRS,
carrier->do_SRS,
ue_context_p->local_uid);
}
ue_context_p->ue_id_rnti = ue_context_p->ue_context.secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity; ue_context_p->ue_id_rnti = ue_context_p->ue_context.secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity;
NR_CG_Config_t *CG_Config = calloc(1,sizeof(*CG_Config)); NR_CG_Config_t *CG_Config = calloc(1,sizeof(*CG_Config));
memset((void *)CG_Config,0,sizeof(*CG_Config)); memset((void *)CG_Config,0,sizeof(*CG_Config));
...@@ -359,11 +347,11 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ...@@ -359,11 +347,11 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
// configure MAC and RLC // configure MAC and RLC
if (NODE_IS_DU(rrc->node_type)) { if (NODE_IS_DU(rrc->node_type)) {
rrc_mac_config_req_gNB(rrc->module_id, rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.ssb_SubcarrierOffset, rrc->configuration.ssb_SubcarrierOffset,
rrc->carrier.pdsch_AntennaPorts, rrc->configuration.pdsch_AntennaPorts,
rrc->carrier.pusch_AntennaPorts, rrc->configuration.pusch_AntennaPorts,
rrc->carrier.sib1_tda, rrc->configuration.sib1_tda,
rrc->carrier.minRXTXTIME, rrc->configuration.minRXTXTIME,
rrc->carrier.servingcellconfigcommon, rrc->carrier.servingcellconfigcommon,
&rrc->carrier.mib, &rrc->carrier.mib,
1, // add_ue flag 1, // add_ue flag
...@@ -371,11 +359,11 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ...@@ -371,11 +359,11 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
ue_context_p->ue_context.secondaryCellGroup); ue_context_p->ue_context.secondaryCellGroup);
} else { } else {
rrc_mac_config_req_gNB(rrc->module_id, rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.ssb_SubcarrierOffset, rrc->configuration.ssb_SubcarrierOffset,
rrc->carrier.pdsch_AntennaPorts, rrc->configuration.pdsch_AntennaPorts,
rrc->carrier.pusch_AntennaPorts, rrc->configuration.pusch_AntennaPorts,
rrc->carrier.sib1_tda, rrc->configuration.sib1_tda,
rrc->carrier.minRXTXTIME, rrc->configuration.minRXTXTIME,
NULL, NULL,
NULL, NULL,
1, // add_ue flag 1, // add_ue flag
......
...@@ -56,11 +56,12 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -56,11 +56,12 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_UE_NR_Capability_t *uecap, NR_UE_NR_Capability_t *uecap,
int scg_id, int scg_id,
int servCellIndex, int servCellIndex,
rrc_pdsch_AntennaPorts_t dl_antenna_ports_struct, const gNB_RrcConfigurationReq *configuration,
int minRXTXTIME, int uid)
int do_csirs, {
int do_srs, const rrc_pdsch_AntennaPorts_t* pdschap = &configuration->pdsch_AntennaPorts;
int uid) { const int dl_antenna_ports = pdschap->N1 * pdschap->N2 * pdschap->XP;
const int do_csirs = configuration->do_CSIRS;
AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n"); AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n"); AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n");
...@@ -73,8 +74,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -73,8 +74,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
// where the startPosition = 2 or 3 and sl160 = 17, 17, 27 ... 157 only give us 30 different allocations. // where the startPosition = 2 or 3 and sl160 = 17, 17, 27 ... 157 only give us 30 different allocations.
AssertFatal(uid>=0 && uid<30, "gNB cannot allocate the SRS resources\n"); AssertFatal(uid>=0 && uid<30, "gNB cannot allocate the SRS resources\n");
int dl_antenna_ports = dl_antenna_ports_struct.N1 * dl_antenna_ports_struct.N2 * dl_antenna_ports_struct.XP;
uint64_t bitmap=0; uint64_t bitmap=0;
switch (servingcellconfigcommon->ssb_PositionsInBurst->present) { switch (servingcellconfigcommon->ssb_PositionsInBurst->present) {
case 1 : case 1 :
...@@ -603,7 +602,11 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -603,7 +602,11 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup1=NULL; bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup1=NULL;
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup2=NULL; bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup2=NULL;
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rbg_Size=NR_PDSCH_Config__rbg_Size_config1; bwp->bwp_Dedicated->pdsch_Config->choice.setup->rbg_Size=NR_PDSCH_Config__rbg_Size_config1;
set_dl_mcs_table(bwp->bwp_Common->genericParameters.subcarrierSpacing, uecap, secondaryCellGroup->spCellConfig, bwp->bwp_Dedicated, servingcellconfigcommon); set_dl_mcs_table(bwp->bwp_Common->genericParameters.subcarrierSpacing,
configuration->force_256qam_off ? NULL : uecap,
secondaryCellGroup->spCellConfig,
bwp->bwp_Dedicated,
servingcellconfigcommon);
bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI)); bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI));
*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1; *bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1;
bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.present = NR_PDSCH_Config__prb_BundlingType_PR_staticBundling; bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.present = NR_PDSCH_Config__prb_BundlingType_PR_staticBundling;
...@@ -768,7 +771,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -768,7 +771,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD(&srs_resset0->srs_ResourceIdList->list,srs_resset0_id); ASN_SEQUENCE_ADD(&srs_resset0->srs_ResourceIdList->list,srs_resset0_id);
srs_Config->srs_ResourceToReleaseList=NULL; srs_Config->srs_ResourceToReleaseList=NULL;
if(do_srs) { if (configuration->do_SRS) {
srs_resset0->resourceType.present = NR_SRS_ResourceSet__resourceType_PR_periodic; srs_resset0->resourceType.present = NR_SRS_ResourceSet__resourceType_PR_periodic;
srs_resset0->resourceType.choice.periodic = calloc(1,sizeof(*srs_resset0->resourceType.choice.periodic)); srs_resset0->resourceType.choice.periodic = calloc(1,sizeof(*srs_resset0->resourceType.choice.periodic));
srs_resset0->resourceType.choice.periodic->associatedCSI_RS = NULL; srs_resset0->resourceType.choice.periodic->associatedCSI_RS = NULL;
...@@ -812,7 +815,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -812,7 +815,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
srs_res0->freqHopping.b_SRS); srs_res0->freqHopping.b_SRS);
srs_res0->groupOrSequenceHopping=NR_SRS_Resource__groupOrSequenceHopping_neither; srs_res0->groupOrSequenceHopping=NR_SRS_Resource__groupOrSequenceHopping_neither;
if(do_srs) { if (configuration->do_SRS) {
srs_res0->resourceType.present= NR_SRS_Resource__resourceType_PR_periodic; srs_res0->resourceType.present= NR_SRS_Resource__resourceType_PR_periodic;
srs_res0->resourceType.choice.periodic=calloc(1,sizeof(*srs_res0->resourceType.choice.periodic)); srs_res0->resourceType.choice.periodic=calloc(1,sizeof(*srs_res0->resourceType.choice.periodic));
srs_res0->resourceType.choice.periodic->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl160; srs_res0->resourceType.choice.periodic->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl160;
...@@ -933,7 +936,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -933,7 +936,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
long *delay[8]; long *delay[8];
for (int i=0;i<8;i++) { for (int i=0;i<8;i++) {
delay[i] = calloc(1,sizeof(*delay[i])); delay[i] = calloc(1,sizeof(*delay[i]));
*delay[i] = i+minRXTXTIME; *delay[i] = i + configuration->minRXTXTIME;
ASN_SEQUENCE_ADD(&pucch_Config->dl_DataToUL_ACK->list,delay[i]); ASN_SEQUENCE_ADD(&pucch_Config->dl_DataToUL_ACK->list,delay[i]);
} }
pucch_Config->spatialRelationInfoToAddModList = calloc(1,sizeof(*pucch_Config->spatialRelationInfoToAddModList)); pucch_Config->spatialRelationInfoToAddModList = calloc(1,sizeof(*pucch_Config->spatialRelationInfoToAddModList));
...@@ -1298,10 +1301,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon ...@@ -1298,10 +1301,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
NR_RRCReconfiguration_IEs_t *reconfig, NR_RRCReconfiguration_IEs_t *reconfig,
NR_CellGroupConfig_t *secondaryCellGroup, NR_CellGroupConfig_t *secondaryCellGroup,
NR_UE_NR_Capability_t *uecap, NR_UE_NR_Capability_t *uecap,
rrc_pdsch_AntennaPorts_t dl_antenna_ports, const gNB_RrcConfigurationReq *configuration,
int minRXTXTIME,
int do_csirs,
int do_srs,
int uid) { int uid) {
AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n"); AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
AssertFatal(reconfig!=NULL,"reconfig is null\n"); AssertFatal(reconfig!=NULL,"reconfig is null\n");
...@@ -1315,10 +1315,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon ...@@ -1315,10 +1315,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
uecap, uecap,
1, 1,
1, 1,
dl_antenna_ports, configuration,
minRXTXTIME,
do_csirs,
do_srs,
uid); uid);
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup); xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
......
...@@ -69,7 +69,7 @@ gNBs = ...@@ -69,7 +69,7 @@ gNBs =
#initialDownlinkBWP #initialDownlinkBWP
#genericParameters #genericParameters
# this is RBstart=0,L=162 (275*(275-L+1))+(274-RBstart)) # this is RBstart=0,L=162 (275*(275-L+1))+(274-RBstart))
initialDLBWPlocationAndBandwidth = 31899; initialDLBWPlocationAndBandwidth = 31624;
# #
# subcarrierSpacing # subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
...@@ -103,7 +103,7 @@ gNBs = ...@@ -103,7 +103,7 @@ gNBs =
pMax = 20; pMax = 20;
#initialUplinkBWP #initialUplinkBWP
#genericParameters #genericParameters
initialULBWPlocationAndBandwidth = 31899; initialULBWPlocationAndBandwidth = 31624;
# subcarrierSpacing # subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1; initialULBWPsubcarrierSpacing = 1;
......
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