Feature request bluetooth / offline mode?

Posted on
  • What I'm missing is a menu entry to enable/disable sensors and connections.
    In detail bluetooth, both for a matter of electromagnetic waves but as far as I'm concerned for a matter of privacy and also GPS.

    Even if I indicate "Make connectable > no" the bangle shortly after, it comes back with bluetooth enabled.

    I would like to be able to use it "offline" in certain cases.

    I think of the android dropdown with the various options to enable/disable bluetooth, location, wifi, etc., and it seems like a great thing that allows so much control.

    Otherwise an entry to take it offline....

    @Gordon you had explained some steps for bangle 1 but I couldn't get anything satisfactory...

  • I just tested it on firmware 2v13, when "connectable" is no, I could really not connect.

    For GPS: I don't see the connection here with electromagnetic waves or privacy.
    Electromagnetic waves: Last time I checked there was no way to get the satellites to send any data.
    Privacy: GPS is only enabled if an app requests it. Just tell none of your apps to use GPS and you are good. GPS defaults to disabled because it eats your battery.

  • Unfortunately I am not aware of it, I am with the latest available firmware espruino_2v13.123_banglejs2.zip
    Last night it wouldn't disconnect for me, I noticed that I had to disconnect the laptop and only after that, the "make connectable > no" actually "turned off" the bluetooth.
    This morning I try again to connect, and it reconnected without any problems, and without re-enabling the connection on the bangle.
    I tried removing, reinstalling a few apps and everything worked.

    So something wakes up the ability to reconnect without going through the "bluetooth" menu and making it connectable.

    Something is not working as it should.

    I will confirm that for GPS, if you don't use apps that require it, it seems to stay dormant.

  • I'm not sure if I fully understood you, but since sounds like a bug. However in my last test, "make connectable" work.

    For the accessibility someone could create a widget like the close widget but instead of closing it could toggle bluetooth power.

  • Before I went to sleep, I set the bangle with "make connectable -> no" and in the morning when I picked it up again, it connected to the app loader https://espruino.github.io/BangleApps/ without any problems.

    MAYBE some commonly used generic app like the launcher or the alarm app, the only two apps I may have used afterwards, "re-enable" bluetooth.

  • Could it be that there already was a connection when you set make connectable=no and the connection persisted over night?

    Also, directly below the "make connectable" option there is "BLE". I would try this one. According to the description it really turns off BT, disabling incoming & outgoing connections.

  • Initially, yes, there was a connection and the Bluetooth did not turn off (which was not good anyway).
    I broke the connection and disabled bluetooth on laptop and smartphone and set "make connectable = no" (which automatically set BLE = Off).

    The next day the problem showed up as described above, at most I'll have used the launcher and fixed the alarm (maybe).

  • It'd be great if you could post up the contents of your setting.json and .boot0 files when you've done a make connectable : no.

    Looking at the code, it should set ble=false in settings, which should add the line if (!NRF.getSecurityStatus().connected) NRF.sleep();, so it should be that if you're not connected, as soon as you leave the settings app it turns bluetooth off.

  • I have now put my hand back on the bangle.

    I broke the connections, set "make connectable = no" and reconnected immediately without any problems with the IDE.

    The files you asked for are attached

    Thank you.


    2 Attachments

  • Ok, thanks. I've just looked at this and everything seems ok to me, and I tried here on a watch and it seems to work as expected.


    I broke the connections, set "make connectable = no" and reconnected immediately without any problems with the IDE.

    What happens if you:

    • set "make connectable = no"
    • Ensure the bluetooth connection icon is grey
    • Exit settings/otherwise change apps
    • try to reconnect now

    So I guess there are multiple issues here:

    • When you say 'Make Connectable' and then click 'No' you want the watch to disconnect from any actively connected devices? There are actually reasons why this would be a pain - the main use case of 'Make Connectable' is to make the Bangle connectable - so you had BLE off, but then you open that window, connect, and do what you want - but if you're then connected and you just want to close the window without changing BLE settings permanently, clicking 'No' would disconnect you
    • Changing 'BLE' to 'Off' should kick off currently connected devices? Maybe we should do that
    • When 'BLE' is off, when a device disconnects, BLE is left on until you change apps. I guess that could change too.
  • I tried what you asked, there were no active connections but I checked, the icon was already grayed out, set "make connectable = no", reverified the grayed out icon, went back to the initial clock screen and reconnected without any problems from chrome.

    I confirm that setting "make connectable = no" with an active connection breaks my connection.

    I previously used Garmin because it's one of the few that allows you to disconnect bluetooth and "turn it into an offline device."

    I am trying to achieve this same result, it's not important to me how.
    If by disabling bluetooth I also cut off connections even better.

    Is it possible that there is some scheduling that reactivates bluetooth after a while?
    Or by going into the settings or trivially by unlocking the device?

  • Wow, ok, that is strange. And I tried it here and it's fine.

    One thing that could be an issue - I saw you mentioned you were on firmware 2v13.123? Maybe try and update to latest again? 2v13.123 did have an issue that could cause some code to fail, and if the boot code failed before NRF.sleep() was called the Bangle wouldn't stop advertising.

    ... although I'd have thought if you were connected with the IDE you'd have seen some errors in the console.

    Is it possible that there is some scheduling that reactivates bluetooth after a while?

    Not by default, but what apps do you have installed? You can get a list from the App Loader's More... menu

    It's entirely possible one of those would try and wake up bluetooth.

  • I am now with firmware 2v13.142, I will try a firmware update and maybe even a reset with the default apps to see if without "additional" apps I get the same results.

    Is there any way to see, connected to the IDE, if an app activates bluetooth?
    Some sort of trace...

    Thank you for your time !

  • I confirm that a reset solves the problem, with the default apps everything works as it should and bluetooth once "off" stays off.
    Yeah I'm glad, thanks, I'll add one app at a time and see how it goes.

  • Great! Please let me know if you find out what's causing the issue!

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

Feature request bluetooth / offline mode?

Posted by Avatar for uname @uname