Closed bobrippling closed 1 year ago
I might've gone down totally the wrong path here with obtaining the BLE advertising status - I figure it's not related to a connection and so picked it up from the ble_advertising
module, rather than modifying ble_conn_state
, but let me know if there's a better way.
Also waiting on the github firmware builds, I suspect I might need a few ifdef
s yet.
Thanks - but I wouldn't change the NRF52 APIs themselves - Bangle.js uses the v15 API anyway.
What I'd intended was you use:
so just bleStatus&BLE_IS_ADVERTISING
- no need for a special function.
Thanks, that's a much easier route - let me know if there's any other changes you'd prefer, I've popped in some typescript for the security status too
Thanks! But would it be possible to put that code in jsble_get_security_status
instead? That's where we set all the other fields, and it would avoid the duplication (although it would still have to be copied for NRF52/ESP32 I guess)
Ah yeah of course - I was thinking bleStatus
belonged to libs/bluetooth/
and I wouldn't be able to include it from "down the chain" if you get me, but I hadn't looked to confirm where it was! Thanks again for your guidance
Thanks for those changes - this looks great now!
As mentioned in espruino/BangleApps#2608, this adds a
advertising
property to the object returned byNRF.getSecurityStatus()
, allowing us to determine whether the chip is idle, advertising or connected.