Commit f7e78c3b authored by Nick Ho's avatar Nick Ho

Provide the get_NB_IoT_SIB1, but the value of SIB1 should be checked

parent 79c80bc7
...@@ -395,16 +395,23 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -395,16 +395,23 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
asn_set_empty(&(*sib1_NB_IoT)->systemInfoValueTagList_r13->list); asn_set_empty(&(*sib1_NB_IoT)->systemInfoValueTagList_r13->list);
ASN_SEQUENCE_ADD(&(*sib1_NB_IoT)->systemInfoValueTagList_r13->list,&systemInfoValueTagSI); ASN_SEQUENCE_ADD(&(*sib1_NB_IoT)->systemInfoValueTagList_r13->list,&systemInfoValueTagSI);
// To check if the bcch message properly setting
printf("Check value :%d, should be band number\n",bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13.freqBandIndicator_r13);
#ifdef XER_PRINT //generate xml files #ifdef XER_PRINT //generate xml files
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message); xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
#endif #endif
//bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13 = **sib1_NB_IoT;
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB,
(void*)bcch_message, (void*)bcch_message,
carrier->SIB1_NB_IoT, carrier->SIB1_NB_IoT,
100); 100);
printf("In Asn.1 SIB1\n");
for(int i=0;i<32;i++)
printf("%x ",carrier->SIB1_NB_IoT[i]);
printf("\n");
if (enc_rval.encoded > 0){ if (enc_rval.encoded > 0){
LOG_F(RRC,"ASN1 message encoding failed (%s, %lu)!\n", LOG_F(RRC,"ASN1 message encoding failed (%s, %lu)!\n",
...@@ -687,6 +694,12 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -687,6 +694,12 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
(void*)bcch_message, (void*)bcch_message,
carrier->SIB23_NB_IoT, carrier->SIB23_NB_IoT,
900); 900);
printf("In Asn.1 SIB23\n");
for(int i=0;i<32;i++)
printf("%x ", carrier->SIB23_NB_IoT[i]);
printf("\n");
printf("(enc_rval.encoded+7)/8 = %d\n",(enc_rval.encoded+7)/8);
// AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", // AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
// enc_rval.failed_type->name, enc_rval.encoded); // enc_rval.failed_type->name, enc_rval.encoded);
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#include "LAYER2/MAC/defs_NB_IoT.h" #include "LAYER2/MAC/defs_NB_IoT.h"
/*NOTE: no static function should be declared in this header file (e.g. init_SI_NB)*/ /*NOTE: no static function should be declared in this header file (e.g. init_SI_NB)*/
uint8_t *get_NB_IoT_SIB1(void);
uint8_t *get_NB_IoT_MIB(void); uint8_t *get_NB_IoT_MIB(void);
void init_testing_NB_IoT(uint8_t Mod_id, int CC_id, rrc_eNB_carrier_data_NB_IoT_t *carrier, RrcConfigurationReq *configuration, uint32_t frame, uint32_t hyper_frame); void init_testing_NB_IoT(uint8_t Mod_id, int CC_id, rrc_eNB_carrier_data_NB_IoT_t *carrier, RrcConfigurationReq *configuration, uint32_t frame, uint32_t hyper_frame);
......
...@@ -125,6 +125,11 @@ uint8_t *get_NB_IoT_MIB(void) ...@@ -125,6 +125,11 @@ uint8_t *get_NB_IoT_MIB(void)
return eNB_rrc_inst_NB_IoT->carrier[0].MIB_NB_IoT; return eNB_rrc_inst_NB_IoT->carrier[0].MIB_NB_IoT;
} }
uint8_t *get_NB_IoT_SIB1(void)
{
return eNB_rrc_inst_NB_IoT->carrier[0].SIB1_NB_IoT;
}
void init_testing_NB_IoT(uint8_t Mod_id, int CC_id, rrc_eNB_carrier_data_NB_IoT_t *carrier, RrcConfigurationReq *configuration, uint32_t frame, uint32_t hyper_frame) void init_testing_NB_IoT(uint8_t Mod_id, int CC_id, rrc_eNB_carrier_data_NB_IoT_t *carrier, RrcConfigurationReq *configuration, uint32_t frame, uint32_t hyper_frame)
{ {
...@@ -187,6 +192,14 @@ void init_testing_NB_IoT(uint8_t Mod_id, int CC_id, rrc_eNB_carrier_data_NB_IoT_ ...@@ -187,6 +192,14 @@ void init_testing_NB_IoT(uint8_t Mod_id, int CC_id, rrc_eNB_carrier_data_NB_IoT_
//exit here //exit here
} }
//dump SIB1_NB_IoT
LOG_I(RRC,"Dump SIB1 NB-IoT content\n");
for(int i = 0; i<32;i++)
printf("%02X ",carrier[CC_id].SIB1_NB_IoT[i]);
printf("\n");
//SIB23_NB_IoT //SIB23_NB_IoT
carrier[CC_id].SIB23_NB_IoT = (uint8_t*) malloc16(64); carrier[CC_id].SIB23_NB_IoT = (uint8_t*) malloc16(64);
......
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