I'm trying to set up Pi Zero W as a wireless client in an embedded application that will first allow a user to log in to a hot spot, then select a WiFi router accessible by the Pi, log in to the selected network, and then have the Pi convert to a WiFi client on that network once credentials are accepted. I know how to set up the wireless hot spot, but the rest is a blur.
I found a reference for toggling a hot spot at Disable WiFi (wlan0) on Pi 3. I don't understand how to switch the state of wlan0 and antenna between modes while maintaining contact with the user who has logged in. Help would be much appreciated. Thanks for the responses.
I am trying to follow https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md but get to "To configure the static IP address, edit the dhcpcd configuration file with: " and stuck. There is no file /etc/dhcpcd.conf to edit. I can easily create one, but think I may be missing something.
Sorry for the confusion. Let me try again.
- RPi Zero W is initially set up as stand-alone hot spot and DHCP server. (I know how to do this.)
- User signs in to RPi hot spot.
- RPi then reassigns wlan0 (?) to WiFi client and surveys available WiFi networks.
- RPi loads SSIDs into memory.
- User selects SSID and logs in. RPi records log in information.
- RPi then converts itself from hot spot to WiFi client on the selected network.
I'm trying to do completely wireless what is ordinarily done to select and log into a wireless network while connecting a RPi to a keyboard and mouse.
I understand how to do the individual functions in 1, 2, 4, and 5. Accomplishing 3, and transitions from 2 to 3, and 3 to 4 are beyond me. Does wlan0 get reassigned? Does, for example, /etc/hostapd/hostapd get rewritten several times to accomplish the transitions from hot spot to WiFi client?
Signing on to the RPi hot spot is a one time event, to connect the RPi to the user-managed WiFi. After that, the RPi merely sits on the network and generates video. – fperkins 3 hours ago
I hope that is clearer. Thanks for the help.
2) User signs in to RPi hot spot
to step3) RPi then reassigns wlan0 (?) to WiFi client
should work. If you reassign the hot spot to a client connection then the hot spot is gone and the connected User is kicked out and cannot select a SSID. – Ingo Apr 12 '19 at 23:31