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

Is it at all necessary to integrate CRC when using notification?

Suppose you want to send 20 bytes of data using API sd_ble_gatts_hvx, do you need to punctuate the first 16 or so data within the 20 bytes sent with a CRC ?

it may seem unnecessary as BLE stack in itself is quite reliable, but I'm still puzzled by these few lines found within the BLE stack specification:

3.1 ERROR CHECKING At packet reception, the Access Address shall be checked first. If the Access Address is incorrect, the packet shall be rejected, otherwise the packet shall be considered received. If the CRC is incorrect, the packet shall be rejected, otherwise the packet shall be considered valid. A packet shall only be processed if the packet is considered valid. A packet with an incorrect CRC may cause a connection event to continue,

and:

The slave shall always send a packet if it receives a packet from the master regardless of a valid CRC match, except after multiple consecutive invalid CRC matches as specified in Section 4.5.6

My understanding is that the communication should have a zero-tolerance policy regarding wrong CRCs, or else it's meaningless, upon receiving a mismatching CRC, either slave or master shall inform the other by either sending a control packet of some sort, or stall the comm and cause the entire established link to start over. The quoted paragraphs of the specification makes it look like as if it is necessary to have a CRC at a higher level. May be I'm misinterpreting all of this?

Parents Reply Children
No Data
Related