In order to configure WIFI in Raspbian Stretch, you will need to connect to your Pi via SSH (see the KB Article HERE) or attach a keyboard and monitor to your Pi (see the KB Article HERE).

 

 

 

 

There are a couple of options to configure WIFI in Stretch.

Option 1: Use the raspi-config utility.

***WARNING – THIS OPTION WILL STORE YOUR PSK IN THE CONFIG FILE IN CLEAR TEXT***

While logged in to your Pi’s console enter the following:

sudo raspi-config

Remember, anytime you enter ‘sudo’ then a command it will ask you for a password. This is the password you used when you logged in to your pi.

Down arrow to ‘2 Network Options’ and hit <Enter>.

Down arrow to ‘N2 WI-FI’ and hit <ENTER>.

Type in the SSID of your wireless network hit <Tab> then hit <Enter>.

Type in your PSK hit <Tab> then hit <Enter>.

This takes you back to the main menu of raspi-config. Hit <Tab> then right arrow to ‘<Finish>’ and hit <Enter>.

To view your IP Address for your wireless adapter type:

ifconfig wlan0

Option 2: Configure the WIFI via the command line.

sudo su
wpa_passphrase "MySSID" "MyPASSWORD" >> /etc/wpa_supplicant/wpa_supplicant.conf

Of course, you will need to change “MySSID” and “MyPASSWORD” to the SSID and PSK of your wireless network.

Now we need to modify wpa_supplicant.conf

nano /etc/wpa_supplicant/wpa_supplicant.conf

This command opens the nano editor.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
        ssid="MySSID"
        #psk="MyPASSWORD"
        psk=e1e39a54ca2bcad2e28622d7371c3bd8995f14648d57068406953f37052a1d1c
}

Remove the line with the clear text password by getting to the beginning of the line and type <Control>+k. Then type <Control>+x and answer “y” <Enter> to save the file.

In order to use the newly configured WIFI, you will need to enter the following:

wpa_cli reconfigure

If you entered everything correctly, your WIFI should be up and running. To confirm, check your IP Address:

ifconfig wlan0

 

Article by: Andy Delgado, KE5EXX

in Networking
Did this article answer your question?