Skip to content

Add failNextConnects: leave service discovery unanswered, then hang up - #31

Merged
ps2 merged 1 commit into
mainfrom
fail-next-connects-main
Nov 4, 2026
Merged

ps2 merged 1 commit into
mainfrom
fail-next-connects-main

Conversation

@ps2

@ps2 ps2 commented Nov 4, 2026 •

Copy link
Copy Markdown

POST /command {"command": "failNextConnects", "value": N, "hangUpAfter": 7} makes the next N connects fail the way some pods do in loopandlearn/OmnipodKit#199:

  1. The link comes up.
  2. Service and characteristic discovery go unanswered.
  3. The pod hangs up after hangUpAfter seconds (default 7) with CBErrorDomain code 7, "The specified device has disconnected from us."

Only -transport impossible supports it. For the app to see code 7 rather than a generic ImpossiBLE error, its ImpossiBLE needs mickeyl/ImpossiBLE#9.

Testing:

  • The new Go test checks four things:
    • discovery goes unanswered on a failing connect
    • the hang-up carries domain and code
    • the pod is disconnected afterwards
    • the next connect is served normally
  • go test ./pkg/bluetooth passes.
  • Ran it against Loop next-dev in the iOS Simulator with an Omnipod DASH. Two failing connects reproduced the #199 pattern:

Reapplies #29, which merged into ignore-next-messages after that branch had already been squash-merged into main (#28), so it never reached main. Same change; go test ./... passes on top of current main.

Reapplies #29, which was merged into ignore-next-messages after that branch had already been squash-merged into main.
@ps2
ps2 merged commit e8ae25d into main Nov 4, 2026
1 check passed
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