Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRC Question

Status
Not open for further replies.

iondy

Programmer
Feb 10, 2004
10
GB
Not truely a tcp/ip question so apologies.
Have a serial connection that is sending data as follows:

'A packet header byte is sent followed by data pertaining to that packet followed by a 16 bit CRC.'

Now the problem is, I cant seem to reproduce the same CRC.

An example of packet sent (hex):

AA 0C 16 10 03 93 4D AA

Now from what I can work out, the 0C 16 10 03 is the data, the 93 4D is the CRC. Is this right? Having said that, the '0C' may not be used to work out the CRC as that never (as of yet) seems to change.

Thing is, I can't seem to recreate this CRC.

Am I totally wrong in this? Wouldn't suprise me. :)
 
the crc is a 4 byte field at the end of an (ethernet) frame. It is a calculation using a fixed formula to check if the package is not damaged during transfer.

Looking at your packet, it seems rather short, a standard ethernet packet has a minimum of 64 byte, from wich the first six are the destination MAC address and the second six are the source MAC address. The fields that follow depent on the type of ethernet packet (f.y.i. it can be a length field or an ethertype).

It is possible to create the same CRC, if the packet is exactly the same.


regards,
Robert
 
Thanks for the reply...

Sorry, really didnt explain too well. This is an 8 bit packet sent over rs-232. 3 bits of it are data and 2 crc of that data. (made mistake writing it down)

Having various data values and the relevant created crc's, how do I go about finding what seed was used to create it first time round?
 
i presume you mean 8 byte not 8 bit.
About the rest, i really can't tell you, have no experience on that area sorry........
Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top