seems to stay connected after CLI has completed
eep. I don't have any suggestions - that's definitely not the intended behaviour! I'll take a look when I get a moment.
On the device, how can you see if you are currently connected?
It's the slight;y cryptic NRF.getSecurityStatus().connected - http://www.espruino.com/Reference#l_NRF_getSecurityStatus
NRF.getSecurityStatus().connected
You can use that on a central connection as well if you need to see if that is connected.
If I do want to force a disconnect from the device side as part of my application once programming is complete
Yes, NRF.disconnect() as the last line sounds good. In an ideal world the CLI would automatically disconnect though - I'm a bit surprised about that!
NRF.disconnect()
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
eep. I don't have any suggestions - that's definitely not the intended behaviour! I'll take a look when I get a moment.
It's the slight;y cryptic
NRF.getSecurityStatus().connected
- http://www.espruino.com/Reference#l_NRF_getSecurityStatusYou can use that on a central connection as well if you need to see if that is connected.
Yes,
NRF.disconnect()
as the last line sounds good. In an ideal world the CLI would automatically disconnect though - I'm a bit surprised about that!