brewpi-remix / aioblescan

Python only library to scan and decode advertised BLE info for Tilt/BrewPi Remix.
https://www.brewpiremix.com
MIT License
0 stars 0 forks source link

Packet Dropouts #1

Open lbussy opened 4 years ago

lbussy commented 4 years ago

Aioblescan can raise an exception under some circumstances, causing client connections to fail:

  File "/usr/local/lib/python3.7/dist-packages/aioblescan/aioblescan.py", line 966, in decode
    data=ev.decode(data)
  File "/usr/local/lib/python3.7/dist-packages/aioblescan/aioblescan.py", line 1007, in decode
    data=ev.decode(data)
  File "/usr/local/lib/python3.7/dist-packages/aioblescan/aioblescan.py", line 1033, in decode
    data=x.decode(data)
  File "/usr/local/lib/python3.7/dist-packages/aioblescan/aioblescan.py", line 298, in decode
    self.val= unpack(">B",data[:1])[0]
struct.error: unpack requires a buffer of 1 bytes
lbussy commented 4 years ago

Fixed.

lbussy commented 4 years ago

Still happening.

lbussy commented 4 years ago

Image Alt

lbussy commented 4 years ago

So far this seems to be helped by lowering the baud rate. Noah says he noticed it a lot when logging multiple Tilts.

lbussy commented 4 years ago

Link to Tilt issue board.