Commit 672ae1e3 authored by Raymond Knopp's avatar Raymond Knopp

added nr/eutra-nr request to first UECapabilityEnquiry message

parent 630b609d
...@@ -3220,56 +3220,65 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, ...@@ -3220,56 +3220,65 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.count=0; dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.count=0;
ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list, ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list,
&rat); &rat);
LTE_RAT_Type_t rat_nr=LTE_RAT_Type_nr;
/* request NR configuration */ LTE_RAT_Type_t rat_eutra_nr=LTE_RAT_Type_eutra_nr;
LTE_UECapabilityEnquiry_r8_IEs_t *r8 = &dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8; LTE_UECapabilityEnquiry_r8_IEs_t *r8 = &dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8;
LTE_UECapabilityEnquiry_v8a0_IEs_t r8_a0; LTE_UECapabilityEnquiry_v8a0_IEs_t r8_a0;
LTE_UECapabilityEnquiry_v1180_IEs_t r11_80; LTE_UECapabilityEnquiry_v1180_IEs_t r11_80;
LTE_UECapabilityEnquiry_v1310_IEs_t r13_10; LTE_UECapabilityEnquiry_v1310_IEs_t r13_10;
LTE_UECapabilityEnquiry_v1430_IEs_t r14_30; LTE_UECapabilityEnquiry_v1430_IEs_t r14_30;
LTE_UECapabilityEnquiry_v1510_IEs_t r15_10; LTE_UECapabilityEnquiry_v1510_IEs_t r15_10;
OCTET_STRING_t req_freq;
memset(&r8_a0, 0, sizeof(r8_a0)); if (nr_band>0) {
memset(&r11_80, 0, sizeof(r11_80));
memset(&r13_10, 0, sizeof(r13_10));
memset(&r14_30, 0, sizeof(r14_30));
memset(&r15_10, 0, sizeof(r15_10));
r8->nonCriticalExtension = &r8_a0; ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list,
r8_a0.nonCriticalExtension = &r11_80; &rat_nr);
r11_80.nonCriticalExtension = &r13_10; ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list,
r13_10.nonCriticalExtension = &r14_30; &rat_eutra_nr);
r14_30.nonCriticalExtension = &r15_10;
/* TODO: no hardcoded values here */ /* request NR configuration */
nsa_band_list = (NR_FreqBandList_t *)calloc(1, sizeof(NR_FreqBandList_t)); memset(&r8_a0, 0, sizeof(r8_a0));
memset(&r11_80, 0, sizeof(r11_80));
memset(&r13_10, 0, sizeof(r13_10));
memset(&r14_30, 0, sizeof(r14_30));
memset(&r15_10, 0, sizeof(r15_10));
nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t)); r8->nonCriticalExtension = &r8_a0;
nsa_band->present = NR_FreqBandInformation_PR_bandInformationEUTRA; r8_a0.nonCriticalExtension = &r11_80;
nsa_band->choice.bandInformationEUTRA = (NR_FreqBandInformationEUTRA_t *) calloc(1, sizeof(NR_FreqBandInformationEUTRA_t)); r11_80.nonCriticalExtension = &r13_10;
nsa_band->choice.bandInformationEUTRA->bandEUTRA = eutra_band; r13_10.nonCriticalExtension = &r14_30;
ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band); r14_30.nonCriticalExtension = &r15_10;
nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t)); /* TODO: no hardcoded values here */
nsa_band->present = NR_FreqBandInformation_PR_bandInformationNR;
nsa_band->choice.bandInformationNR = (NR_FreqBandInformationNR_t *) calloc(1, sizeof(NR_FreqBandInformationNR_t)); nsa_band_list = (NR_FreqBandList_t *)calloc(1, sizeof(NR_FreqBandList_t));
if(nr_band > 0)
nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t));
nsa_band->present = NR_FreqBandInformation_PR_bandInformationEUTRA;
nsa_band->choice.bandInformationEUTRA = (NR_FreqBandInformationEUTRA_t *) calloc(1, sizeof(NR_FreqBandInformationEUTRA_t));
nsa_band->choice.bandInformationEUTRA->bandEUTRA = eutra_band;
ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band);
nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t));
nsa_band->present = NR_FreqBandInformation_PR_bandInformationNR;
nsa_band->choice.bandInformationNR = (NR_FreqBandInformationNR_t *) calloc(1, sizeof(NR_FreqBandInformationNR_t));
//if(nr_band > 0)
nsa_band->choice.bandInformationNR->bandNR = nr_band; nsa_band->choice.bandInformationNR->bandNR = nr_band;
else //else
nsa_band->choice.bandInformationNR->bandNR = 78; // nsa_band->choice.bandInformationNR->bandNR = 78;
ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band); ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band);
OCTET_STRING_t req_freq;
//unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x02, 0x68 }; // bands 7 & nr78 //unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x02, 0x68 }; // bands 7 & nr78
unsigned char req_freq_buf[1024]; unsigned char req_freq_buf[1024];
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_FreqBandList, enc_rval = uper_encode_to_buffer(&asn_DEF_NR_FreqBandList,
NULL, NULL,
(void *)nsa_band_list, (void *)nsa_band_list,
req_freq_buf, req_freq_buf,
1024); 1024);
xer_fprint(stdout, &asn_DEF_NR_FreqBandList, (void *)nsa_band_list); xer_fprint(stdout, &asn_DEF_NR_FreqBandList, (void *)nsa_band_list);
...@@ -3280,14 +3289,16 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, ...@@ -3280,14 +3289,16 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
//0x01, 0x60, 0x18, 0x05, 0x80, 0xc0, 0x04, 0x04, 0xc1, 0x2c, 0x10, 0x08, 0x20, 0x30, 0x40, 0xe0, 0x82, 0x40, 0x28, 0x80, 0x9a //0x01, 0x60, 0x18, 0x05, 0x80, 0xc0, 0x04, 0x04, 0xc1, 0x2c, 0x10, 0x08, 0x20, 0x30, 0x40, 0xe0, 0x82, 0x40, 0x28, 0x80, 0x9a
// }; // };
req_freq.buf = req_freq_buf; req_freq.buf = req_freq_buf;
req_freq.size = (enc_rval.encoded+7)/8; req_freq.size = (enc_rval.encoded+7)/8;
// req_freq.size = 21; // req_freq.size = 21;
r15_10.requestedFreqBandsNR_MRDC_r15 = &req_freq; r15_10.requestedFreqBandsNR_MRDC_r15 = &req_freq;
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { // Add request for eutra-nr
xer_fprint(stdout, &asn_DEF_LTE_DL_DCCH_Message, (void *)&dl_dcch_msg);
} }
// if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_LTE_DL_DCCH_Message, (void *)&dl_dcch_msg);
// }
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_DCCH_Message, enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_DCCH_Message,
NULL, NULL,
......
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