Commit a442876b authored by Navid Nikaein's avatar Navid Nikaein

* add RA procedures for handover, SR, and other DCCH messaging. Status: experimental

* fixed few issues in the testing scripts
* pre-ci passed 


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4334 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e8230f27
...@@ -316,7 +316,8 @@ int rrc_mac_config_req(u8 Mod_id,u8 eNB_flag,u8 UE_id,u8 eNB_index, ...@@ -316,7 +316,8 @@ int rrc_mac_config_req(u8 Mod_id,u8 eNB_flag,u8 UE_id,u8 eNB_index,
(void *)mobilityControlInfo->radioResourceConfigCommon.ul_CyclicPrefixLength, (void *)mobilityControlInfo->radioResourceConfigCommon.ul_CyclicPrefixLength,
sizeof(UL_CyclicPrefixLength_t)); sizeof(UL_CyclicPrefixLength_t));
} }
// store the previous rnti in case of failure, and set thenew rnti
UE_mac_inst[Mod_id].crnti_before_ho = UE_mac_inst[Mod_id].crnti;
UE_mac_inst[Mod_id].crnti = ((mobilityControlInfo->newUE_Identity.buf[0])|(mobilityControlInfo->newUE_Identity.buf[1]<<8)); UE_mac_inst[Mod_id].crnti = ((mobilityControlInfo->newUE_Identity.buf[0])|(mobilityControlInfo->newUE_Identity.buf[1]<<8));
LOG_I(MAC,"[UE %d] Received new identity %x from %d\n", Mod_id, UE_mac_inst[Mod_id].crnti, eNB_index); LOG_I(MAC,"[UE %d] Received new identity %x from %d\n", Mod_id, UE_mac_inst[Mod_id].crnti, eNB_index);
UE_mac_inst[Mod_id].rach_ConfigDedicated = malloc(sizeof(*mobilityControlInfo->rach_ConfigDedicated)); UE_mac_inst[Mod_id].rach_ConfigDedicated = malloc(sizeof(*mobilityControlInfo->rach_ConfigDedicated));
......
...@@ -711,6 +711,8 @@ typedef struct{ ...@@ -711,6 +711,8 @@ typedef struct{
u32 subframe; u32 subframe;
/// C-RNTI of UE /// C-RNTI of UE
u16 crnti; u16 crnti;
/// C-RNTI of UE before HO
uint16_t crnti_before_ho; ///user id (rnti) of connected UEs
/// uplink active flag /// uplink active flag
uint8_t ul_active; uint8_t ul_active;
/// pointer to RRC PHY configuration /// pointer to RRC PHY configuration
......
...@@ -227,7 +227,13 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){ ...@@ -227,7 +227,13 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){
u16 Size16; u16 Size16;
struct RACH_ConfigCommon *rach_ConfigCommon = (struct RACH_ConfigCommon *)NULL; struct RACH_ConfigCommon *rach_ConfigCommon = (struct RACH_ConfigCommon *)NULL;
s32 frame_diff=0; s32 frame_diff=0;
mac_rlc_status_resp_t rlc_status;
u8 dcch_header_len=0;
u8 dcch_header_len_tmp=0;
u16 sdu_lengths[8];
u8 sdu_lcids[8],payload_offset=0,num_sdus=0;
u8 ulsch_buff[MAX_ULSCH_PAYLOAD_BYTES];
u16 sdu_length_total=0;
if (UE_mode == PRACH) { if (UE_mode == PRACH) {
if (UE_mac_inst[Mod_id].radioResourceConfigCommon) if (UE_mac_inst[Mod_id].radioResourceConfigCommon)
...@@ -254,11 +260,9 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){ ...@@ -254,11 +260,9 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){
if (Size>0) { if (Size>0) {
UE_mac_inst[Mod_id].RA_active = 1; UE_mac_inst[Mod_id].RA_active = 1;
UE_mac_inst[Mod_id].RA_PREAMBLE_TRANSMISSION_COUNTER = 1; UE_mac_inst[Mod_id].RA_PREAMBLE_TRANSMISSION_COUNTER = 1;
UE_mac_inst[Mod_id].RA_Msg3_size = Size+sizeof(SCH_SUBHEADER_SHORT)+sizeof(SCH_SUBHEADER_SHORT); UE_mac_inst[Mod_id].RA_Msg3_size = Size+sizeof(SCH_SUBHEADER_SHORT)+sizeof(SCH_SUBHEADER_SHORT);
UE_mac_inst[Mod_id].RA_prachMaskIndex = 0; UE_mac_inst[Mod_id].RA_prachMaskIndex = 0;
UE_mac_inst[Mod_id].RA_prach_resources.Msg3 = UE_mac_inst[Mod_id].CCCH_pdu.payload; UE_mac_inst[Mod_id].RA_prach_resources.Msg3 = UE_mac_inst[Mod_id].CCCH_pdu.payload;
UE_mac_inst[Mod_id].RA_backoff_cnt = 0; // add the backoff condition here if we have it from a previous RA reponse which failed (i.e. backoff indicator) UE_mac_inst[Mod_id].RA_backoff_cnt = 0; // add the backoff condition here if we have it from a previous RA reponse which failed (i.e. backoff indicator)
...@@ -289,6 +293,65 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){ ...@@ -289,6 +293,65 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){
NULL, // short bsr NULL, // short bsr
NULL, // long_bsr NULL, // long_bsr
1); //post_padding 1); //post_padding
return(&UE_mac_inst[Mod_id].RA_prach_resources);
}
else if (UE_mac_inst[Mod_id].scheduling_info.BSR_bytes[DCCH] > 0) {
// This is for triggering a transmission on DCCH using PRACH (during handover, or sending SR for example)
dcch_header_len = 2 + 2; /// SHORT Subheader + C-RNTI control element
rlc_status = mac_rlc_status_ind(Mod_id+NB_eNB_INST,frame,0,RLC_MBMS_NO,
DCCH,
6);
if (UE_mac_inst[Mod_id].crnti_before_ho)
LOG_D(MAC,"[UE %d] Frame %d : UL-DCCH -> ULSCH, HO RRCConnectionReconfigurationComplete (%x, %x), RRC message has %d bytes to send throug PRACH (mac header len %d)\n",
Mod_id,frame, UE_mac_inst[Mod_id].crnti,UE_mac_inst[Mod_id].crnti_before_ho, rlc_status.bytes_in_buffer,dcch_header_len);
else
LOG_D(MAC,"[UE %d] Frame %d : UL-DCCH -> ULSCH, RRC message has %d bytes to send through PRACH(mac header len %d)\n",
Mod_id,frame, rlc_status.bytes_in_buffer,dcch_header_len);
sdu_lengths[0] = mac_rlc_data_req(Mod_id+NB_eNB_INST,frame,RLC_MBMS_NO,
DCCH,
(char *)&ulsch_buff[0]);
sdu_length_total = sdu_lengths[0];
sdu_lcids[0] = DCCH;
LOG_D(MAC,"[UE %d] TX Got %d bytes for DCCH\n",Mod_id,sdu_lengths[0]);
num_sdus = 1;
update_bsr(Mod_id, frame, DCCH,UE_mac_inst[Mod_id].scheduling_info.LCGID[DCCH]);
//header_len +=2;
UE_mac_inst[Mod_id].RA_active = 1;
UE_mac_inst[Mod_id].RA_PREAMBLE_TRANSMISSION_COUNTER = 1;
UE_mac_inst[Mod_id].RA_Msg3_size = Size+dcch_header_len;
UE_mac_inst[Mod_id].RA_prachMaskIndex = 0;
UE_mac_inst[Mod_id].RA_prach_resources.Msg3 = ulsch_buff;
UE_mac_inst[Mod_id].RA_backoff_cnt = 0; // add the backoff condition here if we have it from a previous RA reponse which failed (i.e. backoff indicator)
if (rach_ConfigCommon) {
UE_mac_inst[Mod_id].RA_window_cnt = 2+ rach_ConfigCommon->ra_SupervisionInfo.ra_ResponseWindowSize;
if (UE_mac_inst[Mod_id].RA_window_cnt == 9)
UE_mac_inst[Mod_id].RA_window_cnt = 10; // Note: 9 subframe window doesn't exist, after 8 is 10!
}
else {
LOG_D(MAC,"[UE %d] FATAL Frame %d: rach_ConfigCommon is NULL !!!\n",Mod_id,frame);
mac_xface->macphy_exit("");
}
UE_mac_inst[Mod_id].RA_tx_frame = frame;
UE_mac_inst[Mod_id].RA_tx_subframe = subframe;
UE_mac_inst[Mod_id].RA_backoff_frame = frame;
UE_mac_inst[Mod_id].RA_backoff_subframe = subframe;
// Fill in preamble and PRACH resource
get_prach_resources(Mod_id,eNB_index,subframe,1,NULL);
generate_ulsch_header((u8*)ulsch_buff, // mac header
1, // num sdus
0, // short pading
&Size16, // sdu length
&lcid, // sdu lcid
NULL, // power headroom
&UE_mac_inst[Mod_id].crnti, // crnti
NULL, // truncated bsr
NULL, // short bsr
NULL, // long_bsr
0); //post_padding
return(&UE_mac_inst[Mod_id].RA_prach_resources); return(&UE_mac_inst[Mod_id].RA_prach_resources);
} }
......
...@@ -1366,7 +1366,7 @@ UE_L2_STATE_t ue_scheduler(u8 Mod_id,u32 frame, u8 subframe, lte_subframe_t dire ...@@ -1366,7 +1366,7 @@ UE_L2_STATE_t ue_scheduler(u8 Mod_id,u32 frame, u8 subframe, lte_subframe_t dire
LOG_E(MAC,"RRC Loss of synch, returning PHY_RESYNCH\n"); LOG_E(MAC,"RRC Loss of synch, returning PHY_RESYNCH\n");
return(PHY_RESYNCH); return(PHY_RESYNCH);
case RRC_Handover_failed: case RRC_Handover_failed:
LOG_D(MAC,"Handover failure for UE %d eNB_index %d\n",Mod_id,eNB_index); LOG_N(MAC,"Handover failure for UE %d eNB_index %d\n",Mod_id,eNB_index);
//Invalid...need to add another MAC UE state for re-connection procedure //Invalid...need to add another MAC UE state for re-connection procedure
mac_xface->phy_config_afterHO_ue(Mod_id,eNB_index,(MobilityControlInfo_t *)NULL,1); mac_xface->phy_config_afterHO_ue(Mod_id,eNB_index,(MobilityControlInfo_t *)NULL,1);
//return(3); //return(3);
...@@ -1388,7 +1388,7 @@ UE_L2_STATE_t ue_scheduler(u8 Mod_id,u32 frame, u8 subframe, lte_subframe_t dire ...@@ -1388,7 +1388,7 @@ UE_L2_STATE_t ue_scheduler(u8 Mod_id,u32 frame, u8 subframe, lte_subframe_t dire
LOG_E(MAC,"FATAL: radioResourceConfigCommon is NULL!!!\n"); LOG_E(MAC,"FATAL: radioResourceConfigCommon is NULL!!!\n");
mac_xface->macphy_exit(""); mac_xface->macphy_exit("");
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_OUT); vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_OUT);
return(RRC_OK); // RRC_OK ??? return(RRC_OK);
} }
LOG_I(MAC,"Frame %d: Contention resolution timer %d/%d\n",frame,UE_mac_inst[Mod_id].RA_contention_resolution_cnt, LOG_I(MAC,"Frame %d: Contention resolution timer %d/%d\n",frame,UE_mac_inst[Mod_id].RA_contention_resolution_cnt,
......
...@@ -205,6 +205,9 @@ emul_rt: ...@@ -205,6 +205,9 @@ emul_rt:
clean: clean:
(cd NAS/DRIVER/MESH && $(MAKE) clean) (cd NAS/DRIVER/MESH && $(MAKE) clean)
(cd NAS/DRIVER/LITE && $(MAKE) clean)
rm -rf NAS/DRIVER/MESH/RB_TOOL/rb_tool
rm -rf NAS/DRIVER/LITE/RB_TOOL/rb_tool
cleanall: cleanall:
find -name *.o -delete -print find -name *.o -delete -print
......
...@@ -15,7 +15,7 @@ First, you must have all four openair SW directories, openair1, openair2, openai ...@@ -15,7 +15,7 @@ First, you must have all four openair SW directories, openair1, openair2, openai
1. The following packages must be available on your system: 1. The following packages must be available on your system:
- libblas and libblas-dev - libblas and libblas-dev
- libxml2 and libxml2-dev - libxml2 and libxml2-dev and gccxml
- libforms-bin libforms-dev - libforms-bin libforms-dev
- libatlas-base-dev and libatlas-headers (for Ubuntu 11.04, libatlas-dev instead of libatlas-headers) - libatlas-base-dev and libatlas-headers (for Ubuntu 11.04, libatlas-dev instead of libatlas-headers)
- asn1c and the LTE ASN1 files (for more information on how to install this and generate the required files see the README file in openair2/RRC/LITE/MESSAGES) - asn1c and the LTE ASN1 files (for more information on how to install this and generate the required files see the README file in openair2/RRC/LITE/MESSAGES)
......
...@@ -407,14 +407,15 @@ oaisimCROWN: $(OBJ) $(ASN1_MSG_OBJS1) oaisimCROWN.c ...@@ -407,14 +407,15 @@ oaisimCROWN: $(OBJ) $(ASN1_MSG_OBJS1) oaisimCROWN.c
@echo "Compiling oaisimCROWN.c ..." @echo "Compiling oaisimCROWN.c ..."
@$(CC) oaisimCROWN.c -I$(TOP_DIR) $(L2_incl) $(UTIL_incl) $(UTILS_incl) -I$(ASN1_MSG_INC) $(S1AP_Incl) -o oaisimCROWN $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(ASN1_MSG_OBJS1) -lm -lblas -lpthread -llapack_atlas -lforms -lxml2 -lX11 -lXpm -lrt @$(CC) oaisimCROWN.c -I$(TOP_DIR) $(L2_incl) $(UTIL_incl) $(UTILS_incl) -I$(ASN1_MSG_INC) $(S1AP_Incl) -o oaisimCROWN $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(ASN1_MSG_OBJS1) -lm -lblas -lpthread -llapack_atlas -lforms -lxml2 -lX11 -lXpm -lrt
test_nasmesh_fix: nasmesh_fix:
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE)) (cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE))
(cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink_address_fix.ko) (cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink_address_fix.ko)
(cp $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko . ) (cp $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko . )
nasmesh_fix: nasmesh_fix_install:
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE)) (cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE))
(cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink_address_fix.ko) (cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink_address_fix.ko)
(sudo insmod $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko) (sudo insmod $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko)
(cp $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko . )
nasmesh_nl: nasmesh_nl:
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE)) (cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE))
(cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink.ko) (cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink.ko)
...@@ -425,7 +426,8 @@ rb_tool: ...@@ -425,7 +426,8 @@ rb_tool:
nasmesh_install: nasmesh_install:
(sudo rmmod nasmesh) (sudo rmmod nasmesh)
(sudo insmod $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko) (sudo insmod $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko)
nasmesh_clean:
(cd $(OPENAIR2_DIR) && $(MAKE) clean)
nas_sim_mt_cellular: nas_sim_mt_cellular:
( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make nasmt_sim CELLULAR=1 NO_RRM=1) ( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make nasmt_sim CELLULAR=1 NO_RRM=1)
......
...@@ -416,7 +416,7 @@ void check_and_adjust_params() { ...@@ -416,7 +416,7 @@ void check_and_adjust_params() {
LOG_I(EMU,"[INIT] Starting NAS netlink interface\n"); LOG_I(EMU,"[INIT] Starting NAS netlink interface\n");
ret = netlink_init(); ret = netlink_init();
if (ret < 0) if (ret < 0)
LOG_E(EMU,"[INIT] Netlink not available, careful ...\n"); LOG_W(EMU,"[INIT] Netlink not available, careful ...\n");
if (ethernet_flag == 1) { if (ethernet_flag == 1) {
oai_emulation.info.master[oai_emulation.info.master_id].nb_ue = oai_emulation.info.nb_ue_local + oai_emulation.info.nb_rn_local; oai_emulation.info.master[oai_emulation.info.master_id].nb_ue = oai_emulation.info.nb_ue_local + oai_emulation.info.nb_rn_local;
......
...@@ -38,14 +38,14 @@ import log ...@@ -38,14 +38,14 @@ import log
import openair import openair
import core import core
makerr1 = 'make: ***' makerr1 = '***'
makerr2 = 'Error 1' makerr2 = 'Error 1'
def execute(oai, user, pw, logfile): def execute(oai, user, pw, logfile):
case = '01' case = '01'
oai.send('cd $OPENAIR_TARGETS;') oai.send('cd $OPENAIR_TARGETS;')
try: try:
test = '00' test = '00'
name = 'Check oai.svn.add' name = 'Check oai.svn.add'
...@@ -64,7 +64,7 @@ def execute(oai, user, pw, logfile): ...@@ -64,7 +64,7 @@ def execute(oai, user, pw, logfile):
log.ok(case, test, name, conf, '', logfile) log.ok(case, test, name, conf, '', logfile)
oai.send('cd SIMU/USER;') oai.send('cd SIMU/USER;')
try: try:
test = '01' test = '01'
name = 'Compile oai.rel8.make' name = 'Compile oai.rel8.make'
...@@ -88,15 +88,10 @@ def execute(oai, user, pw, logfile): ...@@ -88,15 +88,10 @@ def execute(oai, user, pw, logfile):
oai.send('make cleanall;') oai.send('make cleanall;')
oai.send('rm -f ./oaisim.rel8.nas;') oai.send('rm -f ./oaisim.rel8.nas;')
oai.send('rm -f ./nasmesh;') oai.send('rm -f ./nasmesh;')
oai.send('make nasmesh_clean;')
oai.send_expect_false('make nasmesh_fix;', makerr1, 60)
oai.send_expect_false('make NAS=1 -j4;', makerr1, 1500) oai.send_expect_false('make NAS=1 -j4;', makerr1, 1500)
oai.send('cp ./oaisim ./oaisim.rel8.nas;') oai.send('cp ./oaisim ./oaisim.rel8.nas;')
if user == 'root' :
oai.send_nowait('rmmod nasmesh;')
oai.send_expect_false('make nasmesh_fix;', makerr1, 60)
else :
oai.send_nowait('echo '+pw+ ' | sudo -S rmmod nasmesh;')
oai.send_expect_false('make test_nasmesh_fix;', makerr1, 60)
oai.send_nowait('echo '+pw+ ' | sudo -S insmod ./nasmesh.ko;')
except log.err, e: except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile) log.fail(case, test, name, conf, e.value, diag, logfile)
...@@ -183,8 +178,10 @@ def execute(oai, user, pw, logfile): ...@@ -183,8 +178,10 @@ def execute(oai, user, pw, logfile):
#oai.send('cp ./oaisim ./oaisim.rel8.cellular.rg;') #oai.send('cp ./oaisim ./oaisim.rel8.cellular.rg;')
#except log.err, e: #except log.err, e:
#log.fail(case, test, name, conf, e.value, diag, logfile) #log.fail(case, test, name, conf, e.value, diag, logfile)
#log.skip(case, test, name, conf, '', '', logfile)
#else: #else:
#log.ok(case, test, name, conf, '', logfile) #log.ok(case, test, name, conf, '', logfile)
#log.skip(case, test, name, conf, '', '', logfile)
#try: #try:
#test = '08' #test = '08'
...@@ -199,12 +196,14 @@ def execute(oai, user, pw, logfile): ...@@ -199,12 +196,14 @@ def execute(oai, user, pw, logfile):
#oai.send('cp ./oaisim ./oaisim.rel8.cellular.mt;') #oai.send('cp ./oaisim ./oaisim.rel8.cellular.mt;')
#except log.err, e: #except log.err, e:
#log.fail(case, test, name, conf, e.value, diag, logfile) #log.fail(case, test, name, conf, e.value, diag, logfile)
#log.skip(case, test, name, conf, '', '', logfile)
#else: #else:
#log.ok(case, test, name, conf, '', logfile) #log.ok(case, test, name, conf, '', logfile)
#log.skip(case, test, name, conf, '', '', logfile)
#try: #try:
#test = '09' #test = '09'
#name = 'Compile nas_sim_rg_cellular' #name = 'Compile oai.rel8.cellular.nas.eNB'
#conf = 'make nas_sim_rg_cellular' #conf = 'make nas_sim_rg_cellular'
#diag = 'check the compilation errors for NAS SIM RRC Cellular (node RG)' #diag = 'check the compilation errors for NAS SIM RRC Cellular (node RG)'
#oai.send('make clean;') #oai.send('make clean;')
...@@ -215,12 +214,14 @@ def execute(oai, user, pw, logfile): ...@@ -215,12 +214,14 @@ def execute(oai, user, pw, logfile):
#oai.send_expect_false('make nas_sim_rg_cellular -j4;', makerr1, 1500) #oai.send_expect_false('make nas_sim_rg_cellular -j4;', makerr1, 1500)
#except log.err, e: #except log.err, e:
#log.fail(case, test, name, conf, e.value, diag, logfile) #log.fail(case, test, name, conf, e.value, diag, logfile)
#log.skip(case, test, name, conf, '', '', logfile)
#else: #else:
#log.ok(case, test, name, conf, '', logfile) #log.ok(case, test, name, conf, '', logfile)
#log.skip(case, test, name, conf, '', '', logfile)
#try: #try:
#test = '10' #test = '10'
#name = 'Compile nas_sim_mt_cellular' #name = 'Compile oai.rel8.cellular.nas.UE'
#conf = 'make nas_sim_mt_cellular' #conf = 'make nas_sim_mt_cellular'
#diag = 'check the compilation errors for NAS SIM RRC Cellular (node MT)' #diag = 'check the compilation errors for NAS SIM RRC Cellular (node MT)'
#oai.send('make clean;') #oai.send('make clean;')
...@@ -231,9 +232,11 @@ def execute(oai, user, pw, logfile): ...@@ -231,9 +232,11 @@ def execute(oai, user, pw, logfile):
#oai.send_expect_false('make nas_sim_mt_cellular -j4;', makerr1, 1500) #oai.send_expect_false('make nas_sim_mt_cellular -j4;', makerr1, 1500)
#except log.err, e: #except log.err, e:
#log.fail(case, test, name, conf, e.value, diag, logfile) #log.fail(case, test, name, conf, e.value, diag, logfile)
#log.skip(case, test, name, conf, '', '', logfile)
#else: #else:
#log.ok(case, test, name, conf, '', logfile) #log.ok(case, test, name, conf, '', logfile)
#log.skip(case, test, name, conf, '', '', logfile)
try: try:
test = '11' test = '11'
name = 'Compile oai.rel8.itti.make' name = 'Compile oai.rel8.itti.make'
......
...@@ -93,6 +93,7 @@ def execute(oai, user, pw, logfile): ...@@ -93,6 +93,7 @@ def execute(oai, user, pw, logfile):
test = '03' test = '03'
name = 'Run oai.rel8.abs.ping' name = 'Run oai.rel8.abs.ping'
diag = 'Data-plane is not working normally, check the OAI protocol stack, OAI driver, and normal operation of the OS' diag = 'Data-plane is not working normally, check the OAI protocol stack, OAI driver, and normal operation of the OS'
oai.driver(oai,user,pw)
for i in range(NUM_UE) : for i in range(NUM_UE) :
for j in range(NUM_eNB) : for j in range(NUM_eNB) :
conf = '-a -A AWGN -u' + str(i+1) +' -b'+ str(j+1) conf = '-a -A AWGN -u' + str(i+1) +' -b'+ str(j+1)
...@@ -111,6 +112,8 @@ def execute(oai, user, pw, logfile): ...@@ -111,6 +112,8 @@ def execute(oai, user, pw, logfile):
oai.send_nowait('echo '+pw+ ' | sudo -S pkill oaisim.rel8.nas;') oai.send_nowait('echo '+pw+ ' | sudo -S pkill oaisim.rel8.nas;')
time.sleep(1) time.sleep(1)
oai.send_nowait('echo '+pw+ ' | sudo -S pkill oaisim.rel8.nas;') oai.send_nowait('echo '+pw+ ' | sudo -S pkill oaisim.rel8.nas;')
oai.rm_driver(oai,user,pw)
except log.err, e: except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile) log.fail(case, test, name, conf, e.value, diag, logfile)
......
...@@ -121,4 +121,27 @@ class openair(core): ...@@ -121,4 +121,27 @@ class openair(core):
except Error, val: except Error, val:
print "Error:", val print "Error:", val
def rm_driver(self,oai,user, pw):
try:
if user == 'root' :
#oai.send_nowait('rmmod nasmesh;')
os.system('rmmod nasmesh;')
else :
#oai.send_nowait('echo '+pw+ ' | sudo -S rmmod nasmesh;')
os.system('echo '+pw+ ' | sudo -S rmmod nasmesh;')
except Error, val:
print "Error removing oai network driver module:", val
def driver(self,oai,user,pw):
pwd = oai.send_recv('pwd')
oai.send('cd $OPENAIR_TARGETS;')
oai.send('cd SIMU/USER;')
try:
if user == 'root' :
oai.send_nowait('insmod ./nasmesh.ko;')
else :
oai.send_nowait('echo '+pw+ ' | sudo -S insmod ./nasmesh.ko;')
oai.send_nowait('cd '+ pwd)
except Error, val:
print "Error inserting oai network driver module:", val
...@@ -103,12 +103,15 @@ log.writefile(logfile,'====================start'+test+' at ' + ctime + '======= ...@@ -103,12 +103,15 @@ log.writefile(logfile,'====================start'+test+' at ' + ctime + '=======
log.set_debug_level(debug) log.set_debug_level(debug)
oai.kill(user, pw) oai.kill(user, pw)
oai.rm_driver(oai,user,pw)
# start te test cases # start te test cases
case01.execute(oai, user, pw, logfile) case01.execute(oai, user, pw, logfile)
case02.execute(oai, user, pw, logfile) case02.execute(oai, user, pw, logfile)
case03.execute(oai, user, pw, logfile) case03.execute(oai, user, pw, logfile)
oai.kill(user, pw) oai.kill(user, pw)
oai.rm_driver(oai,user,pw)
# perform the stats # perform the stats
log.statistics(logfile) log.statistics(logfile)
......
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