Download Raspbian
Use etcher to flash the image to SD.
- Mount the SD and
$ cd /Volumes/boot/
$ touch ssh
to enable ssh server on the PI- Edit
cmdline.txt
, addmodules-load=dwc2,g_ether
afterrootwait
- Add the following to
config.txt
:
# Enable OTG
dtoverlay=dwc2
-
Safely eject the sd card. On Mac:
$ diskutil eject /Volumes/boot
-
Connect the innermost USB port to the USB on your host.
-
Wait ~90 sec
-
Connect via
$ ssh pi@raspberrypi.local
. Password israspberry
Note that the Zero W only supports 2.4 Ghz networks.
# cat /etc/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
# AES
network={
ssid="<SSID>"
psk="<PASSPHRASE>"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
auth_alg=OPEN
}
Automatically connect via wpa_supplicant
and obtain an IP:
# cat /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp