Testing web-bluetooth on desktop

480 views
Skip to first unread message

Tommy Thorsen

unread,
Jan 19, 2016, 3:48:05 AM1/19/16
to web-bl...@chromium.org
Hi!

I've been trying unsuccessfully for a few days to test web-bluetooth on one of the desktop builds, using the bluez implementation. I'm basically trying to get one of my desktop chrome builds to use my usb ble dongle to talk to the various usb devices in my office.

When I try to do this with my regular linux build, I get a NotFoundError; "Bluetooth adapter not available". My ChromeOS build gets all the way to the device chooser, but the chooser is always empty. It doesn't seem to be able to scan.

Are any of you guys able to do this? If so, what does your setup look like? Do you remember having to do something special in order to make the scanning work?

(When I do a ble scan on command line, I have to use "sudo". Do I need to run the browser as root? I've tried doing this, but it keeps complaining about suid sandbox issues)

Best regards,
Tommy Thorsen

François Beaufort 🇫🇷

unread,
Jan 19, 2016, 3:54:11 AM1/19/16
to Tommy Thorsen, web-bluetooth
You might want to follow https://code.google.com/p/chromium/issues/detail?id=578779 as I'm also facing some of these issues.

--
You received this message because you are subscribed to the Google Groups "web-bluetooth" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-bluetoot...@chromium.org.
To post to this group, send email to web-bl...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/web-bluetooth/CA%2BzGpV1YVSbzKGYG8fHbok61111G4c1Vkuoq7dGOzdgF2%3DXFQg%40mail.gmail.com.

Tommy Thorsen

unread,
Jan 19, 2016, 4:04:50 AM1/19/16
to François Beaufort 🇫🇷, web-bluetooth
Interestingly, I get the following output after invoking a requestDevice:

requestDevice called with the following filters: 
Name: 
Name Prefix: 
Services:
[
a6c31337-6c07-453e-961a-d8a8a41bf368
]
requestDevice called with the following optional services:
Populating 2 devices in chooser 1
20:7D:74:00:00:04
00:11:22:33:44:55

It actually did find two devices, but maybe something is up with the matching? I'm going to debug this a bit more.

François Beaufort 🇫🇷

unread,
Jan 19, 2016, 4:10:13 AM1/19/16
to Tommy Thorsen, web-bluetooth
Which kernel version do you have?
Which version of BlueZ do you run?

Tommy Thorsen

unread,
Jan 19, 2016, 4:17:03 AM1/19/16
to François Beaufort 🇫🇷, web-bluetooth
I'm also running the ancient 3.13 kernel version.

$ uname -r
3.13.0-67-generic

$ apt-show-versions bluez
bluez:amd64/trusty-updates 4.101-0ubuntu13.1 uptodate


François Beaufort 🇫🇷

unread,
Jan 19, 2016, 4:19:17 AM1/19/16
to Tommy Thorsen, web-bluetooth
Same configuration there.

François Beaufort 🇫🇷

unread,
Jan 19, 2016, 4:25:36 AM1/19/16
to Tommy Thorsen, web-bluetooth
Can you remove all devices from your BlueZ cache and try again?
$ bluetoothctl
[bluetoothctl] remove 12:34:56:78:90:12
...

For info, it happened to work, for me at least, the second time: https://code.google.com/p/chromium/issues/detail?id=578779#c4

Tommy Thorsen

unread,
Jan 19, 2016, 5:18:33 AM1/19/16
to François Beaufort 🇫🇷, web-bluetooth
Unfortunately I don't seem to have the bluetoothctl tool, and I can't see any obvious way to install it. It's supposed to be in one of the bluez-utils or bluez-tools packages, but I have the latest version of both of them.

The only help I can find on the web are suggestions that I might need a later version of the bluez packages. What version of the bluez packages are you using?

$ apt-show-versions bluez
bluez:amd64/trusty-updates 4.101-0ubuntu13.1 uptodate
 
$ apt-show-versions bluez-utils
bluez-utils:all/trusty-updates 4.101-0ubuntu13.1 uptodate
 
$ apt-show-versions bluez-tools
bluez-tools:amd64/trusty 0.1.38+git662e-3 uptodate



François Beaufort 🇫🇷

unread,
Jan 19, 2016, 5:21:59 AM1/19/16
to Tommy Thorsen, web-bluetooth
I've installed BlueZ 5.35 (same version as in Chrome OS for now) from source.

Giovanni Ortuno

unread,
Jan 19, 2016, 12:03:13 PM1/19/16
to web-bluetooth, tom...@opera.com, fbea...@google.com
If you are not seeing the device in Chrome OS then it's possible the device is getting filtered out. Do you see it in android? You can also try using Nordic's Master Control Panel to see what services you are advertising and see if it matches the one you are searching for.
Same configuration there.


To unsubscribe from this group and stop receiving emails from it, send an email to web-bluetooth+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "web-bluetooth" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-bluetooth+unsubscribe@chromium.org.

To post to this group, send email to web-bl...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "web-bluetooth" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-bluetooth+unsubscribe@chromium.org.

To post to this group, send email to web-bl...@chromium.org.

Jeffrey Yasskin

unread,
Jan 19, 2016, 1:57:16 PM1/19/16
to Tommy Thorsen, François Beaufort 🇫🇷, web-bluetooth
https://crbug.com/570344 suggests that you need BlueZ 5. I haven't tried it on linux at all, but it looks like François has now checked in some support.

Vincent Scheib

unread,
Jan 19, 2016, 2:01:35 PM1/19/16
to Jeffrey Yasskin, Tommy Thorsen, François Beaufort 🇫🇷, web-bluetooth
Also, for target_os = "chromeos", you are:
+ Setting command line flag from command line
+ Seeing the Chrome OS UI and enabling bluetooth in the bottom right corner?
Are the fake devices appearing in the OS UI?


François Beaufort 🇫🇷

unread,
Jan 20, 2016, 8:14:49 AM1/20/16
to Vincent Scheib, Jeffrey Yasskin, Tommy Thorsen, web-bluetooth
On Tue, Jan 19, 2016 at 8:01 PM, Vincent Scheib <sch...@chromium.org> wrote:
Also, for target_os = "chromeos", you are:
+ Setting command line flag from command line
+ Seeing the Chrome OS UI and enabling bluetooth in the bottom right corner?
Are the fake devices appearing in the OS UI?


On Tue, Jan 19, 2016 at 10:56 AM, Jeffrey Yasskin <jyas...@chromium.org> wrote:
https://crbug.com/570344 suggests that you need BlueZ 5. I haven't tried it on linux at all, but it looks like François has now checked in some support.


https://codereview.chromium.org/1598943005 is for developers to toggle the flag from the about:flags page. 
Running ./chrome --enable-web-bluetooth with BlueZ 5 and a recent version of Kernel work.

I wonder how much effort is it to backport Bluetooth subsytem kernel to "old" kernel.

Tommy Thorsen

unread,
Jan 20, 2016, 8:21:53 AM1/20/16
to Vincent Scheib, Jeffrey Yasskin, François Beaufort 🇫🇷, web-bluetooth
Yes, I'm doing both those things. I do see a whole lot of fake devices, but no real devices.

As François says, it's probably because of my old bluez.

On Tue, Jan 19, 2016 at 8:01 PM, Vincent Scheib <sch...@chromium.org> wrote:
Reply all
Reply to author
Forward
0 new messages