blackmore90
Member
- Joined
- Jan 9, 2018
- Messages
- 13
I'm working on decoding the SACCH for the MMDVM project. I have the LICH decoding correctly after I realised that the scrambler was per symbol and not per bit.
I'd be interested in your CRC algorithm for the six-bit CRC, as well as any gotchas on decoding the SACCH. I don't expect to see an FACCH2 unless I send data, I get the impression from the documentation that the FACCH2 works as a header for a bunch of UDCH blocks.
For voice I only expect to see SACCH and FACCH1 as well as audio blocks.
Hi,
Here is the CRC-6 algorithm:
void crc_calc()
{
unsigned char xor_flag = 0;
crc = 0x3f;
for (int i = 0; i < 26; i++) {
xor_flag = l3_data ^ ((crc & 0x20) >> 5);
crc <<= 1;
if(xor_flag)
crc++;
if (xor_flag)
crc ^= 0x26;
crc &= 0x3F;
}
}
sorry for the late response.Actually FACCH2s are with data packets, that's why i don't encounter them. I have FACCH1 and SACCH packets but it seems that i miss some TX_REL_EX packets from FACCH1. But i can use IDLE messages instead, to determine the call stop instants. Thank you.