• Hmm - I just did some changes to the advertising as I was including some other libraries that might have been getting in the way, and now simply typing NRF.sleep() can make this happen.

    As far as I can make out, it happens when the device disconnects but doesn't start sending advertising packets again at all.

    So you might be able to work around it by delaying your call to NRF.sleep by a second.

    This works for me setTimeout("NRF.sleep()",1000);NRF.disconnect() when NRF.sleep() failed, so you might find:

    function on_disconnect() {
      clear_sleep_timeout();
      blinken(0b101);
      is_connected = false;
      setTimeout("NRF.sleep()",1000); // Prevent reconnection until manually woken
    }
    

    works for you?

About

Avatar for Gordon @Gordon started