Commit 164ff7f9 authored by AlanLi's avatar AlanLi

Do MIB/SIB1

parent 83ba28ea
......@@ -237,22 +237,21 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
uint32_t hyper_frame=proc->HFN;
////////////////////////////////////////////////////////////////////////////////////
/*
rrc_eNB_carrier_data_NB_IoT_t *carrier = &eNB_rrc_inst_NB_IoT->carrier[0];
if(frame%64==0 && subframe ==0)
{//printf("dooooo MIB");
do_MIB_NB_IoT(carrier,1,frame,hyper_frame);
/* for(int i = 0; i<5;i++)
printf("%02X ",eNB_rrc_inst_NB_IoT->carrier[0].MIB_NB_IoT[i]);
printf("\n");*/
}
if(frame%64==1 && subframe ==0)
{
do_SIB1_NB_IoT_x(0,0,carrier,208,92,1,3584,28,2,hyper_frame);
}
*/
/////////////////////////////////////////////////////////////////////////////////
//uint8_t *control_region_size = get_NB_IoT_SIB1_eutracontrolregionsize();
//int G=0;
......
......@@ -17,8 +17,9 @@
int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_id, uint32_t hypersfn, uint32_t frame, uint32_t subframe, uint8_t MIB_flag, uint8_t SIB1_flag, uint32_t current_time){
uint8_t MIB_size = 0;
uint8_t SIB1_size = 0, i = 0;
uint8_t *MIB_pdu = get_NB_IoT_MIB();
uint8_t *SIB1_pdu = get_NB_IoT_SIB1();
rrc_eNB_carrier_data_NB_IoT_t *carrier = &eNB_rrc_inst_NB_IoT->carrier[0];
uint8_t *MIB_pdu = get_NB_IoT_MIB(carrier,1,subframe,frame,hypersfn);
uint8_t *SIB1_pdu = get_NB_IoT_SIB1(0,0,carrier,208,92,1,3584,28,2,subframe,frame,hypersfn);
Sched_Rsp_NB_IoT_t *SCHED_info = &mac_inst->Sched_INFO;
......
......@@ -37,12 +37,26 @@
#include "LAYER2/MAC/defs_NB_IoT.h"
/*NOTE: no static function should be declared in this header file (e.g. init_SI_NB)*/
uint8_t *get_NB_IoT_MIB(void);
uint8_t *get_NB_IoT_MIB(
rrc_eNB_carrier_data_NB_IoT_t *carrier,
uint16_t N_RB_DL,//may not needed--> for NB_IoT only 1 PRB is used
uint32_t subframe,
uint32_t frame,
uint32_t hyper_frame);
uint8_t *get_NB_IoT_MIB_size(void);
uint8_t *get_NB_IoT_SIB1(void);
uint8_t *get_NB_IoT_SIB1(uint8_t Mod_id, int CC_id,
rrc_eNB_carrier_data_NB_IoT_t *carrier,
uint16_t mcc, //208
uint16_t mnc, //92
uint16_t tac, //1
uint32_t cell_identity, //3584
uint16_t band, // 7
uint16_t mnc_digit_length,
uint32_t subframe,
uint32_t frame,
uint32_t hyper_frame);
uint8_t *get_NB_IoT_SIB1_size(void);
uint8_t *get_NB_IoT_SIB23(void);
......
......@@ -119,8 +119,23 @@ extern uint16_t two_tier_hexagonal_cellIds[7];
mui_t rrc_eNB_mui = 0;
uint8_t *get_NB_IoT_MIB(void)
uint8_t *get_NB_IoT_MIB(
rrc_eNB_carrier_data_NB_IoT_t *carrier,
uint16_t N_RB_DL,//may not needed--> for NB_IoT only 1 PRB is used
uint32_t subframe,
uint32_t frame,
uint32_t hyper_frame)
{
if(frame%64==0 && subframe ==0)
{//printf("dooooo MIB");
do_MIB_NB_IoT(carrier,N_RB_DL,frame,hyper_frame);
/* for(int i = 0; i<5;i++)
printf("%02X ",eNB_rrc_inst_NB_IoT->carrier[0].MIB_NB_IoT[i]);
printf("\n");*/
}
// CC_ID=0
return eNB_rrc_inst_NB_IoT->carrier[0].MIB_NB_IoT;
}
......@@ -132,8 +147,27 @@ uint8_t *get_NB_IoT_MIB_size(void)
return eNB_rrc_inst_NB_IoT->carrier[0].sizeof_MIB_NB_IoT;
}
uint8_t *get_NB_IoT_SIB1(void)
uint8_t *get_NB_IoT_SIB1(uint8_t Mod_id, int CC_id,
rrc_eNB_carrier_data_NB_IoT_t *carrier,
uint16_t mcc, //208
uint16_t mnc, //92
uint16_t tac, //1
uint32_t cell_identity, //3584
uint16_t band, // 7
uint16_t mnc_digit_length,
uint32_t subframe,
uint32_t frame,
uint32_t hyper_frame)
{
if(frame%64==1 && subframe ==0)
{
do_SIB1_NB_IoT_x(Mod_id,CC_id,carrier,mcc,mnc,tac,cell_identity,band,mnc_digit_length,hyper_frame);
}
return eNB_rrc_inst_NB_IoT->carrier[0].SIB1_NB_IoT;
}
......
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