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

Connecting the BLE device to a phone/App with highest signal strength

Dear Sir,

I am working on the following scenario.

I have BLE device ( SDK 15 and softdevice s132). It is advertising for specific duration.

There are different phones at different distances from the BLE device.

There will be multiple requests coming to the BLE device to establish connection. I want the BLE device to connect the phone with highest signal strength?

Is it possible to do handle such a scenario with SDK15 and softdevice s132?

Please guide me on this.

Thanking you.

  • HI,

    You mentioned the following.

    3. Repeat Step 1-2 until you have covered all relevant phones. Make a Whitelist that contain only the phone with the highest RSSI

    4. Set the phone in connectable mode and scan only for devices in your whitelist with a filter policy

    Here once we create the whitelist  with the peer address of the phone with highest rssi signal, we need to advertise with the whitelist using the function "ble_advertising_whitelist_reply" Am I correct?

    I have got stuck on this for long time.

    Please help in resolving this.

    Thanking you in advance.

  • HI,

    And The _p_ble_evt->evt.gap_evt.params.scan_req_report.peer_addr will contain the peer address of the phone or the central device?

    Am I correct?

  • You can print the peer address by printing the p_ble_evt->evt.gap_evt.params.connected.peer_addr.addr array that is of length BLE_GAP_ADDR_LEN. 

    But this is useful only after the connection is eastablished right?

    What will be the value in 

    p_ble_evt->evt.gap_evt.params.scan_req_report.peer_addr

    signifies?

    Will it give the address of the phone?

  • Hi Jared, I recently look for a similar solution, looking to measure the phones RSSI. I downloaded your example Scan_example and compiled with Keil uVision V5.24 with Nordic SDK V15.3 and SoftDevice s132. I have Nordic nRF52 DK with nrf52832.

    But when I compile the Scan_Example firmware I got the following errors complaining the following files are missing:

    nrf_log.h
    nrf_log_instance.h
    nrf_log_ctrl.h
    nrfx_power_clock.c
    nrf_memobj.c
    pm_mutex.c
    nrf_log_backend_rtt.c
    nrf_log_backend_serial.c

    Can you give any idea what I might be missing?

    Thanks.

  • Hi Jared,

    I am new to this. I recently have a similar need to write a firmware capable of measuring RSSI from nearby phones. I downloaded the Scan_Example and tried to compile but I encounter some errors complaining about these missing files:

    nrf_log.h
    nrf_log_instance.h
    nrf_log_ctrl.h
    nrfx_power_clock.c
    nrf_memobj.c
    pm_mutex.c
    nrf_log_backend_rtt.c
    nrf_log_backend_serial.c

    I'm using Keil uVision5 V5.24 with SoftDevice s132, SDK V15.3.

    Any suggestion will be appreciated.

    Thanks.

Related