Commit 02928ec2 authored by Melissa Elkadi's avatar Melissa Elkadi

Passing RRCConfigComplete to LTE UE success!

However, the NR UE is crashing because it is receiving
a second RRCReconfig message from the LTE UE and it is
having trouble decoding it. Need to understand this.
parent b4faa599
......@@ -2398,7 +2398,9 @@ do_RRCConnectionReconfigurationComplete(
rrcConnectionReconfigurationComplete->criticalExtensions.present =
LTE_RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8;
rrcConnectionReconfigurationComplete->criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8.nonCriticalExtension=NULL;
/* Melissa need to add the release 15 message here into the ul_dcch_msg that we just got.
We will receive the buffer as an octet string and then pull the data out and put it into
this message we are encoding here. */
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, (void *)&ul_dcch_msg);
}
......
......@@ -1918,9 +1918,6 @@ rrc_ue_process_rrcConnectionReconfiguration(
criticalExtensions.choice.c1.
choice.rrcConnectionReconfiguration_r8;
/* Melissa: Here we need to open up container to get r_15 non-criticalExtensions. Look in
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)) {
OCTET_STRING_t *nr_RadioBearer = r_r8->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
......@@ -1930,23 +1927,26 @@ rrc_ue_process_rrcConnectionReconfiguration(
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",
uint32_t total_size = nr_RadioBearer->size + nr_SecondaryCellGroup->size;
struct msg {
uint32_t RadioBearer_size;
uint32_t SecondaryCellGroup_size;
uint8_t trans_id;
uint8_t buffer[total_size];
} msg;
msg.RadioBearer_size = nr_RadioBearer->size;
msg.SecondaryCellGroup_size = nr_SecondaryCellGroup->size;
msg.trans_id = rrcConnectionReconfiguration->rrc_TransactionIdentifier;
memcpy(msg.buffer, nr_RadioBearer->buf, nr_RadioBearer->size);
memcpy(msg.buffer + nr_RadioBearer->size, nr_SecondaryCellGroup->buf, nr_SecondaryCellGroup->size);
LOG_D(RRC, "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_I(RRC, "Calling nsa_sendmsg_to_nr_ue to send an RRC_CONFIG_COMPLETE_REQ\n");
nsa_sendmsg_to_nrue(&msg, sizeof(msg), RRC_CONFIG_COMPLETE_REQ);
}
if (r_r8->mobilityControlInfo) {
......@@ -6623,6 +6623,13 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
}
break;
}
case NR_RRC_CONFIG_COMPLETE_REQ:
{
LOG_I(RRC, "Got an NR_RRC_CONFIG_COMPLETE_REQ. Now make octet string and call below!\n");
//rrc_ue_generate_RRCConnectionReconfigurationComplete(ctxt, 0, 0);
break;
}
default:
LOG_E(RRC, "No NSA Message Found\n");
}
......
......@@ -513,7 +513,7 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
}
else if (get_softmodem_params()->nsa)
{
//process_nsa_message(NR_UE_rrc_inst, nr_SecondaryCellGroupConfig_r15, buffer,msg_len);
LOG_D(NR_RRC, "In NSA mode \n");
}
}else{
NR_UE_rrc_inst = NULL;
......@@ -3098,37 +3098,37 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len)
}
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
struct msg {
uint32_t RadioBearer_size;
uint32_t SecondaryCellGroup_size;
uint8_t trans_id;
uint8_t buffer[];
} hdr;
AssertFatal(msg_len >= sizeof(hdr), "Bad received msg\n");
memcpy(&hdr, msg_buffer, sizeof(hdr));
LOG_I(NR_RRC, "We got an RRC_CONFIG_COMPLETE_REQ\n");
uint32_t nr_RadioBearer_size = hdr.RadioBearer_size;
uint32_t nr_SecondaryCellGroup_size = hdr.SecondaryCellGroup_size;
AssertFatal(sizeof(hdr) + nr_RadioBearer_size + nr_SecondaryCellGroup_size != msg_len,
"Bad received msg\n");
uint8_t t_id = hdr.trans_id;
LOG_I(NR_RRC, "nr_RadioBearerConfig1_r15 size %d nr_SecondaryCellGroupConfig_r15 size %d t_id %d\n",
nr_RadioBearer_size,
nr_SecondaryCellGroup_size,
t_id);
uint8_t *nr_RadioBearer_buffer = msg_buffer + offsetof(struct msg, buffer);
uint8_t *nr_SecondaryCellGroup_buffer = nr_RadioBearer_buffer + nr_RadioBearer_size;
process_nsa_message(NR_UE_rrc_inst, nr_SecondaryCellGroupConfig_r15, nr_SecondaryCellGroup_buffer,
nr_SecondaryCellGroup_size);
process_nsa_message(NR_UE_rrc_inst, nr_RadioBearerConfigX_r15, nr_RadioBearer_buffer, nr_RadioBearer_size);
LOG_I(NR_RRC, "Calling do_NR_RRCReconfigurationComplete. t_id %d \n", t_id);
protocol_ctxt_t ctxt;
memset(&ctxt, 0, sizeof(ctxt));
uint8_t buffer[RRC_BUF_SIZE];
size_t size = do_NR_RRCReconfigurationComplete(&ctxt, buffer, t_id);
nsa_sendmsg_to_lte_ue(buffer, size, NR_RRC_CONFIG_COMPLETE_REQ);
break;
}
default:
......
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