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

RSSI Start problem NRF_ERROR_SOFTDEVICE_NOT_ENABLED

Hello. I want RSSI check. so added source code as below.

test_rssi_start = sd_ble_gap_rssi_start(m_conn_handle,BLE_GAP_RSSI_THRESHOLD_INVALID,0x00); if(test_rssi_start==NRF_SUCCESS){ app_uart_put(0x53); }

but, rssi_start NRF_SUCCESS is fail. error occur NRF_ERROR_SOFTDEVICE_NOT_ENABLED. Please solve the above problem and give me rssi example. thank you.

  • The error code NRF_ERROR_SOFTDEVICE_NOT_ENABLED means that the softdevice is not enabled. Have you enabled the softdevice? Or do you want to use RSSI with the RADIO peripheral directly? Which device are you using? SDK version? Could you post some more code showing what you try to achieve?

  • thank you for your support. when Central and Peripheral is connect, start sd_ble_gap_rssi_start in the ble_db_discovery_on_ble_evt function. my source code as below. How to enable softdevice?

    switch (p_ble_evt->header.evt_id)

    {
        case BLE_GAP_EVT_CONNECTED:
    				p_db_discovery->conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
    				 test_rssi_start = sd_ble_gap_rssi_start(m_conn_handle,BLE_GAP_RSSI_THRESHOLD_INVALID,0x00);
    			if(test_rssi_start==NRF_SUCCESS){
    				app_uart_put(0x53);
    			}				
            break;
        
        case BLE_GAP_EVT_DISCONNECTED:
            memset(p_db_discovery, 0, sizeof(ble_db_discovery_t));
            p_db_discovery->conn_handle = BLE_CONN_HANDLE_INVALID;
    			sd_ble_gap_rssi_stop(m_conn_handle);
    			app_uart_put(0x45);
            break;
    
  • If you are in a connection, the softdevice should be enabled. Could you answer my other questions? Also, which softdevice version are you using?

  • Peripheral soft device version 8.0.0 and Central soft device version 2.1.0 I check connection to Peripheral and Central but occur error NRF_ERROR_SOFTDEVICE_NOT_ENABLED

  • Are you sure the error is NRF_ERROR_SOFTDEVICE_NOT_ENABLED and not BLE_ERROR_INVALID_CONN_HANDLE? Note that these have the same error code ending, but different BASE number (0x0002 vs 0x3002).

1 2