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( ...@@ -2398,7 +2398,9 @@ do_RRCConnectionReconfigurationComplete(
rrcConnectionReconfigurationComplete->criticalExtensions.present = rrcConnectionReconfigurationComplete->criticalExtensions.present =
LTE_RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8; LTE_RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8;
rrcConnectionReconfigurationComplete->criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8.nonCriticalExtension=NULL; 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) ) { if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, (void *)&ul_dcch_msg); xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, (void *)&ul_dcch_msg);
} }
......
...@@ -1918,9 +1918,6 @@ rrc_ue_process_rrcConnectionReconfiguration( ...@@ -1918,9 +1918,6 @@ rrc_ue_process_rrcConnectionReconfiguration(
criticalExtensions.choice.c1. criticalExtensions.choice.c1.
choice.rrcConnectionReconfiguration_r8; 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)) { if (is_nr_r15_config_present(r_r8)) {
OCTET_STRING_t *nr_RadioBearer = r_r8->nonCriticalExtension->nonCriticalExtension-> OCTET_STRING_t *nr_RadioBearer = r_r8->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension-> nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
...@@ -1930,23 +1927,26 @@ rrc_ue_process_rrcConnectionReconfiguration( ...@@ -1930,23 +1927,26 @@ rrc_ue_process_rrcConnectionReconfiguration(
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension-> nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension-> nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->
nr_Config_r15->choice.setup.nr_SecondaryCellGroupConfig_r15; 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_RadioBearer->size,
nr_SecondaryCellGroup->size); nr_SecondaryCellGroup->size);
uint8_t buffer[8192];
LTE_RRCConnectionReconfiguration_t *rrcCR; LOG_I(RRC, "Calling nsa_sendmsg_to_nr_ue to send an RRC_CONFIG_COMPLETE_REQ\n");
memcpy((char *)rrcCR, nsa_sendmsg_to_nrue(&msg, sizeof(msg), RRC_CONFIG_COMPLETE_REQ);
(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);
} }
if (r_r8->mobilityControlInfo) { if (r_r8->mobilityControlInfo) {
...@@ -6623,6 +6623,13 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len) ...@@ -6623,6 +6623,13 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
} }
break; 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: default:
LOG_E(RRC, "No NSA Message Found\n"); 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){ ...@@ -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) 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{ }else{
NR_UE_rrc_inst = NULL; NR_UE_rrc_inst = NULL;
...@@ -3098,37 +3098,37 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len) ...@@ -3098,37 +3098,37 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len)
} }
case RRC_CONFIG_COMPLETE_REQ: case RRC_CONFIG_COMPLETE_REQ:
{ {
LOG_I(NR_RRC, "MELISSA ELKADI! We got a RRC_CONFIG_COMPLETE_REQ\n"); struct msg {
#if 0 uint32_t RadioBearer_size;
NR_DL_DCCH_Message_t *dl_dcch_msg = NULL; uint32_t SecondaryCellGroup_size;
asn_dec_rval_t dec_rval = uper_decode_complete(NULL, uint8_t trans_id;
&asn_DEF_NR_DL_DCCH_Message, uint8_t buffer[];
(void **)&dl_dcch_msg, } hdr;
msg_buffer, AssertFatal(msg_len >= sizeof(hdr), "Bad received msg\n");
msg_len); memcpy(&hdr, msg_buffer, sizeof(hdr));
LOG_I(NR_RRC, "We got an RRC_CONFIG_COMPLETE_REQ\n");
if (dec_rval.code != RC_OK && dec_rval.consumed == 0) uint32_t nr_RadioBearer_size = hdr.RadioBearer_size;
{ uint32_t nr_SecondaryCellGroup_size = hdr.SecondaryCellGroup_size;
LOG_E(RRC, "%s: Failed to decode LTE_DL_DCC_Msg\n", __FUNCTION__); AssertFatal(sizeof(hdr) + nr_RadioBearer_size + nr_SecondaryCellGroup_size != msg_len,
SEQUENCE_free(&asn_DEF_LTE_DL_DCCH_Message, dl_dcch_msg, ASFM_FREE_EVERYTHING); "Bad received msg\n");
return; 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",
LTE_RRCConnectionReconfiguration_t *rrcConnectionReconfiguration = &dl_dcch_msg-> nr_RadioBearer_size,
LTE_RRCConnectionReconfiguration_r8_IEs_t *r_r8 = &rrcConnectionReconfiguration-> nr_SecondaryCellGroup_size,
criticalExtensions.choice.c1. t_id);
choice.rrcConnectionReconfiguration_r8;
OCTET_STRING_t *nr_RadioBearer = r_r8->nonCriticalExtension->nonCriticalExtension-> uint8_t *nr_RadioBearer_buffer = msg_buffer + offsetof(struct msg, buffer);
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension-> uint8_t *nr_SecondaryCellGroup_buffer = nr_RadioBearer_buffer + nr_RadioBearer_size;
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension-> process_nsa_message(NR_UE_rrc_inst, nr_SecondaryCellGroupConfig_r15, nr_SecondaryCellGroup_buffer,
nr_RadioBearerConfig1_r15; nr_SecondaryCellGroup_size);
OCTET_STRING_t *nr_SecondaryCellGroup = r_r8->nonCriticalExtension->nonCriticalExtension-> process_nsa_message(NR_UE_rrc_inst, nr_RadioBearerConfigX_r15, nr_RadioBearer_buffer, nr_RadioBearer_size);
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension-> LOG_I(NR_RRC, "Calling do_NR_RRCReconfigurationComplete. t_id %d \n", t_id);
nonCriticalExtension->nonCriticalExtension->nonCriticalExtension-> protocol_ctxt_t ctxt;
nr_Config_r15->choice.setup.nr_SecondaryCellGroupConfig_r15; memset(&ctxt, 0, sizeof(ctxt));
LOG_I(NR_RRC, "MELISSA ELKADI! nr_RadioBearerConfig1_r15 size %ld nr_SecondaryCellGroupConfig_r15 size %ld\n", uint8_t buffer[RRC_BUF_SIZE];
nr_RadioBearer->size, size_t size = do_NR_RRCReconfigurationComplete(&ctxt, buffer, t_id);
nr_SecondaryCellGroup->size); nsa_sendmsg_to_lte_ue(buffer, size, NR_RRC_CONFIG_COMPLETE_REQ);
#endif break;
} }
default: 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