Web Bluetooth Failure

Posted on
  • Hi,
    I'm facing a strange problem with WebBLE with Chromium running on Kubuntu. The device is visible and can be selected but the IDE does fail to connect to the Bangle v1. The browser log states:
    either:

    " No Services matching UUID 6e400001-b5a3-f393-e0a9-e50e24dcca9e found in Device.".
    

    or

    >>> Connecting to Bangle.js 3f8a
    index.js:92938 BT>  Device Name:       Bangle.js 3f8a
    index.js:92938 BT>  Device ID:         oyJbQyUewHuu3x2K3MAQUg==
    index.js:92938 >>> Connected to BLE
    index.js:92938 BT> Connected
    index.js:92938 BT> Disconnected (gattserverdisconnected)
    index.js:92948 [notify_error] Connection Failed.
    (anonymous) @ index.js:92948
    error @ index.js:94178
    (anonymous) @ index.js:99634
    (anonymous) @ index.js:95425
    closeSerial @ index.js:96412
    btDevice.addEventListener.once @ index.js:96351
    index.js:92938 >>> Connection Failed.
    index.js:92938 BT> ERROR: NetworkError: GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.
    

    The app loader logs "NetworkError: Connection failed for unknown reason.
    ui.js:86 [error] Device connection failed,".

    Has anyone an idea on this?

  • Did you change any settings on your device? You could conceivable have uploaded something that removed the UART connection, but it seems super unlikely.

    Can you connect from your phone?

    It could just be the bluetooth stack getting in a twist. Try running sudo /etc/init.d/bluetooth restart in the console?

    On my laptop I have occasionally had the whole btusb kernel module getting confused. While I could post the commands to restart it, honestly you might be better just trying a restart and seeing if that fixes it?

  • Hi Gordon,
    thank you. I previously made some experiments with Node.js/Noble/Bangle which did not work (stuck on discovery while WebBLE did work). But this had not affected WebBLE.
    Today it is not working anymore. The strange thing was that I had to enable experimental "Use the new permissions backend for Web Bluetooth" in Chromium which is -as far as I remember new- before I even got offered WebBLE in the IDE.

    I restarted, un/reinstalled BT and Bluez and it is working with other devices.
    In Chrome I don't even get a yellow connection button though experimental features are enabled. In Brave the IDE does not offer WebBLE. I got no more idea now.

  • Did you try restarting? As I say in my laptop the btusb module gets confused sometimes - messing with bluez/etc doesn't help at all.

    Strange about the permissions backend for Web Bluetooth - never seen that one before!

  • there is also some persistent stuff in /var/lib/bluetooth/ma:ca:dd:re:ss , sometimes helps to stop bluetooth and delete that stuff as root, it gets recreated again

  • Yes and reinstalled BT. The Bangle can be accessed from my phone, but it looses erratically connection. It the one I discussed here already: http://forum.espruino.com/conversations/­368381/#comment16201131
    I tried also firmware v2.09 an v2.10.
    I'm at the moment not shure whether it's Bangle or PC which causes problems. The Chrom(ium) problems are strange.

  • Thank you for the hint. I tried this but there was no change.

  • Otk, there seem to be two seperate problems. One with Kubuntu. The other problem is obviously the Bangle.
    What I tried now: I charged my second Bangle and connected it without any problem to the IDE and App Loader. The first Bangle still does not want to communicate properly.

  • Did you try what @fanoush suggested about removing the stored device info? You could try removing it via the Bluetooth settings menu first. If you set it as a HID device and paired it then the OS may be auto-connecting.

  • Yes, I did. Finally moving to Kubuntu 21.10 did it. Thank you for the help!

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

Web Bluetooth Failure

Posted by Avatar for Tx @Tx

Actions