Commit 3b1a53e6 authored by winckel's avatar winckel
Browse files

Added "eps_BearerIdentity" field set to 5 in...

Added "eps_BearerIdentity" field set to 5 in "rrc_eNB_generate_defaultRRCConnectionReconfiguration()" (was set to this on PFT traces).
Added ITTI log on some ASN1 messages.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4854 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 2de57dd6
......@@ -282,7 +282,7 @@ uint8_t do_SIB1(LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer,
}
*/
// AT4 packet
uint8_t do_MIB(LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame, uint8_t *buffer) {
uint8_t do_MIB(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame, uint8_t *buffer) {
asn_enc_rval_t enc_rval;
BCCH_BCH_Message_t mib;
......@@ -342,9 +342,29 @@ uint8_t do_MIB(LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame, uint8_t *buffer)
mib.message.spare.bits_unused = 6; // This makes a spare of 10 bits
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message,
(void*)&mib,
buffer,
100);
(void*)&mib,
buffer,
100);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_BCCH_BCH_Message, (void *) &mib)) > 0)
{
MessageDef *message_p;
message_p = itti_alloc_new_message_sized (TASK_RRC_ENB, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, message_p);
}
}
# endif
#endif
if (enc_rval.encoded==-1)
return(-1);
return((enc_rval.encoded+7)/8);
......@@ -1042,7 +1062,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
}
#endif
bcch_message->message.present = BCCH_DL_SCH_MessageType_PR_c1;
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType__c1_PR_systemInformation;
......@@ -1105,7 +1124,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
return((enc_rval.encoded+7)/8);
}
uint8_t do_RRCConnectionRequest(uint8_t *buffer,uint8_t *rv) {
uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv) {
asn_enc_rval_t enc_rval;
uint8_t buf[5],buf2=0;
......@@ -1158,9 +1177,28 @@ uint8_t do_RRCConnectionRequest(uint8_t *buffer,uint8_t *rv) {
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_CCCH_Message,
(void*)&ul_ccch_msg,
buffer,
100);
(void*)&ul_ccch_msg,
buffer,
100);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_UL_CCCH_Message, (void *) &ul_ccch_msg)) > 0)
{
MessageDef *message_p;
message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, NB_eNB_INST + Mod_id, message_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC,"[UE] RRCConnectionRequest Encoded %d bits (%d bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
......@@ -1170,7 +1208,7 @@ uint8_t do_RRCConnectionRequest(uint8_t *buffer,uint8_t *rv) {
}
uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS) {
uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS) {
asn_enc_rval_t enc_rval;
......@@ -1213,14 +1251,29 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const uint8_t Transaction
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.bits_unused=0;
*/
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
(void*)&ul_dcch_msg,
buffer,
100);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_UL_DCCH_Message, (void *) &ul_dcch_msg)) > 0)
{
MessageDef *message_p;
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
(void*)&ul_dcch_msg,
buffer,
100);
message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, NB_eNB_INST + Mod_id, message_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC,"RRCConnectionSetupComplete Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
......@@ -1230,7 +1283,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const uint8_t Transaction
}
uint8_t do_RRCConnectionReconfigurationComplete(uint8_t *buffer, const uint8_t Transaction_id) {
uint8_t do_RRCConnectionReconfigurationComplete(uint8_t Mod_id, uint8_t *buffer, const uint8_t Transaction_id) {
asn_enc_rval_t enc_rval;
......@@ -1250,9 +1303,28 @@ uint8_t do_RRCConnectionReconfigurationComplete(uint8_t *buffer, const uint8_t T
rrcConnectionReconfigurationComplete->criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8.nonCriticalExtension=NULL;
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
(void*)&ul_dcch_msg,
buffer,
100);
(void*)&ul_dcch_msg,
buffer,
100);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_UL_DCCH_Message, (void *) &ul_dcch_msg)) > 0)
{
MessageDef *message_p;
message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, NB_eNB_INST + Mod_id, message_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC,"RRCConnectionReconfigurationComplete Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
......@@ -1262,14 +1334,14 @@ uint8_t do_RRCConnectionReconfigurationComplete(uint8_t *buffer, const uint8_t T
}
uint8_t do_RRCConnectionSetup(uint8_t *buffer,
u8 transmission_mode,
uint8_t UE_id,
uint8_t Transaction_id,
LTE_DL_FRAME_PARMS *frame_parms,
SRB_ToAddModList_t **SRB_configList,
struct PhysicalConfigDedicated **physicalConfigDedicated) {
uint8_t do_RRCConnectionSetup(uint8_t Mod_id,
uint8_t *buffer,
u8 transmission_mode,
uint8_t UE_id,
uint8_t Transaction_id,
LTE_DL_FRAME_PARMS *frame_parms,
SRB_ToAddModList_t **SRB_configList,
struct PhysicalConfigDedicated **physicalConfigDedicated) {
asn_enc_rval_t enc_rval;
uint8_t ecause=0;
......@@ -1518,9 +1590,28 @@ uint8_t do_RRCConnectionSetup(uint8_t *buffer,
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
(void*)&dl_ccch_msg,
buffer,
100);
(void*)&dl_ccch_msg,
buffer,
100);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message, (void *) &dl_ccch_msg)) > 0)
{
MessageDef *message_p;
message_p = itti_alloc_new_message_sized (TASK_RRC_ENB, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, message_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC,"RRCConnectionSetup Encoded %d bits (%d bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
......@@ -1805,11 +1896,12 @@ uint8_t do_RRCConnectionReconfiguration(uint8_t Mod_id
uint8_t TMGI[5] = {4,3,2,1,0};//TMGI is a string of octet, ref. TS 24.008 fig. 10.5.4a
#ifdef Rel10
uint8_t do_MBSFNAreaConfig(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t sync_area,
uint8_t *buffer,
MCCH_Message_t *mcch_message,
MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration) {
uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t sync_area,
uint8_t *buffer,
MCCH_Message_t *mcch_message,
MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration) {
asn_enc_rval_t enc_rval;
MBSFN_SubframeConfig_t *mbsfn_SubframeConfig1;
......@@ -1910,9 +2002,29 @@ uint8_t do_MBSFNAreaConfig(LTE_DL_FRAME_PARMS *frame_parms,
xer_fprint(stdout,&asn_DEF_MCCH_Message,(void*)mcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_MCCH_Message,
(void*)mcch_message,
buffer,
100);
(void*)mcch_message,
buffer,
100);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_MCCH_Message, (void *) &mcch_message)) > 0)
{
MessageDef *message_p;
message_p = itti_alloc_new_message_sized (TASK_RRC_ENB, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, message_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC,"[eNB] MCCH Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif
......@@ -1925,8 +2037,7 @@ uint8_t do_MBSFNAreaConfig(LTE_DL_FRAME_PARMS *frame_parms,
}
#endif
uint8_t do_MeasurementReport(uint8_t *buffer,int measid,int phy_id,int rsrp_s,int rsrq_s,long rsrp_t,long rsrq_t) {
uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_id,int rsrp_s,int rsrq_s,long rsrp_t,long rsrq_t) {
asn_enc_rval_t enc_rval;
......@@ -1942,7 +2053,6 @@ uint8_t do_MeasurementReport(uint8_t *buffer,int measid,int phy_id,int rsrp_s,in
measurementReport->criticalExtensions.choice.c1.present=MeasurementReport__criticalExtensions__c1_PR_measurementReport_r8;
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.nonCriticalExtension=CALLOC(1,sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.nonCriticalExtension));
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measId=measid;
#ifdef Rel10
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrpResult=rsrp_s;
......@@ -1964,7 +2074,6 @@ uint8_t do_MeasurementReport(uint8_t *buffer,int measid,int phy_id,int rsrp_s,in
struct MeasResultEUTRA__cgi_Info *measresult_cgi2;
measresult_cgi2 = CALLOC(1,sizeof(*measresult_cgi2));
memset(&measresult_cgi2->cellGlobalId.plmn_Identity,0,sizeof(measresult_cgi2->cellGlobalId.plmn_Identity));
measresult_cgi2->cellGlobalId.plmn_Identity.mcc=CALLOC(1,sizeof(measresult_cgi2->cellGlobalId.plmn_Identity.mcc));
......@@ -1981,7 +2090,6 @@ uint8_t do_MeasurementReport(uint8_t *buffer,int measid,int phy_id,int rsrp_s,in
dummy=8;ASN_SEQUENCE_ADD(&measresult_cgi2->cellGlobalId.plmn_Identity.mnc.list,&dummy);
dummy=0;ASN_SEQUENCE_ADD(&measresult_cgi2->cellGlobalId.plmn_Identity.mnc.list,&dummy);
measresult_cgi2->cellGlobalId.cellIdentity.buf=MALLOC(8);
measresult_cgi2->cellGlobalId.cellIdentity.buf[0]=0x01;
measresult_cgi2->cellGlobalId.cellIdentity.buf[1]=0x48;
......@@ -2010,11 +2118,29 @@ uint8_t do_MeasurementReport(uint8_t *buffer,int measid,int phy_id,int rsrp_s,in
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA=*(measResultListEUTRA2);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
(void*)&ul_dcch_msg,
buffer,
100);
(void*)&ul_dcch_msg,
buffer,
100);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_UL_DCCH_Message, (void *) &ul_dcch_msg)) > 0)
{
MessageDef *message_p;
message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, NB_eNB_INST + Mod_id, message_p);
}
}
# endif
#endif
#ifdef USER_MODE
printf("Measurement Report Encoded %zu bits (%zu bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
......@@ -2447,14 +2573,14 @@ uint8_t do_SIB2_cell(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *b
//-----------------------------------------------------------------------------
uint8_t do_RRCConnReconf_defaultCELL(uint8_t Mod_id,
uint8_t *buffer,
uint8_t UE_id,
uint8_t Transaction_id,
/* struct SRB_ToAddMod **SRB2_config,
struct DRB_ToAddMod **DRB_config,*/
SRB_ToAddModList_t **SRB_configList,
DRB_ToAddModList_t **DRB_configList,
struct PhysicalConfigDedicated **physicalConfigDedicated) {
uint8_t *buffer,
uint8_t UE_id,
uint8_t Transaction_id,
/* struct SRB_ToAddMod **SRB2_config,
struct DRB_ToAddMod **DRB_config,*/
SRB_ToAddModList_t **SRB_configList,
DRB_ToAddModList_t **DRB_configList,
struct PhysicalConfigDedicated **physicalConfigDedicated) {
//-----------------------------------------------------------------------------
asn_enc_rval_t enc_rval;
......@@ -2866,9 +2992,9 @@ uint8_t do_RRCConnReconf_defaultCELL(uint8_t Mod_id,
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO = NULL;
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
(void*)&dl_dcch_msg,
buffer,
100);
(void*)&dl_dcch_msg,
buffer,
100);
#ifdef XER_PRINT
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)&dl_dcch_msg);
......
......@@ -94,15 +94,15 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
@return size of encoded bit stream in bytes*/
uint8_t do_SIB23(uint8_t Mod_id,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t *buffer,
BCCH_DL_SCH_Message_t *systemInformation,
SystemInformationBlockType2_t **sib2,
SystemInformationBlockType3_t **sib3
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t *buffer,
BCCH_DL_SCH_Message_t *systemInformation,
SystemInformationBlockType2_t **sib2,
SystemInformationBlockType3_t **sib3
#ifdef Rel10
,
,
SystemInformationBlockType13_r9_t **sib13,
uint8_t MBMS_flag
uint8_t MBMS_flag
#endif
);
......@@ -113,17 +113,17 @@ routine only generates an mo-data establishment cause.
@param rv 5 byte random string or S-TMSI
@returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionRequest(uint8_t *buffer,u8 *rv);
uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,u8 *rv);
/** \brief Generate an RRCConnectionSetupComplete UL-DCCH-Message (UE)
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
@returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS);
uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS);
/** \brief Generate an RRCConnectionReconfigurationComplete UL-DCCH-Message (UE)
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
@returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionReconfigurationComplete(uint8_t *buffer, const uint8_t Transaction_id);
uint8_t do_RRCConnectionReconfigurationComplete(uint8_t Mod_id, uint8_t *buffer, const uint8_t Transaction_id);
/**
\brief Generate an RRCConnectionSetup DL-CCCH-Message (eNB). This routine configures SRB_ToAddMod (SRB1/SRB2) and
......@@ -135,13 +135,14 @@ PhysicalConfigDedicated IEs. The latter does not enable periodic CQI reporting
@param SRB_configList Pointer (returned) to SRB1_config/SRB2_config(later) IEs for this UE
@param physicalConfigDedicated Pointer (returned) to PhysicalConfigDedicated IE for this UE
@returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionSetup(uint8_t *buffer,
uint8_t transmission_mode,
uint8_t UE_id,
uint8_t Transaction_id,
LTE_DL_FRAME_PARMS *frame_parms,
SRB_ToAddModList_t **SRB1_configList,
struct PhysicalConfigDedicated **physicalConfigDedicated);
uint8_t do_RRCConnectionSetup(uint8_t Mod_id,
uint8_t *buffer,
uint8_t transmission_mode,
uint8_t UE_id,
uint8_t Transaction_id,
LTE_DL_FRAME_PARMS *frame_parms,
SRB_ToAddModList_t **SRB1_configList,
struct PhysicalConfigDedicated **physicalConfigDedicated);
/**
\brief Generate an RRCConnectionReconfiguration DL-DCCH-Message (eNB). This routine configures SRBToAddMod (SRB2) and one DRBToAddMod
......@@ -181,11 +182,11 @@ uint8_t do_RRCConnectionReconfiguration(uint8_t Mod_id
MeasIdToAddModList_t *MeasId_list,
MAC_MainConfig_t *mac_MainConfig,
MeasGapConfig_t *measGapConfig,
MobilityControlInfo_t *mobilityInfo,
struct MeasConfig__speedStatePars *speedStatePars,
RSRP_Range_t *rsrp,
C_RNTI_t *cba_rnti,
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList);
MobilityControlInfo_t *mobilityInfo,
struct MeasConfig__speedStatePars *speedStatePars,
RSRP_Range_t *rsrp,
C_RNTI_t *cba_rnti,
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList);
/***
* \brief Generate an MCCH-Message (eNB). This routine configures MBSFNAreaConfiguration (PMCH-InfoList and Subframe Allocation for MBMS data)
......@@ -199,14 +200,15 @@ uint8_t do_MCCHMessage(uint8_t *buffer);
* @param buffer Pointer to PER-encoded ASN.1 description of MCCH-Message PDU
* @returns Size of encoded bit stream in bytes
*/
uint8_t do_MBSFNAreaConfig(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t sync_area,
uint8_t *buffer,
MCCH_Message_t *mcch_message,
MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration);
uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t sync_area,
uint8_t *buffer,
MCCH_Message_t *mcch_message,
MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration);
#endif
uint8_t do_MeasurementReport(uint8_t *buffer,int measid,int phy_id,int rsrp_s,int rsrq_s,long rsrp_t,long rsrq_t);
uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_id,int rsrp_s,int rsrq_s,long rsrp_t,long rsrq_t);
uint8_t do_DLInformationTransfer(uint8_t Mod_id, uint8_t **buffer, uint8_t transaction_id, uint32_t pdu_length, uint8_t *pdu_buffer);
......@@ -215,9 +217,9 @@ uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t
OAI_UECapability_t *fill_ue_capability();
uint8_t do_UECapabilityEnquiry(uint8_t Mod_id,
uint8_t *buffer,
uint8_t UE_id,
uint8_t Transaction_id);
uint8_t *buffer,
uint8_t UE_id,
uint8_t Transaction_id);
uint8_t do_SecurityModeCommand(uint8_t Mod_id,
uint8_t *buffer,
......
......@@ -297,7 +297,7 @@ void rrc_ue_generate_RRCConnectionRequest(u8 Mod_id, u32 frame, u8 eNB_index){
LOG_T(RRC,"%x.",rv[i]);
}
LOG_T(RRC,"\n");
UE_rrc_inst[Mod_id].Srb0[eNB_index].Tx_buffer.payload_size = do_RRCConnectionRequest((u8 *)UE_rrc_inst[Mod_id].Srb0[eNB_index].Tx_buffer.Payload,rv);
UE_rrc_inst[Mod_id].Srb0[eNB_index].Tx_buffer.payload_size = do_RRCConnectionRequest(Mod_id, (u8 *)UE_rrc_inst[Mod_id].Srb0[eNB_index].Tx_buffer.Payload,rv);
LOG_I(RRC,"[UE %d] : Frame %d, Logical Channel UL-CCCH (SRB0), Generating RRCConnectionRequest (bytes %d, eNB %d)\n",
Mod_id, frame, UE_rrc_inst[Mod_id].Srb0[eNB_index].Tx_buffer.payload_size, eNB_index);
......@@ -365,7 +365,7 @@ void rrc_ue_generate_RRCConnectionSetupComplete(u8 Mod_id, u32 frame, u8 eNB_ind
nas_msg_length = sizeof(nas_attach_req_imsi);
#endif
size = do_RRCConnectionSetupComplete(buffer, Transaction_id, nas_msg_length, nas_msg);
size = do_RRCConnectionSetupComplete(Mod_id, buffer, Transaction_id, nas_msg_length, nas_msg);
LOG_I(RRC,"[UE %d][RAPROC] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionSetupComplete (bytes%d, eNB %d)\n",
Mod_id,frame, size, eNB_index);
......@@ -381,7 +381,7 @@ void rrc_ue_generate_RRCConnectionReconfigurationComplete(u8 Mod_id, u32 frame,
u8 buffer[32], size;
size = do_RRCConnectionReconfigurationComplete(buffer, Transaction_id);
size = do_RRCConnectionReconfigurationComplete(Mod_id, buffer, Transaction_id);
LOG_I(RRC,"[UE %d] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionReconfigurationComplete (bytes %d, eNB_index %d)\n",
Mod_id,frame, size, eNB_index);
......@@ -1184,6 +1184,25 @@ void rrc_ue_process_securityModeCommand(uint8_t Mod_id,uint32_t frame,SecurityMo
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_UL_DCCH_Message, (void *) &ul_dcch_msg)) > 0)
{
MessageDef *message_p;
message_p = itti_alloc_new_message_sized (TASK_RRC_ENB, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, NB_eNB_INST + Mod_id, message_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC, "securityModeComplete Encoded %d bits (%d bytes)\n", enc_rval.encoded, (enc_rval.encoded+7)/8);
#endif
......@@ -1246,6 +1265,25 @@ void rrc_ue_process_ueCapabilityEnquiry(uint8_t Mod_id,uint32_t frame,UECapabili
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_UL_DCCH_Message, (void *) &ul_dcch_msg)) > 0)
{
MessageDef *message_p;
message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, NB_eNB_INST + Mod_id, message_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC,"UECapabilityInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif
......@@ -2397,7 +2435,7 @@ void rrc_ue_generate_MeasurementReport(u8 eNB_id, u8 UE_id, u32 frame) {
if (pframe!=frame){
pframe=frame;
size = do_MeasurementReport(buffer,measId,targetCellId,rsrp_s,rsrq_s,rsrp_t,rsrq_t);
size = do_MeasurementReport(UE_id, buffer,measId,targetCellId,rsrp_s,rsrq_s,rsrp_t,rsrq_t);
LOG_D(RRC, "[UE %d] Frame %d: Sending MeasReport: servingCell(%d) targetCell(%d) rsrp_s(%d) rsrq_s(%d) rsrp_t(%d) rsrq_t(%d) \n",
UE_id, frame, cellId,targetCellId,rsrp_s,rsrq_s,rsrp_t,rsrq_t);
LOG_I(RRC, "[UE %d] Frame %d : Generating Measurement Report for eNB %d\n", UE_id, frame, eNB_id);
......
......@@ -127,10 +127,10 @@ static void init_SI (u8 Mod_id
int N_RB_DL,phich_resource;
do_MIB(mac_xface->lte_frame_parms,0x321,&mib);
do_MIB(Mod_id, mac_xface->lte_frame_parms,0x321,&mib);
for (i=0;i<1024;i+=4)
do_MIB(mac_xface->lte_frame_parms,i,&mib);
do_MIB(Mod_id, mac_xface->lte_frame_parms,i,&mib);
N_RB_DL=6;
while (N_RB_DL != 0) {
......@@ -140,7 +140,7 @@ static void init_SI (u8 Mod_id
mac_xface->lte_frame_parms->N_RB_DL = N_RB_DL;
mac_xface->lte_frame_parms->phich_config_common.phich_duration=i;
mac_xface->lte_frame_parms->phich_config_common.phich_resource = phich_resource;
do_MIB(mac_xface->lte_frame_parms,0,&mib);
do_MIB(Mod_id, mac_xface->lte_frame_parms,0,&mib);
}
if (phich_resource == 1)
phich_resource = 3;
......@@ -722,6 +722,8 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration (u8 Mod_id, u32
/// DRB
DRB_config = CALLOC (1, sizeof (*DRB_config));
DRB_config->eps_BearerIdentity = CALLOC(1, sizeof(long));
*(DRB_config->eps_BearerIdentity) = 5L; // LW set to first value, allowed value 5..15