fmarzocca
Posts: 22
Joined: Fri May 25, 2018 12:42 pm

WiFi Connection manager with fallback web configuration portal

Wed Mar 20, 2019 10:48 am

I have realized an unmanned embedded project with Raspberry which works on WiFi. Now, in order to let it really flexible and portable, I need an easy way to choose the WiFi AP to connect to, without the need to access to the SD or other "acrobatic" processes (ethernet/video/keyboard).

With Arduino/ESP8266 it is just a matter of include a Library (WiFiManager). I need this functionality:
  • when the Raspi starts up, it sets it up in Station mode and tries to connect to a previously saved Access Point;
  • if this is unsuccessful (or no previous network saved) it moves the Raspi into Access Point mode and spins up a DNS and WebServer (captive portal);
  • using any wifi enabled device with a browser (computer, phone, tablet) connect to the newly created Access Point
  • because of the Captive Portal and the DNS server you will either get a 'Join to network' type of popup or get any domain you try to access redirected to the configuration portal;
  • choose one of the access points scanned, enter password, click save
  • Raspberry will try to connect (without rebooting). If successful, it relinquishes control back to your app. If not, reconnect to AP and reconfigure.
Is there something already coded for this, or should I start from scratch?

Thanks for any tip
Fabio

fmarzocca
Posts: 22
Joined: Fri May 25, 2018 12:42 pm

Re: WiFi Connection manager with fallback web configuration portal

Sat Mar 23, 2019 9:28 am

Has anyone ever faced this problem?

Paul Hutch
Posts: 354
Joined: Fri Aug 25, 2017 2:58 pm
Location: Blackstone River Valley, MA, USA
Contact: Website

Re: WiFi Connection manager with fallback web configuration portal

Tue Apr 02, 2019 5:55 pm

From what I've read nobody who has coded this type of system for the Raspberry Pi has released it as free software.

Later this year I'll be working on this functionality for a work project and I intend it to be FLOSS, but do to work time constraints I'm certain I won't be able to get the project set up on GitHub or another place to easily share the code and allow contribution until sometime next year. However if you end up getting something going I should be able to contribute some testing and code to the project while I'm working on the work project.


User avatar
dividuum
Posts: 119
Joined: Sun Jun 16, 2013 1:18 pm
Location: Germany
Contact: Website

Re: WiFi Connection manager with fallback web configuration portal

Wed Apr 10, 2019 9:45 am

Paul Hutch wrote:
Tue Apr 02, 2019 5:55 pm
From what I've read nobody who has coded this type of system for the Raspberry Pi has released it as free software.
While I'm guilty of that too, the following exists and might be what OP is looking for: https://github.com/balena-io/wifi-connect
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

Paul Hutch
Posts: 354
Joined: Fri Aug 25, 2017 2:58 pm
Location: Blackstone River Valley, MA, USA
Contact: Website

Re: WiFi Connection manager with fallback web configuration portal

Wed Apr 10, 2019 11:42 am

Thank you very much dividuum, that looks like a good solution for many users.

Andyroo
Posts: 3280
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: WiFi Connection manager with fallback web configuration portal

Wed Apr 10, 2019 11:47 am

dividuum wrote:
Wed Apr 10, 2019 9:45 am
Paul Hutch wrote:
Tue Apr 02, 2019 5:55 pm
From what I've read nobody who has coded this type of system for the Raspberry Pi has released it as free software.
While I'm guilty of that too, the following exists and might be what OP is looking for: https://github.com/balena-io/wifi-connect
Thank you for that link as it will come in very handy - bookmarked :)
Need Pi spray - these things are breeding in my house...

fmarzocca
Posts: 22
Joined: Fri May 25, 2018 12:42 pm

Re: WiFi Connection manager with fallback web configuration portal

Wed Apr 10, 2019 2:21 pm

dividuum wrote:
Wed Apr 10, 2019 9:45 am
Paul Hutch wrote:
Tue Apr 02, 2019 5:55 pm
From what I've read nobody who has coded this type of system for the Raspberry Pi has released it as free software.
While I'm guilty of that too, the following exists and might be what OP is looking for: https://github.com/balena-io/wifi-connect
Hey, that's EXACTLY what I was looking for. Great!
You should do some more advertising! :-)

Thank you very much

Return to “Advanced users”