This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF51: best strategy to detect when a module goes off-range

Hi, I'm trying to design the solution of this problem: I need to detect when a peripheral module goes off-range vs. an associated central device (smartphone/tablet). The central role must be ran by the smartphone side since there are cases where it cannot advertise (Nexus 5), even if it implements BLE specs.

No data to exchange (besides some very initial params). The peripheral - nRF51 based - is a kind of black box (no user interaction), running on a coin cell battery. Thus power consumption is a concern. Finally, it contains a buzzer to activate when link is lost.

First, it's unclear to me if I better keep the connection always on, detecting when link is lost. This would be similar to the Link Loss service in the ble_app_proximity example. This solution needs power anyway, since the peripheral advertises even when connected.

Alternatively, I might stay unconnected and poll the device at a given interval - a kind of ping. In such a case, I know the MAC of the device, so I could try a straight connection, if we have suitable API (I'm new to this environment).

I don't know about further approaches.

Thanks for any comment.

Related