This file and function appear in three examples that I could find.
The 'readPacket' function resets the packet when a '!' byte is seen:
if (c == '!') { replyidx = 0; }
(line 101 after ble->read)
Unfortunately, '!' can be a valid value for a parameter or checksum byte in the packet. This flaw causes certain valid packets to be rejected with a "Checksum mismatch". For example, a color picker packet with any of the RGB values set to 33 ('!') will be rejected. Likewise a color picker packet whose RGB values sum to 122 will generate a checksum value of '!' and be rejected.
This file and function appear in three examples that I could find.
The 'readPacket' function resets the packet when a '!' byte is seen: if (c == '!') { replyidx = 0; } (line 101 after ble->read) Unfortunately, '!' can be a valid value for a parameter or checksum byte in the packet. This flaw causes certain valid packets to be rejected with a "Checksum mismatch". For example, a color picker packet with any of the RGB values set to 33 ('!') will be rejected. Likewise a color picker packet whose RGB values sum to 122 will generate a checksum value of '!' and be rejected.