Calculating the RPC Message CRC

Hi.. Everyone Im new in forum. I have a problem with CRC. I found a Document for How to Calculating the RPC Message CRC.
I've tried to calculate with the CRC online, but none of the results match.

Thereis for example :

There are many CRC variations. You have to know the CRC polynomial, the bit width (probably 16), the start and stop XOR parameters, etc.

Somewhere you need to find out which CRC variant is being used, or reverse engineer it using the program RevEng https://reveng.sourceforge.io/

The RPC protocol is independent of SLIP.

You need to know the specifics of the CRC calculation used by the RPC protocol. There is not enough information in the posts above to guess which CRC variant is used.

There is information about RPC message.

Sorry, that adds absolutely nothing.

Edit: it looks like RPC protocol uses CRC16-KERMIT variant. The RPC message 01 65 00 03 produces the CRC value 12D0, which when complemented and byte-reversed gives 2FED, as shown in the example, post #1.

Ohh okay, my mistake. Thanks for your help. :grinning: :pray:

Click on this link to see the solution using the CRC16-KERMIT.

It works for the message FF FE 00 03 as well.

You say "when complemented and byte-reversed", What bytes should be reversed? Thanks

The CRC16-KERMIT result is 12D0. The complement of that is ED2F. Reverse the two bytes of ED2F to get 2FED.

Understood, obtain the 15's complement of a hexadecimal number by subtracting each digit from F. and the results is ED2F. Thank You

Or complement the binary number. In C/C++

0xED2F == ~(0x12D0)

Hi @Mrrusda12 , where you get the document where find the message hex to the telemetry port? Can you help me with it please?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.