Raspberry Pi Course wireless

Connecting the Raspberry Pi to a Wi-Fi network is straight forward providing you have a compatible Wi-Fi adapter.

If you do not have a compatible wireless adapter then you can purchased one below from Amazon.

 

Wireless Raspberry Pi adapter Wireless wifi adapter for the Raspberry Pi

 

To achieve this, a file called interfaces needs to be edited with the correct network information.

What is the interfaces file?
The interfaces file holds the information required to give the Raspberry Pi access to the wireless network or a wired network.  The file exists in /etc/network/ folder.

Open a terminal window and enter the following.

$ sudo nano /etc/network/interfaces

Nano will load a file similar to this.

—————————————–

auto lo

 

iface lo inet loopback

iface eth0 inet dhcp
allow-hotplug wlan0

auto wlan0

iface wlan0 inet dhcp

wpa-ssid “YOUR_SSID”

wpa-psk “YOUR-PASSWORD”

—————————————–

Edit the last two lines with your SSID and your password.  Your SSID is the network ID that your Wi-Fi router is broadcasting.  Note that your SSID and password need to appear in between the quotes.

Save the file by pressing CTRL-X followed by Y to overwrite the file.  To be sure that these changes take affect reboot your password by enter the following.

Before continuing, a quick summary of the file is in order.

The word auto  is used to identify the physical interface files that will be brought on or offline.  The line auto wlan0 is an example of this.  It will allow wlan0 to be shut down or brought back online when using commands or when the system boots up.

The iface refers to the interface which is followed by eth0, eth1 or wlan0 etc ,depending on which device it is referencing.    The inet dhcp is informing the raspberry pi that you require an IP address in order to access the network.  Enter the following to restart the system.

$ sudo reboot

If you are still having problems connecting see the troubleshooting page on Raspberry Pi Wireless Network Setup Issues.

Please feed the volunteers

The information on this site has been created by volunteers in their own time because they have a passion to learn and to teach others. If you find this information useful please consider contributing something so that they know their efforts are appreciated.

Raspberry Pi Tutorial Pi Store

Next Raspberry Pi Week 3 – Day 3.0 Raspberry Pi Store >>