-
Notifications
You must be signed in to change notification settings - Fork 20
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
Support multiple WiFi networks for an interface #72
Comments
I pushed a branch with working support for multiple networks to https://github.com/nerves-project/nerves_network/tree/multiple-wifi-networks. It maintains backwards compatibility with: Nerves.Network.setup "wlan0", ssid: "myssid", key_mgmt: :"WPA-PSK", psk: "secretsecret" while adding support for multiple network config via: Nerves.Network.setup "wlan0", networks: [
[ssid: "myssid", key_mgmt: :"WPA-PSK", psk: "secretsecret"],
[ssid: "myotherssid", key_mgmt: :"WPA-PSK", psk: "othersecret", priority: 10]] I'm not particularly attached to the |
Testing changes from the |
Has there been upates to this issue? |
I think we can close this with version 0.4.0 being released, right? |
Also, thanks again @tmecklem ❤️ |
Whoops yep. Thought the PR would close it. Thanks @tmecklem!! |
Nerves.Network doesn't currently support configuring multiple ssids for an interface.
WPA supplicant supports multiple
network
entries with priority (where higher number is higher priority), where the interface scans for ssids and connects to the highest priority network, and Nerves.Network can be modified to accept and configure wpa_supplicant to do that.POC code to add a configuration to wpa supplicant without removing other network configs (thanks to @GregMefford for working through this with me):
Although the wpa_cli documents that this causes a reassociation to the current network, in practice it causes the interface to rescan networks and connect to the highest priority available ssid:
Together these pieces can be used to add support to the
Nerves.Network.setup
function and the config.exs support for default network config so that multiple ssids can be supported at configuration or runtime.The text was updated successfully, but these errors were encountered: