Crccalc.com lists the initial state of the CRC as 0xC6C6, whereas we use the initial value of 0x6363, the bit reversed value. This value is the one that gives the correct result (matching crccalc.com's check) when run with our code.
Computes the CRC-16/RIELLO checksum of the given data.
Returns the checksum as a 16-bit integer.
Note
Crccalc.com lists the initial state of the CRC as 0xB2AA, whereas we use the initial value of 0x554D, the bit reversed value. This value is the one that gives the correct result (matching crccalc.com's check) when run with our code, and it is also the value given in the specification at https://networkupstools.org/protocols/riello/PSGPSER-0104.pdf
Computes the CRC-16/TMS37157 checksum of the given data.
Returns the checksum as a 16-bit integer.
Note
Crccalc.com lists the initial state of the CRC as 0x89EC, whereas we use the initial value of 0x3791, the bit reversed value. This value is the one that gives the correct result (matching crccalc.com's check) when run with our code.