Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux 6.9 support broken #53

Open
agrath opened this issue Jan 19, 2025 · 5 comments
Open

Linux 6.9 support broken #53

agrath opened this issue Jan 19, 2025 · 5 comments

Comments

@agrath
Copy link

agrath commented Jan 19, 2025

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

@agrath
Copy link
Author

agrath commented Jan 19, 2025

PR here: #54

@agrath
Copy link
Author

agrath commented Jan 19, 2025

Also see abandonware/node-bluetooth-hci-socket#60 (comment) for the background

@xcellsior
Copy link

Oh my gosh thank you, I was going crazy on this issue and doing exactly what you were doing with the same hardware.

I can confirm this resolved the issue for me as well.

@sirfergy
Copy link

sirfergy commented Feb 2, 2025

This fix has merged, is it possible to get an updated npm package?

@sirfergy
Copy link

sirfergy commented Feb 2, 2025

I submitted this PR to bump to 0.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants