How to get Chrome Web Bluetooth working on Linux

In my previous post I demonstrated how to test and scan for Bluetooth Low Energy:

Now I will explain what I did to get Bluetooth Low Energy working on Linux Debian.

First I installed the Chrome Dev version 53 from here:

But the Bluetooth Scan Page example was not working:

Then searching in the forums I discovered these four requirements to get it working:
1) A recente Chrome version 45+ (I’m using version 53);
2) A recente Linux kernel 3.19+ (my kernel was too old: 3.16);
3) BlueZ 5.40+ (my bluez version was 5.36);
4) Bluetooth daemon (bluetoothd) running with experimental interface (/usr/bin/bluetoothd -E).

Then I updated my Linux kernel:

$ sudo apt-get install linux-image-4.6.0-1-amd64

Compiled Bluez 5.40:

// Install the dependecies:
$ sudo apt-get -y install automake autotools-dev bison check clang flex lcov libcap-ng-dev libdbus-glib-1-dev libdw-dev libglib2.0-dev libical-dev libreadline-dev libtool libudev-dev

//Download bluez-5.40:
$ wget

//Extract it:
$ tar xvf bluez-5.40.tar.xz

// Configure and compile it:
$ cd bluez-5.40
$ ./configure --prefix=/usr           \
            --mandir=/usr/share/man \
            --sysconfdir=/etc       \
            --localstatedir=/var    \
            --enable-library        \
            --disable-systemd       \
            --disable-android       \
$ make

// Create a debian package with checkinstall:
$ sudo checkinstall

Here checkinstall didn’t create the /usb/bin/bluetoothd link, let us to create it:

# ln -s /usr/libexec/bluetooth/bluetoothd /usr/bin/bluetoothd

We need to stop bluetoothd daemon and call it with -E:

# /etc/init.d/bluetooth stop
# /usr/libexec/bluetooth/bluetoothd -E &

Now let see if Chromium could communicate with the BLE device:

$ ./chrome --enable-web-bluetooth

Then open the sample page to test Discover Services and Characteristics:

I will test the Nordic Serial Service, then I enter:


After updating bluez to version 5.40 the Bluetooth Chooser pop-up window stopped to list the nearby Bluetooth LE devices.

This issue was caused because I used “ControllerMode = le” in the /etc/bluetooth/main.conf. This BUG didn’t exist in the bluez 5.36.

Changing “ControllerMode = dual” in the /etc/bluetooth/main.conf fixed the issue (thanks François Beaufort for the help).

And after restarting bluetoothd and clicking on “Discover services and characteristics” and choosing the Nordic_UART device, it returns:

Requesting any Bluetooth Device...
> Name:             Nordic_UART
> Allowed Services: 6e400001-b5a3-f393-e0a9-e50e24dcca9e
Connecting to GATT Server...
Getting Services...
Getting Characteristics...
> Service: 6e400001-b5a3-f393-e0a9-e50e24dcca9e
>> Characteristic: 6e400003-b5a3-f393-e0a9-e50e24dcca9e [NOTIFY]
>> Characteristic: 6e400002-b5a3-f393-e0a9-e50e24dcca9e [WRITEWITHOUTRESPONSE, WRITE]


5 thoughts on “How to get Chrome Web Bluetooth working on Linux

  1. Thanks for you sharing. There is an important detail, you need to enable Experimental Web plataform features on chrome. Going to chrome://flags/


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s