-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Bluetooth LE watchAdvertisements doesn't work on Linux Ubuntu + Chrome while it works on Android or Windows #794
Comments
Linux is not supported for now. See https://github.com/WebBluetoothCG/web-bluetooth/blob/main/implementation-status.md#scanning-api |
OK. Thank you. I'm using Linux+Chrome for development purpose. The page says that "GATT Server Connect" is supported. But I tried device.gatt.connect() on the response of navigator.bluetooth.requestDevice() but it doesn't succeed. Once again, the same device is connected from Windows + chrome upon reception of the Advertisement watch. I'm in a case which I own the device with its Gatt server. Is there a way to manage to connect to a BLE device from Linux+Chrome without using scanLE and without watch advertisement? |
Does this help?
If you own the device, can you expose the GATT Battery Service and try https://googlechrome.github.io/samples/web-bluetooth/battery-level-async-await.html? |
Ubuntu 22.04 is way beyond kernel 3.19 and BlueZ 5.41. I'm on Ubuntu 20.04 (kernel 5.15 and bluez 5.53) and I can connect to the device from a plain C application. request device works and I get a structure such as {deviceId: 'ui5gjtwifKM+.....', name: 'AutoCamera'}. But the connect() fails. And the connect works in Android. I really would like to make this work because it will save me a lot of time to work on Linux+Chrome. |
The error in Linux is "connect error: DOMException: Connection Error: Connection attempt failed." |
Could you file a web bluetooth bug at https://crbug.com/new and follow https://www.chromium.org/developers/how-tos/file-web-bluetooth-bugs/#linux instructions? |
I'm not totally sure of my own implementation of the Gatt server on my device, but the same "very simple" page works on Android and fails on Linux. And it also works in a native Android java app, as well as in a native Linux C app. I have emailed you a full log report (to fbe....com) |
As shared by email, it looks like a Bluez issue:
|
A clean install of Ubuntu 22.04 LTS with the latest version of Google Chrome as of February 2023 such as 110, watchAdvertisements doesn't work in the sense that no device is seen. There is no error on the page https://googlechrome.github.io/samples/web-bluetooth/watch-advertisements-and-connect.html, it just says:
The same page on Android or on Windows 10 (even with an old Google Chrome) is working, it lists the advertisements and successfully connects to the device.
Once again, a live ISO of Ubuntu 22.04 LTS with google-chrome.deb installed shows up the problem.
The text was updated successfully, but these errors were encountered: