Repository navigation
CLI 0.10: firmware 4.0 (code-only errors, client API 2, TLS, JSON over USB), cleanup - #80
Merged
Merged
Conversation
Sync the error catalog (BP0001-BP0079) and the features table (rev 10, api 2) from the fw-3.11-cutover branch. ClientAPI is 2. Refusals are classified by their code only: every catalog code has a kind (refused, locked, busy, forbidden, update the pod, update the CLI), a coded reply without a message renders from the catalog, and a refusal without a code is shown as the pod wrote it. The text matching is gone (ClassifyRefusal, translateRefusal, explainRefusal, the lease, SPI busy, reply too large and LAN gate texts), and with it internal/fwrefusals. A pod below API level 2 (firmware 3.x) stops a command with exit code 7 and "this pod needs firmware 4.0: benchpod flash-self"; the CLI reads the pod's status once before its first command (LAN, USB network and the cloud). status, flash-self, install-blobs, dfu, bootsel, discover and identity still run against a pod of any level. README: exit codes and error codes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Firmware 4.0 advertises api=2 in its _benchpod._tcp TXT record. A pod below level 2 (none: firmware 3.x) shows "needs firmware update", one above it "needs a newer CLI". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
benchpod lan-tls scpi on|off sends lan_tls scpi; show prints it. The switches (https-only, scpi, regenerate, set-cert) only work over USB or through embeddedci.com: the pod refuses them from Ethernet and Wi-Fi with BP0042, which the catalog words. README and help: the LAN is TLS only from firmware 4.0 and the CLI pins on first use, with nothing to set up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ore 3.9.0) Blobs go over the pod's USB network adapter or its network address only. A pod older than 3.9.0 (no USB network adapter) gets an error that names flash-self, which installs its blobs over USB DFU. A pod with USB networking off is told how to turn it back on (usb-network on, or net-reset when Wi-Fi keeps it off). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Over USB both go to the pod's USB network adapter (cloud_ca, cloud_proxy, ota_* target ca), which may change them; the console commands are gone in firmware 4.0. Without the adapter the error says how to turn it on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Firmware 4.0 has no Wi-Fi commands on its console. The four commands send wifi_set, wifi_status, wifi_scan and wifi_clear over the pod's USB network adapter (or the --connection given). set-wifi follows the join on the address the console reports once USB networking turns off. benchpod net-reset runs the console's net-reset: the way back to a pod no network reaches (forgets Wi-Fi, resets Ethernet). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Firmware 4.0 has no console identity-wipe. The CLI still reads the identity on the console, then sends identity_wipe with the confirm token over the pod's USB link; without the link it says how to turn USB networking on. BP0043 (not over the USB link) is worded from the catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Firmware 4.0 always requires signatures (BP0074 for loosening), so sig-policy has no set any more and its values are just required. Over USB it reads sig_policy over the pod's USB network adapter (no console sig-policy in 4.0); lan-policy set stays on the console. The root help describes the 0.10 transports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
usb-reattach sends usb_reattach (over the USB link when it is up, else the pod's network address). la voltage and flash (dap_start, target power) over USB use the pod's USB network adapter; the console paths for firmware before 3.9.0 are gone, and without the adapter the error says how to turn it on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the console Wi-Fi, CA, proxy, upload, blobs, la-voltage, power, dap-start, identity-wipe and usb-reattach code and their tests: the CLI sends JSON over the USB network adapter for all of them. Add net-reset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- generate: freq_hz, sample_rate_hz, and volts (path, amplitude_v, offset_v) or mA (amplitude_ua, offset_ua) only; the 8-bit --amplitude and --offset and the generate16 check are gone. - measure, capture: freq_hz, sample_rate_hz (Hz). stream is gone (the firmware removed the verb). - la step and la pull send la_step and la_pull; la pullup and its pullup fallback for older firmware are gone. - i2c, expansion, spi-flash: clock_hz. power profile: sample_rate_hz. - target_power enabled true/false; target_status, status.usb and usb_network read booleans (status still reads the 3.x forms). - Captures come as base64 by default: no enc in the request. - One flag per unit: --sample-rate-mhz, --duration-ms and --delay-us are gone. An unknown subcommand of a command group is a usage error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BP0080 (dac_pinout_mismatch) is a refusal (exit code 3) with the catalog's fix. status shows "DAC off: board/module pinout mismatch" when status.module.dac_pinout_ok is false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A run's results move to 10 (failed), 11 (drift regression) and 12 (invalid). Codes 0 to 7 mean what they mean for every command: usage errors are 2 (were 1), an unreachable pod 5, update the CLI 6, update the pod 7 (all were 1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The flag and argument checks the commands make themselves (required flags, ranges, flags that go together or exclude each other, a bad format) return a usage error, so they exit 2 like cobra's own, not 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The global --output-filename is --out (BENCHPOD_OUT); capture, measure and test take --format for json/csv/ndjson; sensor export writes to --out/-o; flash-self and sensor start take --addr like spi-flash and expansion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--connection serial is a usage error that names usb; set-bench-pod is gone (set-connection); la voltage 3300 is no longer millivolts (a bare number is volts: 3.3, or 3300mV). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- features.Has decides from features_rev only (no caps list); benchpod ci reads the lease feature the same way. - la pins: the pod sends the pins asked for; no client-side filtering. The two-part read for BP0053 stays. - Wiring profiles come from the pod only: no embeddedci.com profile for firmware before 3.10.8, and la voltage saves nothing there. - cloud ca, cloud proxy: no "this firmware has no ..." mapping of an unknown command; BP0002 is worded from the catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
CLI 0.10 drives BenchPod firmware 4.0 (client API 2). Pairs with embeddedci-com/benchpod-firmware#192 (
fw-3.11-cutover, at c5107d3: catalog up to BP0080, features table revision 11). Not tagged or released; tested against fakes only (no hardware).Breaking changes
api, level 1) gets exit code 7 andthis pod needs firmware 4.0: benchpod flash-self; a newer pod still gets 6.status,flash-self,install-blobs,dfu,bootsel,discoverandidentitykeep running against any level.discoverreads mDNS TXTapiand shows "needs firmware update" / "needs a newer CLI".internal/fwrefusalsis deleted. Every catalog code (BP0001 to BP0080) has a kind and so an exit code; a coded reply without a message renders from the catalog (message + fix.cli).benchpod lan-tls scpi on|off; the lan-tls switches work only over USB or the cloud (BP0042).benchpod net-reset. Errors say how to turn USB networking on. Console blob upload (firmware before 3.9.0) removed; serialconsole pruned accordingly.sig-policy setremoved (always required, BP0074).enabled, boolean target_status and status.usb (status still reads 3.x forms), base64 captures by default, generate volts/mA only.stream,la pullup,set-bench-pod,--connection serial,generate --amplitude/--offset,--sample-rate-mhz,--duration-ms,--delay-us, bare-mVla voltage 3300, caps-list/LegacyCaps, la_pins subset filtering, embeddedci.com wiring-profile fallback, unknown-command mappings in cloud ca/proxy.--output-filename->--out(BENCHPOD_OUT),--output(format) ->--format,sensor export --output->--out,--address->--addr.benchpod ciresults move to 10/11/12; ci uses 2/5/6/7 like every command.--jsonoutput unchanged.Exit codes
benchpod ci: 0 passed, 1 setup, 2 usage, 5/6/7 as above, 10 failed, 11 drift regression, 12 invalid.Docs the website needs (embeddedci-server webapp/src/docs)
benchpod cicodes 10/11/12 (were 2/3/4).net-reset,usb-network on).stream,la pullup,--output-filename->--out,--format,--addr,generatevolts only, unit-suffixed flags).sig-policyshow only;lan-tls scpi; LAN TLS by default.Not done here: setup still saves la_mv to the embeddedci.com profile;
--allow-unsigned(the CLI's own check of downloaded DFU images) kept; ci's--outstays the run folder (shadows the global--out).🤖 Generated with Claude Code