Describe the bug
I opened separated issue, to make it more clean.
Because I couldn't make bonding working as described in this two issues:
#732
espressif/esp-idf#18609 (comment)
I included the micro ecc library in host (STM32H563).
The problem now is that the connection timeouts at the beggining, and that is why our APP drops communication. We increased the timeout and noticed that it can take more than 20 second for connection to be establish. The delay is the same if we need to bond new device, or if the keys are already saved.
To Reproduce
Steps to reproduce the behavior:
- #define ENABLE_MICRO_ECC_FOR_LE_SECURE_CONNECTIONS
- include micro ecc library
- Connect ESP32C3 mini, ESP-IDF v6.0.1
Expected behavior
Bonding and connection should happen in 5s. this is currently our timeout. We can increase it ofcourse, but 20s is a too much.
HCI Packet Logs
hci_uart_log.zip
Environment: (please complete the following information):
- Bluetooth Controller ESP32C3
Additional context
Log from the nrf connect APP
New device
nRF Connect, 2026-05-19
BLE pairing (28:37:2F:B5:A3:EA)
D 14:08:36.326 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
V 14:08:36.481 Connecting to 28:37:2F:B5:A3:EA...
D 14:08:36.481 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 14:08:36.486 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 14:08:36.486 Connected to 28:37:2F:B5:A3:EA
I 14:08:36.487 MTU changed to: 247
V 14:08:36.491 Discovering services...
D 14:08:36.491 gatt.discoverServices()
V 14:08:36.492 Discovering services...
D 14:08:36.492 gatt.discoverServices()
D 14:08:36.492 [Callback] Services discovered with status: 0
I 14:08:36.492 Services discovered
V 14:08:36.493 Unknown Service (11548c14-5c59-4bbb-aaa1-e05019060106)
- RX Characteristic [N R W WNR] (6e400002-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
- TX Characteristic [N R W WNR] (6e400003-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N R] (6e400004-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N R] (6e400005-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
D 14:08:36.493 gatt.setCharacteristicNotification(6e400002-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.495 gatt.setCharacteristicNotification(6e400003-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.496 gatt.setCharacteristicNotification(6e400004-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.497 gatt.setCharacteristicNotification(6e400005-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.498 [Callback] Services discovered with status: 0
I 14:08:36.498 Services discovered
V 14:08:36.499 Unknown Service (11548c14-5c59-4bbb-aaa1-e05019060106)
- RX Characteristic [N R W WNR] (6e400002-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
- TX Characteristic [N R W WNR] (6e400003-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N R] (6e400004-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N R] (6e400005-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
D 14:08:36.499 gatt.setCharacteristicNotification(6e400002-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.499 gatt.setCharacteristicNotification(6e400003-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.500 gatt.setCharacteristicNotification(6e400004-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.500 gatt.setCharacteristicNotification(6e400005-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:40.768 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BONDING (11)
D 14:08:40.797 [Broadcast] Action received: android.bluetooth.device.extra.PAIRING_VARIANT, pairing variant: CONSENT
I 14:08:44.833 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 14:08:44.963 [Broadcast] Action received: android.bluetooth.device.action.ENCRYPTION_CHANGE, encryption: ENABLED, algorithm: AES (16 bytes), transport: TRANSPORT_LE, status: 0
D 14:08:47.721 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BONDED (12)
I 14:08:47.721 Device bonded
I 14:08:47.756 Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 2000ms)
already bonded
nRF Connect, 2026-05-19
BLE pairing (28:37:2F:B5:A3:EA)
D 14:10:49.199 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
V 14:10:49.370 Connecting to 28:37:2F:B5:A3:EA...
D 14:10:49.370 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 14:10:49.389 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 14:10:49.389 Connected to 28:37:2F:B5:A3:EA
D 14:10:49.389 wait(1600ms)
V 14:10:50.989 Discovering services...
D 14:10:50.989 gatt.discoverServices()
I 14:10:51.572 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 14:10:52.712 [Callback] Services discovered with status: 0
I 14:10:52.712 Services discovered
V 14:10:52.716 Unknown Service (11548c14-5c59-4bbb-aaa1-e05019060106)
- RX Characteristic [N R W WNR] (6e400002-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
- TX Characteristic [N R W WNR] (6e400003-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N R] (6e400004-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N R] (6e400005-b5a3-f393-e0a9-e50e24dcca9e)
Client Characteristic Configuration (0x2902)
D 14:10:52.716 gatt.setCharacteristicNotification(6e400002-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:10:52.719 gatt.setCharacteristicNotification(6e400003-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:10:52.726 gatt.setCharacteristicNotification(6e400004-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:10:52.727 gatt.setCharacteristicNotification(6e400005-b5a3-f393-e0a9-e50e24dcca9e, true)
I 14:10:52.831 Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 2000ms)
I 14:11:07.299 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
I 14:11:08.171 Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 2000ms)
Describe the bug
I opened separated issue, to make it more clean.
Because I couldn't make bonding working as described in this two issues:
#732
espressif/esp-idf#18609 (comment)
I included the micro ecc library in host (STM32H563).
The problem now is that the connection timeouts at the beggining, and that is why our APP drops communication. We increased the timeout and noticed that it can take more than 20 second for connection to be establish. The delay is the same if we need to bond new device, or if the keys are already saved.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Bonding and connection should happen in 5s. this is currently our timeout. We can increase it ofcourse, but 20s is a too much.
HCI Packet Logs
hci_uart_log.zip
Environment: (please complete the following information):
Additional context
Log from the nrf connect APP
New device
nRF Connect, 2026-05-19
BLE pairing (28:37:2F:B5:A3:EA)
D 14:08:36.326 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
V 14:08:36.481 Connecting to 28:37:2F:B5:A3:EA...
D 14:08:36.481 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 14:08:36.486 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 14:08:36.486 Connected to 28:37:2F:B5:A3:EA
I 14:08:36.487 MTU changed to: 247
V 14:08:36.491 Discovering services...
D 14:08:36.491 gatt.discoverServices()
V 14:08:36.492 Discovering services...
D 14:08:36.492 gatt.discoverServices()
D 14:08:36.492 [Callback] Services discovered with status: 0
I 14:08:36.492 Services discovered
V 14:08:36.493 Unknown Service (11548c14-5c59-4bbb-aaa1-e05019060106)
Client Characteristic Configuration (0x2902)
Client Characteristic Configuration (0x2902)
Client Characteristic Configuration (0x2902)
Client Characteristic Configuration (0x2902)
D 14:08:36.493 gatt.setCharacteristicNotification(6e400002-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.495 gatt.setCharacteristicNotification(6e400003-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.496 gatt.setCharacteristicNotification(6e400004-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.497 gatt.setCharacteristicNotification(6e400005-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.498 [Callback] Services discovered with status: 0
I 14:08:36.498 Services discovered
V 14:08:36.499 Unknown Service (11548c14-5c59-4bbb-aaa1-e05019060106)
Client Characteristic Configuration (0x2902)
Client Characteristic Configuration (0x2902)
Client Characteristic Configuration (0x2902)
Client Characteristic Configuration (0x2902)
D 14:08:36.499 gatt.setCharacteristicNotification(6e400002-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.499 gatt.setCharacteristicNotification(6e400003-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.500 gatt.setCharacteristicNotification(6e400004-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:36.500 gatt.setCharacteristicNotification(6e400005-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:08:40.768 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BONDING (11)
D 14:08:40.797 [Broadcast] Action received: android.bluetooth.device.extra.PAIRING_VARIANT, pairing variant: CONSENT
I 14:08:44.833 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 14:08:44.963 [Broadcast] Action received: android.bluetooth.device.action.ENCRYPTION_CHANGE, encryption: ENABLED, algorithm: AES (16 bytes), transport: TRANSPORT_LE, status: 0
D 14:08:47.721 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BONDED (12)
I 14:08:47.721 Device bonded
I 14:08:47.756 Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 2000ms)
already bonded
nRF Connect, 2026-05-19
BLE pairing (28:37:2F:B5:A3:EA)
D 14:10:49.199 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
V 14:10:49.370 Connecting to 28:37:2F:B5:A3:EA...
D 14:10:49.370 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 14:10:49.389 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 14:10:49.389 Connected to 28:37:2F:B5:A3:EA
D 14:10:49.389 wait(1600ms)
V 14:10:50.989 Discovering services...
D 14:10:50.989 gatt.discoverServices()
I 14:10:51.572 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 14:10:52.712 [Callback] Services discovered with status: 0
I 14:10:52.712 Services discovered
V 14:10:52.716 Unknown Service (11548c14-5c59-4bbb-aaa1-e05019060106)
Client Characteristic Configuration (0x2902)
Client Characteristic Configuration (0x2902)
Client Characteristic Configuration (0x2902)
Client Characteristic Configuration (0x2902)
D 14:10:52.716 gatt.setCharacteristicNotification(6e400002-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:10:52.719 gatt.setCharacteristicNotification(6e400003-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:10:52.726 gatt.setCharacteristicNotification(6e400004-b5a3-f393-e0a9-e50e24dcca9e, true)
D 14:10:52.727 gatt.setCharacteristicNotification(6e400005-b5a3-f393-e0a9-e50e24dcca9e, true)
I 14:10:52.831 Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 2000ms)
I 14:11:07.299 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
I 14:11:08.171 Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 2000ms)