diff --git a/include/dsd.h b/include/dsd.h index 05b4688..ddfe9f4 100644 --- a/include/dsd.h +++ b/include/dsd.h @@ -369,6 +369,9 @@ typedef struct //Trunking - Tune Data Calls uint8_t trunk_tune_data_calls; + //Trunking - Tune Enc Calls (P25 only on applicable grants with svc opts) + uint8_t trunk_tune_enc_calls; + //OSS audio - slot preference uint8_t slot_preference; diff --git a/src/dsd_main.c b/src/dsd_main.c index b5abbb6..4591acd 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -581,6 +581,9 @@ initOpts (dsd_opts * opts) //Trunking - Tune Data Calls opts->trunk_tune_data_calls = 0; //disabled by default + //Trunking - Tune Encrypted Calls (P25 only on applicable grants with svc opts) + opts->trunk_tune_enc_calls = 1; //enabled by default + opts->dPMR_next_part_of_superframe = 0; //OSS audio - Slot Preference diff --git a/src/p25_lcw.c b/src/p25_lcw.c index a5bd9d4..3d58018 100644 --- a/src/p25_lcw.c +++ b/src/p25_lcw.c @@ -93,13 +93,13 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir if (channel1 && group1) { fprintf (stderr, "Ch: %04X TG: %d; ", channel1, group1); - sprintf (state->dmr_lrrp_gps[0], "Active Ch: %04X TG: %d;", channel1, group1); + sprintf (state->active_channel[0], "Active Ch: %04X TG: %d; ", channel1, group1); } if (channel2 && group2 && group1 != group2) { fprintf (stderr, "Ch: %04X TG: %d; ", channel2, group2); - sprintf (state->dmr_lrrp_gps[1], "Active Ch: %04X TG: %d;", channel2, group2); + sprintf (state->active_channel[1], "Active Ch: %04X TG: %d; ", channel2, group2); } } @@ -299,8 +299,8 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir //reset some strings sprintf (state->call_string[0], "%s", " "); //21 spaces sprintf (state->call_string[1], "%s", " "); //21 spaces - sprintf (state->dmr_lrrp_gps[0], "%s", ""); //this is used for active ch in p25 trunking - sprintf (state->dmr_lrrp_gps[1], "%s", ""); //this is used for active ch in p25 trunking + sprintf (state->active_channel[0], "%s", ""); + sprintf (state->active_channel[1], "%s", ""); opts->p25_is_tuned = 0; state->p25_vc_freq[0] = state->p25_vc_freq[1] = 0; if (opts->setmod_bw != 0 ) SetModulation(opts->rigctl_sockfd, opts->setmod_bw); @@ -317,8 +317,8 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir //reset some strings sprintf (state->call_string[0], "%s", " "); //21 spaces sprintf (state->call_string[1], "%s", " "); //21 spaces - sprintf (state->dmr_lrrp_gps[0], "%s", ""); //this is used for active ch in p25 trunking - sprintf (state->dmr_lrrp_gps[1], "%s", ""); //this is used for active ch in p25 trunking + sprintf (state->active_channel[0], "%s", ""); + sprintf (state->active_channel[1], "%s", ""); opts->p25_is_tuned = 0; state->p25_vc_freq[0] = state->p25_vc_freq[1] = 0; rtl_udp_tune (opts, state, state->p25_cc_freq); diff --git a/src/p25p1_mdpu.c b/src/p25p1_mdpu.c index 8d2e707..e821e2c 100644 --- a/src/p25p1_mdpu.c +++ b/src/p25p1_mdpu.c @@ -24,6 +24,11 @@ static uint32_t crc32mbf(uint8_t buf[], int len) void processMPDU(dsd_opts * opts, dsd_state * state) { + + //reset some strings when returning from a call in case they didn't get zipped already + sprintf (state->call_string[0], "%s", " "); //21 spaces + sprintf (state->call_string[1], "%s", " "); //21 spaces + state->p25_vc_freq[0] = state->p25_vc_freq[1] = 0; int tsbkbit[196]; //tsbk bit array, 196 trellis encoded bits int tsbk_dibit[98]; @@ -276,21 +281,32 @@ void processMPDU(dsd_opts * opts, dsd_state * state) //Group Voice Channel Grant - Extended else if (opcode == 0x0) { - int svc = mpdu_byte[8]; //look up what these do! + int svc = mpdu_byte[8]; int channelt = (mpdu_byte[14] << 8) | mpdu_byte[15]; int channelr = (mpdu_byte[16] << 8) | mpdu_byte[17]; long int source = (mpdu_byte[3] << 16) |(mpdu_byte[4] << 8) | mpdu_byte[5]; int group = (mpdu_byte[18] << 8) | mpdu_byte[19]; long int freq1 = 0; long int freq2 = 0; - fprintf (stderr, "%s",KYEL); - fprintf (stderr, "\n Group Voice Channel Grant Update - Extended"); + fprintf (stderr, "%s\n ",KYEL); + if (svc & 0x80) fprintf (stderr, " Emergency"); + if (svc & 0x40) fprintf (stderr, " Encrypted"); + + if (opts->payload == 1) //hide behind payload due to len + { + if (svc & 0x20) fprintf (stderr, " Duplex"); + if (svc & 0x10) fprintf (stderr, " Packet"); + else fprintf (stderr, " Circuit"); + if (svc & 0x8) fprintf (stderr, " R"); //reserved bit is on + fprintf (stderr, " Priority %d", svc & 0x7); //call priority + } + fprintf (stderr, " Group Voice Channel Grant Update - Extended"); fprintf (stderr, "\n SVC [%02X] CHAN-T [%04X] CHAN-R [%04X] Group [%d][%04X]", svc, channelt, channelr, group, group); freq1 = process_channel_to_freq (opts, state, channelt); freq2 = process_channel_to_freq (opts, state, channelr); //add active channel to string for ncurses display - sprintf (state->dmr_lrrp_gps[0], "Active Ch: %04X TG: %d", channelt, group); + sprintf (state->active_channel[0], "Active Ch: %04X TG: %d ", channelt, group); for (int i = 0; i < state->group_tally; i++) { @@ -305,6 +321,9 @@ void processMPDU(dsd_opts * opts, dsd_state * state) //Skip tuning group calls if group calls are disabled if (opts->trunk_tune_group_calls == 0) goto SKIPCALL; + //Skip tuning encrypted calls if enc calls are disabled + if ( (svc & 0x40) && opts->trunk_tune_enc_calls == 0) goto SKIPCALL; + //tune if tuning available if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0)) { @@ -344,7 +363,7 @@ void processMPDU(dsd_opts * opts, dsd_state * state) else if (opcode == 0x6) { //I'm not doing EVERY element of this, just enough for tuning! - int svc = mpdu_byte[8]; //look up what these do! + int svc = mpdu_byte[8]; int channelt = (mpdu_byte[22] << 8) | mpdu_byte[23]; int channelr = (mpdu_byte[24] << 8) | mpdu_byte[25]; //optional! //using source and target address, not source and target id (is this correct?) @@ -352,14 +371,25 @@ void processMPDU(dsd_opts * opts, dsd_state * state) long int target = (mpdu_byte[19] << 16) |(mpdu_byte[20] << 8) | mpdu_byte[21]; long int freq1 = 0; long int freq2 = 0; - fprintf (stderr, "%s",KYEL); - fprintf (stderr, "\n Unit to Unit Voice Channel Grant Update - Extended"); + fprintf (stderr, "%s\n ",KYEL); + if (svc & 0x80) fprintf (stderr, " Emergency"); + if (svc & 0x40) fprintf (stderr, " Encrypted"); + + if (opts->payload == 1) //hide behind payload due to len + { + if (svc & 0x20) fprintf (stderr, " Duplex"); + if (svc & 0x10) fprintf (stderr, " Packet"); + else fprintf (stderr, " Circuit"); + if (svc & 0x8) fprintf (stderr, " R"); //reserved bit is on + fprintf (stderr, " Priority %d", svc & 0x7); //call priority + } + fprintf (stderr, " Unit to Unit Voice Channel Grant Update - Extended"); fprintf (stderr, "\n SVC [%02X] CHAN-T [%04X] CHAN-R [%04X] Source [%ld][%04lX] Target [%ld][%04lX]", svc, channelt, channelr, source, source, target, target); freq1 = process_channel_to_freq (opts, state, channelt); freq2 = process_channel_to_freq (opts, state, channelr); //optional! //add active channel to string for ncurses display - sprintf (state->dmr_lrrp_gps[0], "Active Ch: %04X TGT: %ld;", channelt, target); + sprintf (state->active_channel[0], "Active Ch: %04X TGT: %ld; ", channelt, target); for (int i = 0; i < state->group_tally; i++) { @@ -374,6 +404,9 @@ void processMPDU(dsd_opts * opts, dsd_state * state) //Skip tuning private calls if group calls are disabled if (opts->trunk_tune_private_calls == 0) goto SKIPCALL; + //Skip tuning encrypted calls if enc calls are disabled + if ( (svc & 0x40) && opts->trunk_tune_enc_calls == 0) goto SKIPCALL; + //tune if tuning available if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0)) { diff --git a/src/p25p1_tsbk.c b/src/p25p1_tsbk.c index d727475..5b9ce84 100644 --- a/src/p25p1_tsbk.c +++ b/src/p25p1_tsbk.c @@ -10,6 +10,11 @@ void processTSBK(dsd_opts * opts, dsd_state * state) { + + //reset some strings when returning from a call in case they didn't get zipped already + sprintf (state->call_string[0], "%s", " "); //21 spaces + sprintf (state->call_string[1], "%s", " "); //21 spaces + state->p25_vc_freq[0] = state->p25_vc_freq[1] = 0; int tsbkbit[196]; //tsbk bit array, 196 trellis encoded bits int tsbk_dibit[98]; @@ -38,11 +43,7 @@ void processTSBK(dsd_opts * opts, dsd_state * state) int protectbit = 0; int MFID = 0xFF; //Manufacturer ID - Might be beneficial to NOT send anything but standard 0x00 or 0x01 messages - //Update: Identified Bug in skipdibit incrememnt causing many block deinterleave/crc failures - //with correct values set, now we are decoding many more TSBKs //TODO: Don't Print TSBKs/vPDUs unless verbosity levels set higher - //TSBKs are always single block, but up to three can be transmitted in a row, - //Multi-Block PDUs are sent on a different DUID - 0xC (not handled currently) //collect three reps of 101 dibits (98 valid dibits with status dibits interlaced) for (j = 0; j < 3; j++) @@ -63,7 +64,7 @@ void processTSBK(dsd_opts * opts, dsd_state * state) if (i+(j*101) == skipdibit) { - skipdibit += 36; //was set to 35, this was the bug + skipdibit += 36; } } diff --git a/src/p25p2_vpdu.c b/src/p25p2_vpdu.c index 15eefbf..b72941b 100644 --- a/src/p25p2_vpdu.c +++ b/src/p25p2_vpdu.c @@ -97,7 +97,7 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon freq = process_channel_to_freq (opts, state, channel); //add active channel to string for ncurses display - sprintf (state->dmr_lrrp_gps[slot], "Active Ch: %04X SG: %d;", channel, sgroup); + sprintf (state->active_channel[0], "MFID90 Active Ch: %04X SG: %d; ", channel, sgroup); for (int i = 0; i < state->group_tally; i++) { @@ -179,7 +179,7 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon freq = process_channel_to_freq (opts, state, channel); //add active channel to string for ncurses display - sprintf (state->dmr_lrrp_gps[slot], "Active Ch: %04X SG: %d", channel, sgroup); + sprintf (state->active_channel[0], "MFID90 Active Ch: %04X SG: %d ", channel, sgroup); for (int i = 0; i < state->group_tally; i++) { @@ -267,7 +267,7 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon freq2 = process_channel_to_freq (opts, state, channel2); //add active channel to string for ncurses display - sprintf (state->dmr_lrrp_gps[slot], "Active Ch: %04X SG: %d; Ch: %04X SG: %d;", channel1, group1, channel2, group2); + sprintf (state->active_channel[0], "MFID90 Active Ch: %04X SG: %d; Ch: %04X SG: %d; ", channel1, group1, channel2, group2); //Skip tuning group calls if group calls are disabled if (opts->trunk_tune_group_calls == 0) goto SKIPCALL; @@ -380,12 +380,25 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon int source = (MAC[7+len_a] << 16) | (MAC[8+len_a] << 8) | MAC[9+len_a]; long int freq = 0; - fprintf (stderr, "\n Group Voice Channel Grant Update"); + fprintf (stderr, "\n"); + if (svc & 0x80) fprintf (stderr, " Emergency"); + if (svc & 0x40) fprintf (stderr, " Encrypted"); + + if (opts->payload == 1) //hide behind payload due to len + { + if (svc & 0x20) fprintf (stderr, " Duplex"); + if (svc & 0x10) fprintf (stderr, " Packet"); + else fprintf (stderr, " Circuit"); + if (svc & 0x8) fprintf (stderr, " R"); //reserved bit is on + fprintf (stderr, " Priority %d", svc & 0x7); //call priority + } + + fprintf (stderr, " Group Voice Channel Grant Update"); fprintf (stderr, "\n SVC [%02X] CHAN [%04X] Group [%d] Source [%d]", svc, channel, group, source); freq = process_channel_to_freq (opts, state, channel); //add active channel to string for ncurses display - sprintf (state->dmr_lrrp_gps[slot], "Active Ch: %04X TG: %d;", channel, group); + sprintf (state->active_channel[0], "Active Ch: %04X TG: %d; ", channel, group); for (int i = 0; i < state->group_tally; i++) { @@ -399,6 +412,9 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //Skip tuning group calls if group calls are disabled if (opts->trunk_tune_group_calls == 0) goto SKIPCALL; + //Skip tuning encrypted calls if enc calls are disabled + if ( (svc & 0x40) && opts->trunk_tune_enc_calls == 0) goto SKIPCALL; + //tune if tuning available if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0)) { @@ -471,11 +487,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon freq = process_channel_to_freq (opts, state, channel); //add active channel to string for ncurses display - sprintf (state->dmr_lrrp_gps[slot], "Active Ch: %04X TGT: %d;", channel, target); + sprintf (state->active_channel[0], "Active Ch: %04X TGT: %d; ", channel, target); //Skip tuning private calls if private calls is disabled if (opts->trunk_tune_private_calls == 0) goto SKIPCALL; + //Skip tuning encrypted calls if enc calls are disabled -- abb formats do not carry svc bits :( + if (opts->trunk_tune_enc_calls == 0) goto SKIPCALL; //enable, or disable? + //unit to unit needs work, may fail under certain conditions (first blocked, second allowed, etc) (labels should still work though) for (int i = 0; i < state->group_tally; i++) { @@ -558,20 +577,45 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon long int freq1r = 0; long int freq2t = 0; long int freq2r = 0; + fprintf (stderr, "\n Group Voice Channel Grant Update Multiple - Explicit"); fprintf (stderr, "\n SVC [%02X] CHAN-T [%04X] CHAN-R [%04X] Group [%d][%04X]", svc1, channelt1, channelr1, group1, group1); + if (svc1 & 0x80) fprintf (stderr, " Emergency"); + if (svc1 & 0x40) fprintf (stderr, " Encrypted"); + if (opts->payload == 1) //hide behind payload due to len + { + if (svc1 & 0x20) fprintf (stderr, " Duplex"); + if (svc1 & 0x10) fprintf (stderr, " Packet"); + else fprintf (stderr, " Circuit"); + if (svc1 & 0x8) fprintf (stderr, " R"); //reserved bit is on + fprintf (stderr, " Priority %d", svc1 & 0x7); //call priority + } freq1t = process_channel_to_freq (opts, state, channelt1); freq1r = process_channel_to_freq (opts, state, channelr1); + fprintf (stderr, "\n SVC [%02X] CHAN-T [%04X] CHAN-R [%04X] Group [%d][%04X]", svc2, channelt2, channelr2, group2, group2); + if (svc2 & 0x80) fprintf (stderr, " Emergency"); + if (svc2 & 0x40) fprintf (stderr, " Encrypted"); + if (opts->payload == 1) //hide behind payload due to len + { + if (svc2 & 0x20) fprintf (stderr, " Duplex"); + if (svc2 & 0x10) fprintf (stderr, " Packet"); + else fprintf (stderr, " Circuit"); + if (svc2 & 0x8) fprintf (stderr, " R"); //reserved bit is on + fprintf (stderr, " Priority %d", svc2 & 0x7); //call priority + } freq1t = process_channel_to_freq (opts, state, channelt2); freq1r = process_channel_to_freq (opts, state, channelr2); //add active channel to string for ncurses display - sprintf (state->dmr_lrrp_gps[slot], "Active Ch: %04X TG: %d; Ch: %04X TG: %d;", channelt1, group1, channelt2, group2); + sprintf (state->active_channel[0], "Active Ch: %04X TG: %d; Ch: %04X TG: %d; ", channelt1, group1, channelt2, group2); //Skip tuning group calls if group calls are disabled if (opts->trunk_tune_group_calls == 0) goto SKIPCALL; + //Skip tuning encrypted calls if enc calls are disabled + if ( (svc1 & 0x40) && (svc2 & 0x40) && opts->trunk_tune_enc_calls == 0) goto SKIPCALL; + int loop = 1; if (channelt2 == channelt2) loop = 1; else loop = 2; @@ -582,6 +626,16 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon for (int j = 0; j < loop; j++) { + //test svc opts for enc to tune or skip + if (j == 0) + { + if ( (svc1 & 0x40) && opts->trunk_tune_enc_calls == 0) j++; //skip to next + } + if (j == 1) + { + if (( svc2 & 0x40) && opts->trunk_tune_enc_calls == 0) goto SKIPCALL; //skip to end + } + //assign our internal variables for check down on if to tune one freq/group or not if (j == 0) { @@ -680,18 +734,53 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon fprintf (stderr, "\n Group Voice Channel Grant Update Multiple - Implicit"); fprintf (stderr, "\n Channel 1 [%04X] Group 1 [%d][%04X]", channel1, group1, group1); + if (so1 & 0x80) fprintf (stderr, " Emergency"); + if (so1 & 0x40) fprintf (stderr, " Encrypted"); + if (opts->payload == 1) //hide behind payload due to len + { + if (so1 & 0x20) fprintf (stderr, " Duplex"); + if (so1 & 0x10) fprintf (stderr, " Packet"); + else fprintf (stderr, " Circuit"); + if (so1 & 0x8) fprintf (stderr, " R"); //reserved bit is on + fprintf (stderr, " Priority %d", so1 & 0x7); //call priority + } freq1 = process_channel_to_freq (opts, state, channel1); + fprintf (stderr, "\n Channel 2 [%04X] Group 2 [%d][%04X]", channel2, group2, group2); + if (so2 & 0x80) fprintf (stderr, " Emergency"); + if (so2 & 0x40) fprintf (stderr, " Encrypted"); + if (opts->payload == 1) //hide behind payload due to len + { + if (so2 & 0x20) fprintf (stderr, " Duplex"); + if (so2 & 0x10) fprintf (stderr, " Packet"); + else fprintf (stderr, " Circuit"); + if (so2 & 0x8) fprintf (stderr, " R"); //reserved bit is on + fprintf (stderr, " Priority %d", so2 & 0x7); //call priority + } freq2 = process_channel_to_freq (opts, state, channel2); + fprintf (stderr, "\n Channel 3 [%04X] Group 3 [%d][%04X]", channel3, group3, group3); + if (so3 & 0x80) fprintf (stderr, " Emergency"); + if (so3 & 0x40) fprintf (stderr, " Encrypted"); + if (opts->payload == 1) //hide behind payload due to len + { + if (so3 & 0x20) fprintf (stderr, " Duplex"); + if (so3 & 0x10) fprintf (stderr, " Packet"); + else fprintf (stderr, " Circuit"); + if (so3 & 0x8) fprintf (stderr, " R"); //reserved bit is on + fprintf (stderr, " Priority %d", so3 & 0x7); //call priority + } freq3 = process_channel_to_freq (opts, state, channel3); //add active channel to string for ncurses display - sprintf (state->dmr_lrrp_gps[slot], "Active Ch: %04X TG: %d; Ch: %04X TG: %d; Ch: %04X TG: %d;", channel1, group1, channel2, group2, channel3, group3); + sprintf (state->active_channel[0], "Active Ch: %04X TG: %d; Ch: %04X TG: %d; Ch: %04X TG: %d; ", channel1, group1, channel2, group2, channel3, group3); //Skip tuning group calls if group calls are disabled if (opts->trunk_tune_group_calls == 0) goto SKIPCALL; + //Skip tuning encrypted calls if enc calls are disabled + if ( (so1 & 0x40) && (so2 & 0x40) && (so3 & 0x40) && opts->trunk_tune_enc_calls == 0) goto SKIPCALL; + int loop = 3; long int tunable_freq = 0; @@ -700,6 +789,20 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon for (int j = 0; j < loop; j++) { + //test svc opts for enc to tune or skip + if (j == 0) + { + if ( (so1 & 0x40) && opts->trunk_tune_enc_calls == 0) j++; //skip to next + } + if (j == 1) + { + if ( (so2 & 0x40) && opts->trunk_tune_enc_calls == 0) j++; //skip to next + } + if (j == 2) + { + if ( (so3 & 0x40) && opts->trunk_tune_enc_calls == 0) goto SKIPCALL; //skip to end + } + //assign our internal variables for check down on if to tune one freq/group or not if (j == 0) { @@ -807,11 +910,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon freq2 = process_channel_to_freq (opts, state, channel2); //add active channel to string for ncurses display - sprintf (state->dmr_lrrp_gps[slot], "Active Ch: %04X TG: %d; Ch: %04X TG: %d;", channel1, group1, channel2, group2); + sprintf (state->active_channel[0], "Active Ch: %04X TG: %d; Ch: %04X TG: %d; ", channel1, group1, channel2, group2); //Skip tuning group calls if group calls are disabled if (opts->trunk_tune_group_calls == 0) goto SKIPCALL; + //Skip tuning encrypted calls if enc calls are disabled -- abb formats do not carry svc bits :( + if (opts->trunk_tune_enc_calls == 0) goto SKIPCALL; //enable, or disable? + int loop = 1; if (channel1 == channel2) loop = 1; else loop = 2; @@ -916,7 +1022,20 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon long int freq1 = 0; long int freq2 = 0; - fprintf (stderr, "\n Group Voice Channel Grant Update - Explicit"); + fprintf (stderr, "\n"); + + if (svc & 0x80) fprintf (stderr, " Emergency"); + if (svc & 0x40) fprintf (stderr, " Encrypted"); + + if (opts->payload == 1) //hide behind payload due to len + { + if (svc & 0x20) fprintf (stderr, " Duplex"); + if (svc & 0x10) fprintf (stderr, " Packet"); + else fprintf (stderr, " Circuit"); + if (svc & 0x8) fprintf (stderr, " R"); //reserved bit is on + fprintf (stderr, " Priority %d", svc & 0x7); //call priority + } + fprintf (stderr, " Group Voice Channel Grant Update - Explicit"); fprintf (stderr, "\n SVC [%02X] CHAN-T [%04X] CHAN-R [%04X] Group [%d][%04X]", svc, channelt, channelr, group, group); freq1 = process_channel_to_freq (opts, state, channelt); freq2 = process_channel_to_freq (opts, state, channelr); @@ -940,6 +1059,9 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon //Skip tuning group calls if group calls are disabled if (opts->trunk_tune_group_calls == 0) goto SKIPCALL; + //Skip tuning encrypted calls if enc calls are disabled + if ( (svc & 0x40) && opts->trunk_tune_enc_calls == 0) goto SKIPCALL; + //tune if tuning available if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0)) { @@ -1218,7 +1340,7 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon { fprintf (stderr, "\n Secondary Control Channel Broadcast - Explicit\n"); - fprintf (stderr, " RFSS[%03d] SITE ID [%03X] CHAN-T [%04X] CHAN-R [%04X] SSC [%02X]", rfssid, siteid, channelt, channelr, sysclass); + fprintf (stderr, " RFSS [%03d] SITE ID [%03X] CHAN-T [%04X] CHAN-R [%04X] SSC [%02X]", rfssid, siteid, channelt, channelr, sysclass); process_channel_to_freq (opts, state, channelt); process_channel_to_freq (opts, state, channelr);