-
Notifications
You must be signed in to change notification settings - Fork 52
Description
I have a raspberry pi 4, which I am using bleno on.
After a fresh install and setup, my app was working fine and broadcasting a BLE peripheral.
After some time, when I didn't make any changes, the stateChange event stopped arriving when I started the app, even though hci0 was up.
I could see in the DEBUG=* npm run... output the following:
bleno platform linux +0ms
hci setting filter to: 1400000020c10800000000400000 +0ms
hci onSocketError: EINVAL, Invalid argument +1ms
I couldn't repair this by reinstalling the bluetooth tools, rebooting, taking hci0 up/down etc. I ended up rebuilding the entire pi with all dependencies and this fixed it, but unfortunately today the issue reoccurred.
However, as rebuilding the pi is incredibly time consuming, I did some more research and I have discovered noble#482 with associated pull request for mayfield@2644e67
This changes the setSocketFilter buffer size from 14 to 16 and I can confirm that this seems to resolve the issue, once changing this locally, the EINVAL goes away and normal service resumes
I will raise a new PR on this repo for the issue