Ubuntu 16.04, bluez 5.41, can't connect

Posted on
  • Hi all, hoping for some help so I can get cracking on some preojects.

    Having an issue connecting to my puck via chrome:

    1. I open the web IDE
    2. I click connect and choose Web bluetooth
    3. My puck shows, and I can attempt to connect.
    4. That fails. Console says "Connection failed for unknown reason"
    5. The puck will now not show up in the list of bluetooth devices I can connect to through the site until I reboot my machine. Rebooting the BT service alone does nothing.

    The puck works fine on my android tablet, but obviously I'd rather code on something a bit more friendly.

    Any ideas?

  • My guess is that the Puck thinks its connected to My laptop, but the laptop doesn't?

    Edit: I've tried manually closing the bluetooth daemon and starting it with the E flag, and that got the puck to show up again without the need for a reboot. However, that showed the puck in the list, and said that it was already paired with the laptop.

    Clearly there's something up with how these things are talking to each other...

  • You should probably try installing Bluex 5.43 like this: http://www.espruino.com/Web+Bluetooth+On­+Linux

    Even then it can be a bit flaky - apparently the Chrome dev team have had to put a lot of patches on top of the stock Bluez.

    For starters, try http://www.espruino.com/Raspberry+Pi+Web­+IDE (the instructions still work for Linux) or the command-line app mentioned here: http://www.espruino.com/Puck.js+Quick+St­art

    For the command-line app you'll also need to do sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)

    It tends to be a lot more reliable than Web Bluetooth on Linux (at the moment)

  • My mistake, I've actually got Bluez 5.43 not 41.

    I managed to get the local Web IDE working with bluetooth so I'm happy now making my puck randomly flash colours until I've gotten up to sped with the API. Many thanks for your help.

    An issue I did notice when trying to manually install the web-ide through NPM is that it first complained that it couldn't find node, so I used apt-get nodejs-legacy (I had node installed), then it complained that it couldn't find the module "nw". Installing that (sudo npm install nw -g) did fix the issue, maybe worth adding that to the guide on the git readme

  • Ahh - yeah, I need to update that. I'm still a bit overworked at the mo, so if you do get a second to do a PR it'd be hugely appreciated!

    To be honest the Node-Webkit based IDE is sometimes a bit hard to install (if the nw.js and node versions don't match exactly, BLE via noble won't work without a lot of messing around) so I've been encouraging everyone to use the server which just makes it available on localhost:8080 - that doesn't generally have the noble problems as it runs using 'normal' node.js.

  • I will take a look at writing up what I had to do.

    Really do appreciate all your efforts; you've got a fantastic product here.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Ubuntu 16.04, bluez 5.41, can't connect

Posted by Avatar for user70974 @user70974

Actions