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

How to get rssi without connection via central device

I use nrf51822 sdk130 (central device) and nrf51822 sdk110(peripheral device). I want to get rssi value of the peripheral device using the central device without connection. Is it possible to read rssi value of peripheral device without connection?

Parents
  • Sure, each scanning event (when you receive ADV_xxx packet) has RSSI value in the event data structure.

  • I try to read rssi like adc_value. I want to keep watching. I have two buttons. I just want to use first button manually. So try to connect every time I press it. When I press the second button(I only pressed the second button once), Central device always search peripheral device and it always try to connect automatically if the rssi value is at a certain level. (Connect to the peripheral device without pressing the button.)

    scan_start function ;

    static void scan_start(void)
    {
        uint32_t err_code;
    	
        err_code = sd_ble_gap_scan_start(&m_scan_params);
        APP_ERROR_CHECK(err_code);
        
        err_code = bsp_indication_set(BSP_INDICATE_SCANNING);
        APP_ERROR_CHECK(err_code);
    	
    }
    
Reply
  • I try to read rssi like adc_value. I want to keep watching. I have two buttons. I just want to use first button manually. So try to connect every time I press it. When I press the second button(I only pressed the second button once), Central device always search peripheral device and it always try to connect automatically if the rssi value is at a certain level. (Connect to the peripheral device without pressing the button.)

    scan_start function ;

    static void scan_start(void)
    {
        uint32_t err_code;
    	
        err_code = sd_ble_gap_scan_start(&m_scan_params);
        APP_ERROR_CHECK(err_code);
        
        err_code = bsp_indication_set(BSP_INDICATE_SCANNING);
        APP_ERROR_CHECK(err_code);
    	
    }
    
Children
No Data
Related