I've been looking for a concise article on how to get the raspberry pi zero w setup through the Wi-Fi and locale issues that everyone seems to be having. Since I did not find one, I figured I would give it a shot.
It seems that the integrated Wifi does not work out of the box and an update is required. The below steps will walk you through how to do that using a separate usb wireless card. This is the only way I've figure out how to get the Zero W working.
Prerequisites:
Raspberry Pi Zero W
Jessie Lite flashed to SD Card
USB wireless card (I have TP-Link TL-WN722N)
Bluetooth Keyboard
USB Keyboard
Micro USB to USB adapter
Monitor
Power
Two keyboards are required because there is only one spare USB on the Raspberry Pi Zero W (PiZW). If you have a duel adapter/hub that works you can do away with the Bluetooth keyboard and a few of the steps.
1. Plugin the monitor, USB Micro to USB adapter (all future references to usb keyboard and usb wireless devices assume you are using the appropriate adapter), plugin keyboard and finally plug in the power. Let the PiZW boot and go through its initial setup phase.
2. Once complete, login with the default username and password. (This article has info on setting up a new user if interested: dimabobkov.blogspot.com/2015/11/install ... essie.html)
Username: pi
Password: raspberry
3. Connect the Bluetooth keyboard - Agent will confirm Bluetooth is running.
Code: Select all
$ bluetoothctl
$ power on
$ agent on
Code: Select all
$scan on
Code: Select all
$connect XX:XX:XX:XX:XX:XX
Type something to confirm it works. Remember the MAC address as we will need it in the next step.
4. Update crontab to auto reconnect Bluetooth keyboard (I set the Bluetooth keyboard to connect mode during the 'enable Interface' step on bootup, it connects shortly afterwards, prior to dhcp step).
Code: Select all
$ sudo crontab -e
Code: Select all
@reboot sleep 5 && /bin/echo -e 'connect XX:XX:XX:XX:XX:XX \n quit \n' | bluetoothctl
5. Shutdown, swap wired usb keyboard for wireless usb card.
Code: Select all
$ sudo shutdown -h -P now
7. Setup wireless card - someone confirm this step, it is the only part I don't remember
Code: Select all
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
It should look like this:
Code: Select all
network={
ssid="Your WiFi name"
psk="Your WiFi password"
}
To find out which device is your usb card - mine was wlan1
Code: Select all
$ifconfig
Code: Select all
$iw wlan1 link
9. Update and upgrade - the -y is auto Yes to upgrade prompts. Leave off if you want to verify upgrade before proceeding.
Code: Select all
$ sudo apt-get update && upgrade -y
$ sudo apt-get dist-upgrade
10. Install rpi-update and run
Code: Select all
$ sudo apt-get install rpi-update
$ sudo rpi-upgrade
This is required because raspi-config doesn't behave well with Bluetooth keyboards.
Code: Select all
$ sudo shutdown -h -P now
12. Turn on PiZW and login - using the usb keyboard
13. Update Locales, timezone, and keyboard layout
Code: Select all
$sudo raspi-config
Update Locale, Timezone, and Keyboard layout using arrow keys to navigate, spacebar to select/deselect options and Enter to proceed/Save
alternate keyboard instructions.
Code: Select all
$ sudo nano /etc/default/keyboard
Variant and Options blank
Not sure about backspace=guess
Should look like this:
Code: Select all
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
14. Run wpa_passphrase to get psk keyboard and pipe to /etc/network/interfaces
Complained about /etc/network/interfaces if you just do sudo wpa_passphrase...
Code: Select all
$ sudo -i
$ wpa_passphrase "SSID" >> /etc/network/interfaces
15. Edit interfaces with new psk key
Code: Select all
$sudo nano /etc/network/interfaces
Code: Select all
auto wlan0
iface wlan0 inet dhcp
wpa-ssid {ssid}
wpa-psk {password}
Should look like this (at the bottom of the file, ignore everything above it):
Code: Select all
auto wlan0
iface wlan0 inet dhcp
wpa-ssid MySSID
wpa-psk xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
16. (Optional) Reboot
Code: Select all
$ sudo shutdown -r now
17. Confirm the onboard wifi is working - after login
Code: Select all
$ iw wlan0 link