The CRC field provides integrity check of the packet.

A CRC8 is computed over the entire packet including the header, but the CRC field in the header is set to 0xFF prior to computing the CRC.

The reference C++ implementation of the CRC8 is like this:

inline uint8_t NeblinaUtilities::crc8( const uint8_t* ppBuf, uint32_t pSize )
{
uint32_t i;
uint8_t e, f, crc;

crc = 0;
for ( i = 0; i < pSize; i++ )
{
e = crc ^ ppBuf[i];
f = e ^ ( e >> 4 ) ^ ( e >> 7 );
crc = ( f << 1 ) ^ ( f << 4 );
}
return crc;
}