Skip to content

A switched-off board that answered before isn't called busy - #200

Merged
bdbarnett merged 1 commit into
mainfrom
fix/offline-board-message
Nov 1, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
fix/offline-board-message

Conversation

@bdbarnett

Copy link
Copy Markdown
Collaborator

Fixes #199.

A board that had answered before (one saved in wifiBoards, or one that logged in earlier in the session) was called busy on any silence, so a board that's switched off got "The board is busy in a loop that never yields; use serial, or reset it." after the 5 s connect timeout.

A busy board still answers ping (lwIP runs on its own task); one that's off doesn't. Now, when the TCP connect itself times out, ping decides even for a board that answered before. Silence after the connect (no password prompt, no login reply, no WebSocket upgrade reply) still means busy without asking ping, since the board is plainly up.

Tested: the Wi-Fi and WebREPL tests, with the old "answered before is busy without ping" test split into the after-connect case (still busy, no ping) and the timed-out case (ping decides, both ways). By hand under Windows Python 3, Session().connect("ws://<an empty address>", known=True) said busy before and now says "no answer from ... Is the board on this network at that address?".

@bdbarnett
bdbarnett merged commit aaa79a1 into main Nov 1, 2026
7 checks passed
@bdbarnett
bdbarnett deleted the fix/offline-board-message branch November 1, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

exec over WebREPL says a board that's switched off is "busy in a loop that never yields"

1 participant