With data equals
string=("68008002710100007101000000000000FF051D002C32D06203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
CRC_Protocol gets CRC equals ("BC97") while the correct CRC equals ("AEB2") and the correct CRC was checked by online calculator.
the problem is that CRC_Protocol calculates CRC from string while it should calculate it from bytes same as the online calculator.
So how to make CRC_Protocol calculates the CRC from bytes instead of string ???
With data equals string=("68008002710100007101000000000000FF051D002C32D06203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
bytes = ("0x68 0x00 0x80 0x02 0x71 0x01 0x00 0x00 0x71 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0x05 0x1D 0x00 0x2C 0x32 0xD0 0x62 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00")
CRC_Protocol gets CRC equals ("BC97") while the correct CRC equals ("AEB2") and the correct CRC was checked by online calculator. the problem is that CRC_Protocol calculates CRC from string while it should calculate it from bytes same as the online calculator.
So how to make CRC_Protocol calculates the CRC from bytes instead of string ???