mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-12 16:57:23 -05:00
P25 MFID90 Misc TSBK/LCW and Tweaks; #164
This commit is contained in:
@@ -1252,6 +1252,8 @@ void dmr_embedded_gps (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[])
|
||||
|
||||
}
|
||||
|
||||
fprintf(stderr, "\n DEV NOTE: If you see this message, please submit samples to https://github.com/lwvmobile/dsd-fme/issues/164 ");
|
||||
|
||||
}
|
||||
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
|
||||
@@ -14,7 +14,7 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir
|
||||
UNUSED(irrecoverable_errors);
|
||||
|
||||
uint8_t lc_format = (uint8_t)ConvertBitIntoBytes(&LCW_bits[0], 8); //format
|
||||
uint8_t lc_opcode = (uint8_t)ConvertBitIntoBytes(&LCW_bits[2], 8); //opcode portion of format
|
||||
uint8_t lc_opcode = (uint8_t)ConvertBitIntoBytes(&LCW_bits[2], 6); //opcode portion of format
|
||||
uint8_t lc_mfid = (uint8_t)ConvertBitIntoBytes(&LCW_bits[8], 8); //mfid
|
||||
uint8_t lc_svcopt = (uint8_t)ConvertBitIntoBytes(&LCW_bits[16], 8); //service options
|
||||
uint8_t lc_pf = LCW_bits[0]; //protect flag
|
||||
@@ -273,7 +273,7 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir
|
||||
// if (cfva & 0x4) fprintf (stderr, " Failure Condition");
|
||||
// if (cfva & 0x2) fprintf (stderr, " Up to Date (Correct)");
|
||||
// else fprintf (stderr, " Last Known");
|
||||
if (cfva & 0x1) fprintf (stderr, "- Connection Active");
|
||||
if (cfva & 0x1) fprintf (stderr, " - Connection Active");
|
||||
// process_channel_to_freq (opts, state, channelt);
|
||||
//end debug, way too much for a simple link control line
|
||||
|
||||
@@ -364,8 +364,39 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir
|
||||
else fprintf (stderr, " Unknown Format %02X MFID %02X SVC %02X", lc_format, lc_mfid, lc_svcopt);
|
||||
}
|
||||
|
||||
//MFID 90 Embedded GPS -- SDRTrunk shows this is a LCW with the same format as
|
||||
//DMR Embedded GPS FLC (I have not observed this opcode for accuracy)
|
||||
else if (lc_mfid == 0x90 && lc_opcode == 0x6)
|
||||
{
|
||||
fprintf (stderr, " MFID90 (Moto)");
|
||||
dmr_embedded_gps (opts, state, LCW_bits);
|
||||
}
|
||||
|
||||
else if (lc_mfid == 0x90 && lc_opcode == 0x0)
|
||||
fprintf (stderr, " MFID90 (Moto) Group Regroup Channel User (LCGRGR)");
|
||||
|
||||
else if (lc_mfid == 0x90 && lc_opcode == 0x1)
|
||||
fprintf (stderr, " MFID90 (Moto) Group Regroup Channel Update (LCGRGU)");
|
||||
|
||||
else if (lc_mfid == 0x90 && lc_opcode == 0x3)
|
||||
fprintf (stderr, " MFID90 (Moto) Group Regroup Add");
|
||||
|
||||
else if (lc_mfid == 0x90 && lc_opcode == 0x4)
|
||||
fprintf (stderr, " MFID90 (Moto) Group Regroup Delete");
|
||||
|
||||
//Still unclear whether or not this signals the end of a call grant,
|
||||
//or just the end of the current talker talking, so we won't tune away here
|
||||
//MFID90 still uses the standard Call Termination as well at teardown
|
||||
else if (lc_mfid == 0x90 && lc_opcode == 0xF)
|
||||
fprintf (stderr, " MFID90 (Moto) Call Termination");
|
||||
|
||||
//not a duplicate, this one will print if not MFID 0 or 1
|
||||
else fprintf (stderr, " Unknown Format %02X MFID %02X ", lc_format, lc_mfid);
|
||||
else
|
||||
{
|
||||
fprintf (stderr, " Unknown Format %02X MFID %02X ", lc_format, lc_mfid);
|
||||
if (lc_mfid == 0x90) fprintf (stderr, "(Moto)");
|
||||
else if (lc_mfid == 0xA4) fprintf (stderr, "(Harris)");
|
||||
}
|
||||
}
|
||||
|
||||
//ending line break
|
||||
|
||||
@@ -459,6 +459,13 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
|
||||
mihex2 = (unsigned long long int)ConvertBitIntoBytes(&mi[32], 32);
|
||||
mihex3 = (unsigned long long int)ConvertBitIntoBytes(&mi[64], 8);
|
||||
|
||||
//NOTE: LSD is also encrypted if voice is encrypted, so let's just zip it for now
|
||||
if (state->payload_algid != 0x80)
|
||||
{
|
||||
lsd_hex1 = 0;
|
||||
lsd_hex2 = 0;
|
||||
}
|
||||
|
||||
//WIP: LSD FEC
|
||||
lsd1_okay = p25p1_lsd_fec (lowspeeddata+0);
|
||||
lsd2_okay = p25p1_lsd_fec (lowspeeddata+16);
|
||||
@@ -497,13 +504,6 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
}
|
||||
|
||||
//NOTE: LSD is also encrypted if voice is encrypted, so let's just zip it for now
|
||||
if (state->payload_algid != 0x80)
|
||||
{
|
||||
lsd_hex1 = 0;
|
||||
lsd_hex2 = 0;
|
||||
}
|
||||
|
||||
if (opts->payload == 1)
|
||||
{
|
||||
//view Low Speed Data
|
||||
|
||||
@@ -210,7 +210,7 @@ void processTSBK(dsd_opts * opts, dsd_state * state)
|
||||
// fprintf (stderr, " Priority %d", svc & 0x7); //call priority
|
||||
// }
|
||||
|
||||
fprintf (stderr, " MFID90 Group Regroup Channel Grant");
|
||||
fprintf (stderr, " MFID 90 (Moto) Group Regroup Channel Grant");
|
||||
fprintf (stderr, "\n SVC [%02X] CHAN [%04X] SG [%d][%04X]", svc, channel, group, group);
|
||||
freq1 = process_channel_to_freq (opts, state, channel);
|
||||
|
||||
@@ -309,7 +309,7 @@ void processTSBK(dsd_opts * opts, dsd_state * state)
|
||||
long int tempf = 0; //temp freq
|
||||
|
||||
fprintf (stderr, "%s\n ",KYEL);
|
||||
fprintf (stderr, " MFID90 Group Regroup Channel Grant Update");
|
||||
fprintf (stderr, " MFID 90 (Moto) Group Regroup Channel Grant Update");
|
||||
fprintf (stderr, "\n CHAN1 [%04X] SG [%d][%04X] CHAN2 [%04X] SG [%d][%04X]", channel1, group1, group1, channel2, group2, group2);
|
||||
freq1 = process_channel_to_freq (opts, state, channel1);
|
||||
freq2 = process_channel_to_freq (opts, state, channel2);
|
||||
@@ -393,6 +393,98 @@ void processTSBK(dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if ( (tsbk_byte[0] & 0x3F) == 0x00)
|
||||
{
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, " MFID 90 (Moto) Group Regroup Add: ");
|
||||
for (i = 2; i < 10; i++)
|
||||
fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
}
|
||||
|
||||
else if ( (tsbk_byte[0] & 0x3F) == 0x01 )
|
||||
{
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, " MFID 90 (Moto) Group Regroup Delete: ");
|
||||
for (i = 2; i < 10; i++)
|
||||
fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
}
|
||||
|
||||
else if ( (tsbk_byte[0] & 0x3F) == 0x04 )
|
||||
{
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, " MFID 90 (Moto) Extended Function: ");
|
||||
for (i = 2; i < 10; i++)
|
||||
fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
}
|
||||
|
||||
else if ( (tsbk_byte[0] & 0x3F) == 0x06 )
|
||||
{
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, " MFID 90 (Moto) Queued Response: ");
|
||||
for (i = 2; i < 10; i++)
|
||||
fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
}
|
||||
|
||||
else if ( (tsbk_byte[0] & 0x3F) == 0x07 )
|
||||
{
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, " MFID 90 (Moto) Deny Response: ");
|
||||
for (i = 2; i < 10; i++)
|
||||
fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
}
|
||||
|
||||
else if ( (tsbk_byte[0] & 0x3F) == 0x08 )
|
||||
{
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, " MFID 90 (Moto) Acknoledge Response: ");
|
||||
for (i = 2; i < 10; i++)
|
||||
fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
}
|
||||
|
||||
|
||||
//Some of these Opcodes that aren't found in any TIA manual come from SDRTrunk,
|
||||
//but can't verify the accuracy of their meaning/context
|
||||
// else if ( (tsbk_byte[0] & 0x3F) == 0x05 )
|
||||
// {
|
||||
// fprintf (stderr, "\n");
|
||||
// fprintf (stderr, " MFID 90 (Moto) Traffic Channel: "); //not sure about this one, don't understand what it means when its on a control channel (activity? but never seems to change even while call grants in progress)
|
||||
// for (i = 2; i < 10; i++)
|
||||
// fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
// }
|
||||
|
||||
// else if ( (tsbk_byte[0] & 0x3F) == 0x09 )
|
||||
// {
|
||||
// fprintf (stderr, "\n");
|
||||
// fprintf (stderr, " MFID 90 (Moto) Channel Loading: "); //don't understand the context for this one, waiting on units to arrive on channel?
|
||||
// for (i = 2; i < 10; i++)
|
||||
// fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
// }
|
||||
|
||||
// else if ( (tsbk_byte[0] & 0x3F) == 0x0B )
|
||||
// {
|
||||
// fprintf (stderr, "\n");
|
||||
// fprintf (stderr, " MFID 90 (Moto) Control Channel: "); //this appears to echo the 16-bit channel number for the main control channel/RFSS
|
||||
// for (i = 2; i < 10; i++)
|
||||
// fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
// }
|
||||
|
||||
// else if ( (tsbk_byte[0] & 0x3F) == 0x0E )
|
||||
// {
|
||||
// fprintf (stderr, "\n");
|
||||
// fprintf (stderr, " MFID 90 (Moto) Control Channel Planned Shutdown: ");
|
||||
// for (i = 2; i < 10; i++)
|
||||
// fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
// }
|
||||
|
||||
// else if ( (tsbk_byte[0] & 0x3F) == 0x10 )
|
||||
// {
|
||||
// fprintf (stderr, "\n");
|
||||
// fprintf (stderr, " MFID 90 (Moto) Something: "); //observed, but no idea
|
||||
// for (i = 2; i < 10; i++)
|
||||
// fprintf (stderr, "%02X", tsbk_byte[i]);
|
||||
// }
|
||||
|
||||
else
|
||||
{
|
||||
fprintf (stderr, "%s",KCYN);
|
||||
|
||||
Reference in New Issue
Block a user