dream4soul at gmail.com wrote: > calc_crc(b'\x00\x00\x34\x35\x38\x35') > unsigned char a[]={0x30,0x30,0x34,0x35,0x38,0x35}; The first two bytes differ; you made an error on the input.