Commit 9b7367c0 authored by Raphael Defosseux's avatar Raphael Defosseux

Adding a parameter in configuration file to enable RRC Inactivity timers

  -- rrc_inactivity_threshold in seconds
Adding support in CI to test it
  -- disable/enable data service on UEs
  -- no automatic check yet on the UE status
     certainly should be done w/ a Flexran controller command
Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent b56aef4f
......@@ -18,6 +18,9 @@ eNBs =
tr_s_preference = "local_mac"
// In seconds
rrc_inactivity_threshold = 30;
////////// Physical parameters:
component_carriers = (
......
......@@ -509,6 +509,9 @@ class SSHConnection():
logging.debug('send adb commands')
try:
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
# enable data service
self.command('stdbuf -o0 adb -s ' + device_id + ' shell svc data enable', '\$', 60)
# The following commands are deprecated since we no longer work on Android 7+
# self.command('stdbuf -o0 adb -s ' + device_id + ' shell settings put global airplane_mode_on 1', '\$', 10)
# self.command('stdbuf -o0 adb -s ' + device_id + ' shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true', '\$', 60)
......@@ -963,6 +966,54 @@ class SSHConnection():
job.join()
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
def DataDisableUE_common(self, device_id):
try:
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
# enable data service
self.command('stdbuf -o0 adb -s ' + device_id + ' shell svc data disable', '\$', 60)
logging.debug('\u001B[1mUE (' + device_id + ') Disabled Data Service\u001B[0m')
self.close()
except:
os.kill(os.getppid(),signal.SIGUSR1)
def DataDisableUE(self):
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
Usage()
sys.exit('Insufficient Parameter')
multi_jobs = []
for device_id in self.UEDevices:
p = Process(target = self.DataDisableUE_common, args = (device_id,))
p.daemon = True
p.start()
multi_jobs.append(p)
for job in multi_jobs:
job.join()
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
def DataEnableUE_common(self, device_id):
try:
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
# enable data service
self.command('stdbuf -o0 adb -s ' + device_id + ' shell svc data enable', '\$', 60)
logging.debug('\u001B[1mUE (' + device_id + ') Enabled Data Service\u001B[0m')
self.close()
except:
os.kill(os.getppid(),signal.SIGUSR1)
def DataEnableUE(self):
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
Usage()
sys.exit('Insufficient Parameter')
multi_jobs = []
for device_id in self.UEDevices:
p = Process(target = self.DataEnableUE_common, args = (device_id,))
p.daemon = True
p.start()
multi_jobs.append(p)
for job in multi_jobs:
job.join()
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
def GetAllUEDevices(self, terminate_ue_flag):
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
Usage()
......@@ -989,6 +1040,68 @@ class SSHConnection():
sys.exit(1)
self.close()
def CheckUEStatus_common(self, lock, device_id, statusQueue):
try:
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
lock.acquire()
logging.debug('\u001B[1;37;44m Status Check (' + str(device_id) + ') \u001B[0m')
#logging.debug('\u001B[1;34m ' + pal_msg + '\u001B[0m')
#logging.debug('\u001B[1;34m ' + min_msg + '\u001B[0m')
#logging.debug('\u001B[1;34m ' + avg_msg + '\u001B[0m')
#logging.debug('\u001B[1;34m ' + max_msg + '\u001B[0m')
statusQueue.put(0)
statusQueue.put(device_id)
statusQueue.put('Nothing for the moment')
lock.release()
self.close()
except:
os.kill(os.getppid(),signal.SIGUSR1)
def CheckStatusUE(self):
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
Usage()
sys.exit('Insufficient Parameter')
initialize_eNB_flag = False
pStatus = self.CheckProcessExist(initialize_eNB_flag)
if (pStatus < 0):
self.CreateHtmlTestRow('N/A', 'KO', pStatus)
self.CreateHtmlTabFooter(False)
sys.exit(1)
multi_jobs = []
lock = Lock()
status_queue = SimpleQueue()
for device_id in self.UEDevices:
p = Process(target = self.CheckUEStatus_common, args = (lock,device_id,status_queue,))
p.daemon = True
p.start()
multi_jobs.append(p)
for job in multi_jobs:
job.join()
if (status_queue.empty()):
self.CreateHtmlTestRow('N/A', 'KO', ALL_PROCESSES_OK)
self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
else:
check_status = True
html_queue = SimpleQueue()
while (not status_queue.empty()):
count = status_queue.get()
if (count < 0):
check_status = False
device_id = status_queue.get()
message = status_queue.get()
html_cell = '<pre style="background-color:white">UE (' + device_id + ')\n' + message + '</pre>'
html_queue.put(html_cell)
if (check_status):
self.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue)
else:
self.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
def GetAllUEIPAddresses(self):
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
Usage()
......@@ -1795,7 +1908,7 @@ class SSHConnection():
result = re.search('LTE_RRCConnectionSetupComplete from UE', str(line))
if result is not None:
rrcSetupComplete += 1
result = re.search('Generate LTE_RRCConnectionRelease', str(line))
result = re.search('Generate LTE_RRCConnectionRelease|Generate RRCConnectionRelease', str(line))
if result is not None:
rrcReleaseRequest += 1
result = re.search('Generate LTE_RRCConnectionReconfiguration', str(line))
......@@ -2006,6 +2119,7 @@ class SSHConnection():
def TerminateUE_common(self, device_id):
try:
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
# back in airplane mode on (ie radio off)
self.command('stdbuf -o0 adb -s ' + device_id + ' shell /data/local/tmp/off', '\$', 60)
logging.debug('\u001B[1mUE (' + device_id + ') Detach Completed\u001B[0m')
......@@ -2493,7 +2607,7 @@ def Usage():
print('------------------------------------------------------------')
def CheckClassValidity(action,id):
if action != 'Build_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep':
if action != 'Build_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'DataDisable_UE' and action != 'DataEnable_UE' and action != 'CheckStatusUE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep':
logging.debug('ERROR: test-case ' + id + ' has wrong class ' + action)
return False
return True
......@@ -2793,7 +2907,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE):
continue
SSH.ShowTestID()
GetParametersFromXML(action)
if action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Ping' or action == 'Iperf' or action == 'Reboot_UE':
if action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Ping' or action == 'Iperf' or action == 'Reboot_UE' or action == 'DataDisable_UE' or action == 'DataEnable_UE' or action == 'CheckStatusUE':
terminate_ue_flag = False
SSH.GetAllUEDevices(terminate_ue_flag)
if action == 'Build_eNB':
......@@ -2810,6 +2924,12 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE):
SSH.AttachUE()
elif action == 'Detach_UE':
SSH.DetachUE()
elif action == 'DataDisable_UE':
SSH.DataDisableUE()
elif action == 'DataEnable_UE':
SSH.DataEnableUE()
elif action == 'CheckStatusUE':
SSH.CheckStatusUE()
elif action == 'Initialize_CatM_module':
SSH.InitializeCatM()
elif action == 'Terminate_CatM_module':
......
......@@ -26,10 +26,32 @@
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
040101
030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201
030101 040301 040501 000010 040302 000001 000011 040303 000002 040502 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Waiting for 35 seconds</desc>
<idle_sleep_time_in_sec>35</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Waiting for 5 seconds</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="000010">
<class>CheckStatusUE</class>
<desc>Check UE(s) status before data disabling</desc>
</testCase>
<testCase id="000011">
<class>CheckStatusUE</class>
<desc>Check UE(s) status after data disabling</desc>
</testCase>
<testCase id="030101">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
......@@ -61,6 +83,16 @@
<desc>Detach UE</desc>
</testCase>
<testCase id="040302">
<class>DataDisable_UE</class>
<desc>Disabling Data Service on UE</desc>
</testCase>
<testCase id="040303">
<class>DataEnable_UE</class>
<desc>Enabling Data Service on UE</desc>
</testCase>
<testCase id="040501">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
......@@ -68,6 +100,13 @@
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040502">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040603">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)</desc>
......
......@@ -54,7 +54,7 @@
#include "RRC_config_tools.h"
#include "enb_paramdef.h"
#define RRC_INACTIVITY_THRESH 0
//#define RRC_INACTIVITY_THRESH 0
extern uint16_t sf_ahead;
extern void set_parallel_conf(char *parallel_conf);
......@@ -428,7 +428,9 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I)
PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]);
RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = RRC_INACTIVITY_THRESH; // set to 0 to deactivate
//RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = RRC_INACTIVITY_THRESH; // set to 0 to deactivate
// In the configuration file it is in seconds. For RRC it has to be in milliseconds
RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = (*ENBParamList.paramarray[i][ENB_RRC_INACTIVITY_THRES_IDX].uptr) * 1000;
RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id;
RRC_CONFIGURATION_REQ (msg_p).tac = *ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].uptr;
AssertFatal(!ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr
......
......@@ -197,6 +197,7 @@ typedef enum {
#define ENB_CONFIG_STRING_REMOTE_S_PORTC "remote_s_portc"
#define ENB_CONFIG_STRING_LOCAL_S_PORTD "local_s_portd"
#define ENB_CONFIG_STRING_REMOTE_S_PORTD "remote_s_portd"
#define ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD "rrc_inactivity_threshold"
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
/* cell configuration parameters */
......@@ -217,6 +218,7 @@ typedef enum {
{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
}
#define ENB_ENB_ID_IDX 0
#define ENB_CELL_TYPE_IDX 1
......@@ -232,6 +234,8 @@ typedef enum {
#define ENB_REMOTE_S_PORTC_IDX 11
#define ENB_LOCAL_S_PORTD_IDX 12
#define ENB_REMOTE_S_PORTD_IDX 13
#define ENB_RRC_INACTIVITY_THRES_IDX 14
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
#define ENBPARAMS_CHECK { \
......@@ -249,6 +253,7 @@ typedef enum {
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
......
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