floatm_dl=0;//this is the category offset for NB1/NB2 UE category used for EARFCN evaluation (TS 36.101 ch. 5.7.3F) (for the moment we keep this value fixed)
//PROBLEM: we need to know the LTE bandwidht for In-band and Guard band operating mode in order to choose the proper PRB idex or is given at configuration time??
//The prb index allowed are the one specified in R&shwarz pag 9 NB-IoT white papaer
config_INFO->cfg->config_NB_IoT.prb_index.value=-1;// is not defined for this case (put a negative random value--> will be not considered for encoding, scrambling procedures)
cfg->nb_iot_config.prb_index.value=-1;// is not defined for this case (put a negative random value--> will be not considered for encoding, scrambling procedures)
config_INFO->cfg->config_NB_IoT.control_region_size.value=-1;//is not defined so we put a negative value
cfg->nb_iot_config.control_region_size.value=-1;//is not defined so we put a negative value
config_INFO->cfg->config_NB_IoT.assumed_crs_aps.value=-1;//is not defined so we put a negative value
cfg->nb_iot_config.assumed_crs_aps.value=-1;//is not defined so we put a negative value
break;
break;
default:
default:
LOG_E(RRC,"rrc_mac_config_req_eNB_NB_IoT: NB-IoT operating Mode (MIB-NB) not set\n");
LOG_E(RRC,"rrc_mac_config_req_eNB_NB_IoT: NB-IoT operating Mode (MIB-NB) not set\n");
break;
break;
}
}
//we shoud use dl_CarrierConfig for generating the earfcn for LTE-CAT N2 based on TS 36.101 5.7.3F
/*
* 1) takes a random number from the offset of category NB1 and NB2 based on the operating mode (we assume always the usage of anchor carrier)
* 2)evaluate the EARFCN value based on the corresponding formula
* 2)Call the PHY_config_req for trigger the NB_phy_config_mib_eNB() at the end
* 2)Call the PHY_config_req for trigger the NB_phy_config_mib_eNB() at the end
*/
*/
//XXX where allocate memory for cfg??
if(config_INFO->cfg!=NULL)LOG_E(MAC,"rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
//if(config_INFO->cfg == NULL) LOG_E(MAC, "rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
//if(cfg == NULL) LOG_E(MAC, "rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
LOG_I(MAC,"NPRACH 1 setting: NumRepetiion: %ld size of list %d\n",nprach_parameter->numRepetitionsPerPreambleAttempt_r13,radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.size);
LOG_I(MAC,"NPRACH 2 setting: NumRepetiion: %ld size of list %d\n",nprach_parameter->numRepetitionsPerPreambleAttempt_r13,radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.size);
if(config_INFO->cfg==NULL)LOG_E(MAC,"rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
if(config_INFO->cfg==NULL)LOG_E(MAC,"rrc_mac_config_req_eNB_NB_IoT: trying to configure PHY but no config.request message in config_INFO is allocated\n");
sib1_NB_IoT->cellSelectionInfo_r13.q_QualMin_r13=0;//FIXME new parameter for SIB1-NB, not present in SIB1 (for cell reselection but if not used the UE should apply the default value)
(*sib1_NB_IoT)->cellSelectionInfo_r13.q_QualMin_r13=0;//FIXME new parameter for SIB1-NB, not present in SIB1 (for cell reselection but if not used the UE should apply the default value)
schedulingInfo_NB_IoT.si_RepetitionPattern_r13=SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every2ndRF;//This Indicates the starting radio frames within the SI window used for SI message transmission.
schedulingInfo_NB_IoT[0].si_RepetitionPattern_r13=SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every2ndRF;//This Indicates the starting radio frames within the SI window used for SI message transmission.
//from ASN1 tools we have seen that sib2 + sib3 we are always below 200 bits so we use this si_TB size.
// According configuration to set the 3 CE level configuration setting, for the initial testing, only consider the CE 0, since there is only one set of parameters.