I am working on a new interface that has a piece within it that I have no experience. I am posting here in the hope that one of you with experience in this area can point me in the right direction.
Basically I’m working on calculating a CRC for a MAC address. The documentation is not very clear and I have completed an internet search on the subject. I have found many online CRC calculators and much source code, but none seems to be what I need. In the PowerBASIC forums I found several nice 32 CRC but do not understand the theory well enough to modify.
This is a key description of doing the calculation:
The unit address has an 8 bit checksum. The checksum is calculated over the 40 bit unit using CRC with the generator polynomial,
G(X)= X^8 + X^7 + X^4 + X^3 + X +1.
The CRC is calculated using a shift register circuit. The register is first preset to all ones. Then the 40-bit unit address is shifted into the circuit most significant bit first. After the last (least significant) bit is shifted into the circuit, the value within the 8-bit circuit is the CRC of the address.
Examples:
The last 3 digits of the readable format is the CRC as far as I can tell.
I have not had any luck calculating the CRC nor the converting of the MAC to a readable format. The shifting makes no sense to me. It would seem that you would have the same results just putting the last 8 bits into the register. Something else going on I’m sure.
Thanks
John
Basically I’m working on calculating a CRC for a MAC address. The documentation is not very clear and I have completed an internet search on the subject. I have found many online CRC calculators and much source code, but none seems to be what I need. In the PowerBASIC forums I found several nice 32 CRC but do not understand the theory well enough to modify.
This is a key description of doing the calculation:
The unit address has an 8 bit checksum. The checksum is calculated over the 40 bit unit using CRC with the generator polynomial,
G(X)= X^8 + X^7 + X^4 + X^3 + X +1.
The CRC is calculated using a shift register circuit. The register is first preset to all ones. Then the 40-bit unit address is shifted into the circuit most significant bit first. After the last (least significant) bit is shifted into the circuit, the value within the 8-bit circuit is the CRC of the address.
Examples:
Code:
MAC Human Readable format 78100BFFE3 120-02692-21859-211 00ACD8945F 000-28998-74911-239
The last 3 digits of the readable format is the CRC as far as I can tell.
I have not had any luck calculating the CRC nor the converting of the MAC to a readable format. The shifting makes no sense to me. It would seem that you would have the same results just putting the last 8 bits into the register. Something else going on I’m sure.
Thanks
John
Comment