Skip to content

System firmware error when trying to make a BLE connection on ESP32-S3 #9614

Open
@izmishi

Description

@izmishi

CircuitPython version

Adafruit CircuitPython 9.2.0-alpha.2350-17-g422eb7eff2-dirty on 2024-08-18; Seeed Xiao ESP32-S3 Sense with ESP32S3

Code/REPL

import _bleio

# dummy address bytes here, but also happens with valid addresses
someAddress = _bleio.Address(b'\x00\x00\x00\x00\x00\x00', 2)
_bleio.adapter.connect(someAddress, timeout=10)

Behavior

Running the code immediately results in an error.

Traceback (most recent call last):
  File "code.py", line 5, in <module>
_bleio.BluetoothError: Unknown system firmware error: 530

Description

On a Seeed Xiao ESP32-S3, when attempting to initiate a bluetooth connection to an already-paired device with a RANDOM_PRIVATE_RESOLVABLE address, an unknown system firmware error (530) occurs.

I've found that the actual address bytes don't matter, only the type (it also happens for RANDOM_PRIVATE_NON_RESOLVABLE, but not PUBLIC or RANDOM_STATIC).

Additional information

I've done a little digging through the CircuitPython source code and I suspect that it's a NimBLE error, in which case it would be an Invalid HCI Command Parameters error (0x212).

It occurs on both 9.1.1 and 9.2.0 alpha.

Running the above code on a Seeed Xiao nRF52840 (CircuitPython 9.0.4) performs as expected (a 'failed to connect' error after 10 seconds):

Traceback (most recent call last):
  File "code.py", line 5, in <module>
_bleio.BluetoothError: Failed to connect: internal error

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions