This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF Snifffer 1.0.1 crc

Hello,

I am getting data from UART and extract NRF BLE packet. I check the CRC Flag and its OK. But sometimes the UART has some error and I have to check the 3 CRC bytes at the end of the packet manually. So I need to check the 24 bit CRC which is at the end of the NRF BLE packet. I searched for some days but I was not able to find the algorithm for checking the CRC. Can any one help me?

  • From Bluetooth Core Spec (Vol 6., Part B):

    3.1.1 CRC Generation

    The CRC shall be calculated on the PDU field in all Link Layer packets. If the PDU is encrypted, then the CRC shall be calculated after encryption of the PDU has been performed.

    The CRC polynomial is a 24-bit CRC and all bits in the PDU shall be processed in transmitted order starting from the least significant bit. The polynomial has theformofx24 +x10 +x9 +x6 +x4 +x3 +x+1.For every Data Channel PDU, the shift register shall be preset with the CRC initialization value set for the Link Layer connection and communicated in the CONNECT_REQ PDU. For every Advertising Channel PDU the shift register shall be preset with 0x555555.

Related