diff --git a/src/dsd_main.c b/src/dsd_main.c index 9decd56..1f156f4 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -177,9 +177,8 @@ noCarrier (dsd_opts * opts, dsd_state * state) state->last_cc_sync_time = time(NULL); //test to switch back to 10/4 P1 QPSK for P25 FDMA CC - //some P2 systems are C4FM, so this needs to be allowed on all P25 systems! - //but not to happen on NXDN48 or dPMR systems - if (opts->mod_qpsk == 1 && state->p25_cc_is_tdma == 0) + //reworked to always change back to 10/4 if p25_cc_is_tdma is set to 0 or 1 (inits on 2) + if (state->p25_cc_is_tdma == 0) //is set on signal from P25 TSBK or MAC_SIGNAL { state->samplesPerSymbol = 10; state->symbolCenter = 4; @@ -1078,6 +1077,7 @@ usage () printf (" -ft XDMA P25 and DMR BS/MS frame types (new default)\n"); printf (" -fs DMR Stereo BS and MS Simplex\n"); printf (" -f1 Decode only P25 Phase 1\n"); + printf (" -f2 Decode only P25 Phase 2**\n"); printf (" -fd Decode only D-STAR\n"); printf (" -fr Decode only DMR Mono - Single Slot Voice\n"); printf (" -fx Decode only X2-TDMA\n"); @@ -1092,6 +1092,7 @@ usage () printf (" -xd Expect inverted ICOM dPMR signal\n"); printf ("\n"); printf (" * denotes frame types that cannot be auto-detected.\n"); + printf (" ** Phase 2 Single Frequency may require user to manually set WACN/SYSID/CC parameters if MAC_SIGNAL not present.\n"); printf ("\n"); printf ("Advanced Decoder options:\n"); printf (" -X Manually Set P2 Parameters (WACN, SYSID, CC/NAC)\n"); @@ -1345,7 +1346,7 @@ main (int argc, char **argv) } #ifdef AERO_BUILD - fprintf (stderr, "Build Version: v2.0.1-8 Win32 \n"); + fprintf (stderr, "Build Version: v2.0.1-9 Win32 \n"); #else fprintf (stderr, "Build Version: %s \n", GIT_TAG); #endif @@ -1792,7 +1793,7 @@ main (int argc, char **argv) // opts.setmod_bw = 12000; opts.ssize = 36; //128 current default, fall back to old default on P1 only systems opts.msize = 15; //1024 current default, fall back to old default on P1 only systems - sprintf (opts.output_name, "P25P1"); + sprintf (opts.output_name, "P25p1"); fprintf (stderr,"Decoding only P25 Phase 1 frames.\n"); } else if (optarg[0] == 'i') @@ -1863,8 +1864,8 @@ main (int argc, char **argv) opts.frame_dpmr = 0; opts.frame_provoice = 0; opts.frame_ysf = 0; - state.samplesPerSymbol = 10; - state.symbolCenter = 4; + state.samplesPerSymbol = 8; + state.symbolCenter = 3; opts.mod_c4fm = 1; opts.mod_qpsk = 0; opts.mod_gfsk = 0; @@ -1873,8 +1874,8 @@ main (int argc, char **argv) state.dmr_stereo = 0; opts.dmr_mono = 0; // opts.setmod_bw = 12000; - sprintf (opts.output_name, "P25P2"); - fprintf (stderr,"Decoding P25-P2 frames C4FM or OP25 Symbol Captures!\n"); + sprintf (opts.output_name, "P25p2"); + fprintf (stderr,"Decoding 6000 sps P25p2 frames only!\n"); } else if (optarg[0] == 's') { @@ -2053,7 +2054,7 @@ main (int argc, char **argv) state.samplesPerSymbol = 8; state.symbolCenter = 3; // opts.setmod_bw = 12000; - fprintf (stderr,"Enabling 6000 sps P25p2 CQPSK.\n"); + fprintf (stderr,"Enabling 6000 sps P25p2 QPSK.\n"); } //test else if (optarg[0] == '3') diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c index 19462f3..0e5e4b4 100644 --- a/src/dsd_ncurses.c +++ b/src/dsd_ncurses.c @@ -2059,7 +2059,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) { printw ("------------------------------------------------------------------------------\n"); // printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", GIT_TAG); - printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.0.1-7 Win32"); + printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.0.1-9 Win32"); printw ("------------------------------------------------------------------------------\n"); } #elif LIMAZULUTWEAKS diff --git a/src/nxdn_frame.c b/src/nxdn_frame.c index 39ba92f..4612415 100644 --- a/src/nxdn_frame.c +++ b/src/nxdn_frame.c @@ -396,6 +396,9 @@ void nxdn_frame (dsd_opts * opts, dsd_state * state) #endif //end LIMAZULUTWEAKS +if (opts->scanner_mode = 1) + state->last_cc_sync_time = time(NULL) + 2; //add a little extra hangtime between resuming scan + //Option/Steal Flags echoed in Voice, V+F, or Data if (voice && !facch) //voice only, no facch steal { diff --git a/src/p25p2_vpdu.c b/src/p25p2_vpdu.c index e002cb8..1e171d2 100644 --- a/src/p25p2_vpdu.c +++ b/src/p25p2_vpdu.c @@ -118,19 +118,8 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //reworked to set freq once on any call to process_channel_to_freq, and tune on that, independent of slot if (state->p25_cc_freq != 0 && opts->p25_is_tuned == 0 && freq != 0) //if we aren't already on a VC and have a valid frequency { - // //testing switch to P2 channel symbol rate with qpsk enabled, we need to know if we are going to a TDMA channel or an FDMA channel - // if (opts->mod_qpsk == 1) - // { - // int spacing = state->p25_chan_spac[channel >> 12]; - // if (spacing == 0x64) //tdma should always be 0x64, and fdma should always be 0x32 - // { - // state->samplesPerSymbol = 8; - // state->symbolCenter = 3; - // } - // } - - //may be this way independent of whether or not this is QPSK (does C4FM run at 6000 sps?) - if (opts->mod_qpsk == 1) + //changed to allow symbol rate change on C4FM Phase 2 systems as well as QPSK + if (1 == 1) { if (state->p25_chan_tdma[channel >> 12] == 1) { @@ -205,19 +194,8 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //reworked to set freq once on any call to process_channel_to_freq, and tune on that, independent of slot if (state->p25_cc_freq != 0 && opts->p25_is_tuned == 0 && freq != 0) //if we aren't already on a VC and have a valid frequency { - //testing switch to P2 channel symbol rate with qpsk enabled, we need to know if we are going to a TDMA channel or an FDMA channel - // if (opts->mod_qpsk == 1) - // { - // int spacing = state->p25_chan_spac[channel >> 12]; - // if (spacing == 0x64) //tdma should always be 0x64, and fdma should always be 0x32 - // { - // state->samplesPerSymbol = 8; - // state->symbolCenter = 3; - // } - // } - - //may be this way independent of whether or not this is QPSK (does C4FM run at 6000 sps?) - if (opts->mod_qpsk == 1) + //changed to allow symbol rate change on C4FM Phase 2 systems as well as QPSK + if (1 == 1) { if (state->p25_chan_tdma[channel >> 12] == 1) { @@ -324,19 +302,8 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //reworked to set freq once on any call to process_channel_to_freq, and tune on that, independent of slot if (state->p25_cc_freq != 0 && opts->p25_is_tuned == 0 && tunable_freq != 0) //if we aren't already on a VC and have a valid frequency already { - //testing switch to P2 channel symbol rate with qpsk enabled, we need to know if we are going to a TDMA channel or an FDMA channel - // if (opts->mod_qpsk == 1) - // { - // int spacing = state->p25_chan_spac[tunable_chan >> 12]; - // if (spacing == 0x64) //tdma should always be 0x64, and fdma should always be 0x32 - // { - // state->samplesPerSymbol = 8; - // state->symbolCenter = 3; - // } - // } - - //may be this way independent of whether or not this is QPSK (does C4FM run at 6000 sps?) - if (opts->mod_qpsk == 1) + //changed to allow symbol rate change on C4FM Phase 2 systems as well as QPSK + if (1 == 1) { if (state->p25_chan_tdma[tunable_chan >> 12] == 1) { @@ -437,19 +404,8 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //reworked to set freq once on any call to process_channel_to_freq, and tune on that, independent of slot if (state->p25_cc_freq != 0 && opts->p25_is_tuned == 0 && freq != 0) //if we aren't already on a VC and have a valid frequency { - //testing switch to P2 channel symbol rate with qpsk enabled, we need to know if we are going to a TDMA channel or an FDMA channel - // if (opts->mod_qpsk == 1) - // { - // int spacing = state->p25_chan_spac[channel >> 12]; - // if (spacing == 0x64) //tdma should always be 0x64, and fdma should always be 0x32 - // { - // state->samplesPerSymbol = 8; - // state->symbolCenter = 3; - // } - // } - - //may be this way independent of whether or not this is QPSK (does C4FM run at 6000 sps?) - if (opts->mod_qpsk == 1) + //changed to allow symbol rate change on C4FM Phase 2 systems as well as QPSK + if (1 == 1) { if (state->p25_chan_tdma[channel >> 12] == 1) { @@ -532,19 +488,8 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //reworked to set freq once on any call to process_channel_to_freq, and tune on that, independent of slot if (state->p25_cc_freq != 0 && opts->p25_is_tuned == 0 && freq != 0) //if we aren't already on a VC and have a valid frequency { - //testing switch to P2 channel symbol rate with qpsk enabled, we need to know if we are going to a TDMA channel or an FDMA channel - // if (opts->mod_qpsk == 1) - // { - // int spacing = state->p25_chan_spac[channel >> 12]; - // if (spacing == 0x64) //tdma should always be 0x64, and fdma should always be 0x32 - // { - // state->samplesPerSymbol = 8; - // state->symbolCenter = 3; - // } - // } - - //may be this way independent of whether or not this is QPSK (does C4FM run at 6000 sps?) - if (opts->mod_qpsk == 1) + //changed to allow symbol rate change on C4FM Phase 2 systems as well as QPSK + if (1 == 1) { if (state->p25_chan_tdma[channel >> 12] == 1) { @@ -690,19 +635,8 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //reworked to set freq once on any call to process_channel_to_freq, and tune on that, independent of slot if (state->p25_cc_freq != 0 && opts->p25_is_tuned == 0 && tunable_freq != 0) //if we aren't already on a VC and have a valid frequency { - //testing switch to P2 channel symbol rate with qpsk enabled, we need to know if we are going to a TDMA channel or an FDMA channel - // if (opts->mod_qpsk == 1) - // { - // int spacing = state->p25_chan_spac[tunable_chan >> 12]; - // if (spacing == 0x64) //tdma should always be 0x64, and fdma should always be 0x32 - // { - // state->samplesPerSymbol = 8; - // state->symbolCenter = 3; - // } - // } - - //may be this way independent of whether or not this is QPSK (does C4FM run at 6000 sps?) - if (opts->mod_qpsk == 1) + //changed to allow symbol rate change on C4FM Phase 2 systems as well as QPSK + if (1 == 1) { if (state->p25_chan_tdma[tunable_chan >> 12] == 1) { @@ -869,19 +803,8 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //reworked to set freq once on any call to process_channel_to_freq, and tune on that, independent of slot if (state->p25_cc_freq != 0 && opts->p25_is_tuned == 0 && tunable_freq != 0) //if we aren't already on a VC and have a valid frequency already { - //testing switch to P2 channel symbol rate with qpsk enabled, we need to know if we are going to a TDMA channel or an FDMA channel - // if (opts->mod_qpsk == 1) - // { - // int spacing = state->p25_chan_spac[tunable_chan >> 12]; - // if (spacing == 0x64) //tdma should always be 0x64, and fdma should always be 0x32 - // { - // state->samplesPerSymbol = 8; - // state->symbolCenter = 3; - // } - // } - - //may be this way independent of whether or not this is QPSK (does C4FM run at 6000 sps?) - if (opts->mod_qpsk == 1) + //changed to allow symbol rate change on C4FM Phase 2 systems as well as QPSK + if (1 == 1) { if (state->p25_chan_tdma[tunable_chan >> 12] == 1) { @@ -993,19 +916,8 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //reworked to set freq once on any call to process_channel_to_freq, and tune on that, independent of slot if (state->p25_cc_freq != 0 && opts->p25_is_tuned == 0 && tunable_freq != 0) //if we aren't already on a VC and have a valid frequency already { - //testing switch to P2 channel symbol rate with qpsk enabled, we need to know if we are going to a TDMA channel or an FDMA channel - // if (opts->mod_qpsk == 1) - // { - // int spacing = state->p25_chan_spac[tunable_chan >> 12]; - // if (spacing == 0x64) //tdma should always be 0x64, and fdma should always be 0x32 - // { - // state->samplesPerSymbol = 8; - // state->symbolCenter = 3; - // } - // } - - //may be this way independent of whether or not this is QPSK (does C4FM run at 6000 sps?) - if (opts->mod_qpsk == 1) + //changed to allow symbol rate change on C4FM Phase 2 systems as well as QPSK + if (1 == 1) { if (state->p25_chan_tdma[tunable_chan >> 12] == 1) { @@ -1108,19 +1020,9 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //reworked to set freq once on any call to process_channel_to_freq, and tune on that, independent of slot if (state->p25_cc_freq != 0 && opts->p25_is_tuned == 0 && freq1 != 0) //if we aren't already on a VC and have a valid frequency { - //testing switch to P2 channel symbol rate with qpsk enabled, we need to know if we are going to a TDMA channel or an FDMA channel - // if (opts->mod_qpsk == 1) - // { - // int spacing = state->p25_chan_spac[channelt >> 12]; - // if (spacing == 0x64) //tdma should always be 0x64, and fdma should always be 0x32 - // { - // state->samplesPerSymbol = 8; - // state->symbolCenter = 3; - // } - // } - //may be this way independent of whether or not this is QPSK (does C4FM run at 6000 sps?) - if (opts->mod_qpsk == 1) + //changed to allow symbol rate change on C4FM Phase 2 systems as well as QPSK + if (1 == 1) { if (state->p25_chan_tdma[channelt >> 12] == 1) { @@ -1641,7 +1543,7 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon int lcolorcode = ((MAC[12+len_a] & 0xF) << 8) | MAC[13+len_a]; fprintf (stderr, "\n Network Status Broadcast - Extended \n"); fprintf (stderr, " LRA [%02X] WACN [%05X] SYSID [%03X] NAC [%03X] CHAN-T [%04X] CHAN-R [%04X]", lra, lwacn, lsysid, lcolorcode, channelt, channelr); - process_channel_to_freq (opts, state, channelt); + state->p25_cc_freq = process_channel_to_freq (opts, state, channelt); process_channel_to_freq (opts, state, channelr); state->p25_cc_is_tdma = 1; //flag on for CC tuning purposes when system is qpsk if (state->p2_hardset == 0 ) //state->p2_is_lcch == 1 shim until CRC is working, prevent bogus data