P25 -- TG Hold Support; #132

This commit is contained in:
lwvmobile
2023-10-05 10:13:39 -04:00
parent cdcdc106ef
commit 241cc05f80
4 changed files with 91 additions and 1 deletions

View File

@@ -93,7 +93,9 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir
}
//uses explicit bit?
//TODO: Allow Tuning from Call Grants either in LDU1 or TDULC? (TDMA to p1 fallback?)
//TODO: Allow TG Hold overrides here either in LDU1 or TDULC?
//NOTE: If we have an active TG hold, we really should't be here anyways
else if (lc_format == 0x42) //is this group only, or group and private?
{
fprintf (stderr, " Group Voice Channel Update - ");

View File

@@ -322,6 +322,9 @@ void processMPDU(dsd_opts * opts, dsd_state * state)
}
}
//TG hold on P25p1 Ext -- block non-matching target, allow matching group
if (state->tg_hold != 0 && state->tg_hold != group) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == group) sprintf (mode, "%s", "A");
//Skip tuning group calls if group calls are disabled
if (opts->trunk_tune_group_calls == 0) goto SKIPCALL;
@@ -421,6 +424,9 @@ void processMPDU(dsd_opts * opts, dsd_state * state)
}
}
//TG hold on P25p1 Ext UU -- may not be ideal/feasible to use these on private calls
// if (state->tg_hold != 0 && state->tg_hold != target) sprintf (mode, "%s", "B");
// if (state->tg_hold != 0 && state->tg_hold == target) sprintf (mode, "%s", "A");
//Skip tuning private calls if group calls are disabled
if (opts->trunk_tune_private_calls == 0) goto SKIPCALL;
@@ -539,6 +545,9 @@ void processMPDU(dsd_opts * opts, dsd_state * state)
}
}
//TG hold on MFID90 GRG -- block non-matching target, allow matching group
if (state->tg_hold != 0 && state->tg_hold != group) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == group) sprintf (mode, "%s", "A");
//Skip tuning group calls if group calls are disabled
if (opts->trunk_tune_group_calls == 0) goto SKIPCALL;

View File

@@ -214,6 +214,10 @@ void processTSBK(dsd_opts * opts, dsd_state * state)
}
}
//TG hold on MFID90 GRG -- block non-matching target, allow matching group
if (state->tg_hold != 0 && state->tg_hold != group) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == group) sprintf (mode, "%s", "A");
//Skip tuning group calls if group calls are disabled
if (opts->trunk_tune_group_calls == 0) goto SKIPCALL;
@@ -309,6 +313,9 @@ void processTSBK(dsd_opts * opts, dsd_state * state)
}
}
//TG hold on MFID90 GRG -- block non-matching target, allow matching group
if (state->tg_hold != 0 && state->tg_hold != tempg) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == tempg) sprintf (mode, "%s", "A");
//Skip tuning group calls if group calls are disabled
if (opts->trunk_tune_group_calls == 0) goto SKIPCALL;

View File

@@ -115,6 +115,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
}
}
//TG hold on MFID90 GRG -- block non-matching super group, allow matching group
if (state->tg_hold != 0 && state->tg_hold != sgroup) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == sgroup)
{
sprintf (mode, "%s", "A");
opts->p25_is_tuned = 0; //unlock tuner
}
//Skip tuning group calls if group calls are disabled
if (opts->trunk_tune_group_calls == 0) goto SKIPCALL;
@@ -193,6 +201,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
}
}
//TG hold on MFID90 GRG -- block non-matching super group, allow matching group
if (state->tg_hold != 0 && state->tg_hold != sgroup) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == sgroup)
{
sprintf (mode, "%s", "A");
opts->p25_is_tuned = 0; //unlock tuner
}
//Skip tuning group calls if group calls are disabled
if (opts->trunk_tune_group_calls == 0) goto SKIPCALL;
@@ -305,6 +321,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
}
}
//TG hold on MFID90 GRG -- block non-matching super group, allow matching group
if (state->tg_hold != 0 && state->tg_hold != tunable_group) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == tunable_group)
{
sprintf (mode, "%s", "A");
opts->p25_is_tuned = 0; //unlock tuner
}
//check to see if the group candidate is blocked first
if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0)) //DE is digital encrypted, B is block
{
@@ -402,6 +426,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
}
}
//TG hold on GRP_V -- block non-matching group, allow matching group
if (state->tg_hold != 0 && state->tg_hold != group) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == group)
{
sprintf (mode, "%s", "A");
opts->p25_is_tuned = 0; //unlock tuner
}
//Skip tuning group calls if group calls are disabled
if (opts->trunk_tune_group_calls == 0) goto SKIPCALL;
@@ -493,6 +525,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
}
}
//TG hold on UU_V -- may not want to allow these in case of TG and RID both are same
// if (state->tg_hold != 0 && state->tg_hold != target) sprintf (mode, "%s", "B");
// if (state->tg_hold != 0 && state->tg_hold == target)
// {
// sprintf (mode, "%s", "A");
// opts->p25_is_tuned = 0; //unlock tuner
// }
//tune if tuning available
if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0))
{
@@ -641,6 +681,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
}
}
//TG hold on GRP_V Multi -- block non-matching group, allow matching group
if (state->tg_hold != 0 && state->tg_hold != tunable_group) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == tunable_group)
{
sprintf (mode, "%s", "A");
opts->p25_is_tuned = 0; //unlock tuner
}
//tune if tuning available
if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0))
{
@@ -810,6 +858,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
}
}
//TG hold on GRP_V Multi -- block non-matching group, allow matching group
if (state->tg_hold != 0 && state->tg_hold != tunable_group) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == tunable_group)
{
sprintf (mode, "%s", "A");
opts->p25_is_tuned = 0; //unlock tuner
}
//check to see if the group candidate is blocked first
if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0)) //DE is digital encrypted, B is block
{
@@ -924,6 +980,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
}
}
//TG hold on GRP_V Multi -- block non-matching group, allow matching group
if (state->tg_hold != 0 && state->tg_hold != tunable_group) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == tunable_group)
{
sprintf (mode, "%s", "A");
opts->p25_is_tuned = 0; //unlock tuner
}
//check to see if the group candidate is blocked first
if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0)) //DE is digital encrypted, B is block
{
@@ -1024,6 +1088,14 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
}
}
//TG hold on GRP_V Exp -- block non-matching group, allow matching group
if (state->tg_hold != 0 && state->tg_hold != group) sprintf (mode, "%s", "B");
if (state->tg_hold != 0 && state->tg_hold == group)
{
sprintf (mode, "%s", "A");
opts->p25_is_tuned = 0; //unlock tuner
}
//Skip tuning group calls if group calls are disabled
if (opts->trunk_tune_group_calls == 0) goto SKIPCALL;