Commit fe13ce77 authored by cucengineer's avatar cucengineer

debug

parent 54536bb8
...@@ -615,6 +615,7 @@ void *rrc_enb_process_msg(void *notUsed) { ...@@ -615,6 +615,7 @@ void *rrc_enb_process_msg(void *notUsed) {
return NULL; return NULL;
} }
extern void tesths(void);//CUC:test
int main( int argc, char **argv ) { int main( int argc, char **argv ) {
//uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2; //uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
...@@ -677,6 +678,11 @@ int main( int argc, char **argv ) { ...@@ -677,6 +678,11 @@ int main( int argc, char **argv ) {
#endif #endif
*/ */
printf("witcomm111witcomm: \n");//CUC:test
tesths();
printf("witcomm111witcomm \n");
NB_UE_INST=1; NB_UE_INST=1;
NB_INST=1; NB_INST=1;
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_NR_UE **)); PHY_vars_UE_g = malloc(sizeof(PHY_VARS_NR_UE **));
......
...@@ -14,8 +14,7 @@ int decode_fgs_authentication_request(authenticationrequestHeader_t *fgs_authent ...@@ -14,8 +14,7 @@ int decode_fgs_authentication_request(authenticationrequestHeader_t *fgs_authent
{ {
int decoded = 0; int decoded = 0;
fgs_authentication_req->ngKSI = (*(buffer + decoded)>>4) & 0x0f; fgs_authentication_req->ngKSI = *(buffer + decoded) & 0x0f;
fgs_authentication_req->spare = *(buffer + decoded) & 0x0f;
decoded++; decoded++;
IES_DECODE_U8(buffer, decoded, fgs_authentication_req->ABBALen); IES_DECODE_U8(buffer, decoded, fgs_authentication_req->ABBALen);
...@@ -35,6 +34,7 @@ int decode_fgs_authentication_request(authenticationrequestHeader_t *fgs_authent ...@@ -35,6 +34,7 @@ int decode_fgs_authentication_request(authenticationrequestHeader_t *fgs_authent
IES_DECODE_U8(buffer, decoded, fgs_authentication_req->AUTNlen); IES_DECODE_U8(buffer, decoded, fgs_authentication_req->AUTNlen);
memcpy(fgs_authentication_req->AUTN, buffer+decoded, sizeof(fgs_authentication_req->AUTN)); memcpy(fgs_authentication_req->AUTN, buffer+decoded, sizeof(fgs_authentication_req->AUTN));
decoded += sizeof(fgs_authentication_req->AUTN); decoded += sizeof(fgs_authentication_req->AUTN);
break;
default: default:
return TLV_DECODE_UNEXPECTED_IEI; return TLV_DECODE_UNEXPECTED_IEI;
......
...@@ -99,6 +99,7 @@ int decode_fgs_registration_accept(fgs_registration_accept_msg *fgs_registration ...@@ -99,6 +99,7 @@ int decode_fgs_registration_accept(fgs_registration_accept_msg *fgs_registration
int decode_result = 0; int decode_result = 0;
IES_DECODE_U8(buffer, decoded, fgs_registration_acc->fgsregistrationresult.resultlength); IES_DECODE_U8(buffer, decoded, fgs_registration_acc->fgsregistrationresult.resultlength);
fgs_registration_acc->fgsregistrationresult.spare = (*(buffer + decoded)>>4) & 0xf;
fgs_registration_acc->fgsregistrationresult.smsallowed = (*(buffer + decoded)>>3) & 0x1; fgs_registration_acc->fgsregistrationresult.smsallowed = (*(buffer + decoded)>>3) & 0x1;
fgs_registration_acc->fgsregistrationresult.registrationresult = *(buffer + decoded) & 0x7; fgs_registration_acc->fgsregistrationresult.registrationresult = *(buffer + decoded) & 0x7;
decoded++; decoded++;
......
...@@ -15,10 +15,7 @@ int decode_fgs_security_mode_command(securityModeCommand_t *fgs_security_mode_co ...@@ -15,10 +15,7 @@ int decode_fgs_security_mode_command(securityModeCommand_t *fgs_security_mode_co
IES_DECODE_U8(buffer, decoded, fgs_security_mode_com->selectedNASsecurityalgorithms); IES_DECODE_U8(buffer, decoded, fgs_security_mode_com->selectedNASsecurityalgorithms);
fgs_security_mode_com->ngKSI = (*(buffer + decoded)>>4) & 0x0f; fgs_security_mode_com->ngKSI = *(buffer + decoded) & 0x0f;
decoded++;
fgs_security_mode_com->spare = *(buffer + decoded) & 0x0f;
decoded++; decoded++;
return decoded; return decoded;
......
...@@ -230,21 +230,21 @@ void tesths(void) //CUC:test ...@@ -230,21 +230,21 @@ void tesths(void) //CUC:test
char Authenticationrequest[] = "7e005601020000217d003b4a2e3bb80403de19020f57b16a2010583f0d352eb89001539b2cb2cbf1da5c"; char Authenticationrequest[] = "7e005601020000217d003b4a2e3bb80403de19020f57b16a2010583f0d352eb89001539b2cb2cbf1da5c";
uint32_t len1=84; uint32_t len1=84;
Byte_t *data1= (uint8_t *)malloc(sizeof(uint8_t)*len1); Byte_t *data1= (uint8_t *)malloc(sizeof(uint8_t)*len1);
string2ByteArray(Authenticationrequest, data1); len1 = string2ByteArray(Authenticationrequest, data1);
nr_nas_proc_dl_transfer_ind(data1,len1); nr_nas_proc_dl_transfer_ind(data1,len1);
printf("Security mode: \n "); printf("Security mode: \n ");
char Securitymodecommand[] = "7e005d0201028020e1360102"; char Securitymodecommand[] = "7e005d0201028020e1360102";
uint32_t len2=24; uint32_t len2=24;
Byte_t *data2= (uint8_t *)malloc(sizeof(uint8_t)*len2); Byte_t *data2= (uint8_t *)malloc(sizeof(uint8_t)*len2);
string2ByteArray(Securitymodecommand, data2); len2 = string2ByteArray(Securitymodecommand, data2);
nr_nas_proc_dl_transfer_ind(data2,len2); nr_nas_proc_dl_transfer_ind(data2,len2);
printf("Registration: \n "); printf("Registration: \n ");
char Registrationrequest[] = "7e0042010177000bf202f8398000410000000154070002f83900000115020101210200005e01be"; char Registrationrequest[] = "7e0042010177000bf202f8398000410000000154070002f83900000115020101210200005e01be";
uint32_t len3=94; uint32_t len3=94;
Byte_t *data3= (uint8_t *)malloc(sizeof(uint8_t)*len3); Byte_t *data3= (uint8_t *)malloc(sizeof(uint8_t)*len3);
string2ByteArray(Registrationrequest, data3); len3 = string2ByteArray(Registrationrequest, data3);
nr_nas_proc_dl_transfer_ind(data3,len3); nr_nas_proc_dl_transfer_ind(data3,len3);
printf("Registration request: \n "); printf("Registration request: \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