Earlier for nrf52 we could filter out connections on the peripheral based on rssi, need similar operation for nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_uart.
Basically the intent is to prevent connection to peer with rssi below certain threshold.
This old code for earlier sdk does not work any more.
static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context) {
ret_code_t err_code;
ble_gap_evt_t const * p_gap_evt = &p_ble_evt->evt.gap_evt;
switch (p_ble_evt->header.evt_id) {
case BLE_GAP_EVT_ADV_REPORT: { /*does not fire any more*/
ble_gap_evt_adv_report_t const * p_adv_report = &p_gap_evt->params.adv_report;
// Look for advertising nRF peripheral devices only when in range of the RSSI threshold
if (p_gap_evt->params.adv_report.rssi >= MIN_RSSI_THRESHOLD) {
...