ayanez17
Posts: 5
Joined: Tue Aug 21, 2018 9:44 pm

Connecting to RPi as an Access Point to set up regular wifi

Tue Jul 28, 2020 8:11 pm

In a lot of smart devices, you connect to that device as a wireless Access Point, once connected you can then set up and transfer you wifi credentials to it, which then allows you're smart device to connect to your home wifi.

Is it possible to do this with a Raspberry Pi?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Connecting to RPi as an Access Point to set up regular wifi

Tue Jul 28, 2020 8:44 pm

RaspiOS has a function where you can put your wpa_supplicant.conf file in /boot (which appears as E:\ on Windows) and at boot time it will move that to /etc/wpa_supplicant/wpa_supplicant.conf then restart WiFi networking.

So you create a file with Notepad++ like

Code: Select all

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
        ssid="myNetworkSSIDhere"
        psk="myNetworkSecretPasswordHere"
}
That's a whole bunch easier that trying to do the Chromecast thing, "If I can't find an STA network - I start a AP network to collect credentials".
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

ayanez17
Posts: 5
Joined: Tue Aug 21, 2018 9:44 pm

Re: Connecting to RPi as an Access Point to set up regular wifi

Tue Jul 28, 2020 8:52 pm

The issue is that if you're creating a consumer product you have to make it so that they can connect it to their own wifi, and if they change wifi credentials you have to have a system in place to allow them to change their credentials.

Return to “Networking and servers”