diff --git a/src/dsd_frame.c b/src/dsd_frame.c index 5c876f0..6c23c75 100644 --- a/src/dsd_frame.c +++ b/src/dsd_frame.c @@ -26,30 +26,23 @@ void printFrameInfo (dsd_opts * opts, dsd_state * state) { - int level; + UNUSED(opts); - level = (int) state->max / 164; - if (opts->verbose > 0) - { - // fprintf (stderr,"inlvl: %2i%% ", level); - UNUSED(level); - } - if (state->nac != 0) - { - fprintf (stderr, "%s", KCYN); - fprintf (stderr,"nac: [%4X] ", state->nac); - fprintf (stderr, "%s", KNRM); - } + fprintf (stderr, "%s", KCYN); + if (state->p2_wacn != 0) + fprintf (stderr, "WACN: %05llX; ", state->p2_wacn); + if (state->p2_sysid != 0) + fprintf (stderr, "SYS: %03llX; ", state->p2_sysid); + if (state->p2_cc != 0) + fprintf (stderr, "NAC/CC: %03llX; ", state->p2_cc); + else fprintf (stderr, "NAC: %03llX; ", state->nac); - if (opts->verbose > 1) - { - fprintf (stderr, "%s", KGRN); - fprintf (stderr,"src: [%8i] ", state->lastsrc); - fprintf (stderr, "%s", KNRM); - } - fprintf (stderr, "%s", KGRN); - fprintf (stderr,"tg: [%5i] ", state->lasttg); + if (state->p2_siteid != 0) + fprintf (stderr, "Site: %03lld; ", state->p2_siteid); + if (state->p2_rfssid != 0) + fprintf (stderr, "RFSS: %03lld; ", state->p2_rfssid); fprintf (stderr, "%s", KNRM); + } void diff --git a/src/dsd_frame_sync.c b/src/dsd_frame_sync.c index e6b7af4..a7623a1 100644 --- a/src/dsd_frame_sync.c +++ b/src/dsd_frame_sync.c @@ -432,7 +432,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state) sprintf (state->ftype, "P25 Phase 1"); if (opts->errorbars == 1) { - printFrameSync (opts, state, "+P25p1 ", synctest_pos + 1, modulation); + printFrameSync (opts, state, "+P25p1", synctest_pos + 1, modulation); } state->lastsynctype = 0; state->last_cc_sync_time = time(NULL); @@ -708,13 +708,11 @@ getFrameSync (dsd_opts * opts, dsd_state * state) state->lastsynctype = 35; //35 if (opts->errorbars == 1) { - printFrameSync (opts, state, "+P25p2 SISCH", synctest_pos + 1, modulation); + printFrameSync (opts, state, "+P25p2", synctest_pos + 1, modulation); } if (state->p2_wacn != 0 && state->p2_cc != 0 && state->p2_sysid != 0) { - //fprintf (stderr, "%s", KCYN); - fprintf (stderr, " WACN [%05llX] SYS [%03llX] NAC [%03llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc); - //fprintf (stderr, "%s", KNRM); + printFrameInfo(opts, state); } else { @@ -741,13 +739,11 @@ getFrameSync (dsd_opts * opts, dsd_state * state) opts->inverted_p2 = 1; if (opts->errorbars == 1) { - printFrameSync (opts, state, "-P25p2 SISCH", synctest_pos + 1, modulation); + printFrameSync (opts, state, "-P25p2", synctest_pos + 1, modulation); } if (state->p2_wacn != 0 && state->p2_cc != 0 && state->p2_sysid != 0) { - //fprintf (stderr, "%s", KCYN); - fprintf (stderr, " WACN [%05llX] SYS [%03llX] NAC [%03llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc); - //fprintf (stderr, "%s", KNRM); + printFrameInfo(opts, state); } else { diff --git a/src/p25p1_pdu_data.c b/src/p25p1_pdu_data.c index 4f75f2a..5d861a9 100644 --- a/src/p25p1_pdu_data.c +++ b/src/p25p1_pdu_data.c @@ -98,7 +98,7 @@ uint8_t p25_decrypt_pdu(dsd_opts * opts, dsd_state * state, uint8_t * input, uin uint8_t ks_bytes[3096]; memset (ks_bytes, 0, sizeof(ks_bytes)); //create keystream - if (alg_id == 0x84 || alg_id == 0x89) //AES -- dsd-fme -f1 -i '/SSD_STORAGE/2024_DEV/otar shit/OTAR/SUGARLOAF DATA OUTPUT/CC-DSDPlus-Raw-Input_2024-08-27@134540.wav' -s 96000 -K testaeskeys.csv + if (alg_id == 0x84 || alg_id == 0x89) { //aes specific arrays and things uint8_t aes_iv[16]; memset (aes_iv, 0, sizeof(aes_iv));