modbus-tk icon indicating copy to clipboard operation
modbus-tk copied to clipboard

how to use the utils.calculate_crc()

Open huanhuangongzi opened this issue 3 years ago • 1 comments

may be in this way: utils.calculate_crc((1, 2, 0, 1)),but the result is not correct.

huanhuangongzi avatar Dec 18 '22 14:12 huanhuangongzi

It is correct but the bytes are swapped. With the input you provide the function returns 0x61D8. If you use some online tool it returns 0xD861.

enev13 avatar Apr 18 '23 13:04 enev13