esp-idf: [TW#25597] ESP32 Classic Bluetooth Initiating Connection Errors

Environment

Development Kit: [ESP32-WROOM-32]
Core (if using chip or module): [ESP-WROOM32]
IDF version 1c7a8b3b
Development Env: [Eclipse]
Operating System: [Ubuntu]
Power Supply: [Battery]

Problem Description

I’m trying to make classic Bluetooth connection from ESP32 module to a remote Bluetooth device which requires a pin code to complete the connection operation.

1- I scan for the device. 2- When I found it and get ESP_SPP_DISCOVERY_COMP_EVT event, I initiate a connection using

ESP_ERROR_CHECK( esp_spp_connect ( ESP_SPP_SEC_AUTHENTICATE /* or ESP_SPP_SEC_AUTHORIZE */ , ESP_SPP_ROLE_MASTER, param->disc_comp.scn[0], g_peer_bd_addr) );

3- Then I got ESP_SPP_CL_INIT_EVT event and call

ESP_ERROR_CHECK ( esp_bt_gap_ssp_passkey_reply ( g_peer_bd_addr, true, 401513 ) );

where 401513 is the remote address pin code. 4- After a while I receive ESP_SPP_CLOSE_EVT event and these 2 errors

E (73975) BT_BTC:  btc_dm_auth_cmpl_evt() Authentication fail reason 5
E (73976) esp_bt_gap_cb: authentication failed, status:9

How to complete the connection successfully?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19

Commits related to this issue

Most upvoted comments

Hi @blueMoodBHD Sorry for the late reply, I will be trying it in 2 days and confirm with you!

@my-abousamra I have added legacy pair into ESP-IDF(master) and merge it. The commit id is 8484b9cf . Please try again. Thanks.

Unfortunate, we do not support legacy pairing, now. But I’m working on it and almost finished. Please wait patiently, thanks!