I want to caculate in a tcl script the CRC for this frame :
00000A00080000000A00090000004500002E0000000040117AC00000000000000000003F003F001AB6EB000102030405060708090A0B0C0D0E0F1011
The expected CRC is 0x1652255A. I tried the following (found here):
% set string \x00\x00\x0A\x00\x08\x00\x00\x00\x0A\x00\x09\x00\x00\x00\x45\x00\x00\x2E\x00\x00\x00\x00\x40\x11\x7A\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x00\x3F\x00\x1A\xB6\xEB\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\
x0D\x0E\x0F\x10\x11
% package require crc32
1.3
% crc::crc32 -format %X $string
690CE0EE ;# not good
% set string 00000A00080000000A00090000004500002E0000000040117AC00000000000000000003F003F001AB6EB000102030405060708090A0B0C0D0E0F1011
% set bin [binary format H* $string]
% crc::crc32 -format %X $bin
690CE0EE ;# same than previous one
There is something I don't understand with this proc, and I am not sure it is working correctly, because the result is always the same :
% crc::crc32 -format %X foo
690CE0EE
% crc::crc32 -format %X somethingdifferent
690CE0EE
If I go on this online tool, if find the expected result...
Is the problem coming from me or from the package ?