mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 05:05:38 -05:00
DMR - DPF 15 P_SAP 1 (prop pdu reserved) Tweaks;
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
void dmr_dheader (dsd_opts * opts, dsd_state * state, uint8_t dheader[], uint8_t dheader_bits[], uint32_t CRCCorrect, uint32_t IrrecoverableErrors)
|
void dmr_dheader (dsd_opts * opts, dsd_state * state, uint8_t dheader[], uint8_t dheader_bits[], uint32_t CRCCorrect, uint32_t IrrecoverableErrors)
|
||||||
{
|
{
|
||||||
|
|
||||||
uint32_t i;
|
int i;
|
||||||
uint8_t slot = state->currentslot;
|
uint8_t slot = state->currentslot;
|
||||||
|
|
||||||
//clear out unified pdu 'superframe' slot
|
//clear out unified pdu 'superframe' slot
|
||||||
@@ -314,21 +314,32 @@ void dmr_dheader (dsd_opts * opts, dsd_state * state, uint8_t dheader[], uint8_t
|
|||||||
{
|
{
|
||||||
fprintf (stderr, " - P_SAP %02d [%s] - MFID %02X [%s]", p_sap, sap_string, p_mfid, mfid_string);
|
fprintf (stderr, " - P_SAP %02d [%s] - MFID %02X [%s]", p_sap, sap_string, p_mfid, mfid_string);
|
||||||
|
|
||||||
//look for LRRP potential report 0x1F (may be others as well)
|
//p_sap 1 on mfid 10 (moto) is a pain, and doesn't assemble correctly for some reason
|
||||||
//this could just be a sap == 1, which is 'reserved', unsure (or maybe no actual correlation?)
|
//two extra duplicate blocks are transmitted at the end for some reason -- system unique error?
|
||||||
if (p_sap != 1) state->data_header_blocks[slot]--; //decrement the blocks to follow count in order to pass CRC32 and properly assemble blocks
|
if (p_sap != 1)
|
||||||
else //add block to start of the dmr_pdu_sf since it probably contains vital LRRP data (0x1F report) -- won't pass CRC32 either way
|
state->data_header_blocks[slot]--;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
|
//this method will assemble with the duplicate blocks and include the header as well
|
||||||
|
// state->data_header_blocks[slot]++;
|
||||||
|
// state->data_header_blocks[slot]++;
|
||||||
|
// int blocks = state->data_header_blocks[slot]-1;
|
||||||
|
// for(i = 0; i < 12; i++)
|
||||||
|
// state->dmr_pdu_sf[slot][i+(blocks*12)] = dheader[i];
|
||||||
|
// state->data_block_counter[slot]++;
|
||||||
|
|
||||||
|
//this method will just include the prop_pdu header as a data block and assemble the data blocks as a message, excluding duplicates
|
||||||
int blocks = state->data_header_blocks[slot]-1;
|
int blocks = state->data_header_blocks[slot]-1;
|
||||||
if (blocks < 1) blocks = 4; //safety value
|
for(i = 0; i < 12; i++)
|
||||||
if (blocks > 9) blocks = 9;
|
state->dmr_pdu_sf[slot][i+(blocks*12)] = dheader[i];
|
||||||
for(i = 0; i < 12; i++) state->dmr_pdu_sf[slot][i+(blocks*12)] = dheader[i];
|
|
||||||
state->data_block_counter[slot]++;
|
state->data_block_counter[slot]++;
|
||||||
//no matter how you assemble this, with or without the p_head block(s), there is ALWAYS a CRC32 Failure
|
|
||||||
|
//this method will NOT include the prop_pdu header as a data block and assemble the data blocks as a message, excluding duplicates
|
||||||
|
// state->data_header_blocks[slot]--; UNUSED(i);
|
||||||
|
|
||||||
|
//no matter how you assemble this, with or without the p_head block(s) or extra blocks, there is ALWAYS a CRC32 Failure
|
||||||
//even when it continues to pass on other SAP values, SAP 1 must have a different checksum?
|
//even when it continues to pass on other SAP values, SAP 1 must have a different checksum?
|
||||||
//Users trying to get this will want to enable -F to bypass the CRC32 failure
|
//Users trying to get this will want to enable -F to bypass the CRC32 failure
|
||||||
|
|
||||||
//a recent discovery on a few systems and samples show the existence of multiple Prop Head Packets (how does that work)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user