Rehan

Rehan

Do we need to specify key_mgmt while configuring wifi?

Hello,

I was working with VintageNet to configure the wlan. We can configure the wifi network using VintageNetWiFi.quick_configure() or VintageNet.configure(). I’m able to configure using both.
I checked that when i use quick_configure(), key_mgmt is set to :wpa_psk.
When i use configure() i have set the key_mgmt if i don’t set it to :wpa_psk or any other key management, I observed it defaults to :none.

Now my requirement is to be able connect to any network WPA2, WPA3, or transitional WPA2/WPA3, without specifying the key_mgmt type.

Regards

First Post!

fhunleth

fhunleth

Co-author of Nerves

WPA3 can be made to work with VintageNetWiFi, but we don’t have a read-to-go configuration. The main reason has been, amazingly, lack of interest. I think that it stems from WPA3 not being supported on the Raspberry Pi 3. (Every time I type this, I can’t believe it could still be the case, so if you know that it works now, please correct me.)

One thing to keep in mind with VintageNetWiFi is that it “just” converts configurations expressed as Elixir terms to wpa_supplicant configurations. That means that anything doable with wpa_supplicant can be done with VintageNetWiFi. Sometimes we need to update VintageNetWiFi to properly expose a feature, but the process is primarily one of converting data structures rather than actually implementing a WiFi feature.

If you look midway down at README — vintage_net_wifi v0.12.9, you can see the configurations for WPA3 and transitional WPA2/WPA3. I don’t know of an all-in-one configuration for the wpa_supplicant to do everything with one configuration. If you find one, it could be adapted to VintageNetWiFi and I’d be very interested in doing that.

The workarounds that I can think of:

  1. Scan for networks, find the AP you want, check it’s parameters and save the config accordingly. I don’t like this since it won’t handle hidden networks and if someone changes the AP’s settings, you’ll have to reconfigure. I know this will work, though.

  2. Send down three configurations for the same SSID in the :networks key. One is the WPA3 config, the next is the transitional config and the last is the WPA2 config. This should make wpa_supplicant try each one and stick with the one that works.

If option 2 works and doesn’t break with hardware that doesn’t support WPA3, I’d interested in updating VintageNetWiFi.quick_configure to do that.

Most Liked

fhunleth

fhunleth

Co-author of Nerves

My previous response isn’t right.

The way to do this is to list all of the key_mgmt types that are ok. The current VintageNetWiFi release doesn’t support that. I started a PR with support at Support creating WPA2/WPA3 configurations by fhunleth · Pull Request #217 · nerves-networking/vintage_net_wifi · GitHub.

Another issue is that I don’t think any of the officially supported Nerves hardware have WiFi modules that support WPA3. I just confirmed that we can’t test WPA3 on any of the Raspberry Pis. This blog post had good links on the work being done.

Do you have a WiFi module that supports WPA3? I’ve tested the PR with a WiFi module that supports WPA3, so the PR seems to work. Confirming that it works with whatever hardware you have would be nice to know if that’s possible.

Rehan

Rehan

@fhunleth Yes we figured out the problem, the reason we’re unable to connect to WPA3 network is because of the wifi chip firmware, I haven’t yet tried updating it, after updating the firmware i’ll check it.

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement