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: noble error -- adapter state unauthorized #9

Closed
jdpigeon opened this issue Jul 24, 2018 · 3 comments
Closed

Linux: noble error -- adapter state unauthorized #9

jdpigeon opened this issue Jul 24, 2018 · 3 comments

Comments

@jdpigeon
Copy link
Contributor

jdpigeon commented Jul 24, 2018

Node doesn't have cap_net_raw privileges, so it can't control BLE advertising.

Unfortunately, unlike Muse LSL, running the command sudo setcap 'cap_net_raw,cap_net_admin+eip' $(eval readlink -f which node) doesn't seem to fix the issues. It's likely we've got a situation like the one described here noble/noble#619, where the electron rebuild step kind of obfuscates the node binary we're trying to use.

@jdpigeon
Copy link
Contributor Author

Another relevant issue: noble/bleno#282 (comment), need to give local electron binary in node_modules setcap access: sudo setcap cap_net_raw+eip node_modules/electron/dist/electron

However, this leads to another issue: electron/electron#4583, caused by Linux disabling shared libraries after changing setcap privileges

@jdpigeon
Copy link
Contributor Author

I think the smartest thing to do here would be to find a platform-specific way to switch to using purely web bluetooth on Linux. It's already the strategy we're going for on Mac and, though it's not there yet, there's a much greater chance of web bluetooth being supported on Linux than Windows: https://www.espruino.com/Web+Bluetooth+On+Linux

@jdpigeon
Copy link
Contributor Author

Fixed in #10

Note: we've decided to go with web bluetooth instead of trying to get noble working

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

1 participant