You are reading a single comment by @d3nd3-o0 and its replies. Click here to read the full conversation.
  • When connectable is set to true in the above code, the watch continues to advertise data... Lets assume that is expected too.

    What data is it advertising? Just its name? Is there some other code that was setting advertising data that isn't in the code you posted above?

    the watch no longer starts advertising again, no matter what you do

    Even a long-press of BTN3?

    Do you think you could check with the nRF Connect app on your phone (not using EspruinoHub at all) whether it is advertising and you're able to connect to it?

    If you're using the EspruinoHub IDE to connect (as you mention in http://forum.espruino.com/conversations/­359160/#comment15777904) and you're using EspruinoHub to detect advertising too, then it might be an issue with EspruinoHub?

    I just tried here, and I think I can get this to happen:

    • Connect with IDE
    • Upload NRF.setAdvertising({},{ connectable:false });
    • Ensure properly disconnected
    • Advertising works fine, but Bangle can't be connected to
    • Long-press BTN3
    • Bangle still can't be connected to (this seems broken)
    • Use BTN1 + BTN2 to reset
    • Bangle is now fine

    So I think there's a problem there, but I wonder whether maybe EspruinoHub trying to connect when the Bangle is nonconnectable is causing it to stay partially connected to Bangle.js, blocking it from advertising.

  • Even a long-press of BTN3?

    Correct.

    Do you think you could check with the nRF Connect app on your phone (not using EspruinoHub at all) whether it is advertising and you're able to connect to it?

    I just checked using a BLE Sniffer on phone. And NRF Connect for connection. I found that your theory :

    I wonder whether maybe EspruinoHub trying to connect when the Bangle is nonconnectable is causing it to stay partially connected to Bangle.js, blocking it from advertising.

    This theory is correct I think. My sniffer says that the watch IS still advertising, and it was indeed a failure of EspruinoHub because it thought it was connected somewhere along the lines, when really it wasn't. I will check if I can resume normal functioning with connectable:True ..

    It seems like this isn't a bug with bangle.js but instead with EspruinoHub!

About

Avatar for d3nd3-o0 @d3nd3-o0 started