DMR FLCO Tweaks; P25 Site/RFSS Display;

This commit is contained in:
lwvmobile 2023-02-02 20:02:28 -05:00
parent b0fc20cea6
commit 6666424ff8
5 changed files with 43 additions and 16 deletions

View File

@ -509,9 +509,11 @@ typedef struct
unsigned int dmr_fid;
unsigned int dmr_so;
unsigned int dmr_flco;
unsigned int dmr_fidR;
unsigned int dmr_soR;
unsigned int dmr_flcoR;
char slot1light[8];
char slot2light[8];
@ -573,6 +575,8 @@ typedef struct
unsigned long long int p2_wacn;
unsigned long long int p2_sysid;
unsigned long long int p2_cc; //p1 NAC
unsigned long long int p2_siteid;
unsigned long long int p2_rfssid;
int p2_hardset; //flag for checking whether or not P2 wacn and sysid are hard set by user
int p2_scramble_offset; //offset counter for scrambling application
int p2_vch_chan_num; //vch channel number (0 or 1, not the 0-11 TS)

View File

@ -67,6 +67,10 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
if (IrrecoverableErrors == 0)
{
if (slot == 0) state->dmr_flco = flco;
else state->dmr_flcoR = flco;
//Embedded Talker Alias Header Only (format and len storage)
if (fid == 0 && type == 3 && flco == 0x04)
{
@ -95,9 +99,9 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
//Unknown Link Control - FLCO=0x08 FID=0x10 SVC=0xC1 or FLCO=0x08 FID=0x10 SVC=0xC0 <- probably no SVC bits in the lc
//flco 0x28 has also been observed lately but the tg and src values don't match
//another flco 0x10 does seem to match, so is probably capmax group call flco
if (type == 1) fprintf (stderr, "%s \n", KRED);
if (type == 2) fprintf (stderr, "%s \n", KRED);
if (type == 3) fprintf (stderr, "%s", KRED);
if (type == 1) fprintf (stderr, "%s \n", KCYN);
if (type == 2) fprintf (stderr, "%s \n", KCYN);
if (type == 3) fprintf (stderr, "%s", KCYN);
fprintf (stderr, " SLOT %d", state->currentslot+1);
fprintf (stderr, " Motorola");
unk = 1;
@ -110,6 +114,7 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
fprintf (stderr, "%s \n", KRED);
fprintf (stderr, " SLOT %d", state->currentslot+1);
fprintf (stderr, " Data Terminator (TD_LC)");
fprintf (stderr, "%s ", KNRM);
goto END_FLCO;
}
@ -118,9 +123,9 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
{
//NOTE: fid 0x58 (tait) had a single flco 0x06 emb observed, but without the other blocks (4,5,7) for an alias
//will need to observe this one, or just remove it from the list, going to isolate tait lc for now
if (type == 1) fprintf (stderr, "%s \n", KRED);
if (type == 2) fprintf (stderr, "%s \n", KRED);
if (type == 3) fprintf (stderr, "%s", KRED);
if (type == 1) fprintf (stderr, "%s \n", KCYN);
if (type == 2) fprintf (stderr, "%s \n", KCYN);
if (type == 3) fprintf (stderr, "%s", KCYN);
fprintf (stderr, " SLOT %d", state->currentslot+1);
fprintf (stderr, " Tait");
unk = 1;
@ -130,9 +135,9 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
//unknown other manufacturer or OTA ENC, etc.
if (fid != 0 && fid != 0x68 && fid != 0x10) //removed tait from the list
{
if (type == 1) fprintf (stderr, "%s \n", KRED);
if (type == 2) fprintf (stderr, "%s \n", KRED);
if (type == 3) fprintf (stderr, "%s", KRED);
if (type == 1) fprintf (stderr, "%s \n", KYEL);
if (type == 2) fprintf (stderr, "%s \n", KYEL);
if (type == 3) fprintf (stderr, "%s", KYEL);
fprintf (stderr, " SLOT %d", state->currentslot+1);
fprintf (stderr, " Unknown LC ");
unk = 1;

View File

@ -697,10 +697,12 @@ initState (dsd_state * state)
state->dmr_stereo = 0; //1, or 0?
state->dmrburstL = 17; //initialize at higher value than possible
state->dmrburstR = 17; //17 in char array is set for ERR
state->dmr_so = 0;
state->dmr_soR = 0;
state->dmr_fid = 0;
state->dmr_fidR = 0;
state->dmr_so = 0;
state->dmr_soR = 0;
state->dmr_fid = 0;
state->dmr_fidR = 0;
state->dmr_flco = 0;
state->dmr_flcoR = 0;
state->dmr_ms_mode = 0;
state->HYTL = 0;
@ -744,6 +746,8 @@ initState (dsd_state * state)
state->p2_wacn = 0;
state->p2_sysid = 0;
state->p2_cc = 0;
state->p2_siteid = 0;
state->p2_rfssid = 0;
state->p2_hardset = 0;
state->p2_is_lcch = 0;
state->p25_cc_is_tdma = 2; //init on 2, TSBK NET_STS will set 0, TDMA NET_STS will set 1. //used to determine if we need to change symbol rate when cc hunting

View File

@ -2343,7 +2343,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
}
else if (lls == 0 || lls == 1) //P1
{
printw ("P25 P1 - WACN: [%05llX] SYS: [%03llX] NAC: [%03llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc);
// printw ("P25 P1 - WACN: [%05llX] SYS: [%03llX] NAC: [%03llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc);
printw ("P25 P1 - [%05llX][%03llX][%03llX] RFSS: [%X] SITE: [%X] ", state->p2_wacn, state->p2_sysid, state->p2_cc, state->p2_rfssid, state->p2_siteid);
if (state->p25_cc_freq != 0)
{
printw ("Freq: [%.06lf] MHz", (double)state->p25_cc_freq/1000000);
@ -2351,7 +2352,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
}
else if (lls == 35 || lls == 36) //P2
{
printw ("P25 P2 - WACN: [%05llX] SYS: [%03llX] NAC: [%03llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc);
// printw ("P25 P2 - WACN: [%05llX] SYS: [%03llX] NAC: [%03llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc);
printw ("P25 P2 - [%05llX][%03llX][%03llX] RFSS: [%X] SITE: [%X] ", state->p2_wacn, state->p2_sysid, state->p2_cc, state->p2_rfssid, state->p2_siteid);
if (state->p2_wacn == 0 || state->p2_sysid == 0 || state->p2_cc == 0)
{
attron(COLOR_PAIR(2));

View File

@ -915,6 +915,9 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
fprintf (stderr, "\n RFSS Status Broadcast - Implicit \n");
fprintf (stderr, " LRA [%02X] SYSID [%03X] RFSS ID [%02X] SITE ID [%02X] CHAN [%04X] SSC [%02X] ", lra, lsysid, rfssid, siteid, channel, sysclass);
process_channel_to_freq (opts, state, channel);
state->p2_siteid = siteid;
state->p2_rfssid = rfssid;
}
//RFSS Status Broadcast - Explicit
@ -931,6 +934,9 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
fprintf (stderr, " LRA [%02X] SYSID [%03X] RFSS ID [%02X] SITE ID [%02X]\n CHAN-T [%04X] CHAN-R [%02X] SSC [%02X] ", lra, lsysid, rfssid, siteid, channelt, channelr, sysclass);
process_channel_to_freq (opts, state, channelt);
process_channel_to_freq (opts, state, channelr);
state->p2_siteid = siteid;
state->p2_rfssid = rfssid;
}
//Unit-to-Unit Answer Request (UU_ANS_REQ)
@ -1079,6 +1085,9 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
process_channel_to_freq (opts, state, channelr);
}
state->p2_siteid = siteid;
state->p2_rfssid = rfssid;
}
//Secondary Control Channel Broadcast, Implicit
@ -1108,7 +1117,10 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
state->trunk_lcn_freq[1] = freq1;
state->trunk_lcn_freq[2] = freq2;
state->lcn_freq_count = 3; //increment to three
}
}
state->p2_siteid = siteid;
state->p2_rfssid = rfssid;
}