EDACS: fixes and improvements to EA analog and i-call parsing (#204)
* Fix MT1 math given esk_mask value is 0xA0 * EDACS: Clean up formatting for I-Calls * EDACS: typo, fix the TGID for group calls Fix copy-pasta * EDACS: Fix MT2 for I-Calls Incorrectly copied decimal values as hex - obviously MT2 is only 4 bits so it cannot be greater than 15. * EDACS: check LCN is > 0 before trying to tune An EA CC sometimes includes commands that parse as LCN 0 - but otherwise valid - analog call voice grants for TG 1. Since LCN 0 is not valid, ensure that we don't try to tune to them while we try to figure out what they're about. * EDACS: Process "login" message on CC Log "login" messages sent on the CC. Verified behaviour against UniTrunker.
This commit is contained in:
parent
10eacd99cc
commit
a7de24c47b
|
|
@ -3618,7 +3618,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||
printw ("Target [%8lld] Source [%8lld] I-Call", call_matrix[j][2] - 100000, call_matrix[j][3]);
|
||||
else
|
||||
// Group call
|
||||
printw ("Target [%8lld] Source [%8lld]", call_matrix[j][2] - 100000, call_matrix[j][3]);
|
||||
printw ("Target [%8lld] Source [%8lld]", call_matrix[j][2], call_matrix[j][3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -651,7 +651,7 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
//this is working now with the new import setup
|
||||
if (opts->trunk_tune_group_calls == 1 && opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0) ) //DE is digital encrypted, B is block
|
||||
{
|
||||
if (lcn < 26 && state->trunk_lcn_freq[lcn-1] != 0) //don't tune if zero (not loaded or otherwise)
|
||||
if (lcn > 0 && lcn < 26 && state->trunk_lcn_freq[lcn-1] != 0) //don't tune if zero (not loaded or otherwise)
|
||||
{
|
||||
//openwav file and do per call right here, should probably check as well to make sure we have a valid trunking method active (rigctl, rtl)
|
||||
if (opts->dmr_stereo_wav == 1 && (opts->use_rigctl == 1 || opts->audio_in_type == 3))
|
||||
|
|
@ -714,20 +714,20 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
//if we are using allow/whitelist mode, then write 'B' to mode for block - no allow/whitelist support for i-calls
|
||||
if (opts->trunk_use_allow_list == 1) sprintf (mode, "%s", "B");
|
||||
|
||||
if (mt2 == 0x10) fprintf (stderr, " Analog Call");
|
||||
if (mt2 == 0x14) fprintf (stderr, " Digital Call");
|
||||
if (mt2 == 0xA) fprintf (stderr, " Analog Call");
|
||||
if (mt2 == 0xE) fprintf (stderr, " Digital Call");
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
|
||||
//this is working now with the new import setup
|
||||
if (opts->trunk_tune_private_calls == 1 && opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0) ) //DE is digital encrypted, B is block
|
||||
{
|
||||
if (lcn < 26 && state->trunk_lcn_freq[lcn-1] != 0) //don't tune if zero (not loaded or otherwise)
|
||||
if (lcn > 0 && lcn < 26 && state->trunk_lcn_freq[lcn-1] != 0) //don't tune if zero (not loaded or otherwise)
|
||||
{
|
||||
//openwav file and do per call right here, should probably check as well to make sure we have a valid trunking method active (rigctl, rtl)
|
||||
if (opts->dmr_stereo_wav == 1 && (opts->use_rigctl == 1 || opts->audio_in_type == 3))
|
||||
{
|
||||
sprintf (opts->wav_out_file, "./WAV/%s %s EDACS Site %lld TGT %d SRC %d.wav", getDateE(), timestr, state->edacs_site_id, target, source);
|
||||
if (mt2 == 0x14) //digital
|
||||
if (mt2 == 0xE) //digital
|
||||
openWavOutFile (opts, state);
|
||||
else //analog
|
||||
openWavOutFile48k (opts, state); //
|
||||
|
|
@ -741,7 +741,7 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
state->edacs_tuned_lcn = lcn;
|
||||
opts->p25_is_tuned = 1;
|
||||
//
|
||||
if (mt2 == 0x10)
|
||||
if (mt2 == 0xA) //analog
|
||||
edacs_analog(opts, state, target, lcn);
|
||||
}
|
||||
|
||||
|
|
@ -760,6 +760,13 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
}
|
||||
}
|
||||
}
|
||||
//Login
|
||||
else if (mt1 == 0x19)
|
||||
{
|
||||
int group = (fr_1t & 0xFFFF000) >> 12;
|
||||
int source = (fr_4t & 0xFFFFF000) >> 12;
|
||||
fprintf (stderr, " Login Group [%08d] Source [%08d]", group, source);
|
||||
}
|
||||
else //print frames for debug/analysis
|
||||
{
|
||||
fprintf (stderr, " FR_1 [%010llX]", fr_1t);
|
||||
|
|
|
|||
Loading…
Reference in New Issue