Commit a59ccb36 authored by Nick Ho's avatar Nick Ho

Fix the problem that might cause the connection issue

parent aae1ac05
...@@ -279,7 +279,14 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t ...@@ -279,7 +279,14 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
0); 0);
LOG_D(MAC,"rx_lengths : %d\n", rx_lengths[i]); LOG_D(MAC,"rx_lengths : %d\n", rx_lengths[i]);
msg4_rrc_pdu = mac_rrc_msg3_ind_NB_IoT(payload_ptr,rnti,rx_lengths[i]); msg4_rrc_pdu = mac_rrc_msg3_ind_NB_IoT(payload_ptr,rnti,rx_lengths[i]);
receive_msg3_NB_IoT(mac_inst,rnti,PHR,ul_total_buffer,first_6,msg4_rrc_pdu); if (Valid_msg3 == 1)
{
receive_msg3_NB_IoT(mac_inst,rnti,PHR,ul_total_buffer,first_6,msg4_rrc_pdu);
}else
{
LOG_E(MAC,"Not available RA here\n");
Valid_msg3 = 1;
}
LOG_I(MAC,"Contention resolution ID = %02x %02x %02x %02x %02x %02x\n",first_6[0],first_6[1],first_6[2],first_6[3],first_6[4],first_6[5]); LOG_I(MAC,"Contention resolution ID = %02x %02x %02x %02x %02x %02x\n",first_6[0],first_6[1],first_6[2],first_6[3],first_6[4],first_6[5]);
break; break;
case DCCH0_NB_IoT: case DCCH0_NB_IoT:
......
...@@ -122,4 +122,5 @@ extern int extend_alpha_offset[2]; ...@@ -122,4 +122,5 @@ extern int extend_alpha_offset[2];
extern const int si_repetition_pattern[4]; extern const int si_repetition_pattern[4];
extern int waiting_flag_from_RLC; extern int waiting_flag_from_RLC;
extern int block_RLC; extern int block_RLC;
extern int Valid_msg3;
#endif //DEF_H #endif //DEF_H
...@@ -146,6 +146,7 @@ const int si_repetition_pattern[4] = {20, 40, 80, 160}; ...@@ -146,6 +146,7 @@ const int si_repetition_pattern[4] = {20, 40, 80, 160};
int waiting_flag_from_RLC = 0; int waiting_flag_from_RLC = 0;
int block_RLC = 0; int block_RLC = 0;
int Valid_msg3 = 1;
#endif #endif
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "extern.h" #include "extern.h"
#include "extern_NB_IoT.h" #include "extern_NB_IoT.h"
#include "LAYER2/MAC/proto_NB_IoT.h" #include "LAYER2/MAC/proto_NB_IoT.h"
#include "LAYER2/MAC/extern_NB_IoT.h"
#include "RRC/LITE/MESSAGES/asn1_msg_NB_IoT.h" #include "RRC/LITE/MESSAGES/asn1_msg_NB_IoT.h"
#include "RRCConnectionRequest-NB.h" #include "RRCConnectionRequest-NB.h"
#include "UL-CCCH-Message-NB.h" #include "UL-CCCH-Message-NB.h"
...@@ -223,7 +224,10 @@ uint8_t* mac_rrc_msg3_ind_NB_IoT(uint8_t *payload_ptr, uint16_t rnti, uint32_t l ...@@ -223,7 +224,10 @@ uint8_t* mac_rrc_msg3_ind_NB_IoT(uint8_t *payload_ptr, uint16_t rnti, uint32_t l
msg4_rrc_sdu = generate_msg4_NB_IoT(&eNB_rrc_inst_NB_IoT->carrier[0]); msg4_rrc_sdu = generate_msg4_NB_IoT(&eNB_rrc_inst_NB_IoT->carrier[0]);
} }
else else
{
LOG_E(RRC,"unknown MSG3 format for NB-IoT for current test\n"); LOG_E(RRC,"unknown MSG3 format for NB-IoT for current test\n");
Valid_msg3 = 0;
}
return msg4_rrc_sdu; return msg4_rrc_sdu;
} }
......
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