Habe jetzt herausgefunden, wie das zustandekommt.
Das Bit 16 entfällt einfach und dafür werden High und Low-Byte miteinander getauscht. Somit kommt als Polynom 0xA001 raus.
Ich hab hier jetzt auch ne Routine dazu. Allerdings berechnet diese nur immer das eine Byte richtig.
Kannst du dir das mal anschauen?
crc16 = 0x00;
for(int i=0; i<buf.Length; ++i)
crc16 = calcCRC16r(crc16, buf[i], 0xA001);
uint calcCRC16r(uint crc, uint c, uint mask)
{
byte i;
for(i=0;i<8;i++)
{
if(((crc ^ c) & 1) != 0) { crc=(crc>>1)^mask; }
else crc>>=1;
c>>=1;
}
return (crc);
}