Repository navigation
fix(scpi)!: send SYST:STORage:SD:FILE for SD logging (firmware v3.5.0+) - #253
Conversation
Firmware v3.5.0 hard-renamed the SD logging filename command from `SYSTem:STORage:SD:LOGging "file"` to `SYSTem:STORage:SD:FILE "file"` with no backward-compatible alias (daqifi-nyquist-firmware #323). Since that device-side rename, `SetSdLoggingFileName` has kept emitting the old name, which v3.5.0+ firmware rejects with `-113 "Undefined header"`. Because `StartSdCardLoggingAsync` sends the command fire-and-forget, the failure was silent: logging appeared to start but the device recorded nothing. Verified against hardware (firmware v3.5.0+): the old command returns `-113 "Undefined header"`, the new command returns `0 "No error"`. Not version-gated, per the decision to require firmware v3.5.0+ for SD logging; universal firmware-version capability gating is tracked in #251. BREAKING CHANGE: SD card logging now requires device firmware v3.5.0 or newer. Firmware older than v3.5.0 (which only accepts the former SYSTem:STORage:SD:LOGging command) is no longer supported for SD logging. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR Summary by QodoFix SD logging SCPI filename command for firmware v3.5.0+ Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
Context used 1.
|
The XML <param> docs for SetSdLoggingFileName and GetSdFile said the filename "Must be enclosed in quotes", but the producer adds the quotes itself and the device-side ValidateSdCardFileName rejects filenames containing quote characters. A caller following the old guidance would get an ArgumentException. Reword to state the bare name should be passed without surrounding quotes. Addresses Qodo review finding #1 on PR #253. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Response to Qodo review1. Misleading filename quoting docs — ✅ fixed (9667bbd) Good catch, and confirmed: 2. Silent SD logging failure — ⏭️ intentionally deferred, not actioned here This is a real latent issue, but out of scope for this PR by design:
Folding it into #251 instead of bolting a one-off guard onto this fix. |
…#251) Reconciles ADR 0001 with the seed data on #251 and direct firmware verification: - FIX: the #311 stream-control rename DID ship in v3.5.0 via follow-ups #322/#323/#324 (only the umbrella commit #311 is unmerged). Prior text wrongly said the rename was unreleased. - Record the three v3.5.0 renames with their differing compat: stream start/stop and USB transparent are aliased (non-breaking); SD logging filename is a hard rename with no alias (SD:LOGging -> SD:FILE, fw #323) that silently breaks core today, fixed ungated by core #253. - Add a second gating mode (version-selected command via CommandRename) since a bool Supports() can't express a hard rename. - Follow-ups: convert SetSdLoggingFileName to version-selected; remove the dead GetSdLoggingState / SD:LOGging? producer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds Decision 1 (floor = v3.5.0), which collapses most of the design: - Every command core issues today is <= v3.5.0, so there are NO live firmware-version gates on supported firmware. The only live axis is board/hardware capability (NQ3 -> DAC, SD/WiFi presence), already done by DeviceCapabilities.FromDeviceType. - Drop the version-selected-command (CommandRename) mode — obviated by the floor; core #253's unconditional SD:FILE is correct. - Defer the DeviceFeature version table until we consume a post-floor (v3.6.0+) command; it would be empty today. - Make the -113 -> FeatureNotSupportedException backstop the primary near-term deliverable (closes the #214 gap). Also from the double-check: - Supports() evaluated lazily vs current metadata (no cached version-derived flags) — UpdateFromProtobuf sets caps at part-number time but firmware version separately, so a snapshot would go stale. - Soften "#311 cosmetic"; note we depend on firmware keeping the aliases. - "pending v3.6.1"; frame #327 as "commands shipped" not "the framework". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Fixes silently-broken SD card logging against current firmware.
Firmware v3.5.0 hard-renamed the SD logging filename command from
SYSTem:STORage:SD:LOGging "file"toSYSTem:STORage:SD:FILE "file"with no backward-compatible alias (daqifi-nyquist-firmware#323). daqifi-core'sSetSdLoggingFileNamehas been emitting the old name ever since, so on any v3.5.0+ device the firmware rejects it with-113 "Undefined header".Because
StartSdCardLoggingAsyncissues the command fire-and-forget (no response check), the failure is silent — logging appears to start but the device records nothing.This PR switches the single producer string to
SYSTem:STORage:SD:FILE. No .NET API changes.Verified on hardware
Probed the connected device's SCPI error queue under identical conditions:
SYSTem:STORage:SD:LOGging "f"(old)**ERROR: -113, "Undefined header"-113,"Undefined header"SYSTem:STORage:SD:FILE "f"(new)0,"No error"Testing
dotnet build -c Release: 0 warnings, 0 errors (TreatWarningsAsErrors).SD card logging now requires device firmware v3.5.0 or newer. There is no single command name that works on both sides of the v3.5.0 cutover (old firmware only accepts
SD:LOGging, new firmware only acceptsSD:FILE), so this intentionally drops < v3.5.0 support for SD logging rather than version-gating.Per discussion, universal firmware-version capability gating (which would let this select the command per device version instead of requiring a floor) is tracked in #251. The producer XML doc references it inline.
🤖 Generated with Claude Code