Commit 46a8c83b authored by Javier Morgade's avatar Javier Morgade

UE procedures for FeMBMS SIB1-MBMS (SystemInformationBlockType1-MBMS message)

	-- asn1 dissectors ETSI TS 136 331 V14.2.2 (2017-05)
	-- schedule_SI_MBMS
	-- ue_decode_si_mbms
parent 52754797
...@@ -3413,12 +3413,31 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -3413,12 +3413,31 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
break; break;
case SI_PDSCH: case SI_PDSCH:
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if(subframe_rx == 0 /*&& fembms_flag*/) { //TODO MBMS //Just check SI at subframe 0 for FeMBMS
ue_decode_si_mbms(ue->Mod_id,
CC_id,
frame_rx,
eNB_id,
ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
} else {
ue_decode_si(ue->Mod_id,
CC_id,
frame_rx,
eNB_id,
ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
}
#else
ue_decode_si(ue->Mod_id, ue_decode_si(ue->Mod_id,
CC_id, CC_id,
frame_rx, frame_rx,
eNB_id, eNB_id,
ue->dlsch_SI[eNB_id]->harq_processes[0]->b, ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3); ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
#endif
break; break;
case P_PDSCH: case P_PDSCH:
......
...@@ -34,6 +34,9 @@ MESSAGE_DEF(RRC_MAC_OUT_OF_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacOutOfSy ...@@ -34,6 +34,9 @@ MESSAGE_DEF(RRC_MAC_OUT_OF_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacOutOfSy
MESSAGE_DEF(RRC_MAC_BCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataReq, rrc_mac_bcch_data_req) MESSAGE_DEF(RRC_MAC_BCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataReq, rrc_mac_bcch_data_req)
MESSAGE_DEF(RRC_MAC_BCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataInd, rrc_mac_bcch_data_ind) MESSAGE_DEF(RRC_MAC_BCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataInd, rrc_mac_bcch_data_ind)
MESSAGE_DEF(RRC_MAC_BCCH_MBMS_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchMbmsDataReq, rrc_mac_bcch_mbms_data_req)
MESSAGE_DEF(RRC_MAC_BCCH_MBMS_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchMbmsDataInd, rrc_mac_bcch_mbms_data_ind)
MESSAGE_DEF(RRC_MAC_CCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataReq, rrc_mac_ccch_data_req) MESSAGE_DEF(RRC_MAC_CCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataReq, rrc_mac_ccch_data_req)
MESSAGE_DEF(RRC_MAC_CCCH_DATA_CNF, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataCnf, rrc_mac_ccch_data_cnf) MESSAGE_DEF(RRC_MAC_CCCH_DATA_CNF, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataCnf, rrc_mac_ccch_data_cnf)
MESSAGE_DEF(RRC_MAC_CCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataInd, rrc_mac_ccch_data_ind) MESSAGE_DEF(RRC_MAC_CCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataInd, rrc_mac_ccch_data_ind)
......
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
#define RRC_MAC_BCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_req #define RRC_MAC_BCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_req
#define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_ind #define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_ind
#define RRC_MAC_BCCH_MBMS_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_req
#define RRC_MAC_BCCH_MBMS_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_ind
#define RRC_MAC_CCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_req #define RRC_MAC_CCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_req
#define RRC_MAC_CCCH_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_cnf #define RRC_MAC_CCCH_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_cnf
#define RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_ind #define RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_ind
...@@ -47,6 +50,7 @@ ...@@ -47,6 +50,7 @@
// Some constants from "LAYER2/MAC/defs.h" // Some constants from "LAYER2/MAC/defs.h"
#define BCCH_SDU_SIZE (512) #define BCCH_SDU_SIZE (512)
#define BCCH_SDU_MBMS_SIZE (512)
#define CCCH_SDU_SIZE (512) #define CCCH_SDU_SIZE (512)
#define MCCH_SDU_SIZE (512) #define MCCH_SDU_SIZE (512)
#define PCCH_SDU_SIZE (512) #define PCCH_SDU_SIZE (512)
...@@ -78,6 +82,25 @@ typedef struct RrcMacBcchDataInd_s { ...@@ -78,6 +82,25 @@ typedef struct RrcMacBcchDataInd_s {
uint8_t rsrp; uint8_t rsrp;
} RrcMacBcchDataInd; } RrcMacBcchDataInd;
typedef struct RrcMacBcchMbmsDataReq_s {
uint32_t frame;
uint32_t sdu_size;
uint8_t sdu[BCCH_SDU_MBMS_SIZE];
uint8_t enb_index;
} RrcMacBcchMbmsDataReq;
typedef struct RrcMacBcchMbmsDataInd_s {
uint32_t frame;
uint8_t sub_frame;
uint32_t sdu_size;
uint8_t sdu[BCCH_SDU_MBMS_SIZE];
uint8_t enb_index;
uint8_t rsrq;
uint8_t rsrp;
} RrcMacBcchMbmsDataInd;
typedef struct RrcMacCcchDataReq_s { typedef struct RrcMacCcchDataReq_s {
uint32_t frame; uint32_t frame;
uint32_t sdu_size; uint32_t sdu_size;
......
...@@ -831,6 +831,14 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -831,6 +831,14 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList = schedulingInfoList; RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList = schedulingInfoList;
config_sib1(Mod_idP,CC_idP,tdd_Config); config_sib1(Mod_idP,CC_idP,tdd_Config);
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) //TODO MBMS this must be passed through function
/*if (schedulingInfoList_MBMS!=NULL) {
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList_MBMS = schedulingInfoList_MBMS;
config_sib1_mbms(Mod_idP,CC_idP,tdd_Config);
}*/
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
if (sib1_v13ext != NULL) { if (sib1_v13ext != NULL) {
RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext; RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext;
......
...@@ -658,8 +658,11 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, ...@@ -658,8 +658,11 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
} }
// This schedules MIB // This schedules MIB
if ((subframeP == 0) && (frameP & 3) == 0) if ((subframeP == 0) && (frameP & 3) == 0) {
schedule_mib(module_idP, frameP, subframeP); schedule_mib(module_idP, frameP, subframeP);
//schedule_SI_MBMS(module_idP, frameP, subframeP);
}
if (get_softmodem_params()->phy_test == 0){ if (get_softmodem_params()->phy_test == 0){
// This schedules SI for legacy LTE and eMTC starting in subframeP // This schedules SI for legacy LTE and eMTC starting in subframeP
schedule_SI(module_idP, frameP, subframeP); schedule_SI(module_idP, frameP, subframeP);
......
This diff is collapsed.
...@@ -66,6 +66,12 @@ ...@@ -66,6 +66,12 @@
#include "LTE_SystemInformationBlockType1-v1310-IEs.h" #include "LTE_SystemInformationBlockType1-v1310-IEs.h"
#include "LTE_SystemInformationBlockType18-r12.h" #include "LTE_SystemInformationBlockType18-r12.h"
#endif #endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#include "LTE_BCCH-BCH-Message-MBMS.h"
#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
#endif
#include "LTE_RadioResourceConfigCommonSIB.h" #include "LTE_RadioResourceConfigCommonSIB.h"
#include "nfapi_interface.h" #include "nfapi_interface.h"
#include "PHY_INTERFACE/IF_Module.h" #include "PHY_INTERFACE/IF_Module.h"
...@@ -415,6 +421,11 @@ typedef struct { ...@@ -415,6 +421,11 @@ typedef struct {
#define BCCH_SIB1_BR 6 // SIB1_BR #define BCCH_SIB1_BR 6 // SIB1_BR
/*!\brief Values of BCCH SIB_BR logical channel (fake) */ /*!\brief Values of BCCH SIB_BR logical channel (fake) */
#define BCCH_SI_BR 7 // SI-BR #define BCCH_SI_BR 7 // SI-BR
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/*!\brief Values of BCCH SIB1_BR logical channel (fake) */
#define BCCH_SIB1_MBMS 60 // SIB1_MBMS //TODO better armonize index
#define BCCH_SI_MBMS 61 // SIB_MBMS //TODO better armonize index
#endif
/*!\brief Value of CCCH / SRB0 logical channel */ /*!\brief Value of CCCH / SRB0 logical channel */
#define CCCH 0 // srb0 #define CCCH 0 // srb0
/*!\brief DCCH / SRB1 logical channel */ /*!\brief DCCH / SRB1 logical channel */
...@@ -1244,6 +1255,7 @@ typedef struct { ...@@ -1244,6 +1255,7 @@ typedef struct {
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon; LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR; LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
LTE_SchedulingInfoList_MBMS_r14_t *schedulingInfoList_MBMS;
#endif #endif
LTE_TDD_Config_t *tdd_Config; LTE_TDD_Config_t *tdd_Config;
LTE_SchedulingInfoList_t *schedulingInfoList; LTE_SchedulingInfoList_t *schedulingInfoList;
...@@ -1303,6 +1315,10 @@ typedef struct { ...@@ -1303,6 +1315,10 @@ typedef struct {
/// Outgoing BCCH-BR pdu for PHY /// Outgoing BCCH-BR pdu for PHY
BCCH_PDU BCCH_BR_pdu[20]; BCCH_PDU BCCH_BR_pdu[20];
#endif #endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
BCCH_PDU BCCH_MBMS_pdu;
#endif
} COMMON_channels_t; } COMMON_channels_t;
/*! \brief top level eNB MAC structure */ /*! \brief top level eNB MAC structure */
typedef struct eNB_MAC_INST_s { typedef struct eNB_MAC_INST_s {
...@@ -1370,6 +1386,9 @@ typedef struct eNB_MAC_INST_s { ...@@ -1370,6 +1386,9 @@ typedef struct eNB_MAC_INST_s {
time_stats_t eNB_scheduler; time_stats_t eNB_scheduler;
/// processing time of eNB scheduler for SI /// processing time of eNB scheduler for SI
time_stats_t schedule_si; time_stats_t schedule_si;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
time_stats_t schedule_si_mbms;
#endif
/// processing time of eNB scheduler for Random access /// processing time of eNB scheduler for Random access
time_stats_t schedule_ra; time_stats_t schedule_ra;
/// processing time of eNB ULSCH scheduler /// processing time of eNB ULSCH scheduler
......
...@@ -67,6 +67,17 @@ void schedule_RA(module_id_t module_idP, frame_t frameP, ...@@ -67,6 +67,17 @@ void schedule_RA(module_id_t module_idP, frame_t frameP,
void schedule_SI(module_id_t module_idP, frame_t frameP, void schedule_SI(module_id_t module_idP, frame_t frameP,
sub_frame_t subframeP); sub_frame_t subframeP);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/** \brief First stage of SI Scheduling. Gets a SI SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length. It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs).
@param Mod_id Instance ID of eNB
@param frame Frame index
@param subframe Subframe number on which to act
*/
void schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
sub_frame_t subframeP);
#endif
/** \brief MBMS scheduling: Checking the position for MBSFN subframes. Create MSI, transfer MCCH from RRC to MAC, transfer MTCHs from RLC to MAC. Multiplexing MSI,MCCH&MTCHs. Return 1 if there are MBSFN data being allocated, otherwise return 0; /** \brief MBMS scheduling: Checking the position for MBSFN subframes. Create MSI, transfer MCCH from RRC to MAC, transfer MTCHs from RLC to MAC. Multiplexing MSI,MCCH&MTCHs. Return 1 if there are MBSFN data being allocated, otherwise return 0;
@param Mod_id Instance ID of eNB @param Mod_id Instance ID of eNB
@param frame Frame index @param frame Frame index
...@@ -539,6 +550,11 @@ void mac_out_of_sync_ind(module_id_t module_idP, frame_t frameP, ...@@ -539,6 +550,11 @@ void mac_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
void ue_decode_si(module_id_t module_idP, int CC_id, frame_t frame, void ue_decode_si(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len); uint8_t CH_index, void *pdu, uint16_t len);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len);
#endif
void ue_decode_p(module_id_t module_idP, int CC_id, frame_t frame, void ue_decode_p(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len); uint8_t CH_index, void *pdu, uint16_t len);
......
...@@ -618,6 +618,45 @@ ue_send_sdu(module_id_t module_idP, ...@@ -618,6 +618,45 @@ ue_send_sdu(module_id_t module_idP,
#endif #endif
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void
ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t eNB_index, void *pdu, uint16_t len)
{
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].rx_si);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_IN);
LOG_D(MAC, "[UE %d] Frame %d Sending SI MBMS to RRC (LCID Id %d,len %d)\n",
module_idP, frameP, BCCH, len);
mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe
SI_RNTI,
BCCH_SI_MBMS, (uint8_t *) pdu, len, eNB_index,
0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].rx_si);
#endif
if (opt_enabled == 1) {
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
module_idP,
WS_SI_RNTI,
0xffff,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, len);
}
}
#endif
void void
ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP, ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t eNB_index, void *pdu, uint16_t len) uint8_t eNB_index, void *pdu, uint16_t len)
......
...@@ -75,6 +75,26 @@ mac_rrc_data_req( ...@@ -75,6 +75,26 @@ mac_rrc_data_req(
carrier = &rrc->carrier[0]; carrier = &rrc->carrier[0];
mib = &carrier->mib; mib = &carrier->mib;
if(Srb_id == BCCH_SI_MBMS){
if (frameP%4 == 0){
memcpy(&buffer_pP[0],
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_MBMS,
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS);
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB 1 MBMS\n",Mod_idP,frameP);
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]);
}
LOG_T(RRC,"\n");
} /* LOG_DEBUGFLAG(DEBUG_RRC) */
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS);
}
}
if((Srb_id & RAB_OFFSET) == BCCH) { if((Srb_id & RAB_OFFSET) == BCCH) {
if(RC.rrc[Mod_idP]->carrier[CC_id].SI.Active==0) { if(RC.rrc[Mod_idP]->carrier[CC_id].SI.Active==0) {
return 0; return 0;
......
...@@ -145,6 +145,41 @@ mac_rrc_data_ind_ue( ...@@ -145,6 +145,41 @@ mac_rrc_data_ind_ue(
*/ */
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, 0, rntiP, frameP, sub_frameP,eNB_indexP); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, 0, rntiP, frameP, sub_frameP,eNB_indexP);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if(srb_idP == BCCH_SI_MBMS) {
LOG_D(RRC,"[UE %d] Received SDU for BCCH on MBMS SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
int msg_sdu_size = sizeof(RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu);
if (sdu_lenP > msg_sdu_size) {
LOG_E(RRC, "SDU larger than BCCH SDU buffer size (%d, %d)", sdu_lenP, msg_sdu_size);
sdu_size = msg_sdu_size;
} else {
sdu_size = sdu_lenP;
}
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_BCCH_MBMS_DATA_IND);
memset (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, 0, BCCH_SDU_MBMS_SIZE);
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).frame = frameP;
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sub_frame = sub_frameP;
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu_size = sdu_size;
memcpy (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, sduP, sdu_size);
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).enb_index = eNB_indexP;
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrq = 30 /* TODO change phy to report rspq */;
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrp = 45 /* TODO change phy to report rspp */;
itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
}
#else
decode_BCCH_MBMS_DLSCH_Message(&ctxt,eNB_indexP,(uint8_t*)sduP,sdu_lenP, 0, 0);
#endif
}
#endif
if(srb_idP == BCCH) { if(srb_idP == BCCH) {
LOG_D(RRC,"[UE %d] Received SDU for BCCH on SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP); LOG_D(RRC,"[UE %d] Received SDU for BCCH on SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
......
This diff is collapsed.
...@@ -70,6 +70,15 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich ...@@ -70,6 +70,15 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
#endif #endif
); );
/**
\brief Generate configuration for MIB (eNB).
@param carrier pointer to Carrier information
@param N_RB_DL Number of downlink PRBs
@param additional Non MBSFN Subframes parameter
@param frame radio frame number
@return size of encoded bit stream in bytes*/
uint8_t do_MIB_MBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFNSubframes, uint32_t frame);
/** /**
\brief Generate configuration for SIB1 (eNB). \brief Generate configuration for SIB1 (eNB).
@param carrier pointer to Carrier information @param carrier pointer to Carrier information
...@@ -88,6 +97,17 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id ...@@ -88,6 +97,17 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id
#endif #endif
); );
/**
\brief Generate configuration for SIB1 MBMS (eNB).
@param carrier pointer to Carrier information
@param Mod_id Instance of eNB
@param Component carrier Component carrier to configure
@param configuration Pointer Configuration Request structure
@return size of encoded bit stream in bytes*/
uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, RrcConfigurationReq *configuration
);
/** /**
\brief Generate a default configuration for SIB2/SIB3 in one System Information PDU (eNB). \brief Generate a default configuration for SIB2/SIB3 in one System Information PDU (eNB).
......
...@@ -85,6 +85,13 @@ ...@@ -85,6 +85,13 @@
#include "openair2/LAYER2/MAC/mac_extern.h" #include "openair2/LAYER2/MAC/mac_extern.h"
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#include "LTE_BCCH-BCH-Message-MBMS.h"
#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#include "LTE_SL-Preconfiguration-r12.h" #include "LTE_SL-Preconfiguration-r12.h"
...@@ -2597,6 +2604,109 @@ const char *SIB2nB( long value ) { ...@@ -2597,6 +2604,109 @@ const char *SIB2nB( long value ) {
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int decode_BCCH_MBMS_DLSCH_Message(
const protocol_ctxt_t *const ctxt_pP,
const uint8_t eNB_index,
uint8_t *const Sdu,
const uint8_t Sdu_len,
const uint8_t rsrq,
const uint8_t rsrp ) {
LTE_BCCH_DL_SCH_Message_MBMS_t *bcch_message = NULL;
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_mbms = UE_rrc_inst[ctxt_pP->module_id].sib1_MBMS[eNB_index];
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_IN );
/*if (((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&1) == 1) && // SIB1 received
(UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIcnt == sib1->schedulingInfoList.list.count)) {
// Avoid decoding SystemInformationBlockType1_t* sib1 = UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index];
// to prevent memory bloating
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT );
return 0;
}*/
LOG_W(PHY,"llega\n");
rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_RECEIVING_SIB );
//if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
//xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,(void *)bcch_message );
//}
asn_dec_rval_t dec_rval = uper_decode_complete( NULL,
&asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,
(void **)&bcch_message,
(const void *)Sdu,
Sdu_len );
if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) {
LOG_E( RRC, "[UE %"PRIu8"] Failed to decode BCCH_DLSCH_MBMS_MESSAGE (%zu bits)\n",
ctxt_pP->module_id,
dec_rval.consumed );
log_dump(RRC, Sdu, Sdu_len, LOG_DUMP_CHAR," Received bytes:\n" );
// free the memory
SEQUENCE_free( &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS, (void *)bcch_message, 1 );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT );
return -1;
}
//if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
// xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,(void *)bcch_message );
//}
/*if (bcch_message->message.present == LTE_BCCH_DL_SCH_MessageType_PR_c1) {
switch (bcch_message->message.choice.c1.present) {
case LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1:
if ((ctxt_pP->frame % 2) == 0) {
// even frame
if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&1) == 0) {
LTE_SystemInformationBlockType1_t *sib1 = UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index];
memcpy( (void *)sib1,
(void *)&bcch_message->message.choice.c1.choice.systemInformationBlockType1,
sizeof(LTE_SystemInformationBlockType1_t) );
LOG_D( RRC, "[UE %"PRIu8"] Decoding First SIB1\n", ctxt_pP->module_id );
decode_SIB1( ctxt_pP, eNB_index, rsrq, rsrp );
}
}
break;
case LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformation:
if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&1) == 1) {
// SIB1 with schedulingInfoList is available
LTE_SystemInformation_t *si = UE_rrc_inst[ctxt_pP->module_id].si[eNB_index];
memcpy( si,
&bcch_message->message.choice.c1.choice.systemInformation,
sizeof(LTE_SystemInformation_t) );
LOG_I( RRC, "[UE %"PRIu8"] Decoding SI for frameP %"PRIu32"\n",
ctxt_pP->module_id,
ctxt_pP->frame );
decode_SI( ctxt_pP, eNB_index );
//if (nfapi_mode == 3)
UE_mac_inst[ctxt_pP->module_id].SI_Decoded = 1;
}
break;
case LTE_BCCH_DL_SCH_MessageType__c1_PR_NOTHING:
default:
break;
}
}*/
/*if ((rrc_get_sub_state(ctxt_pP->module_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE)
#if defined(ENABLE_USE_MME)
&& (UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data != NULL)
#endif
) {
rrc_ue_generate_RRCConnectionRequest(ctxt_pP, 0);
rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_CONNECTING );
}*/
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT );
return 0;
}
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -4348,6 +4458,22 @@ void *rrc_ue_task( void *args_p ) { ...@@ -4348,6 +4458,22 @@ void *rrc_ue_task( void *args_p ) {
RRC_MAC_BCCH_DATA_IND (msg_p).rsrp); RRC_MAC_BCCH_DATA_IND (msg_p).rsrp);
break; break;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
case RRC_MAC_BCCH_MBMS_DATA_IND:
LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p),
RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).frame, RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).enb_index);
// PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, NOT_A_RNTI, RRC_MAC_BCCH_DATA_IND (msg_p).frame, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, NOT_A_RNTI, RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).frame, 0,RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).enb_index);
decode_BCCH_MBMS_DLSCH_Message (&ctxt,
RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).enb_index,
RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).sdu,
RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).sdu_size,
RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).rsrq,
RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).rsrp);
break;
#endif
case RRC_MAC_CCCH_DATA_CNF: case RRC_MAC_CCCH_DATA_CNF:
LOG_D(RRC, "[UE %d] Received %s: eNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p), LOG_D(RRC, "[UE %d] Received %s: eNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p),
RRC_MAC_CCCH_DATA_CNF (msg_p).enb_index); RRC_MAC_CCCH_DATA_CNF (msg_p).enb_index);
......
...@@ -635,6 +635,10 @@ typedef struct { ...@@ -635,6 +635,10 @@ typedef struct {
uint8_t sizeof_SIB1_BR; uint8_t sizeof_SIB1_BR;
uint8_t *SIB23_BR; uint8_t *SIB23_BR;
uint8_t sizeof_SIB23_BR; uint8_t sizeof_SIB23_BR;
uint8_t *MIB_FeMBMS;
uint8_t sizeof_MIB_FeMBMS;
uint8_t *SIB1_MBMS;
uint8_t sizeof_SIB1_MBMS;
#endif #endif
int physCellId; int physCellId;
int Ncp; int Ncp;
...@@ -648,12 +652,19 @@ typedef struct { ...@@ -648,12 +652,19 @@ typedef struct {
LTE_BCCH_DL_SCH_Message_t systemInformation; LTE_BCCH_DL_SCH_Message_t systemInformation;
LTE_BCCH_DL_SCH_Message_t systemInformation_BR; LTE_BCCH_DL_SCH_Message_t systemInformation_BR;
// SystemInformation_t systemInformation; // SystemInformation_t systemInformation;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_BCCH_BCH_Message_MBMS_t mib_fembms;
LTE_BCCH_DL_SCH_Message_MBMS_t siblock1_MBMS;
LTE_BCCH_DL_SCH_Message_MBMS_t systemInformation_MBMS;
#endif
LTE_SystemInformationBlockType1_t *sib1; LTE_SystemInformationBlockType1_t *sib1;
LTE_SystemInformationBlockType2_t *sib2; LTE_SystemInformationBlockType2_t *sib2;
LTE_SystemInformationBlockType3_t *sib3; LTE_SystemInformationBlockType3_t *sib3;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_SystemInformationBlockType1_t *sib1_BR; LTE_SystemInformationBlockType1_t *sib1_BR;
LTE_SystemInformationBlockType2_t *sib2_BR; LTE_SystemInformationBlockType2_t *sib2_BR;
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS;
LTE_SystemInformationBlockType13_r9_t *sib13_MBMS;
#endif #endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
LTE_SystemInformationBlockType13_r9_t *sib13; LTE_SystemInformationBlockType13_r9_t *sib13;
...@@ -743,6 +754,9 @@ typedef struct UE_RRC_INST_s { ...@@ -743,6 +754,9 @@ typedef struct UE_RRC_INST_s {
uint8_t SIB1Status[NB_CNX_UE]; uint8_t SIB1Status[NB_CNX_UE];
uint8_t SIStatus[NB_CNX_UE]; uint8_t SIStatus[NB_CNX_UE];
LTE_SystemInformationBlockType1_t *sib1[NB_CNX_UE]; LTE_SystemInformationBlockType1_t *sib1[NB_CNX_UE];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS[NB_CNX_UE];
#endif
LTE_SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI(). LTE_SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
LTE_SystemInformationBlockType2_t *sib2[NB_CNX_UE]; LTE_SystemInformationBlockType2_t *sib2[NB_CNX_UE];
LTE_SystemInformationBlockType3_t *sib3[NB_CNX_UE]; LTE_SystemInformationBlockType3_t *sib3[NB_CNX_UE];
...@@ -785,6 +799,9 @@ typedef struct UE_RRC_INST_s { ...@@ -785,6 +799,9 @@ typedef struct UE_RRC_INST_s {
LTE_SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE]; LTE_SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
LTE_SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE]; LTE_SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
#endif #endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_SystemInformationBlockType13_r9_t *sib13_MBMS[NB_CNX_UE];
#endif
#ifdef CBA #ifdef CBA
uint8_t num_active_cba_groups; uint8_t num_active_cba_groups;
uint16_t cba_rnti[NUM_MAX_CBA_GROUP]; uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
......
...@@ -529,6 +529,16 @@ int decode_BCCH_DLSCH_Message( ...@@ -529,6 +529,16 @@ int decode_BCCH_DLSCH_Message(
const uint8_t rsrq, const uint8_t rsrq,
const uint8_t rsrp ); const uint8_t rsrp );
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int decode_BCCH_MBMS_DLSCH_Message(
const protocol_ctxt_t* const ctxt_pP,
const uint8_t eNB_index,
uint8_t* const Sdu,
const uint8_t Sdu_len,
const uint8_t rsrq,
const uint8_t rsrp );
#endif
int decode_PCCH_DLSCH_Message( int decode_PCCH_DLSCH_Message(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
const uint8_t eNB_index, const uint8_t eNB_index,
......
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