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

RSSI without connection

Simple question:

Is possible a central to evaluate RSSI before connecting to a peripheral?

The idea is to make central device connect and bond to a peripheral only if a determined RSSI is achieved.

Cheers

Fávero

Parents
  • See the scanning section of the BLE Central Tutorial.

    In most SDK examples you will have the following function handling BLE events:

    static void on_ble_evt(ble_evt_t * p_ble_evt)
    {
        uint32_t              err_code;
        const ble_gap_evt_t * p_gap_evt = &p_ble_evt->evt.gap_evt;	
    
        switch (p_ble_evt->header.evt_id)
        {
            case BLE_GAP_EVT_ADV_REPORT:
            {
                const ble_gap_evt_adv_report_t *p_adv_report = &p_gap_evt->params.adv_report;
    

    The p_adv_report contains all the received advertisement data. You will find the rssi at p_adv_report->rssi.

    See the documentation on the type ble_gap_evt_adv_report_t

Reply
  • See the scanning section of the BLE Central Tutorial.

    In most SDK examples you will have the following function handling BLE events:

    static void on_ble_evt(ble_evt_t * p_ble_evt)
    {
        uint32_t              err_code;
        const ble_gap_evt_t * p_gap_evt = &p_ble_evt->evt.gap_evt;	
    
        switch (p_ble_evt->header.evt_id)
        {
            case BLE_GAP_EVT_ADV_REPORT:
            {
                const ble_gap_evt_adv_report_t *p_adv_report = &p_gap_evt->params.adv_report;
    

    The p_adv_report contains all the received advertisement data. You will find the rssi at p_adv_report->rssi.

    See the documentation on the type ble_gap_evt_adv_report_t

Children
Related