Skip to content

Simulated pod speaks firmware 4.0 (client API 2) - #2

Merged
wardviaene merged 9 commits into
mainfrom
fw4-names
Nov 20, 2026
Merged

wardviaene merged 9 commits into
mainfrom
fw4-names

Conversation

@wardviaene

Copy link
Copy Markdown
Member

The simulated pod (benchsim, and podsim on the cloud link) now answers as BenchPod firmware 4.0.0: client API 2, the 4.0 field names and no aliases for the old ones.

  • Client API 2. status and the capabilities frame announce api 2, min_client_api 2 and features_rev 11. A command whose client_api is below 2 gets BP0030 (code, args and the firmware's message), except status, diag, ping, lease_release, the update commands, blob_status and identity_public.
  • Coded refusals. {"status":"error","code":"BP00nn","args":{...}} with no message: unknown verbs (BP0002), the gates (BP0040, BP0025, BP0045, BP0047), the LA voltage, pin and pull conflicts, the capture limits and the policies. Over the cloud command channel the envelope's error is the message, or the code, with code and args beside it.
  • status and capabilities. No caps list and none of the always-true flags. status carries fpga_image and hw, usb.net/usb.enabled as booleans, and lan_tls.scpi. The capabilities frame keeps values and facts only.
  • Renames. freq_hz; sample_rate_hz in Hz; adc_sample_rate_hz/la_sample_rate_hz in requests and replies; clock_hz; power_profile sample_rate_hz; dac_out v (no 8-bit code); loop code16; CAN ts_ms; can_start/can_stop; la_step and la_pull instead of la; booleans for target_power, target_status, la_pull and usb_network.
  • Behavior. generate takes only the calibrated form and replies null or {"cotrig":bool}. stream is gone. ADC samples come as b64 unless "enc":"dec". sig_policy is always required (BP0074). lan_tls has scpi (default off), and SCPI lines get the firmware's "SCPI is off" line.

Not modeled: module/dac_pinout_ok (the sim is an analog board without a module), real LAN TLS (the sim reports https_only true but keeps answering plaintext JSON), and the step train itself.

go vet ./... && go test ./... passes on every commit.

🤖 Generated with Claude Code

wardviaene and others added 9 commits November 19, 2026 22:11
Firmware 4.0.0 refuses every command whose client_api is below 2 with
BP0030 (code, args and a message) before any other gate, except status,
diag, ping, lease_release, the update commands, blob_status and
identity_public. Refusals with a code carry code and args and no message:
an unknown verb is BP0002, and the LAN lock, lease, tunnel tier and
capture gates are BP0040, BP0025, BP0045 and BP0047. Over the cloud
command channel the envelope's error is the message, or the code, with
code and args beside it; a busy pod is BP0052.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both announce api 2, min_client_api 2 and features_rev 11 with the
running image (fpga_image) and the hardware facts (hw). status has no
caps list and none of the always-true flags (sensors_format, ota_sig,
sig_policy_cmd, lan_policy_cmd, tunnel_max_tier, lease_state, cloud_ca,
cloud_proxy), usb.net and usb.enabled are booleans, lan_tls has scpi,
local_lease is always there and the signature policy is required. The
capabilities frame keeps values and facts only, no per-feature flags.
The simulated firmware is 4.0.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
capture, la_capture, sensor_la and replay take sample_rate_hz and
capture_dual adc_sample_rate_hz and la_sample_rate_hz, all in Hz; the
first frame reports adc_sample_rate_hz and la_sample_rate_hz. ADC samples
come as b64 unless the request says "enc":"dec". The stream verb is gone
(BP0002). Samples out of range, a trigger timeout, a capture deeper than
the PSRAM and a capture while another runs are BP0067, BP0038, BP0072
and BP0047.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
spi_start and spi_status use clock_hz, power_profile sample_rate_hz
(100..500) with adc_sample_rate_hz in its stats, dac_out takes v and
replies code16 without the 8-bit code, dac_loop_probe and dac_loop_input
reply code16 for the DAC code, can_read frames carry ts_ms, and
can_config and can_disable are can_start and can_stop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
la is gone (BP0002): la_step takes the step train (steps required) and
la_pull the pull resistors, with "pull":"up"|"down"|"off" and a reply of
state, dirs and pullups_available (no pullup, ohms or pull); pullup is
not read. Pulls work at 1.8 V too. target_power takes and replies
"enabled":true|false, target_status reports enabled, fault and valid as
booleans, and la_pins lists each pull's dirs. The LA voltage, pin and
pull refusals are BP0001, BP0031, BP0032, BP0033, BP0023, BP0024 and
BP0037.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
generate takes path with amplitude_v and offset_v, or amplitude_ua with
offset_ua, and freq_hz (default 1000 Hz). The 8-bit amplitude/offset
form is refused with the firmware's text. The reply is null, or
{"cotrig":bool} with on_capture; the demo has no co-trigger and answers
false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sig_policy is always required: "set":"required" works from every
source, audit and permissive (and lan_unsigned) are BP0074 with the
setting and want, and clear_floor is BP0043 (the USB link only). The
reply has rollback_floor. lan_tls reports https_only (default true) and
scpi (default false) and changes them from the cloud only (BP0042 on the
LAN). usb_network takes "enabled" and replies {"enabled":bool}; only the
device changes it (BP0043). With SCPI off a SCPI line gets the
firmware's one line and the connection closes. lan_policy, cloud_ca and
cloud_proxy refusals are BP0041, BP0042 and BP0048.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README shows client_api, the coded refusals, the status levels and
requests with the 4.0 names. The demo's list of real commands it leaves
out names usb_network and wifi_status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_pull la/pull)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wardviaene
wardviaene merged commit 0fead20 into main Nov 20, 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