[Tutor] CRC-16 calculation

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Tue Feb 8 11:18:10 CET 2005


On Tue, 8 Feb 2005, Johan Geldenhuys wrote:

> I have a data packet in Hex values and need to determine how to
> calculate the CRC-16 bit checksum for these values:
>
> 0x55,0x00,0x0A,0x01,0x01, 0x01,0xFF,0x00,0xDC,0xCC
> Sync|    Lenght |source addr|dest. adr |Data| CRC check|
>
> This example shows me the CRC checksum, but if I change the source addr,
> this chechsum is no longer valid.

Hi Johan,

I'm not exactly sure what you are asking: are you looking for an
implementation of the CRC-16 algorithm in Python?  Or are you asking how
it actually works?

If you'd like to learn how CRC error detection works, the web site:

    http://www.ross.net/crc/crcpaper.html

has a nice tutorial that explain their fundamentals.

If you are looking for a CRC-16 implementation, there appears to be one
here:

   http://mail.python.org/pipermail/python-list/2004-January/204983.html



More information about the Tutor mailing list