Repository navigation
Simulated pod speaks firmware 4.0 (client API 2) - #2
Merged
Merged
Conversation
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>
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.
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.
statusand the capabilities frame announceapi2,min_client_api2 andfeatures_rev11. A command whoseclient_apiis below 2 getsBP0030(code, args and the firmware's message), exceptstatus,diag,ping,lease_release, the update commands,blob_statusandidentity_public.{"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'serroris the message, or the code, withcodeandargsbeside it.capslist and none of the always-true flags.statuscarriesfpga_imageandhw,usb.net/usb.enabledas booleans, andlan_tls.scpi. The capabilities frame keeps values and facts only.freq_hz;sample_rate_hzin Hz;adc_sample_rate_hz/la_sample_rate_hzin requests and replies;clock_hz; power_profilesample_rate_hz; dac_outv(no 8-bitcode); loopcode16; CANts_ms;can_start/can_stop;la_stepandla_pullinstead ofla; booleans for target_power, target_status, la_pull and usb_network.nullor{"cotrig":bool}.streamis gone. ADC samples come asb64unless"enc":"dec". sig_policy is alwaysrequired(BP0074). lan_tls hasscpi(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 reportshttps_onlytrue but keeps answering plaintext JSON), and the step train itself.go vet ./... && go test ./...passes on every commit.🤖 Generated with Claude Code