Meshtastic-Android/feature/wifi-provision
James Rich 387acd7a2f fix(ui): stable LazyColumn keys, semantic roles, and content descriptions
Two Compose correctness/accessibility fixes from the UI audit:

* feature/messaging Reaction.kt: three items() blocks in LazyRow/
  LazyColumn had no key= parameter, which caused incorrect state and
  animation when the underlying lists reorder. Add stable keys: Map.Entry
  iterations use it.key; the reaction list uses a composite
  packetId:userId:emoji:timestamp because packetId defaults to 0 for
  pending/local reactions.
* Accessibility pass across core/ui and feature/{settings,node,
  wifi-provision}: add role=Role.Button + onClickLabel to clickable
  Box/Column/Row/Text widgets that were rendering as plain containers
  to TalkBack (RegularPreference, IndoorAirQuality, NodeFilterTextField,
  ClickableTextField trailing icon). Add contentDescription (via
  stringResource) to meaningful Close/Filter/PhoneAndroid icons that
  previously passed null. Replace hardcoded English strings in
  contentDescription slots with six new keys in core/resources
  (export_tak_data_package, mpwrd_os translatable=false, clear_time_zone,
  filter_icon, remove_filter, show_iaq_legend).

Roughly 200 insertions across 10 files; no behavior change other than
screen-reader output and stable list-item identity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 11:24:15 -05:00
..
src fix(ui): stable LazyColumn keys, semantic roles, and content descriptions 2026-04-17 11:24:15 -05:00
build.gradle.kts chore: review-cleanup fleet (audit + fix + hardening) (#5158) 2026-04-17 00:02:59 +00:00
README.md feat(wifi-provision): add mPWRD-OS branding and disclaimer banner (#4978) 2026-04-03 13:47:15 +00:00

:feature:wifi-provision

Module dependency graph

graph TB
  :feature:wifi-provision[wifi-provision]:::kmp-feature

classDef android-application fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef android-application-compose fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef compose-desktop-application fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef android-feature fill:#FFD6A5,stroke:#000,stroke-width:2px,color:#000;
classDef android-library fill:#9BF6FF,stroke:#000,stroke-width:2px,color:#000;
classDef android-library-compose fill:#9BF6FF,stroke:#000,stroke-width:2px,color:#000;
classDef android-test fill:#A0C4FF,stroke:#000,stroke-width:2px,color:#000;
classDef jvm-library fill:#BDB2FF,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-feature fill:#FFD6A5,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-library-compose fill:#FFC1CC,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-library fill:#FFC1CC,stroke:#000,stroke-width:2px,color:#000;
classDef unknown fill:#FFADAD,stroke:#000,stroke-width:2px,color:#000;

WiFi Provisioning System — for mPWRD-OS

The :feature:wifi-provision module provides BLE-based WiFi provisioning for mPWRD-OS devices using the Nymea network manager protocol. mPWRD-OS is a community project that combines Armbian and Meshtastic for Linux-native mesh networking hardware. This module scans for provisioning-capable devices, retrieves available WiFi networks, and applies credentials — all over BLE via the Kable multiplatform library.

Architecture

  • Protocol: Nymea BLE network manager (GATT service e081fec0-f757-4449-b9c9-bfa83133f7fc)
  • Transport: BLE via core:ble Kable abstractions with chunked packet codec
  • UI: Single-screen Material 3 Expressive flow with 6 phases (Idle, ConnectingBle, DeviceFound, LoadingNetworks, Connected, Provisioning)
sequenceDiagram
    participant App as Meshtastic App
    participant BLE as BLE Scanner
    participant Device as Provisioning Device

    Note over App: Phase 1: Scan
    App->>BLE: Scan for GATT service UUID
    BLE-->>App: Device discovered

    Note over App: Phase 2: Connect
    App->>Device: BLE Connect
    Device-->>App: Device name (confirmation)

    Note over App, Device: Phase 3: Network List
    App->>Device: GetNetworks command
    Device-->>App: WiFi networks (deduplicated by SSID)

    Note over App, Device: Phase 4: Provision
    App->>Device: Connect(SSID, password)
    Device-->>App: NetworkingStatus response
    App->>Device: Disconnect BLE

Key Classes

  • WifiProvisionViewModel.kt: MVI state machine with 6 phases and SSID deduplication.
  • WifiProvisionScreen.kt: Material 3 Expressive single-screen UI with Crossfade transitions.
  • NymeaWifiService.kt: BLE service layer — connect, scan networks, provision, close.
  • NymeaPacketCodec.kt: Chunked BLE packet encoder/decoder with reassembly.
  • NymeaProtocol.kt: JSON serialization for Nymea network manager commands and responses.
  • ProvisionStatusCard.kt: Inline status feedback card (idle/success/failed) with Material 3 colors.