Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhanced wifi setup #504

Merged
merged 2 commits into from
Jan 23, 2024
Merged

enhanced wifi setup #504

merged 2 commits into from
Jan 23, 2024

Conversation

james-ctc
Copy link
Contributor

The setup module uses wpa_cli to configure networks. The default assumes:

  • WPA2 personal (PSK)
  • Visible SSID

This change adds support for connecting to open WiFi networks and networks where the SSID is hidden.

{
    "interface": "wlan0",
    "ssid": "Example",
    "psk": "\"A_valid_passphrase\""
}

For open WiFi networks the psk must be an empty string "psk": "".

{
    "interface": "wlan0",
    "ssid": "OpenExample",
    "psk": ""
}

Unfortunately there isn’t a reliable mechanism to automatically detect that a network is hidden so an additional (optional) argument is needed when connecting to hidden networks.

{
    "interface": "wlan0",
    "ssid": "Example",
    "psk": "20fcb529dee0aad11b0568f553942850d06e4c4531c0d75b35345d580b300f78",
    "hidden": true
}

feat: support configuragion for connecting to hidden WiFi networks
feat: simplified specialising WiFi setup
fix: refactored WiFi config code to separate class
fix: added some unit tests

Note to connect to a hidden network an additional MQTT argument
will be needed.

Signed-off-by: James Chapman <[email protected]>
@james-ctc james-ctc merged commit 1754279 into main Jan 23, 2024
3 of 4 checks passed
@james-ctc james-ctc deleted the jc/enhanced-wifi-setup branch January 23, 2024 09:32
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.

2 participants