ESP32 Bluetooth Classic Controller Hangs (0x08 Connection Timeout) during SSP P-192 after I/O Capability Response (IDFGH-18312)
Author: sroczkazlotooczkaCreated Sep 20, 2026Updated Sep 30, 2026
LabelsType: BugStatus: Opened
Answers checklist.
- I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
- I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
- I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
v5.4.3, v5.4.2, v4.4.8
Espressif SoC revision.
ESP32 v3.1
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
CMD
Development Kit.
Custom Board
Power Supply used.
USB
What is the expected behavior?
The Bluetooth controller should successfully complete the SSP P-192 authentication stage following the I/O Capability exchange, generate the Link Key (HCI_EVENT_LINK_KEY_NOTIFICATION), and allow the Host to enable connection encryption without a link deadlock.
What is the actual behavior?
The hardware controller halts all HCI traffic immediately after receiving the HCI_EVENT_IO_CAPABILITY_RESPONSE event. No user confirmation request or key notification events are generated. After exactly ~5.3 seconds of complete silence, the controller terminates the link with HCI_EVENT_DISCONNECTION_COMPLETE (reason 0x08 - Connection Timeout).
Steps to reproduce.
- Set up an ESP32 Classic HID host using BTstack (or native Bluedroid) configured with Security Level 2 and auto-accept enabled.
- Configure SSP I/O capabilities as DisplayYesNo with authreq=0x04 (General Bonding, MITM not required).
- Set the Link Supervision Timeout to 5 seconds.
- Put a standard Battletron HID gamepad into pairing mode (fast blinking).
- Initiate an outgoing ACL connection from ESP32 to the gamepad's MAC address.
- Observe the HCI exchange: the handshake stalls directly after the obustronna I/O exchange, resulting in a persistent 0x08 timeout across ESP-IDF v4.4.8, v5.4.2, and v5.4.3.
Debug Logs.
Component Versions Audited:
- ESP-IDF: v5.4.3, v5.4.2, and v4.4.8 (Issue is persistent across all tested SDK branches)
- Bluetooth Stack: BTstack (as well as native Bluedroid in preliminary isolated tests)
- Controller Firmware Verified: [b992c7d] (v5.4.2), [f5c3312] (v5.4.3), and [f021fb7] (v4.4.8)
Description:
An unresolvable Link Supervision Timeout (reason=0x08) occurs during Secure Simple Pairing (SSP) between ESP32 (acting as Central/Master) and a standard Battletron HID gamepad.
The Host successfully handles the initial ACL connection and SDP/EIR exchanges. However, immediately after the exchange of I/O Capabilities (where ESP32 replies with DisplayYesNo and the Pad responds with NoInputNoOutput), the ESP32 hardware controller completely ceases HCI transport activity. No further cryptographic or authentication events (HCI_EVENT_USER_CONFIRMATION_REQUEST or Link Key generation) are generated by the controller. After exactly ~5.3 seconds, the controller drops the link due to a hardware Connection Timeout (status=0x08).
Verified Facts & Baseline Controls:
1. Reference Platform Success: The exact same ESP32 hardware, software template, and security settings successfully complete SSP P-192 paring, link key storage, and encryption activation with a Windows SPP/RFCOMM server, excluding generic cryptographic hardware failures.
2. Role & Policy Isolation: Forcing the ESP32 into a confirmed MASTER role (HCI_EVENT_ROLE_CHANGE verified via reference captures) or modifying authentication requirements from authreq=0x05 to authreq=0x04 (General Bonding, No MITM) does not prevent the hang.
3. Buffer Sanity: HCI_Read_Buffer_Size at boot confirms the controller allocates 9 x 1021 B ACL buffers. The RAM capture tool ran with zero overwrites (overwritten=0), confirming full inter-task signaling sanity.
Captured HCI Packet Sequence (RAM Buffer Dump - Definite Line of Demarkation):
D ms=1354 kind=H dir=1 tag=0004 len=8 kept=8 3106XXXXXXXXXXXXXXXX (HCI_EVENT_IO_CAPABILITY_REQUEST)
D ms=1354 kind=H dir=0 tag=0001 len=12 kept=12 2b0409XXXXXXXXXXXXXXXX010004 (HCI_COMMAND_IO_CAPABILITY_REQUEST_REPLY)
D ms=1355 kind=H dir=1 tag=0004 len=12 kept=12 0e0a052b0400XXXXXXXXXXXXXXXX (HCI_EVENT_COMMAND_COMPLETE)
D ms=1375 kind=H dir=1 tag=0004 len=11 kept=11 3209XXXXXXXXXXXXXXXX030004 (HCI_EVENT_IO_CAPABILITY_RESPONSE)
// ==================== CRITICAL CONTROLLER SILENCE (5331 ms) ====================
// No HCI traffic occurs. Link Manager fails to progress to Phase 2 (Nonce exchange).
D ms=6706 kind=H dir=1 tag=0004 len=9 kept=9 360708XXXXXXXXXXXXXXXX (HCI_EVENT_SIMPLE_PAIRING_COMPLETE - status=0x08)
D ms=6707 kind=H dir=1 tag=0004 len=5 kept=5 0603088100
D ms=6707 kind=H dir=0 tag=0001 len=6 kept=6 060403810013
D ms=6708 kind=H dir=1 tag=0004 len=6 kept=6 050400810008 (HCI_EVENT_DISCONNECTION_COMPLETE - reason=0x08)
Conclusion:
Because this exact sequence replicates byte-for-byte across ESP-IDF v4.x and v5.x branches, the issue points to a low-level incompatibility or deadlocking condition inside the closed-source Link Manager ROM/binary blob (libbtdm.a) when interfacing with this specific peripheral's LMP response timing directly following I/O capability confirmation.Diagnostic report archive.
No response
More Information.
No response
Source: espressif/esp-idf