• Hi! That's an interesting thought... Subscribing to E.notify sounds like a great solution.

    Bangle.js can't accept more than one incoming connection unfortunately... You'd hope that Python might somehow be able to find the already-connected device, but if not:

    I'm not 100% sure if this'll work with iOS, but what about changing the Bangle's MAC address, so the phone thinks it has gone out of range:

    // ... to disconnect and allow a connection from your app
    NRF.setAddress(NRF.getAddress().slice(0,-1)+"0 random");
    NRF.disconnect(); // force a disconnect - Bangle.js should now be at a different address
    
    // ... to disconnect and hopefully have iOS reconnect
    NRF.setAddress(NRF.getAddress()+" random");
    NRF.disconnect(); // force a disconnect - Bangle.js should now be at a different address
    

    In the example above I'm assuming your Bangle's address didn't already end in 0 - but hopefully you get the idea :)

About

Avatar for Gordon @Gordon started