lucaong

lucaong

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.

Showing Posts 1 to 5

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.

lucaong

lucaong OP

Oh yes that feature would be great. I assume though that it would have to be supported by wpa_supplicant on which NervesNetwork and my code both rely.

Or maybe it’s possible already? I know wpa_supplicant allows users to specify priorities, but I don’t know how the algorithm works, nor if it takes signal strength into consideration.

Anyway, I will soon share at least a gist. A full generic solution outside of my specific use case will take a bit more polish, but if the Nerves maintainers like the idea I can contribute a pull request.

lucaong

lucaong OP

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!

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
water
I’m aware of 2 such projects, are there others? git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
itzmidinesh
Hi all, I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
csmr
Hi all, I’m new here and would like to hear peoples views on my Elixir/Phoenix based game-engine! :smiley: Mutonex gamedesign was finish...
New
Stef-Verniers
Hello I’ve been coding in Elixir for almost two years now because of my current job where we implemented Elixir in our application. But ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews