diff --git a/include/dsd.h b/include/dsd.h index aefe2b4..f35a931 100644 --- a/include/dsd.h +++ b/include/dsd.h @@ -358,6 +358,9 @@ typedef struct uint8_t dmr_dmrla_is_set; //flag to tell us dmrla is set by the user uint8_t dmr_dmrla_n; //n value for dmrla + //DMR Late Entry + uint8_t dmr_le; //user option to turn on or turn off late entry for enc identifiers + //Trunking - Use Group List as Allow List uint8_t trunk_use_allow_list; diff --git a/src/dmr_bs.c b/src/dmr_bs.c index 14a06d3..a35540d 100644 --- a/src/dmr_bs.c +++ b/src/dmr_bs.c @@ -380,13 +380,13 @@ void dmrBS (dsd_opts * opts, dsd_state * state) processMbeFrame (opts, state, NULL, ambe_fr2, NULL); processMbeFrame (opts, state, NULL, ambe_fr3, NULL); - cach_err = dmr_cach (opts, state, cachdata); - if (opts->payload == 0) fprintf (stderr, "\n"); - //run sbrc here to look for the late entry key and alg after we observe potential errors in VC6 if (internalslot == 0 && vc1 == 6) dmr_sbrc (opts, state, power); if (internalslot == 1 && vc2 == 6) dmr_sbrc (opts, state, power); + cach_err = dmr_cach (opts, state, cachdata); + if (opts->payload == 0) fprintf (stderr, "\n"); + // run alg refresh after vc6 ambe processing if (internalslot == 0 && vc1 == 6) dmr_alg_refresh (opts, state); if (internalslot == 1 && vc2 == 6) dmr_alg_refresh (opts, state); diff --git a/src/dmr_le.c b/src/dmr_le.c index f42ba7c..535fe27 100644 --- a/src/dmr_le.c +++ b/src/dmr_le.c @@ -222,12 +222,13 @@ void dmr_sbrc (dsd_opts * opts, dsd_state * state, uint8_t power) if (opts->payload == 1) //hide the sb/rc behind the payload printer, won't be useful to most people { - fprintf (stderr, "\n %s", KCYN); + fprintf (stderr, "%s", KCYN); if (power == 0) fprintf (stderr, " SB: "); if (power == 1) fprintf (stderr, " RC: "); for(i = 0; i < 11; i++) fprintf (stderr, "%d", sbrc_return[i]); fprintf (stderr, " - %03X", sbrc_hex); + fprintf (stderr, "\n"); fprintf (stderr, "%s", KNRM); if (crc_okay == 0) @@ -244,7 +245,7 @@ void dmr_sbrc (dsd_opts * opts, dsd_state * state, uint8_t power) uint8_t key = (sbrc_hex >> 3) & 0xFF; uint8_t cap_site = (sbrc_hex >> 4) & 0x7; //signalling on Cap+ when voice errors (non voice VC6 is present) - if (1 == 1) //opts->payload == 1 + if (opts->dmr_le == 1) //this will now require a user to switch it on or off until more testing/figuring can be done { if (irr_err != 0) ; //fprintf (stderr, "\n %s SLOT %d SB/RC (FEC ERR) %d %s \n", KRED, slot, irr_err, KNRM); if (irr_err == 0) @@ -254,7 +255,7 @@ void dmr_sbrc (dsd_opts * opts, dsd_state * state, uint8_t power) // { // placeholder for future conditions // } - else //Finally have a consistent set-up for this + else //Finally have a consistent set-up for this -- spoke too soon, sadly { //the signalling here is always presents on good voice frames, if errs are [3][2] then its not a VC6 voice frame, but some other 'hidden' frame if (slot == 0 && state->errs < 3) diff --git a/src/dsd_main.c b/src/dsd_main.c index 0eb2c02..510fc9b 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -627,6 +627,9 @@ initOpts (dsd_opts * opts) opts->dmr_dmrla_is_set = 0; opts->dmr_dmrla_n = 0; + //DMR Late Entry + opts->dmr_le = 0; //off by default until worked out some more + //Trunking - Use Group List as Allow List opts->trunk_use_allow_list = 0; //disabled by default @@ -1153,6 +1156,10 @@ usage () printf (" -4 Force Privacy Key over Encryption Identifiers (DMR BP and NXDN Scrambler) \n"); printf (" \n"); printf (" -0 Force RC4 Key over Missing PI header/LE Encryption Identifiers (DMR) \n"); + printf (" \n"); + printf (" -3 Enable DMR Late Entry Encryption Identifiers (VC6 Single Burst) \n"); + printf (" Note: This is experimental and may produce false positives depending on system type, notably Cap+. \n"); + printf (" Use -0 or -4 options above instead if needed. \n"); printf ("\n"); printf (" Trunking Options:\n"); printf (" -C Import Channel to Frequency Map (channum, freq) from csv file. (Capital C) \n"); @@ -1365,7 +1372,7 @@ main (int argc, char **argv) } #ifdef AERO_BUILD - fprintf (stderr, "Build Version: v2.1 Beta \n"); + fprintf (stderr, "Build Version: v2.1 Beta 2\n"); #else fprintf (stderr, "Build Version: %s \n", GIT_TAG); #endif @@ -1415,6 +1422,11 @@ main (int argc, char **argv) state.keyloader = 0; //turn off keyloader break; + case '3': + opts.dmr_le = 1; + fprintf (stderr,"DMR Late Entry Encryption Identifiers Enabled (VC6 Single Burst)\n"); + break; + case 'Y': //conventional scanner mode opts.scanner_mode = 1; //enable scanner opts.p25_trunk = 0; //turn off trunking mode if user enabled it diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c index 6e49ac5..bbd4b00 100644 --- a/src/dsd_ncurses.c +++ b/src/dsd_ncurses.c @@ -2158,7 +2158,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) if (opts->ncurses_compact == 1) { printw ("------------------------------------------------------------------------------\n"); - printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.1 Beta"); + printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.1 Beta 2"); printw ("------------------------------------------------------------------------------\n"); } #elif LIMAZULUTWEAKS @@ -2194,7 +2194,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) if (i == 4) printw (" MBElib %s", versionstr); #ifdef AERO_BUILD if (i == 5) printw (" %s ", "Aero Build"); - if (i == 6) printw (" v2.1 Beta \n"); + if (i == 6) printw (" v2.1 Beta 2\n"); #elif ZDEV_BUILD if (i == 5) printw (" %s ", "zDEV Build"); if (i == 6) printw (" %s \n", GIT_TAG); @@ -2701,7 +2701,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) attron(COLOR_PAIR(3)); } - if (state->payload_algid == 0xAA || state->payload_algid == 0x21) + //Anytone 0x01 will never show here since its converted to 0x21 for handling + if (state->payload_algid == 0xAA || state->payload_algid == 0x21 || state->payload_algid == 0x01) { attron(COLOR_PAIR(1)); printw("RC4 "); @@ -2898,7 +2899,9 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) attroff(COLOR_PAIR(1)); attron(COLOR_PAIR(3)); } - if (state->payload_algidR == 0xAA || state->payload_algidR == 0x21) + + //Anytone 0x01 will never show here since its converted to 0x21 for handling + if (state->payload_algidR == 0xAA || state->payload_algidR == 0x21 || state->payload_algidR == 0x01) { attron(COLOR_PAIR(1)); printw("RC4 ");