Repository navigation
First-run UX: benchpod setup, readable status, login email, refusal hints - #22
Merged
Merged
Conversation
…ints - New `benchpod setup`: guided first-time setup that walks the getting-started steps and skips what is done (find over USB + mDNS, Ethernet lease or Wi-Fi, board I/O voltage, register / account check, save the connection, next steps). Flags --la-voltage, --ssid, --password-stdin, --no-register, --yes. - `benchpod status` prints a short summary over the network (firmware and latest release, gateware, I/O voltage, target power, network, cloud and account, lease); --json keeps the raw reply. - `benchpod login` prints the account email (Email in the token response and token file), falling back to the user id for older servers/token files. - "la voltage not set" points at `benchpod la voltage 3.3V` / the Wiring tab; pin-conflict hints with raw JSON are reworded (texts pinned in fwrefusals). - "no connection set" suggests `benchpod discover --save` first. - Root help: accurate USB/network split, commands grouped (setup, pod, target, embeddedci.com). - discover/setup match a pod on Ethernet and Wi-Fi at once by cloud device id. - README documents setup, status --json and the login output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
benchpod setup(new): guided first-time setup following the getting-started guide, skipping finished steps: find the pod (USB + mDNS, or--connection), network (Ethernet lease wait or Wi-Fi via the set-wifi path), board I/O voltage, embeddedci.com (login + register an unregistered pod; names it when it is on your account; explains and leaves alone a pod on another account), save the connection, next steps (SWD on LA11/LA12,benchpod flash, pytest, docs). Flags:--la-voltage,--ssid,--password-stdin,--no-register,--yes(never prompts; fails naming the flag to pass). Step logic is unit-tested with a fake environment.la_mv(1800/3300) to the pod's stored wiring profile on embeddedci.com, so the server re-applies it on every connect and the checklist ticks. The server'sPUT /api/benchpod/devices/{id}/wiringreplaces the whole map, so this is a read-modify-write that keeps every other field byte-for-byte (serverapi.GetDeviceWiring,PutDeviceWiring,SetDeviceWiringLaMV; no PUT when the profile already has the value). It also saves when the pod already had the voltage but the profile has none or another one, and right after setup registers a pod. A failed save warns and setup goes on.benchpod la voltage <v>does the same over the network or anembeddedci:connection (not over USB).benchpod status: readable summary over the network (firmware + latest release from GitHub's redirect, 3 s budget, skipped on failure; gateware; I/O voltage or "not set"; target power fromtarget_status; network; cloud registration and account check reusing discover's; lease).--jsonprints the raw reply. USB keeps the console text.benchpod login: prints the account email (Logged in as you@x.com,Already logged in as ...).Emailadded toserverapi.TokenResponseandauthstore.Tokens, kept across refreshes from an older server; falls back to the user id. Needs the server PR that addsemailto the device token and refresh responses.la voltage not setnow points atbenchpod la voltage 3.3V(or 1.8V) or the web Wiring tab. Inpin conflict: LAn is in use by X; <hint>, the raw-JSON hints (gpio, sensor_stop, spi_stop, gps_stop) and the uart/SWD ones are reworded to say where to free the pin. The CLI has no command that frees them, so the hint names the web app / SDK / MCP. Unknown hints are shown unchanged. All texts are pinned ininternal/fwrefusals/refusals.jsonagainst firmware origin/main.benchpod discover --save(andsetup) first.main.godoc comment is fixed too.status --jsonand the login output.Test plan
go test ./...andgo vet ./...(fwrefusals run withBENCHPOD_FIRMWARE_DIRset to an origin/main export; the sibling benchpod-firmware checkout is 104 commits behind and fails the pinned-text check even on main)discover,status,status --json,setup --la-voltage 3.3V --yes,setup --connection usb,setup --connection 192.168.1.221 --yes. Everything was detected as done and only the LA voltage was (re)set to 3.3 V. No wifi, register or flash.{"uart_rx":3};setup --la-voltage 3.3V --yesprinted "Set to 3.3 V on the pod and saved to its wiring profile on embeddedci.com."; after{"la_mv":3300,"uart_rx":3}(onlyla_mvchanged). A second run printed "its wiring profile on embeddedci.com already has it"; without--la-voltageit printed "Done: already 3.3 V.". Profile reset to{"uart_rx":3}, thenla voltage 3.3Vsaved it again ("Saved to the pod's wiring profile on embeddedci.com"). Left at la_mv 3300.BENCHPOD_DOCS_TREE=.../cli.json go test ./cmd/benchpod-cli -run TestDocsCommandTree) in embeddedci-server🤖 Generated with Claude Code