Repository navigation
Conversation
…ring A pod in the field sometimes drops the link during a command, or soon after one. The simulator could leave a message unanswered with the link up, fail a connect during setup, or crash, but not hang up and stay available. With this command it hangs up, with CBErrorPeripheralDisconnected on the ImpossiBLE transport, on each of the next count messages: when the message arrives, or with afterAnswering once the phone has acknowledged the answer. It accepts the phone's reconnect either way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
hangUpOnNextMessages: on each of the next count messages, the pod hangs up, then takes the phone's reconnect as usual.{"command": "hangUpOnNextMessages", "value": 1}hangs up when the message arrives, without answering, as a pod that drops the link during a command does."afterAnswering": trueit answers, waits for the phone's ACK, then hangs up, as a pod that drops the link soon after a command does.-transport impossiblethe phone gets CoreBluetooth's "peripheral disconnected" error (CBError 7), the way a pod's hang-up reaches a phone. On a Bluetooth adapter it's an ordinary disconnect from the pod.The simulator could already leave a message unanswered with the link up (
ignoreNextMessages), fail a connect during setup (failNextConnects), or exit (crashNextCommand). None of those is a pod-initiated drop that leaves the pod available, which is the case in the loopandlearn/OmnipodKit#209 review: a pod that hangs up during or after a command, with the phone in the background.Testing
go test ./pkg/...passes. A new test checks that the hang-up carriesCBErrorDomain7 and that the next connect is accepted.afterAnswering, the status read completes and the drop follows it: