adafruit / Adafruit_CircuitPython_BLE

Bluetooth Low Energy (BLE) library for CircuitPython
MIT License
127 stars 58 forks source link

ValueError: Bad checksum #27

Closed devoh747 closed 4 years ago

devoh747 commented 5 years ago

Traceback (most recent call last): File "code.py", line 241, in File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/helpers/bluefruitconnect/adafruit_bluefruit_connect/packet.py", line 128, in from_stream File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/helpers/bluefruitconnect/adafruit_bluefruit_connect/packet.py", line 89, in from_bytes ValueError: Bad checksum

dhalbert commented 4 years ago

This is still present with the new 3.0.0 API. @katnni was able to generate it.

dhalbert commented 4 years ago

This is due to overflowing the peer's buffer, which is is a ring buffer. There is no flow control, so either the sender should regulate the flow, or the receiver should ignore bad packets.