User friendly WIFI configuration tool for an headless Raspberry Pi (ad-hoc, access point etc)

Hi,

For the project I’m working on (OSC and Ble midi to I2C ), I’m looking for a solution to provide a user-friendly WiFi configuration for an headless Raspberry Pi Zero W.

At the moment I’m using a script that creates an ad-hoc network when the pi boots up but it’s difficult to connect the Pi back to another network (connected to Internet) once it’s installed. I need to revert the script each time I need to connect the RPi to internet for an update or take the Pi out of the Eurorack case and connect the pi via Ethernet. If it was for me only, I would probably keep this solution even if it’s not very handy, but since I plan to share the project with other users, I would like to provide an easy way to manage WiFi, either via command line or via a webpage or a variable set in config.txt, or a wpa supplicant containing multiple configs, I don’t know.

Ideally I would like to set the following up:

  • By default the RPI Zero W would advertise an “access point” or create an ad-hoc network used for OSC communication and eventually accessing a local webpage served by Node.js to adjust a few settings.

  • There would also be a possibility to switch and connect to a known network connected to internet when an update is needed (or if the user wants to permanently use the home network fo example).

How would you do that on a headless setup ?

Is there a script or install procedure that you can recommend ? I tried to set something using Network Manager and its command line tool but I failed to connect to the “hotspot” created and I don’t know yet how to store configurations and switch between two configurations with nmcli. I took inspiration from the WiFi.lua of Norns.

I’ve briefly tried Balena WiFi connect (also using Network manager) but once it recognizes an ssid it connects to it automatically and that’s not what I want. I want to access point or ad-hoc to remain the main option, this is how I got the best results with OSC.


My first thought was: Perhaps there’s a way to set a variable in config.txt or in cmdline.txt so the Pi knows which Wifi config it should use when it boots. Something easily editable by the end-user. But I’m not sure…

As a simple option, (this is probably what I would do if I was not planning to share my project with other users) I could “simply” take the Pi out of the Eurorack case and connect it with an adaptor via Ethernet (or OTG when it works) each time I need to update it but that doesn’t seem to be really handy.

Thanks.

P.s: there are multiple tutorials that I tried to mix on Internet but most of them are obsolete since /etc/network/interfaces is not used by Raspbian anymore… it’s a bit difficult to find some relevant informations… Hopefully someone can help me on Lines ^^

How about starting out running as a hotspot with a fixed config, then serve a webpage (maybe something like https://github.com/billz/raspap-webgui) that lets you reconfigure it to your liking. Then you can connect to it with your phone or laptop and reconfigure if you need to.

1 Like

Thanks for the link.
Raspap seems to be very complete!
While doing some researches about RaspAP I‘ve also found Comitup. I’m gonna try both :wink: