Skip to content

feat: add LAN chip info query and WiFi version check before flashing#141

Merged
tylerkron merged 1 commit intomainfrom
feature/lan-chip-info-and-wifi-version-check
Feb 28, 2026
Merged

feat: add LAN chip info query and WiFi version check before flashing#141
tylerkron merged 1 commit intomainfrom
feature/lan-chip-info-and-wifi-version-check

Conversation

@tylerkron
Copy link
Contributor

Summary

Implements #139.

  • GetLanChipInfo SCPI command — added to ScpiMessageProducer (SYSTem:COMMunicate:LAN:GETChipInfo?)
  • LanChipInfo record + LanChipInfoParser — parses the JSON response {"ChipId":<id>,"FwVersion":"<version>","BuildDate":"<date>"} from the device; FwVersion is required, others default gracefully
  • ILanChipInfoProvider interface — optional-capability pattern so FirmwareUpdateService can cast device is ILanChipInfoProvider without changing IStreamingDevice
  • DaqifiStreamingDevice.GetLanChipInfoAsync — sends the SCPI command via ExecuteTextCommandAsync, parses the response lines
  • IFirmwareDownloadService.GetLatestWifiReleaseAsync — metadata-only query (no download) to get the latest WiFi firmware tag from GitHub
  • FirmwareUpdateService version check — before flashing WiFi firmware, queries the device and compares versions; if device is already current, transitions directly to Complete and reports 100% progress (no unnecessary reflash)
  • 11 new LanChipInfoParser tests and 3 new FirmwareUpdateService tests for the version-check behavior

Hardware-validated against a physical Nyquist 1 over serial (ChipId: 1377184, FwVersion: 19.7.7, BuildDate: Mar 30 2022).

Test plan

  • All 847 existing tests pass (both net8.0 and net9.0)
  • 11 new LanChipInfoParserTests cover valid JSON, optional fields, malformed input, null/whitespace, and TryParseLines
  • 3 new FirmwareUpdateServiceTests cover: device already up to date (skips flash), device is older (proceeds), device doesn't support ILanChipInfoProvider (proceeds)
  • End-to-end validated on hardware via daqifi-core-example-app --lan-chip-info

🤖 Generated with Claude Code

…139)

- Add `GetLanChipInfo` SCPI command to `ScpiMessageProducer`
- Add `LanChipInfo` record and `LanChipInfoParser` (parses JSON from device)
- Add `ILanChipInfoProvider` optional-capability interface
- Implement `DaqifiStreamingDevice.GetLanChipInfoAsync` via `ExecuteTextCommandAsync`
- Add `IFirmwareDownloadService.GetLatestWifiReleaseAsync` (metadata-only, no download)
- Implement in `GitHubFirmwareDownloadService` using cached WiFi releases
- `FirmwareUpdateService.UpdateWifiModuleAsync` now checks device WiFi version
  before flashing; skips flash and reports Complete if already up to date
- Add 11 unit tests for `LanChipInfoParser`
- Add 3 unit tests for the version-check behavior in `FirmwareUpdateService`
- Update README to document WiFi version-check behavior

Closes #139

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: a0fb8798807b
@tylerkron tylerkron requested a review from a team as a code owner February 28, 2026 05:47
@tylerkron tylerkron merged commit 6a66abf into main Feb 28, 2026
1 check passed
@tylerkron tylerkron deleted the feature/lan-chip-info-and-wifi-version-check branch February 28, 2026 05:58
tylerkron added a commit to daqifi/daqifi-desktop that referenced this pull request Feb 28, 2026
Before downloading and flashing the WiFi module firmware, query the
device for its current WiFi chip version using GetLanChipInfoAsync and
compare it against the latest GitHub release via GetLatestWifiReleaseAsync.
If the device is already running the latest version, skip the download
and flash entirely and report 100 % progress immediately.

Changes:
- SerialStreamingDevice implements ILanChipInfoProvider, delegating to
  its underlying Core DaqifiStreamingDevice
- CoreStreamingDeviceAdapter implements ILanChipInfoProvider, delegating
  to the wrapped desktop device
- DaqifiViewModel.UpdateWifiModuleAsync performs a version check before
  downloading; shows "already up to date" status or "X → Y" version info
- Add IsWifiVersionCurrent helper using FirmwareVersion comparison
- All three .csproj files gain a conditional DaqifiCoreProjectPath
  ProjectReference (same pattern as daqifi-core-example-app) for local
  development against Core PR #141

Requires daqifi/daqifi-core#141 for ILanChipInfoProvider,
GetLanChipInfoAsync, and IFirmwareDownloadService.GetLatestWifiReleaseAsync.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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