"PTTID for Unit 1234 is:
(hexidecimal) 01 80 1234 2E3E 00 6580A862DD8808
01 is the command opcode
80 is its argument
1234 is the unit ID
2E3E is presumably the CRC (though the "inverted CCITT-CRC" hint seems reasonable, I haven't successfully found the exact algorithm/input data ordering that works)
00 is an unknown field (it is 00 for PTTIDs, 76 for STS and MSG)
and 6580A862DD8808 is the FEC (convolutional code) bits
Now, for the successful hacking of the evening...
To generate the convolutional code bits, perform the following operation:
1. reverse the bit order for each byte of the first 7 bytes (to undo the reversal performed for display, above)
2. feed those bits into a shift register which is preloaded with all zeros
3. for each bit, calculate the modulo-2 sum: bit(n)+bit(n-2)+bit(n-5)+bit(n-6)
4. then for each byte of resulting output, again reverse those bits to generate the values listed above (for display)
Note that because of the constraint length and lack of trailer of this convolutational code, it does not protect (most of) the final "unknown" field. "
No comments:
Post a Comment