Tricky BLE connection

Posted on
  • My bangle.js BLE connection is tricky, more often than not it doesn't connect. After repeated attempts, turning BLE on and off, in the end I usually manage to get it connected, but it's really frustrating. I tried both on a Macbook Pro with MacOS Catalina and on a Thinkpad x230 with Kubuntu. The watch firmware is 2.05.

    Any suggestion?

  • How is connection from a mobile phone?

    Do you have something like HID enabled in the settings? That can affect the connection stability quite a bit.

  • From Android is the same: sometimes the device is found in a matter of seconds on first attempt, and sometimes it's not found at all even after repeated attempts.

    No HID enabled.

  • Good Day,

    I'm experiencing the same issue with my mobile.
    Currently running Android v9 Kernel 4.4.153-perf+
    But it is actually OxygenOS with build number A5010_43_190624 on a OnePlus 5T.

    Didn't feel different on another device.

    Usually the trick to make it work is turning the watch off completely rather than only triggering the reset with btn1+btn2.

    Still, the watch is amazingly fun to play and tinker around with! Love it!

  • That's odd - is it possible that one of your devices is auto-connecting? It can happen especially if you pair in the OS menu first.

    Bangle.js/Espruino can only have one connection open to it at a time, so if you've got a device already connected then you won't be able to connect another. If you've got the Bluetooth Widget installed then you should be able to see it blue if there's an active connection.

    Usually the trick to make it work is turning the watch off completely rather than only triggering the reset with btn1+btn2.

    That's odd - it should have the same effect either way.

  • After investigating further, I have narrowed it down to the auto-reconnect.
    Everytime I'm out of bluetooth reach, it won't connect again unless:

    • I forget the Watch on my phone
    • restart the watch multiple times

    On first try, it sometimes throws the error that the Bluetooth PIN could not be validated.
    It is very likely that btn1+btn2 vs. turning on/off was just my perception and a coincident.

    Once a stable connection has been established, without master/slave dropping or loosing it, it continues to work like a charm.

  • Thanks. This could be related to pairing.

    Normally a device wouldn't force the pairing (bonding) procedure (it's possible to connect unpaired) and then it'd be fine, but I have noticed that reconnection can be a pain if Bangle.js is bonded (eg if you select to allow pairing in Gadgetbridge)

  • Ok, I made a progress. Switching off the phone bluetooth seems to do the trick, with that, so far, I've always been able to connect the watch at the first attempt.

    Thanks Gordon and kudos for the project

  • I'm 'fbedussi' the user who opened the thread, don't know why my username changed

  • Sat 2020.04.18

    @fbedussi, by chance was the last login from a different device or email address?

    user111507   http://forum.espruino.com/profiles/15562­4/
    fbedussi   http://forum.espruino.com/profiles/15537­2/

  • maybe... I'm using different devices and a couple of email addresses

  • Ok, I used a different email address, now the right one :-) thanks

  • Folks, it's weired. The day before yesterday everything worked like a charm. Since yesterday I'm still experiencing some problem. Now I always see the device listed in the BLE connection dialog, but downloading all apps always fails. No error in consolle, firmware v2.05.15, tried both Chorme on macOS Catalina and on Android 9

  • Shame on me! Yesterday my 6yo son played with the clock and it turns out he set the programmable to false :-) issue resolved

  • I guess he was searching for games 😁

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

Tricky BLE connection

Posted by Avatar for fbedussi @fbedussi

Actions