You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59-3Lines changed: 59 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,66 @@ Windows app to configure Raspbian SD card image before first boot
5
5
6
6

7
7
8
-
Setting up Wi-Fi on a Raspberry Pi with a display directly connected is usually easy to do in Raspbian. However, if you want to setup a headless Pi or connect to a university's enterprise network, this requires editing configuration files manually and is less straightforward. This app lets you set up Wi-Fi right after flashing an SD card image for your Pi while the SD card is still in your PC.
8
+
Setting up Wi-Fi on a Raspberry Pi with a display connected is usually easy to do in Raspbian. However, if you want to setup a headless Pi or connect to a university's enterprise network, this requires editing configuration files manually and is less straightforward. This app lets you set up Wi-Fi right after flashing an SD card image for your Pi while the SD card is still in your PC.
9
9
10
10
PiBootstrapper can automatically generate the Wi-Fi configuration for both personal and enterprise networks and also enable SSH (Secure Shell) login. After bootstrapping the Pi with this app, it should connect to Wi-Fi right away when it boots and be accessible remotely over the network without any further setup necessary.
11
11
12
-
This app is written in C# and only runs on Windows, but you can manually configure a headless Pi setup on Linux or Mac. See [here](https://raspberrypi.stackexchange.com/a/57023/42551) for instructions on how to create `wpa_supplicant.conf` and `ssh` files on the SD card boot partition (also [here](https://raspberrypi.stackexchange.com/a/24670/42551) if you need to configure `wpa_supplicant.conf` for an enterprise network). If you want to set up more than just Wi-Fi and SSH on the SD card image, try the cross-platform app [PiBakery](http://www.pibakery.org/) which allows all sorts of customizations.
12
+
This app only runs on Windows; follow the instructions below to manually setup a headless Pi on Linux or macOS. If you want to set up more than just Wi-Fi and SSH on the SD card image, try the cross-platform app [PiBakery](https://www.pibakery.org/) which allows all sorts of customizations.
13
13
14
-
Wi-Fi passwords are hashed by the app before storing them on the Pi rather than being written as plain text, allowing you to safely edit `wpa_supplicant.conf` in public without revealing your password. If you want to manually hash the passwords, you can use the [`wpa_passphrase`](https://linux.die.net/man/8/wpa_passphrase) command for WPA Personal networks, or see [here](https://unix.stackexchange.com/a/278948/190213) for WPA Enterprise networks.
14
+
15
+
## Manual Instructions
16
+
17
+
The following instructions explain how to manually configure Wi-Fi and enable SSH on a Raspbian SD card the same way that PiBootstrapper does.
18
+
19
+
**Warning:** If you have already booted your Pi and connected to Wi-Fi networks, creating a `wpa_supplicant.conf` file on the boot partition will overwrite any existing network configuration the next time it boots. In this case, it is recommended to edit the file `/etc/wpa_supplicant/wpa_supplicant.conf` directly on your Pi (requires *sudo* privileges). You can skip creating a new file at the beginning of the next section and only add the `network={...}` portion to the existing one.
20
+
21
+
### Configure Wi-Fi
22
+
23
+
Create a file called `wpa_supplicant.conf` on the SD card boot partition starting with the following lines:
(Replace `{COUNTRY_CODE}` with your 2 character long ISO country code. A list of them can be found [here](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements), some common ones are "US" for United States and "GB" for United Kingdom.)
31
+
32
+
After adding the lines shown above, configure your personal or enterprise wireless network as shown in the corresponding section below.
33
+
34
+
#### WPA/WPA2 Personal
35
+
36
+
Add the following lines to `wpa_supplicant.conf`:
37
+
```
38
+
network={
39
+
ssid="{NETWORK_NAME}"
40
+
scan_ssid=1
41
+
key_mgmt=WPA-PSK
42
+
psk="{PASSWORD}"
43
+
}
44
+
```
45
+
(Replace `{NETWORK_NAME}` and `{PASSWORD}` with the actual values.)
46
+
47
+
If you don't want the network password stored in plain text, run the command `wpa_passphrase {NETWORK_NAME} {PASSWORD}` and use the output as the password (without quote marks around it).
48
+
49
+
#### WPA/WPA2 Enterprise
50
+
51
+
Add the following lines to `wpa_supplicant.conf`:
52
+
```
53
+
network={
54
+
ssid="{NETWORK_NAME}"
55
+
scan_ssid=1
56
+
key_mgmt=WPA-EAP
57
+
eap=PEAP
58
+
identity="{USERNAME}"
59
+
password="{PASSWORD}"
60
+
phase1="peaplabel=0"
61
+
phase2="auth=MSCHAPV2"
62
+
}
63
+
```
64
+
(Replace `{NETWORK_NAME}`, `{USERNAME}`, and `{PASSWORD}` with the actual values.)
65
+
66
+
If you don't want the network password stored in plain text, run the command `echo -n {PASSWORD} | iconv -t utf16le | openssl md4` and use the output as the password with "hash:" added in front of it (and without quote marks around it). This will not work if the password is more than 14 characters long.
67
+
68
+
### Enable SSH
69
+
70
+
Create a blank file with no extension called `ssh` on the SD card boot partition.
0 commit comments