espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.28k stars 7.2k forks source link

where to look up the meaning of ESP32 BLE 4.2 function error code? (IDFGH-6574) #8217

Open Rita858 opened 2 years ago

Rita858 commented 2 years ago

I got an error code(0x51) when doing ble gap security authentication. I wonder what is the meaning of this code but there is no way to look up. So can you tell me where to look up the meaning of ESP32 BLE 4.2 function error code. e4e47ca4dd37d427667cc0333f6af3e image

nopnop2002 commented 2 years ago

I think this can be used. esp_err_to_name()

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/esp_err.html

Rita858 commented 2 years ago

I think this can be used. esp_err_to_name()

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/esp_err.html

I'll make a try, thank you.

Alvin1Zhang commented 1 year ago

Thanks for reporting, would you please help share if any updates for the issue? Thanks.

AxelLin commented 1 year ago

I think this can be used. esp_err_to_name()

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/esp_err.html

No, the ble_security.auth_cmpl.fail_reason is nothing to do with esp_err_t. esp_ble_auth_cmpl_t: uint8_t fail_reason; /!< The HCI reason/error code for when success=FALSE /

brendomaciel commented 2 months ago

I don't know if this is still a problem for the author of this issue, but for anyone who is struggling with it, look up for these kind of logs:

image

Since rsn actually matches an entry in the reference table, I'm assuming this is the value that is supposed to be in fail_reason as well, but for some reason they're different.

By the way, there are a few reference tables out there. Take a look: