I want to setup wifi on my new Pi Zero, and I do not have a powered USB hub. My keyboard/mouse takes up the only USB port, so I do not have another port to add a wifi dongle. I would prefer not to buy anything new. After setting up wifi, I will not need my keyboard/mouse. Is there any way to do this?
-
1Have you tried doing the configuration and then just unplugging the keyboard and plugging in the adapter?– goldilocks ♦Commented Jan 14, 2016 at 17:50
-
How can I do the configuration without a dongle in the pi?– Merlin04Commented Jan 14, 2016 at 17:51
-
1There is nothing that says you must have an interface available in order to configure it for future use. Probably the best introduction we have here right now is this one: raspberrypi.stackexchange.com/q/37920/5538 The exact dongle you have should not matter; if there is a driver available the kernel will identify and load it, then there will be a wifi interface and the appropriate networking configuration will be applied.– goldilocks ♦Commented Jan 14, 2016 at 17:56
-
Sorry, I presumed you were brand new and just noticed you've been here a while, so you obviously have a pi already. If you've used the adapter with that before without a problem, it should be the same on the zero. You could literally copy your config from one to the other. The OS and hardware are still fundamentally the same, the zero is a new form factor.– goldilocks ♦Commented Jan 14, 2016 at 18:00
-
1Good luck. If you get this to work out please leave an answer of your own!– goldilocks ♦Commented Jan 14, 2016 at 18:14
1 Answer
goldilocks left a comment that had a link to another question. The answer to that question led me to https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md. The way you configure wifi without a dongle plugged in is to append this to your /etc/wpa_supplicant/wpa_supplicant.conf
file:
network={
ssid="Your_wifi_name"
psk="Your_wifi_password"
}
Replace Your_wifi_name
with your wifi name, and Your_wifi_password
with your wifi password.
Then, turn off your Pi. Plug in your wifi dongle and turn the Pi on again. It should connect to the network.