lucaong

lucaong

Configure multiple WiFi SSID

Hi all,
recently for I project I needed to be able to configure several WiFi SSID/PSK on the same device, with different priorities (so that the device would preferably connect to one network, but fallback to another one if the first is not available). I noticed that nerves_network does not currently seem to support that. The problem is that, when setting a new entry, nerves_wpa_supplicant currently removes all entries and force select of the new one.

I ended up implementing my own solution on top of nerves_network, if there’s interest in porting this feature to the main library I can share my code.

First Post!

outlog

outlog

well.. do please share - could also make for great blog/medium posts (along with the update thing)..

one thing I wonder is if you do a scan to find available/strongest ssid.. say I have 10+ aps in the known list (or even 100 or 1000).. then a scan for strongest/available aps and then matching against the list of known aps, would make a lot of sense..

anyways just a thought for perfection when/if something like this is hopefully added to nerves_network..

the use case is certainly there.

Most Liked

lucaong

lucaong

Here’s a gist: Multiple SSIDs with NervesNetwork · GitHub

I am on the go now, but when I have more time I can work on a pull request to NervesNetwork and WpaSupplicant if there’s interest in it. I would love to hear opinions and comments from the Nerves maintainers.

GregMefford

GregMefford

As an update to this, @tmecklem and I independently started working on this feature without realizing that you had already posted here about it so long ago! :sweat_smile:

Thanks for posting that super-helpful gist! We will take a look and see if there’s anything in there we didn’t think about that we can integrate into the main library, if you’re OK with that.

https://github.com/nerves-project/nerves_network/issues/72

tmecklem

tmecklem

Oh yeah! Great stuff, thanks for sharing it!

Where Next?

Popular in Questions Top

vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
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
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New

Other popular topics Top

Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44778 311
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
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