How to set-up Wireless on your Raspberry Pi

Step 1: Configuring WLAN Connection

Connect you USB Wifi adapter to your Raspberry Pi. Also, ensure that you are already connected to Ethernet cable. Boot your Pi int GUI and open the terminal window. Either directly on the Pi or through SSH.

Next, check that the USB dongle is detected by your Raspberry Pi – enter the command lsusb and check the results. The Wi-Fi device should be listed as shown below:

On the desktop, double-click WiFi Config and select wlan0 as the adapter. On the Current Status tab click Scan and wait for the results. All nearby wireless networks will be listed in a new window.

Select the network you wish to connect to, enter the password in the PSK field and then click Connect. Within seconds, your Raspberry Pi should be connected relentlessly, and you can remove the Ethernet cable.

Step 2: Ensuring Wireless Adapter Connects At Start-up

When you re-boot or shut down and start your Pi again, wireless adapter will not automatically connect. Therefore, if you try to connect via SSH or VNC you will not be able to do so.

To resolve this problem, we will modify network interface file. follow the following steps in your terminal window.

sudo cp /etc/network/interfaces /etc/network/interfaces.old

This will copy the existing interfaces file, renaming it to interfaces.old. If any problem occur with the edits you make, the original can be renamed and restored.

Next, open the interfaces file in a text editor such as vi:

sudo vi /etc/network/interfaces

Update the section dedicated to your wireless device, replacing as mentioned below:

auto wlan0

allow-hotplug wlan0

iface wlan0 inet manual

wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

sudo shutdown -r now

After the change restart the Pi. Refer the screenshot below:

When the device reboots, the USB wireless dongle will automatically connect to the previously configured network!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.