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.

Parents
  • 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;
    
Reply
  • 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;
    
Children
No Data
Related