flutterdartchecksumcrc16

How to calculate the checksum of this data?


I have the following data frame:

AA3200010013000CAAAA000000000000000000043000010156EF79

"EF 79" is supposed to be the checksum. but I am not very sure how to get this value.

in the documentation it says:

Checksum: data CRC16 checksum except for frame head. The calibration algorithm adopts CCITT-16, calibration polynomials is X16 + X15 + X2 + 1, initiation value is set as 0.

Solution

  • If you drop the leading aa, then this CRC-16 of the remainder:

    width=16  poly=0x8005  init=0x0000  refin=false  refout=false  xorout=0x0000  check=0xfee8  residue=0x0000  name="CRC-16/UMTS"
    

    gives ef79.