-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hi, I'm trying to implement in MMDVMHost the DMR tier III reverse channel commands for MS de-key and MS power control.
I use ok-dmrlib to generate the 32 bit PDUs, but the radios do not respond to the commands so there seems to be some issue with my code.
I figured out by myself that in VBPTC3211 I have to invert the parity bits row to odd in the set_parity() method and changed it accordingly. I'm not so sure about CRC7 configuration.
I wonder if you could help me troubleshoot my ok-dmrlib code below. Otherwise, the EMB fields are set with LCSS 0, PI 1 and correct colour code. The PDU is only transmitted in voice burst F so that seems fine as well.
ba = bitarray('0100')
CRC7_conf = BitCrcConfiguration(
width_bits=7,
polynomial=0x27,
init_value=0x00,
final_xor_value=0x7A,
reverse_input_bytes=False,
reverse_output_bytes=False,
)
crc7_calc = BitCrcCalculator(CRC7_conf, True)
crc7_nm = crc7_calc.calculate_checksum(ba)
print(crc7_nm)
ba = ba + crc7_nm
out = VBPTC3211.encode(ba)
print(out)
pad = bitarray('0000')
padl = bitarray('0000')
pad.extend(out)
pad.extend(padl)
all_bytes = bits_to_bytes(pad)
readable = all_bytes.hex(',').split(',')
x = str()
for i in readable:
x += "0x" + i + ', '
print(x)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels