Commit b4faa599 authored by Melissa Elkadi's avatar Melissa Elkadi

Trying to send last RRC message to NRUE

parent a31ee2f0
......@@ -1922,12 +1922,32 @@ rrc_ue_process_rrcConnectionReconfiguration(
eNB as to how this message is put into the container. Need scg_group_config and scg_RB_config.
These two need to be sent over to the NR UE. */
if (is_nr_r15_config_present(r_r8)) {
LOG_I(RRC, "We successfully have NR RRCConnectionReconfig\n");
//extract_nr_elements();
//nsa_sendmsg_to_nrue(buf, len, RRC_CONFIG_COMPLETE_REQ);
return;
OCTET_STRING_t *nr_RadioBearer = r_r8->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
nr_RadioBearerConfig1_r15;
OCTET_STRING_t *nr_SecondaryCellGroup = r_r8->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
nr_Config_r15->choice.setup.nr_SecondaryCellGroupConfig_r15;
LOG_I(RRC, "MELISSA ELKADI! nr_RadioBearerConfig1_r15 size %ld nr_SecondaryCellGroupConfig_r15 size %ld\n",
nr_RadioBearer->size,
nr_SecondaryCellGroup->size);
uint8_t buffer[8192];
LTE_RRCConnectionReconfiguration_t *rrcCR;
memcpy((char *)rrcCR,
(char *)rrcConnectionReconfiguration,
sizeof(LTE_RRCConnectionReconfiguration_t));
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_RRCConnectionReconfiguration,
NULL,
rrcCR,
buffer,
sizeof(buffer));
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %zu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_I(RRC, "Calling nsa_sendmsg_to_nr_ue to send a RRC_CONFIG_COMPLETE_REQ\n");
nsa_sendmsg_to_nrue(buffer, (enc_rval.encoded + 7)/8, RRC_CONFIG_COMPLETE_REQ);
}
LOG_E(RRC, "Unfortunately, nr_r15_config is not present.\n");
if (r_r8->mobilityControlInfo) {
LOG_I(RRC,"Mobility Control Information is present\n");
......
......@@ -69,6 +69,8 @@ typedef enum Rrc_Msg_Type_e {
NRUE_CAPABILITY_INFO,
RRC_MEASUREMENT_PROCEDURE,
NR_UE_RRC_MEASUREMENT,
RRC_CONFIG_COMPLETE_REQ,
NR_RRC_CONFIG_COMPLETE_REQ
} Rrc_Msg_Type_t;
......
......@@ -281,7 +281,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
create_tunnel_req.num_tunnels = m->nb_e_rabs_tobeadded;
RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[rrc->module_id]->rrc_ue_head, ue_context_p);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0,rrc->module_id);
#if 0
#if 0 //Melissa this is a hack.
gtpv1u_create_s1u_tunnel(
ctxt.instance,
&create_tunnel_req,
......
......@@ -3096,6 +3096,40 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len)
as measurement reporting message*/
break;
}
case RRC_CONFIG_COMPLETE_REQ:
{
LOG_I(NR_RRC, "MELISSA ELKADI! We got a RRC_CONFIG_COMPLETE_REQ\n");
#if 0
NR_DL_DCCH_Message_t *dl_dcch_msg = NULL;
asn_dec_rval_t dec_rval = uper_decode_complete(NULL,
&asn_DEF_NR_DL_DCCH_Message,
(void **)&dl_dcch_msg,
msg_buffer,
msg_len);
if (dec_rval.code != RC_OK && dec_rval.consumed == 0)
{
LOG_E(RRC, "%s: Failed to decode LTE_DL_DCC_Msg\n", __FUNCTION__);
SEQUENCE_free(&asn_DEF_LTE_DL_DCCH_Message, dl_dcch_msg, ASFM_FREE_EVERYTHING);
return;
}
LTE_RRCConnectionReconfiguration_t *rrcConnectionReconfiguration = &dl_dcch_msg->
LTE_RRCConnectionReconfiguration_r8_IEs_t *r_r8 = &rrcConnectionReconfiguration->
criticalExtensions.choice.c1.
choice.rrcConnectionReconfiguration_r8;
OCTET_STRING_t *nr_RadioBearer = r_r8->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
nr_RadioBearerConfig1_r15;
OCTET_STRING_t *nr_SecondaryCellGroup = r_r8->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
nr_Config_r15->choice.setup.nr_SecondaryCellGroupConfig_r15;
LOG_I(NR_RRC, "MELISSA ELKADI! nr_RadioBearerConfig1_r15 size %ld nr_SecondaryCellGroupConfig_r15 size %ld\n",
nr_RadioBearer->size,
nr_SecondaryCellGroup->size);
#endif
}
default:
LOG_E(NR_RRC, "No NSA Message Found\n");
......
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