|
| 1 | +Wifi-README.txt |
| 2 | +############### |
| 3 | + |
| 4 | + |
| 5 | +Due to changes in Raspberry Pi OS, which OS_NAME is based on, |
| 6 | +there is no longer a OS_NAME-wpa-supplicant.txt available. |
| 7 | + |
| 8 | +How do I setup a (new) network on my Pi ? |
| 9 | +----------------------------------------- |
| 10 | + |
| 11 | +As described in the original Raspberry Pi OS documentation. |
| 12 | +See https://www.raspberrypi.com/documentation/computers/configuration.html#setting-up-a-headless-raspberry-pi. |
| 13 | + |
| 14 | + |
| 15 | +Quote: |
| 16 | + You will need to define a wpa_supplicant.conf file for your particular wireless network. |
| 17 | + Put this file onto the boot folder of the SD card. |
| 18 | + When the Raspberry Pi boots for the first time, |
| 19 | + it will copy that file into the correct location in the Linux root file system |
| 20 | + and use those settings to start up wireless networking. |
| 21 | + |
| 22 | + The Raspberry Pi’s IP address will not be visible immediately after power on, |
| 23 | + so this step is crucial to connect to it headlessly. |
| 24 | + Depending on the OS and editor you are creating this on, |
| 25 | + the file could have incorrect newlines or the wrong file extension, |
| 26 | + so make sure you use an editor that accounts for this. |
| 27 | + Linux expects the line feed (LF) newline character. |
| 28 | + |
| 29 | +What does that all mean? What do I have to do now? |
| 30 | +---------------------------------------------- |
| 31 | + |
| 32 | +First, ensure you have a proper text editor of your choice. |
| 33 | +Recommendations are Notepad++, VSCode, Atom or SublimeText. |
| 34 | + |
| 35 | +################################################################################ |
| 36 | +#### IMPORTANT! ATTENTION! #### |
| 37 | +################################################################################ |
| 38 | + |
| 39 | +!!!!! HEADS-UP WINDOWS USERS !!!!! |
| 40 | +---------------------------------- |
| 41 | + |
| 42 | +Do not use Wordpad for editing this file, it will mangle it and your |
| 43 | +configuration won't work. Use a proper text editor instead. |
| 44 | + |
| 45 | +!!!!! HEADS-UP MacOS X USERS !!!!! |
| 46 | +--------------------------------- |
| 47 | + |
| 48 | +If you use Textedit to edit this file make sure to use "plain text format" |
| 49 | +and "disable smart quotes" in "Textedit > Preferences", otherwise Textedit |
| 50 | +will use none-compatible characters and your network configuration won't work! |
| 51 | + |
| 52 | + |
| 53 | +1.) Open your chosen text editor and create a new file called |
| 54 | + |
| 55 | + wpa_supplicant.conf |
| 56 | + |
| 57 | +2.) Create a basic configuration. This has to be in place! |
| 58 | + |
| 59 | + ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev |
| 60 | + country=<Insert 2 letter ISO 3166-1 country code here> |
| 61 | + update_config=1 |
| 62 | + |
| 63 | +Valid Country Codes are: |
| 64 | + |
| 65 | + GB (United Kingdom) |
| 66 | + FR (France) |
| 67 | + DE (Germany) |
| 68 | + US (United States) |
| 69 | + SE (Sweden) |
| 70 | + |
| 71 | +For a full list, please visit https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 |
| 72 | + |
| 73 | +2.1) If you plan to use multiple WiFi networks, also add |
| 74 | + |
| 75 | + ap_scan=1 |
| 76 | + |
| 77 | +to the mentioned basic configuration. |
| 78 | + |
| 79 | + |
| 80 | +3.) Setup your "network" block. |
| 81 | + |
| 82 | +For detailed information, please consult: |
| 83 | +https://linux.die.net/man/5/wpa_supplicant.conf |
| 84 | +or |
| 85 | +https://wiki.debian.org/WiFi/HowToUse#wpa_supplicant |
| 86 | +or |
| 87 | +https://man.archlinux.org/man/wpa_supplicant.conf.5 |
| 88 | + |
| 89 | +Examples: |
| 90 | + |
| 91 | +Open or unsecured WiFi network: |
| 92 | +------------------------------- |
| 93 | + |
| 94 | +# Open/unsecured |
| 95 | +network={ |
| 96 | + scan_ssid=1 # Used to find hidden SSID's |
| 97 | + ssid="put SSID here" |
| 98 | + key_mgmt=NONE |
| 99 | +} |
| 100 | + |
| 101 | +------------------------------- |
| 102 | + |
| 103 | + |
| 104 | +WEP "secured" network: |
| 105 | +------------------------------- |
| 106 | + |
| 107 | +NOTE: |
| 108 | + |
| 109 | + WEP can be cracked within minutes. If your network is still relying on this |
| 110 | + encryption scheme you should seriously consider to update your network ASAP. |
| 111 | + |
| 112 | +network={ |
| 113 | + ssid="put SSID here" |
| 114 | + key_mgmt=NONE |
| 115 | + wep_key0="put password here" |
| 116 | + wep_tx_keyidx=0 |
| 117 | +} |
| 118 | +-------------------------------- |
| 119 | + |
| 120 | + |
| 121 | +WPA2 Personal secured network: |
| 122 | +(Please don't use WPA secured networks, WPA isn't secure anymore) |
| 123 | +-------------------------------- |
| 124 | + |
| 125 | +# WPA/WPA2 secured |
| 126 | +network={ |
| 127 | + scan_ssid=1 # Used to find hidden SSID's |
| 128 | + ssid="<Name of your wireless LAN>" |
| 129 | + psk="<Password for your wireless LAN>" |
| 130 | + proto=RSN |
| 131 | + key_mgmt=WPA-PSK |
| 132 | + pairwise=CCMP |
| 133 | + auth_alg=OPEN |
| 134 | +} |
| 135 | +-------------------------------- |
| 136 | + |
| 137 | +For the WPA2 Enterprise setup, please use your google-foo. |
| 138 | +This is an advanced topic! |
| 139 | + |
| 140 | +4.) Put that file on to the "/boot" partition, |
| 141 | +this partition is FAT32 formatted and should be visible if you plug the SD Card into your computer. |
| 142 | + |
| 143 | +If you created a file while the Pi was running, copy that file to boot. |
| 144 | +Assuming you created the file in your users "home" directory use |
| 145 | + |
| 146 | + sudo cp -v wpa_supplicant.conf /boot/ |
| 147 | + |
| 148 | +5.) Almost done... Please reboot the pi and wait for it to connect. |
| 149 | + |
| 150 | +NOTE: |
| 151 | + |
| 152 | +Attach a screen and watch the console output to get its IP address or |
| 153 | +consult your router setup page to grab that information. |
| 154 | + |
| 155 | +You could also try to reach it by its hostname. |
| 156 | + |
| 157 | + http://<yourpisname>.local |
| 158 | + |
| 159 | +If you didnt change the hostname during initial flash, you could use |
| 160 | + |
| 161 | + http://OS_NAME.local |
| 162 | + |
| 163 | +6.) Enjoy OS_NAME :) |
0 commit comments