mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-14 01:37:25 -05:00
Experimental Symbol Capture Bin Input Throttle
Experimental Symbol Capture Bin Input Throttle --throttle read speed when reading capture bin files that are still being written to by OP25, quick easy piggyback (-n). Readme tweaks Minor tweaks
This commit is contained in:
@@ -267,7 +267,7 @@ initOpts (dsd_opts * opts)
|
||||
opts->frame_dpmr = 0;
|
||||
opts->frame_provoice = 0;
|
||||
opts->mod_c4fm = 1;
|
||||
opts->mod_qpsk = 0;
|
||||
opts->mod_qpsk = 1;
|
||||
opts->mod_gfsk = 0;
|
||||
opts->uvquality = 3;
|
||||
opts->inverted_x2tdma = 1; // most transmitter + scanner + sound card combinations show inverted signals for this
|
||||
@@ -572,6 +572,10 @@ initState (dsd_state * state)
|
||||
state->p2_hardset = 0;
|
||||
state->p2_is_lcch = 0;
|
||||
|
||||
//experimental symbol file capture read throttle
|
||||
state->symbol_throttle = 0; //throttle speed
|
||||
state->use_throttle = 0; //only use throttle if set to 1
|
||||
|
||||
state->p2_scramble_offset = 0;
|
||||
state->p2_vch_chan_num = 0;
|
||||
|
||||
@@ -618,8 +622,8 @@ usage ()
|
||||
printf (" -T Enable Per Call WAV file saving in XDMA and NXDN decoding classes\n");
|
||||
printf (" (Per Call can only be used in Ncurses Terminal!)\n");
|
||||
printf (" (Running in console will use static wav files)\n");
|
||||
//printf (" -a Display port audio devices\n");
|
||||
//printf (" -W Monitor Source Audio When No Sync Detected (broken!)\n");
|
||||
printf (" -n Throttle Symbol Capture Bin Input");
|
||||
printf (" (useful when reading files still being written to by OP25)");
|
||||
printf ("\n");
|
||||
printf ("RTL-SDR options:\n");
|
||||
printf (" -c <hertz> RTL-SDR Frequency\n");
|
||||
@@ -662,9 +666,6 @@ usage ()
|
||||
printf (" (default=36)\n");
|
||||
printf (" -M <num> Min/Max buffer size for QPSK decision point tracking\n");
|
||||
printf (" (default=15)\n");
|
||||
// printf (" -T Enable DMR TDMA Stereo Voice (Two Slot Dual Voices)\n");
|
||||
// printf (" This feature will open two streams for slot 1 voice and slot 2 voice\n");
|
||||
// printf (" May Cause Skipping or sync issues if bad signal/errors\n");
|
||||
// printf (" -F Enable DMR TDMA Stereo Passive Frame Sync\n");
|
||||
// printf (" This feature will attempt to resync less often due to excessive voice errors\n");
|
||||
// printf (" Use if skipping occurs, but may cause wonky audio due to loss of good sync\n");
|
||||
@@ -979,7 +980,9 @@ main (int argc, char **argv)
|
||||
case 'v':
|
||||
sscanf (optarg, "%d", &opts.verbose);
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
state.use_throttle = 1;
|
||||
break;
|
||||
case 'K':
|
||||
sscanf (optarg, "%lld", &state.K);
|
||||
if (state.K > 256)
|
||||
|
||||
@@ -2052,6 +2052,30 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
printw("DES-OFB");
|
||||
attron(COLOR_PAIR(3));
|
||||
}
|
||||
if (state->payload_algid == 0x83 || state->payload_algid == 0x23)
|
||||
{
|
||||
attron(COLOR_PAIR(1));
|
||||
printw("Triple DES");
|
||||
attron(COLOR_PAIR(3));
|
||||
}
|
||||
if (state->payload_algid == 0x85 || state->payload_algid == 0x24)
|
||||
{
|
||||
attron(COLOR_PAIR(1));
|
||||
printw("AES-128");
|
||||
attron(COLOR_PAIR(3));
|
||||
}
|
||||
if (state->payload_algid == 0x84 || state->payload_algid == 0x25)
|
||||
{
|
||||
attron(COLOR_PAIR(1));
|
||||
printw("AES-256");
|
||||
attron(COLOR_PAIR(3));
|
||||
}
|
||||
if (state->payload_algid == 0x02)
|
||||
{
|
||||
attron(COLOR_PAIR(1));
|
||||
printw("Hytera Full Encrypt");
|
||||
attron(COLOR_PAIR(3));
|
||||
}
|
||||
|
||||
if(state->dmrburstL == 16 && state->dmr_so == 0x40 && state->R == 0) //0100 0000
|
||||
{
|
||||
@@ -2179,6 +2203,30 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
printw("DES-OFB");
|
||||
attron(COLOR_PAIR(3));
|
||||
}
|
||||
if (state->payload_algidR == 0x83 || state->payload_algidR == 0x23)
|
||||
{
|
||||
attron(COLOR_PAIR(1));
|
||||
printw("Triple DES");
|
||||
attron(COLOR_PAIR(3));
|
||||
}
|
||||
if (state->payload_algidR == 0x85 || state->payload_algidR == 0x24)
|
||||
{
|
||||
attron(COLOR_PAIR(1));
|
||||
printw("AES-128");
|
||||
attron(COLOR_PAIR(3));
|
||||
}
|
||||
if (state->payload_algidR == 0x84 || state->payload_algidR == 0x25)
|
||||
{
|
||||
attron(COLOR_PAIR(1));
|
||||
printw("AES-256");
|
||||
attron(COLOR_PAIR(3));
|
||||
}
|
||||
if (state->payload_algidR == 0x02)
|
||||
{
|
||||
attron(COLOR_PAIR(1));
|
||||
printw("Hytera Full Encrypt");
|
||||
attron(COLOR_PAIR(3));
|
||||
}
|
||||
//Call Types, may switch to the more robust version later?
|
||||
if(state->dmrburstR == 16 && state->dmr_soR == 0x40 && state->R == 0) //0100 0000
|
||||
{
|
||||
|
||||
@@ -363,6 +363,13 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
||||
}
|
||||
|
||||
state->symbolc = fgetc(opts->symbolfile);
|
||||
|
||||
//experimental throttle
|
||||
useconds_t stime = state->symbol_throttle;
|
||||
if (state->use_throttle == 1)
|
||||
{
|
||||
usleep(stime);
|
||||
}
|
||||
//fprintf(stderr, "%d", state->symbolc);
|
||||
if( feof(opts->symbolfile) )
|
||||
{
|
||||
|
||||
10
src/p25_p2.c
10
src/p25_p2.c
@@ -144,6 +144,12 @@ void p2_dibit_buffer (dsd_opts * opts, dsd_state * state)
|
||||
if (opts->audio_in_type == 4) //4
|
||||
{
|
||||
dibit = fgetc(opts->symbolfile);
|
||||
//experimental throttle
|
||||
useconds_t stime = state->symbol_throttle;
|
||||
if (state->use_throttle == 1)
|
||||
{
|
||||
usleep(stime);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -203,7 +209,7 @@ void process_Frame_Scramble (dsd_opts * opts, dsd_state * state)
|
||||
|
||||
void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned long long int MAC[24])
|
||||
{
|
||||
//handle variable content MAC PDUs (Active, Idle, or Hangtime)
|
||||
//handle variable content MAC PDUs (Active, Idle, Hangtime, or Signal)
|
||||
//use type to specify SACCH or FACCH, so we know if we should invert the currentslot when assigning ids etc
|
||||
//get first b1 and b2 values, and first offset value
|
||||
//need a lookup table for message length values...aquired one from OP25
|
||||
@@ -228,7 +234,7 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
|
||||
int b_b = 0;
|
||||
int mco_b = 0;
|
||||
|
||||
//assing here if OECI MAC SIGNAL, after passing RS and CRC
|
||||
//assigning here if OECI MAC SIGNAL, after passing RS and CRC
|
||||
if (state->p2_is_lcch)
|
||||
{
|
||||
if (slot == 0) state->dmrburstL = 30;
|
||||
|
||||
Reference in New Issue
Block a user