Skip to content

OS pairing and then unpairing caused hard fault + stuck bonding info in NVM causing no name advertised. (Claude Code Buddy) #10955

@tyeth

Description

@tyeth

CircuitPython version and board name

10.1.4 S3 rev-TFT feather

Code/REPL

See files in "Behavior" section.

Behavior

Scanning for devices shows the Feather advertising it's name.
Connect to device via OS (shows device name), says connecting, fails slowly and device reverts to advertising again.
Repeat.

At some point this fails to send advertised name any more.

Connect to NRF Connect on mobile. Guess device by RSSI / MAC. BOND the connection. Disconnect from device in NRF Connect
Feather hard faulted at some point here or disconnecting from PC.

At this point it appears the bonding info is saved or something in nvm, and BLE state is corrupt / out of sync, because all subsequent reboots etc start the advertising again but without device name (shows N/A in NRF Connect and Unknown Device in windows BLE dialog).

Only a full erase of flash was able to resolve this and the device advertise it's name again.
I did test other BLE code before erasing, with a different name etc, but the same unnamed device advertisement.

original code from PT for Claude Code Buddy
code.py

debug related version (diff name but similar plus useful logging):
code (1).py

Full libs+code.py from PT:
adafruit-claude-feather-buddy.zip

Description

Might relate to:
#6626 (unbonding issues)
#9573 (safemode/hard-fault)
#9708 (S3 BLE hard faults)
#9614 (connecting to already paired device)

Additional information

I should retest the situation when broken with this fix to see if the broken name then gets resolved by it:

>>> import _bleio
>>> _bleio.adapter.erase_bonding()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions