mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-17 03:07:24 -05:00
Phase 2 Audio Decoding
Phase 2 Audio Decoding Implemented XDMA decoder class implemented and set to default (-ft) --decoder class includes P25 1, 2, DMR BS/MS, and X2-TDMA -- -fr -T option reworked, -T now for Per Call, use -ft (default) Force Privacy Key --force privacy key use over system FID and SVC options. Per call now works on XDMA decoding and NXDN decoding Limited Phase 1 TSBK and Phase 2 LCCH handling (for Network Status Broadcast) --Need to get WACN, SYSID, and CC values for Phase 2 descrambling Fix most of the compiler warnings
This commit is contained in:
@@ -484,15 +484,14 @@ void ProcessDataData(dsd_opts * opts, dsd_state * state, uint8_t info[196], uint
|
||||
}
|
||||
|
||||
|
||||
//set source here so we can reference it in our text dump
|
||||
state->dmr_lrrp_source[state->currentslot] = (DmrDataByte[5] <<16 ) + (DmrDataByte[6] << 8) + DmrDataByte[7];
|
||||
fprintf (stderr, "%s ", KNRM);
|
||||
//end collecting data header info
|
||||
|
||||
//look at see which type of data service ap we have, and then assign src and dst later for lrrp text dump, etc.
|
||||
fprintf (stderr, "%s ", KMAG);
|
||||
if (state->data_header_sap[state->currentslot] == 0x4 && state->data_p_head[state->currentslot] == 0) //4 is IP data
|
||||
if (state->data_header_sap[state->currentslot] == 0x4 && state->data_p_head[state->currentslot] == 0)
|
||||
{
|
||||
fprintf (stderr, "\n IP4 Data - Source: ");
|
||||
fprintf (stderr, "\n IP Data - Source: ");
|
||||
//fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[0] & 0x3F), DmrDataByte[1], DmrDataByte[2], DmrDataByte[3]); //not sure if these are right or not
|
||||
fprintf (stderr, "[%d]", (DmrDataByte[5] <<16 ) + (DmrDataByte[6] << 8) + DmrDataByte[7] );
|
||||
fprintf (stderr, " Destination: ");
|
||||
@@ -507,6 +506,90 @@ void ProcessDataData(dsd_opts * opts, dsd_state * state, uint8_t info[196], uint
|
||||
( (DmrDataByte[2] <<16 ) + (DmrDataByte[3] <<8 ) + DmrDataByte[4]) );
|
||||
}
|
||||
|
||||
state->dmr_lrrp_source[state->currentslot] = (DmrDataByte[5] <<16 ) + (DmrDataByte[6] << 8) + DmrDataByte[7];
|
||||
|
||||
}
|
||||
|
||||
if (state->data_header_sap[state->currentslot] == 0x0 && state->data_p_head[state->currentslot] == 0)
|
||||
{
|
||||
fprintf (stderr, "\n Unified Data Transport - Source: ");
|
||||
//fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[0] & 0x3F), DmrDataByte[1], DmrDataByte[2], DmrDataByte[3]); //not sure if these are right or not
|
||||
fprintf (stderr, "[%d]", (DmrDataByte[5] <<16 ) + (DmrDataByte[6] << 8) + DmrDataByte[7] );
|
||||
fprintf (stderr, " Destination: ");
|
||||
//fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[4] & 0x3F), DmrDataByte[5], DmrDataByte[6], DmrDataByte[7]); //not sure if these are right or not
|
||||
fprintf (stderr, "[%d]", (DmrDataByte[2] <<16 ) + (DmrDataByte[3] <<8 ) + DmrDataByte[4] );
|
||||
|
||||
//part below should probably be inside of above if condition
|
||||
if (1 == 1) //already setting by current slot, no need for checking first
|
||||
{
|
||||
sprintf ( state->dmr_lrrp[state->currentslot][1], "SRC [%d] DST [%d] ",
|
||||
( (DmrDataByte[5] <<16 ) + (DmrDataByte[6] << 8) + DmrDataByte[7]),
|
||||
( (DmrDataByte[2] <<16 ) + (DmrDataByte[3] <<8 ) + DmrDataByte[4]) );
|
||||
}
|
||||
|
||||
state->dmr_lrrp_source[state->currentslot] = (DmrDataByte[5] <<16 ) + (DmrDataByte[6] << 8) + DmrDataByte[7];
|
||||
|
||||
}
|
||||
|
||||
if (state->data_header_sap[state->currentslot] == 0x9 && state->data_p_head[state->currentslot] == 0)
|
||||
{
|
||||
fprintf (stderr, "\n Proprietary Packet Data - Source: ");
|
||||
//fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[0] & 0x3F), DmrDataByte[1], DmrDataByte[2], DmrDataByte[3]); //not sure if these are right or not
|
||||
fprintf (stderr, "[%d]", (DmrDataByte[5] <<16 ) + (DmrDataByte[6] << 8) + DmrDataByte[7] );
|
||||
fprintf (stderr, " Destination: ");
|
||||
//fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[4] & 0x3F), DmrDataByte[5], DmrDataByte[6], DmrDataByte[7]); //not sure if these are right or not
|
||||
fprintf (stderr, "[%d]", (DmrDataByte[2] <<16 ) + (DmrDataByte[3] <<8 ) + DmrDataByte[4] );
|
||||
|
||||
//part below should probably be inside of above if condition
|
||||
if (1 == 1) //already setting by current slot, no need for checking first
|
||||
{
|
||||
sprintf ( state->dmr_lrrp[state->currentslot][1], "SRC [%d] DST [%d] ",
|
||||
( (DmrDataByte[5] <<16 ) + (DmrDataByte[6] << 8) + DmrDataByte[7]),
|
||||
( (DmrDataByte[2] <<16 ) + (DmrDataByte[3] <<8 ) + DmrDataByte[4]) );
|
||||
}
|
||||
|
||||
state->dmr_lrrp_source[state->currentslot] = (DmrDataByte[5] <<16 ) + (DmrDataByte[6] << 8) + DmrDataByte[7];
|
||||
|
||||
}
|
||||
|
||||
if (state->data_header_sap[state->currentslot] == 0x2 && state->data_p_head[state->currentslot] == 0)
|
||||
{
|
||||
fprintf (stderr, "\n TCP/IP Header Compression Data - Source: ");
|
||||
//fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[0] & 0x3F), DmrDataByte[1], DmrDataByte[2], DmrDataByte[3]); //not sure if these are right or not
|
||||
fprintf (stderr, "[%d]", DmrDataByte[3]);
|
||||
fprintf (stderr, " Destination: ");
|
||||
//fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[4] & 0x3F), DmrDataByte[5], DmrDataByte[6], DmrDataByte[7]); //not sure if these are right or not
|
||||
fprintf (stderr, "[%d]", DmrDataByte[2]);
|
||||
|
||||
//part below should probably be inside of above if condition
|
||||
if (1 == 1) //already setting by current slot, no need for checking first
|
||||
{
|
||||
sprintf ( state->dmr_lrrp[state->currentslot][1], "SRC [%d] DST [%d] ",
|
||||
DmrDataByte[3], DmrDataByte[2] );
|
||||
}
|
||||
|
||||
state->dmr_lrrp_source[state->currentslot] = DmrDataByte[3];
|
||||
|
||||
}
|
||||
|
||||
if (state->data_header_sap[state->currentslot] == 0x3 && state->data_p_head[state->currentslot] == 0)
|
||||
{
|
||||
fprintf (stderr, "\n UDP/IP Header Compression Data - Source: ");
|
||||
//fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[0] & 0x3F), DmrDataByte[1], DmrDataByte[2], DmrDataByte[3]); //not sure if these are right or not
|
||||
fprintf (stderr, "[%d]", DmrDataByte[3]);
|
||||
fprintf (stderr, " Destination: ");
|
||||
//fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[4] & 0x3F), DmrDataByte[5], DmrDataByte[6], DmrDataByte[7]); //not sure if these are right or not
|
||||
fprintf (stderr, "[%d]", DmrDataByte[2]);
|
||||
|
||||
//part below should probably be inside of above if condition
|
||||
if (1 == 1) //already setting by current slot, no need for checking first
|
||||
{
|
||||
sprintf ( state->dmr_lrrp[state->currentslot][1], "SRC [%d] DST [%d] ",
|
||||
DmrDataByte[3], DmrDataByte[2] );
|
||||
}
|
||||
|
||||
state->dmr_lrrp_source[state->currentslot] = DmrDataByte[3];
|
||||
|
||||
}
|
||||
|
||||
if (state->data_header_sap[state->currentslot] == 0x5 && state->data_p_head[state->currentslot] == 0) //5 is ARP Address Resolution Protocol
|
||||
@@ -2404,7 +2487,7 @@ void ProcessVoiceBurstSync(dsd_opts * opts, dsd_state * state)
|
||||
//Embedded Alias
|
||||
if ( TSVoiceSupFrame->FullLC.FullLinkControlOpcode > 0x03 && TSVoiceSupFrame->FullLC.FullLinkControlOpcode < 0x08)
|
||||
{
|
||||
sprintf (state->dmr_callsign[state->currentslot][TSVoiceSupFrame->FullLC.FullLinkControlOpcode - 3], ""); //blank here so it doesn't grow out of control?
|
||||
sprintf (state->dmr_callsign[state->currentslot][TSVoiceSupFrame->FullLC.FullLinkControlOpcode - 3], "%s", ""); //blank here so it doesn't grow out of control?
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
//full range of alphanumerical characters?
|
||||
@@ -2431,7 +2514,7 @@ void ProcessVoiceBurstSync(dsd_opts * opts, dsd_state * state)
|
||||
|
||||
if ( TSVoiceSupFrame->FullLC.FullLinkControlOpcode == 0x08 && opts->payload == 1) //Embedded GPS
|
||||
{
|
||||
sprintf (state->dmr_callsign[state->currentslot][TSVoiceSupFrame->FullLC.FullLinkControlOpcode - 3], ""); //blank here so it doesn't grow out of control?
|
||||
sprintf (state->dmr_callsign[state->currentslot][TSVoiceSupFrame->FullLC.FullLinkControlOpcode - 3], "%s", ""); //blank here so it doesn't grow out of control?
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
//full range of alphanumerical characters?
|
||||
|
||||
Reference in New Issue
Block a user