Commit a504d7b2 authored by Raymond Knopp's avatar Raymond Knopp

correction for frame encoding in MIB-SL

parent bc85cb19
...@@ -118,7 +118,7 @@ mac_rrc_data_req_ue( ...@@ -118,7 +118,7 @@ mac_rrc_data_req_ue(
else if (Srb_idP == MIBCH) { else if (Srb_idP == MIBCH) {
int Ret_size = do_MIB_SL(&ctxt,eNB_indexP,frameP,0); int Ret_size = do_MIB_SL(&ctxt,eNB_indexP,frameP,0);
memcpy((void*)buffer_pP,(void*)UE_rrc_inst[Mod_idP].SL_MIB,Ret_size); memcpy((void*)buffer_pP,(void*)UE_rrc_inst[Mod_idP].SL_MIB,Ret_size);
LOG_I(RRC,"MIB-SL for %d.%d: %x.%x.%x.%x.%x\n",frameP,0,buffer_pP[0],buffer_pP[1],buffer_pP[2],buffer_pP[3],buffer_pP[4]); LOG_I(RRC,"MIB-SL for %d.%d: %x.%x.%x.%x.%x\n",frameP/10,frameP%10,buffer_pP[0],buffer_pP[1],buffer_pP[2],buffer_pP[3],buffer_pP[4]);
return(Ret_size); return(Ret_size);
} }
......
...@@ -322,7 +322,10 @@ uint8_t do_MIB_SL(const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, ...@@ -322,7 +322,10 @@ uint8_t do_MIB_SL(const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index,
} }
//set FrameNumber, subFrameNumber //set FrameNumber, subFrameNumber
sl_mib->message.directFrameNumber_r12.buf = &frame; uint8_t buf[2];
buf[1] = frame&3;
buf[0] = (frame>>2)&255;
sl_mib->message.directFrameNumber_r12.buf = &buf[0];
sl_mib->message.directFrameNumber_r12.size = 2; sl_mib->message.directFrameNumber_r12.size = 2;
sl_mib->message.directFrameNumber_r12.bits_unused=6; sl_mib->message.directFrameNumber_r12.bits_unused=6;
sl_mib->message.directSubframeNumber_r12 = subframe; sl_mib->message.directSubframeNumber_r12 = subframe;
......
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