I followed these wonderful instructions on setting up wifi-direct, but now I need to be able to set up regular wifi after that.

Here's what I'm trying to do. Trying to set up the Pi Zero W to do what a chromecast does on initial setup. It defaults to wifi-direct upon startup, then you connect to it via a phone app (I might just use a browser), and provide your home/office wifi credentials. From there, I need to add those credentials to ... ? what, wpa-supplicant config? and connect based on those creds.

Its that last part I'm struggling with. After I supply the wifi creds, what needs to change to connect to regular wifi?

Part of the instructions on the referenced page includes disabling classic networking. I don't care if I have to re-enable classic networking to do it, or just modify the configs for the "new" way its doing it. I just need to be able to script it.

  • I don't know what a chromecast does on initial setup. How do you get the home/office wifi credentials? Are they just presented on the screen and you have to type it into the connection manager? You cannot mix classic networking with systemd-networkd. If you decide to use classic networking then you have to do it also with wifi-direct. – Ingo Apr 29 '19 at 17:19
  • I get the credentials by typing them into a web form after the phone or mobile device connects via wifi-direct. I actually do a scan of the wifi SSIDs within range with iwlist to populate a drop-down. and then ask for the password. I don't mind if I have to write a script to completely back out the entirety of the changes that were made to do wif-direct. I just don't know how to "undo" it. – user281956 Apr 30 '19 at 22:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.