Skip to content

fix(network): fill iwd band and RSSI from Station diagnostics - #4275

Open
kvnloo wants to merge 2 commits into
noctalia-dev:mainfrom
kvnloo:fix/noctalia-4148-iwd-diagnostics
Open

fix(network): fill iwd band and RSSI from Station diagnostics#4275
kvnloo wants to merge 2 commits into
noctalia-dev:mainfrom
kvnloo:fix/noctalia-4148-iwd-diagnostics

Conversation

@kvnloo

@kvnloo kvnloo commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

On iwd connected refresh, call StationDiagnostic.GetDiagnostics(). When Frequency > 0, set frequencyMhz. When OrderedNetworks left signalStrength at 0 and RSSI is present, map dBm with existing signalToPercent. RSSI is read only via supported D-Bus integer forms (int16_t / int32_t), not int8_t.

Motivation

Origin issue #4148: the connection chip never showed band/RSSI on iwd because the backend never filled frequencyMhz / fallback strength even though the display path already existed.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Build / packaging

Related Issue

Closes #4148

Testing

  • Standalone iwd_diagnostics_test: exit 0 — 2437 MHz → 2.4 GHz, 5180 → 5 GHz, 5955 → 6 GHz; frequency 0 unlabeled; RSSI -70 → 60% only when OrderedNetworks left strength 0.
  • Baseline mapping (-DIWD_DIAGNOSTICS_BASELINE) fails connected.frequencyMhz == 2437 (exit 1).
  • Exact CI format gate over src/**/*.cpp and src/**/*.h: exit 0.
  • Real iwd_service.cpp C++23 syntax-only with sdbus-c++ flags: exit 0 (confirms unsupported Variant::get<std::int8_t>() is gone).
  • Full meson debug build not available on factory host; scoped tests above are the verifier evidence.

Checklist

  • This PR is ready for review, or it is marked as Draft.
  • I read and followed the relevant guidance in CONTRIBUTING.md.
  • I ran just format with clang-format v22+ installed, or this PR has no code changes.
  • I ran the relevant build or test commands, or explained why they were not run.
  • I self-reviewed the changes.
  • I checked for new warnings or errors.
  • I updated user-facing documentation in docs/user/ when this PR changes documented behavior or configuration, or this PR does not require documentation changes.
  • I added or updated assets/translations/en.json, or this PR adds no new user-facing strings.
  • I did not edit non-English translation files unless this PR is explicitly for translation tooling, an import/export sync, or a maintainer-requested locale change.
  • I used the existing canonical names for config keys, IPC names, paths, and identifiers.

Additional Notes

Prior PR #4240 was closed for an incomplete template body and had a debug-build failure on Variant::get<std::int8_t>(). This reopens the same branch at CI-fixed head 5de755e4135bce5c6c44bf47dc9f89a5ae49c1bb.

…talia-dev#4148)

iwd never wrote frequencyMhz, so the Wi-Fi band chip stayed empty on
NixOS. On a connected station call StationDiagnostic.GetDiagnostics,
copy Frequency into frequencyMhz, and map RSSI only when OrderedNetworks
left signalStrength at 0. Missing diagnostic interface stays fail-closed.

Refs noctalia-dev#4148
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.

[BUG] WiFi not showing which band is using and RSSI

1 participant