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

hid and ancs problem

hi:

I combined ANCS example and HID_mouse example @SDK 9.0,but there is an error when iphone connect the device ,err_code is 0X8010,(err_code = dm_service_context_set(&m_peer_handle, &service_context);) but I can't find the where return the error code,someone can tell me why?

Parents
  • Edited

    0X8000 is device manager module error base number defined in sdk_errors.h

    #define DEVICE_MANAGER_ERR_BASE   (0x8000)
    

    And anything on top of it is defined in nrf_error.h

    #define NRF_ERROR_INVALID_ADDR                (NRF_ERROR_BASE_NUM + 16) ///< Bad Memory Address
    

    This means that the handle you gave to the call is not identified by the device_manager. This is probably because the connection_id is not valid or BLE_GAP_EVT_SEC_PARAMS_REQUEST event has not been processed.

    dm_service_context_set
    {
        ...
        VERIFY_CONNECTION_INSTANCE(p_handle->connection_id);
        VERIFY_DEVICE_INSTANCE
    }
    
Reply
  • Edited

    0X8000 is device manager module error base number defined in sdk_errors.h

    #define DEVICE_MANAGER_ERR_BASE   (0x8000)
    

    And anything on top of it is defined in nrf_error.h

    #define NRF_ERROR_INVALID_ADDR                (NRF_ERROR_BASE_NUM + 16) ///< Bad Memory Address
    

    This means that the handle you gave to the call is not identified by the device_manager. This is probably because the connection_id is not valid or BLE_GAP_EVT_SEC_PARAMS_REQUEST event has not been processed.

    dm_service_context_set
    {
        ...
        VERIFY_CONNECTION_INSTANCE(p_handle->connection_id);
        VERIFY_DEVICE_INSTANCE
    }
    
Children
Related