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

sd_ble_gap_rssi_start not supported?

After I connected a BLE device (HRM sample program on dev kit), I call sd_ble_gap_rssi_start to do a RSSI measurement, it returns error code 6.

Apparently error code 6 means NRF_ERROR_NOT_SUPPORTED.

Is RSSI measurement not supported yet (I'm using API nrf51-ble-driver_win_0.4.1).

Attached (main.c) is the original HRM sample program modified to toggle RSSI measurement ON/OFF (rather than toggling HRM's CCCD descriptor). It makes it easy to reproduce the problem.

  • Yes, this code acts as a central on a PC with NRF USB dongle programmed with softdevice S120 v7.1.0 - SDK v7.2.0 (not 6.1.0 as my earlier comment). We use the firmware connectivity_1m_with_s120_1.0.1.hex provided by Nordic. So you mean rssi measurement is not supposed to work from the PC with this configuration? Is there any plan to support that later?

  • Hi. Sorry for the late response.

    You say that you use S120 V1.0.1 which does not support sd_ble_gap_rssi_start(). If you try to call sd_ble_gap_rssi_start() anyway the function will return NRF_ERROR_NOT_SUPPORTED. I will suggest that you upgrade your Softdevice to S120 V2.x.x.

    Also note that there has been a slight signature change in the sd_ble_gap_rssi_start() function between SDK V7.x.x and V8.x.x. In SDK V7.x.x the function call takes one single parameter:

    sd_ble_gap_rssi_start(uint16_t conn_handle)
    

    In SDK V8.0.0 it takes three:

    sd_ble_gap_rssi_start(uint16_t conn_handle, uint8_t threshold_dbm, uint8_t skip_count))
    
  • Hi Martin, thank you for your reply. I tried to upgrade SoftDevice dongle to S120 V2.0.0 (SDK 8.0.0). Unfortunately, I'm unable to connect the dongle anymore (actually, I can open the port, but search operation freezes my application). I'm using win driver 0.4.1. Should I upgrade the driver to 0.5.0? But I'm confused because documentation says that S120 support was dropped in 0.5.0....so which driver should be used with S120 2.0.0 dongle...?

  • Hello Martin and thank you again for your help. But I really can't find out how this post is related to mine....is it a bad copy/paste or am I just completely lost here?

  • Hi. Sorry for the late response. Apparently I have misunderstood your problem so my answer above might not make sense, but to recap:

    You need to use compatible SDKs, Softdevices and windows drivers. If you can use the latest version of them all of course that will be the best, but if you of some reason are stuck with an older SDK or softdevice you will need to chose compatible software and/or firmware. What nrf51 revision do you use? Is it compatible with your firm/software?

    Windows driver 0.4.1 contains a hex file based on S120 V1.0.1 and this version does not support the rssi function.

    If you choose to upgrade the driver to V0.5.0, then you will also need to upgrade the softdevice and SDK. I feel like I am repeating myself, but I might very well still be a bit confused.

    Do you think the freezing application can be related to something else?

Related