Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
36
1
This looks like a good tutorial (I have not tried it, having no desire for the functionality). I have a couple of concerns - you seem to be logged as root; the Raspbian does not have root a/c and there is no explanation. Why "# cat >/etc/wpa_supplicant/wpa_supplicant-wlan0.conf <<EOF" when you could just list the files (and use sudo to copy)?
@Milliways There are a couple of commands they all must be prefixed with sudo. To simplify it I like to work in a shell with user environment but with root rights. You can simply invoke this with sudo -Es. You will find it in the steps and you will find also an exit (if not rebooting).
@Ingo if I intend to use wifi for configuring wifi. That is, have a REST API on ap0 which accepts the wifi credentials that wlan0 should connect to, then will I be able to change the wpa_supplicant.conf entries and connect RPi to that wifi without reboot? I am running into problems with the other setup of dual mode wifi after I change the ssid and password in wpa_supplicant.conf on the fly and then do ifdown and ifup on the wlan0 interface. The ap0 no longer accepts connections and even the wlan0 keeps connecting disconneting every 2 seconds... so basically everthing stops working.
@thewebjackal To manage wpa_suppliant as service, e.g. start, stop, restart, enable, disable etc, I would use systemd. This way systemd always nows the state of the service. To manage details of wpa_supplicant, e.g. dynamically add a network, force to connect to a specific hotspot etc., I would use wpa_cli. In general: if possible, use systemctl.
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
complete the sentence: my question is about...
use tags that describe things or concepts that are essential, not incidental to your question
sudo. To simplify it I like to work in a shell with user environment but with root rights. You can simply invoke this withsudo -Es. You will find it in the steps and you will find also anexit(if not rebooting).