Skip to content

Wi-Fi dialog says "Connected" after a wrong passphrase - the board fell back to its hotspot #149

Description

@eliasbakken

Found testing v1.1.0-RC8-2-g23a2bb6 on A8 s/n 0498, board on Ethernet with a WiFi dongle in hotspot mode.

What happens

Wi-Fi dialog, pick Kraakeslottet (2.4 GHz, in range), enter a wrong passphrase, press Connect. The dialog ends on:

Connected to: Kraakeslottet
Connected to Kraakeslottet.

The board never associated. reflash.log:

[info] Connection command accepted.
[info] Waiting for DHCP...
[info] Timed out waiting for IP address.
[info] Never associated with Kraakeslottet (state: disconnected). Check the passphrase.
[info] Connection failed - restoring hotspot (Recore) so the board stays reachable.
[error] WiFi Connection failed: exit status 1

Afterwards iwctl device list shows ap, and /api/wifi_poll_connect answers {"error":"exit status 1","isConnecting":false}. The UI never shows the "Could not join ... back on its own Recore hotspot" message that was written for exactly this case.

Why

watchForReconnect() in TheWifiSetup.vue treats wifi.mode === "station" && wifi.ssid === target as arrived. network-status takes ssid from iwctl's Connected network, which is already filled in while iwd is still connecting (the journal shows connecting (auto) then Deauthentication ... reason: 2). The first poll after the mode switch sees station + matching SSID, declares success, and stops watching, so the fall back to AP is never seen.

Suggested direction

Do not call it connected until the station state is connected and wlan0 has an IPv4 address. Or drive the outcome from wifi_poll_connect, which already knows the real result.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions