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

BLE_ERROR_INVALID_ROLE

My devices in the field have firmware that saves an error code when it gets thrown and then sends it to a central so that I can see if there are errors with devices in the field. I got this error and I'm not sure where it came from. My device is a preipheral (S110, 8.0.0) so presumably some function is being called that is only allowed to be called by a central, but I'm not sure where I might be doing that. Any suggestions on where to look would be appreciated.

-Seth

Parents
  • If the headers are accurate there's only one function documented for S110 which returns that error code

    SVCALL(SD_BLE_GAP_ENCRYPT, uint32_t, sd_ble_gap_encrypt(uint16_t conn_handle, ble_gap_master_id_t const *p_master_id, ble_gap_enc_info_t const *p_enc_info));
    

    ie

    sd_ble_gap_encrypt()
    

    If you're not calling that anywhere in your code then, as Aryan suggested, you need to dump more information about where the error is coming from.

Reply
  • If the headers are accurate there's only one function documented for S110 which returns that error code

    SVCALL(SD_BLE_GAP_ENCRYPT, uint32_t, sd_ble_gap_encrypt(uint16_t conn_handle, ble_gap_master_id_t const *p_master_id, ble_gap_enc_info_t const *p_enc_info));
    

    ie

    sd_ble_gap_encrypt()
    

    If you're not calling that anywhere in your code then, as Aryan suggested, you need to dump more information about where the error is coming from.

Children
No Data
Related