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

How to implement and use the whitelist on peripheral side so as to make the connection of the peripheral device with the phone having highest rssi value

Dear Sir,

I wanted to connect the peripheral device to a phone which has highest rssi value(where multiple phones will be sending requests).

For that I have enabled ' p_advertising->adv_params.scan_req_notification = 1; ' in ble_advertising,c file.

Now I could receive the rssi of phone  here.

case BLE_GAP_EVT_SCAN_REQ_REPORT:
NRF_LOG_INFO("In scan req report ");

rssi_cent = p_ble_evt->evt.gap_evt.params.scan_req_report.rssi;
peer_address_cent = p_ble_evt->evt.gap_evt.params.scan_req_report.peer_addr;
NRF_LOG_INFO("rssi = %d",rssi_cent );

Now I am planning to create a whitelist with the address corresponding to the phone with highest rssi value.

Then advertise it with the whitelist. This is what I assumed will serve my purpose.

PLease let me know whether my assumptions/plans are correct?

Is there any other method to achive this (to connect the peripheral to phone with highest rssi value)?

But I have checked some example code like "ble_app_hids_mouse"..But I could not understand the usage and working of whitelist and how to use it.

It will be a great help if somebody can guide me in this. If this is the only way can somebody help me in understanding and implementing the whitelist and how to use it for my purpose.?

Thanking you in advance,

Geetha

Related