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

sd_ble_gap_rssi_get channel

I want to get the RSSI of a connected device. The sequence will be as follows:

int8_t *p_rssi;

uint8_t *p_ch_index;

sd_ble_gap_rssi_start (m_conn_handle, BLE_GAP_RSSI_THRESHOLD_INVALID, 0x00);

sd_ble_gap_rssi_get(m_conn_handle, p_rssi, p_ch_index);

sd_ble_gap_rssi_stop (m_conn_handle);

The device is configured as a hid device connected to a smart phone.

Nordic Infocenter says p_ch_index is the pointer to the location where Channel Index for the RSSI measurement shall be stored.

I have only one connected phone. I wonder what the Channel Index has to do with this?

Besides, when I tried to get the rssi by implementing this function in a 2 second timer  I can no longer pair the device using the example ble_app_hid_mouse.

Parents Reply Children
  • vn2000 said:
    Nothing appeared after that. The device still failed to pair.

    I understand. What we are trying to do now is to find out where the error is, not fix it (yet). If the example uses deferred logging, then the full log may not be written during an error. If so, you could try to get it by setting NRF_LOG_DEFERRED to 0 in sdk_config.h and removing the call to NRF_LOG_PROCESS() in your application. Alternatively, you can place a breakpoint and inspect the error_info_t struct in app_error_fault_handler using a debugger to see the error there (filename, line number, and error code).

  • I think I found the issue. I need to wait for some time after the device is connected before I can measure the RSSI. I have some other issues but let's close this issue for now.

    Thanks.

Related