How to Set up WiFi on the Raspberry Pi

Connecting your Raspberry Pi to the internet is a great way to expand the possible uses of the device and add a whole range of new functionality. There are two ways to configure a wireless connection on the Pi, the easiest and quickest way is via the desktop interface. Alternatively, you can configure the connection via the terminal interface.

 

Via Desktop:

Click on the Wi-Fi button in the top right of the screen, it's the symbol with the three curved lines and a circle. This will then display a list of all of the available wireless networks the Raspberry Pi has detected. Select and click on the network you wish to connect to.

A box will then pop up prompting you to enter the network's password, enter the password and then click the OK box.

 

If the correct password is entered then the icon will flash for a short period while the connection is made. The icon will then change to display the signal strength, when this happens you're ready to use the internet!

 

Via Terminal:

First, we're going to perform a scan to see all of the available wireless network connections. This can be done by entering "sudo iwlist wlan0 scan" into the terminal. This will then output all of the available connections and various details about them. You will need to make a note of the SSID name for the connection you wish to join, you'll also need to know the password for the next step. Please note that these are case sensitive.

Now we know the name and password for the network that we're going to join we need to edit the file where this information is stored. The file can be accessed by entering "sudo nano /etc/wpa_supplicant/wpa_supplicant.conf" into the terminal. Go to the bottom of the file and add:

network={

ssid="XXXXX"
psk="XXXXX"

}

Replacing the X's with the SSID and password found previously.

Save the file which can be done by pressing CTRL + X and then reboot the Raspberry Pi using the "sudo reboot" command. Once the Pi turns back on as long as the details entered were correct then you should be connected to the internet and ready to go!

 

Previous article How to Connect to a Raspberry Pi Remotely Using VNC
Next article SwitchBlox - The Tiny 5 port Ethernet Switch Designed for Robotics

Check out our latest products...

BBC micro:bit Watch - Smart Coding Kit (micro:bit not included) - Micro:bit
24V Power Adapter - DC24V - 5A - Power

24V Power Adapter - DC24V - 5A

£16.99 inc VAT
£14.16 ex VAT
OpenMV Cam H7 Telephoto Lens - Accessories

OpenMV Cam H7 Telephoto Lens

£5.99 inc VAT
£4.99 ex VAT
OpenMV Cam H7 Ultra Wide Angle Lens - Accessories

OpenMV Cam H7 Ultra Wide Angle Lens

£17.99 inc VAT
£14.99 ex VAT
OpenMV Cam H7 IR Lens - Cameras

OpenMV Cam H7 IR Lens

£5.99 inc VAT
£4.99 ex VAT
OpenMV Cam H7 Case - Accessories

OpenMV Cam H7 Case

£7.99 inc VAT
£6.66 ex VAT
Lightning Detector - AS3935 (Qwiic) - Sensor

Lightning Detector - AS3935 (Qwiic)

£20.99 inc VAT
£17.49 ex VAT
Qwiic Keypad - 12 Button - Qwiic

Qwiic Keypad - 12 Button

£8.99 inc VAT
£7.49 ex VAT