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

ble_gap error

I am getting an error on a connection via the ble nus service that is causing me to scratch my head. If I suppress the error the connection seems fine and I don't notice any problems, but I'm concerned I might be creating a problem for myself down the line by ignoring it.

The error manifests itself here:

case BLE_GAP_EVT_CONNECTED:
    //indicate_with_led(SLOW);
    m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;

    APP_ERROR_CHECK(err_code);
    break;

The err_code is 0x2000265c. Now I understand this to be a gap error by virtue of the base number but what is 0x265c? I have had a look at some of the various headers for the s132 including ble_gap.h, nrf_error.h and others but I haven't be able to identify it.

Any assistance appreciated.

Parents
  • Are you sure you didn't modify the code? in ble_app_uart in main.c I have this:

    static void on_ble_evt(ble_evt_t * p_ble_evt)
    {
        uint32_t                         err_code;
        
        switch (p_ble_evt->header.evt_id)
        {
            case BLE_GAP_EVT_CONNECTED:
                err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
                APP_ERROR_CHECK(err_code);
                m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
                break;
    

    if you are using the central example ble_app_uart_c, in main.c you should have this:

    case BLE_GAP_EVT_CONNECTED:
        APPL_LOG("Connected to target\r\n");
        err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
        APP_ERROR_CHECK(err_code);
    
        // start discovery of services. The NUS Client waits for a discovery result
        err_code = ble_db_discovery_start(&m_ble_db_discovery, p_ble_evt->evt.gap_evt.conn_handle);
        APP_ERROR_CHECK(err_code);
        break;
    

    If you removed all the API call when the event occurs, you should also remove the APP_ERROR_CHECK(err_code);

  • Ok - the call I was concerned about wasn't being asked to return an err_code hence must be unrelated. That's why I couldn't find it. Thanks Hung.

Reply Children
No Data
Related