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

Setup module to support WPA3 Wi-Fi networks #555

Merged
merged 5 commits into from
Feb 23, 2024

Conversation

james-ctc
Copy link
Contributor

background

wpa_cli supports the configuration of WPA2 and WPA3 networks. However WPA3 doesn't support a pre-shared key (the output from the wpa_passphrase command), it always requires the plain text passphrase.

By default the update will try and configure dual support for WPA2 and WPA3 based on the "psk": "" MQTT parameter
i.e.

psk key_mgmt configuration
"" NONE open network
"<length == 64>" WPA-PSK WPA2 only with pre-shared key
""MyPassphrase"" WPA-PSK WPA-PSK-SHA256 SAE WPA2 and WPA3
"<length > 64>" SAE WPA3 only

additional

  • unit tests now part of cmake build
  • an additional MQTT parameter could be added to explicitly set the mode (WPA2, WPA3, both, none)
    it is common for WiFi configuration to require the security being applied. Adding an additional parameter would allow EVerest to fully configure the network (and perhaps support more options: WEP, WPA2 Enterprise mode ...)

The WpaCliSetup has been updated to support network configuration with an additional parameter to indicate the network security to apply. This should make it easier to support new modes alongside an MQTT interface update.

@corneliusclaussen
Copy link
Contributor

Not sure if related to this PR, but during testing I found that configured networks often publishes empty messages in between:
image

@corneliusclaussen
Copy link
Contributor

Not sure if related to this PR, but during testing I found that configured networks often publishes empty messages in between: image

Not a bug, I had a second wireless device that had no configured networks

@corneliusclaussen
Copy link
Contributor

Tested on WPA3 and WPA2 and mixed WPA3/2 networks

@james-ctc
Copy link
Contributor Author

re-reading the README for the Setup module and the configured networks list should be a single list rather than a list per wifi network device.

@corneliusclaussen
Copy link
Contributor

Not sure if related to this PR, but during testing I found that configured networks often publishes empty messages in between: image

Not a bug, I had a second wireless device that had no configured networks

No a joined list of all interface is returned as described in the README

WpaCliSetup extended to support open, WPA2 and WPA3. By default
it attempts to configure based on the existing arguments.
set_network can take an additional argument to explicitly choose
the network security type. (this could be an additional parameter over
MQTT).

Note: WPA3 doesn't support pre shared key (64 hex ditits), it requires the
password/passphrase. Hence over MQTT a quoted "psk": "\"thePassphrase\"" is
required and not the output from the wpa_passphrase command.

Signed-off-by: James Chapman <[email protected]>
Previously configured_networks published an array per wifi device
which resulted in empty arrays where a device had no configured
networks.

Signed-off-by: James Chapman <[email protected]>
@corneliusclaussen corneliusclaussen merged commit fc986b9 into main Feb 23, 2024
4 of 5 checks passed
@corneliusclaussen corneliusclaussen deleted the feat-support-wpa3 branch February 23, 2024 16:38
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