nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ bt_fast_pair_fhn_pf_stop_ranging_response_send()

int bt_fast_pair_fhn_pf_stop_ranging_response_send ( struct bt_conn * conn,
uint16_t ranging_tech_bm )

#include <include/bluetooth/fast_pair/fhn/pf/pf.h>

Send a Stop Ranging Response message.

This function sends a Stop Ranging Response message over the Bluetooth GATT Beacon Actions characteristic to the connected peer. It should be called after receiving the bt_fast_pair_fhn_pf_ranging_mgmt_cb::stop_ranging_request callback to confirm which ranging technologies were successfully stopped.

Calling this function in the wrong context, that is without the preceding stop ranging request callback, will result in an error. Indicating the ranging technologies in the ranging_tech_bm parameter that were not requested will also result in an error.

It is possible to call this function asynchronously outside of the callback context, as the teardown of certain ranging technologies may require time to complete.

Parameters
connConnection object.
ranging_tech_bmBitmask of the ranging technologies that were successfully stopped, composed of bt_fast_pair_fhn_pf_ranging_tech_id bit positions.
Returns
0 if the operation was successful. Otherwise, a (negative) error code is returned.