Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 out of BLE range notification

Hello! I am using nRF52840 develop product. When nRF52840 circuit board has been moved away from the cell phone and is out of the BLE range, I want to send message via UART ports to external ICs. What internal function of 52SDK I can use when this event happen? I actually use HRS example to do the experiment, I found it show: Disconnected, reason 8. It means nRF52840 can differentiate the disconnection scenarios. Could you let me know which internal function I can use to achieve this design?

Parents Reply
  • Hi, haakonsh, Thank you for reply! You are right,ble_hci.h show different status code Macro definition. Therefore, which function in main.c in ble_peripheral/hrs example will call it? I want to achieve something like: if (disconnection_reason == 0x08) {/*send message via UART*/}. There, disconnection_reason should be some return by some function in SDK. Could you advise it? 

Children
Related