Skip to content

ESP32-C3 BLE HCI UART controller crashes on LE Secure Connections pairing (ke_mem.c:267 panic) #732

@jkorenj

Description

@jkorenj

Describe the bug

We are using STM32 as a host and ESP32 as a BLE controller. we are using HCI UART communication between them.
We enabled the secure connection:

  • sm_set_authentication_requirements(SM_AUTHREQ_SECURE_CONNECTION | SM_AUTHREQ_BONDING);
  • sm_set_secure_connections_only_mode(true);

Advertisement works, when I try to BOND with the phone through the nRF Connect APP on android the ESP32C3 crashes and reboots.

I (14921) CMD PARSE : : HCI command opcode 0x2026, parameter_length 64
BLE assert ke_mem.c 267, param 00000000 00000000
Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0).

As the log shows the problem isn't always with this command, but I crashes when we request bonding every time.

To Reproduce

Steps to reproduce the behaviour:

  1. Flash the ESP32C3 module with HCI UART firmware
  2. Scan for device in NRF Connect app
  3. Try to BOND to device
  4. ESP32 crashes

A clear and concise description of what you expected to happen.

HCI Packet Logs
01 03 0C 20
01 01 10 20
01 02 10 20
01 09 10 20
01 03 10 20
01 01 0C 08 FF FF FF FF FF FF FF 3F
01 63 0C 08 20 20 20 02 20 20 20 20
01 02 20 20
01 01 20 08 FF FD FF FF 07
01 25 20 20
01 06 20 0F 30 20 30 20 20 20 20 20 20 20 20 20 20
07
01 17 20 20 38 76 6E 6D 51 A5 A9 35 6D C1 C0 DA A5 D4 DC C1
01
01 08 20 20 1B 02 01 06 05 04 06 01 06 20 04 FF 08 18
01 0C 08 42 4C 45 20 70 61 69 72 69 6E 67 20 20 20 20

Environment: (please complete the following information):

  • Bluetooth Controller ESP32C3 mini ESP IDF v6.0.1
  • Remote device: Samsung S22/Android 16

Additional context
I tried to change the settings also on the ESP32 side, but nothing helped. I tried to update to the latest BTStack version, but this also didn't help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions