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

Startup fails with: error: EINVAL: Invalid argument #10

Open
sooda opened this issue May 11, 2024 · 2 comments
Open

Startup fails with: error: EINVAL: Invalid argument #10

sooda opened this issue May 11, 2024 · 2 comments

Comments

@sooda
Copy link

sooda commented May 11, 2024

FYI, ruuvitag-listener (latest master as of writing) does not work on systems with a new enough Linux kernel; at least 6.8.7 is affected. adapter.connect() in on_measurement() fails, as the kernel refuses btleplug's actions.

btleplug 0.5.5 (and earlier 0.5) suffers from a kernel ABI incompatibility that has gone unnoticed until now; see deviceplug/btleplug#383. Fix has been proposed for btleplug, but anyway 0.5 is really old; consider upgrading to latest (which has an entirely different API, unfortunately).

sooda added a commit to sooda/ruuvitag-listener that referenced this issue May 12, 2024
The API of modern btleplug is very different from that of 0.5, so
quickfix issue lautis#10 by using a fork of btleplug that has the issue fixed.

Update all deps while at it.
@sooda
Copy link
Author

sooda commented May 12, 2024

btleplug confirmed that old versions are not maintained, so I cleaned up local hacks and made a proper fork to not forget about it. Feel free to take or ignore #11.

(I don't think that pointing this curiosity out in the Linux mailing lists would be worthwhile even though the problemo came to be from a kernel patch.)

@lautis
Copy link
Owner

lautis commented May 30, 2024

Thanks for the patch! I’m averse to have git dependencies as then publishing crate isn’t possible as far as I know.

I’ve post-poned updating btleplug as the D-Bus implementation in 0.6 does not support passive scanning. Bluer could be an option that might allow using passive scanning, but both do indeed require a rewrite.

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

2 participants