Skip to content

bluetooth-fw/nimble: recover host start state mismatch#1787

Open
jplexer wants to merge 1 commit into
coredevices:mainfrom
jplexer:jp/firm-3454-recover-nimble-host-start
Open

bluetooth-fw/nimble: recover host start state mismatch#1787
jplexer wants to merge 1 commit into
coredevices:mainfrom
jplexer:jp/firm-3454-recover-nimble-host-start

Conversation

@jplexer

@jplexer jplexer commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

  • queue NimBLE host starts through a Pebble-owned event
  • recover BLE_HS_EALREADY and BLE_HS_EBUSY by stopping and retrying once
  • preserve controlled failures for unrecoverable host start errors

This prevents a host state mismatch during stationary-mode exit from reaching
NimBLE's unconditional ble_hs_event_start_stage2 assertion.

Fixes FIRM-3454

Testing

  • ./pbl build (obelix@dvt)
  • tested successfully on a real Obelix device

Queue host starts through a Pebble-owned event so failures can be handled
instead of tripping NimBLE's stage2 assertion. If the host is still enabled
or stopping, complete a clean stop, reset GATT state, and retry once.

Fixes FIRM-3454

Co-Authored-By: OpenAI GPT-5.4 <noreply@openai.com>
Signed-off-by: Joshua Jun <lets@throw.rocks>
@jplexer
jplexer requested a review from gmarull as a code owner July 22, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant