Last active
February 13, 2019 13:45
-
-
Save jottr/428a7f53e30c24f7790f0bf413e97609 to your computer and use it in GitHub Desktop.
Revisions
-
jottr revised this gist
Feb 13, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Use [etcher](https://www.balena.io/etcher/) to flash the image to SD. dtoverlay=dwc2 ``` - Safely eject the sd card. On Mac: `$ diskutil eject /Volumes/boot` - Connect the _innermost_ USB port to the USB on your host. -
jottr revised this gist
Feb 13, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Use [etcher](https://www.balena.io/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`, add `modules-load=dwc2,g_ether` after `rootwait` - Add the following to `config.txt`: ``` # Enable OTG dtoverlay=dwc2 -
jottr created this gist
Feb 13, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,67 @@ # How to set up the Raspberry Pi Zero W with SSH and Wifi Download [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) Use [etcher](https://www.balena.io/etcher/) to flash the image to SD. ## Prepare the SD Card - Mount the SD and `$ cd /Volumes/boot/` - `$ touch ssh` to enable ssh server on the PI - Edit `cmdline.txt`, add `modules-load=dwc2,g_ether` after `rootwait` - Edit `config.txt`: ``` # Enable OTG dtoverlay=dwc2 ``` - Safely eject the sd card: `$ diskutil eject /Volumes/boot` - Connect the _innermost_ USB port to the USB on your host. - Wait ~90 sec - Connect via `$ ssh [email protected]`. Password is `raspberry` ## Setup Wifi 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 ``` ### Further info on how to connect to wifi from the commandline can be found on the Arch Wiki: - https://wiki.archlinux.org/index.php/WPA_supplicant - https://wiki.archlinux.org/index.php/Wireless_network_configuration