The Raspberry Pi mini computer is so small that those dangling USB cables can make creating projects cumbersome. You can cut out the cable that connects it to the Internet by switching to Wi-Fi. All you need is a compatible USB Wi-Fi adapter, which you can pick up at most electronics and office supply stores. The setup process is simple if you follow the steps below.
For every version of Raspberry Pi prior to the latest Pi 3, connecting to the internet was achieved in one of two ways; connecting via the Ethernet port or using a USB Wi-Fi adapter. Create a Raspberry Pi WiFi Relay December 7, 2014 December 8, 2014 Xavier Linux, Raspberry Pi, Raspbian In this tutorial I am going to show you how to create a WiFi Relay using your Raspberry Pi.
Note that none of the above best Raspberry Pi Wifi adapters in 2014 work well with 5GHz band or Wireless AC. On the good side, all the media center operating systems for Raspberry Pi make it very easy to connect to wireless networks using these RPi Wifi adapters. Adding WiFi adapter to the Raspberry Pi. Plug the USB WiFi adapter into one of the free USB ports on the Raspberry Pi. Power up the Raspberry Pi – remember at this point the WiFi adapter does not work yet. You are still going to need some other means of being able to control the Raspberry Pi either via a keyboard or remotely using a wired.
How to connect the USB Wi-Fi adapter
Before you boot up your Raspberry Pi, make sure the Wi-Fi adapter is plugged in.
- Connect the Wi-Fi adapter to any open USB port on the Raspberry Pi.
- Connect all additional peripherals, like the monitor, keyboard and mouse.
- Connect the Raspberry Pi to its microUSB power source.
When the Raspberry Pi boots up, it will automatically recognize the Wi-Fi adapter if it is compatible.
How to check to make sure Raspberry Pi recognizes your USB Wi-Fi adapter
It is important to make sure your Wi-Fi adapter is compatible with your Raspberry Pi. Adafruit has a list of compatible Wi-Fi adapters for Raspberry Pi, but a Google search will bring a plethora of options. Once your Raspberry Pi has booted up, you can check the boot list to make sure it recognizes your Wi-Fi adapter.
- Select Terminal to open a command window. It is the icon in the upper left corner of the screen that looks like a computer monitor
- When Terminal opens, type the following command: dmesg | more
- Press Enter on the keyboard. A long list of boot code will appear.
- Tap the space bar to page down, about 10 times, until you see the highlighted boot reference below.
This code confirms that Raspberry Pi recognizes the connected USB Wi-Fi adapter. If the highlighted code isn't on the boot list, your Wi-Fi adapter may not be compatible.
How to log on to the local Wi-Fi network
Logging on to the local Wi-Fi network is just about as easy as joining on your home computer.
- Select the Wi-Fi icon in the upper right corner of the screen. A list of nearby networks will appear.
- Select the network you wish to join. A password entry window will appear.
- Enter the Wi-Fi password in the form next to Pre Shared Key.
- Select OK.
You will be logged onto the local Wi-Fi network and ready to go online.
Raspberry Pi
Main
We may earn a commission for purchases using our links. Learn more.
For every version of Raspberry Pi prior to the latest Pi 3, connecting to the internet was achieved in one of two ways; connecting via the Ethernet port or using a USB Wi-Fi adapter.
This article will show you how to set up a USB Wi-Fi adapter with your Pi, using an Edimax EW-7811Un in this example.
Connect Hardware
- Turn off your Raspberry Pi and fit your Wi-Fi adapter into any of the Pi's available USB ports, It doesn't matter which port you use.
- Now is also the time to connect your keyboard and screen if you haven't done so already.
- Turn on your Raspberry Pi and give it a minute to boot up.
Open the Terminal
If your Pi boots to the terminal by default, skip this step.
If your Pi boots to the Raspbian desktop (LXDE), click the Terminal icon in the taskbar. It looks like a monitor with a black screen.
Edit the Network Interfaces File
The first change to make is to add a few lines to the network interfaces file. This sets up the USB adapter to be used, and later on, we will tell it what to connect to.
![Raspberry pi wifi dongles Raspberry pi wifi dongles](/uploads/1/2/6/3/126395053/855111148.jpg)
In the terminal, type in the following command and press Enter:
Your file will already have some lines of text in it, which can be different depending on your version of Raspbian. Regardless, you need to make sure you have the following four lines — some may already be there:
Press Ctrl+X to exit and save the file. You'll be asked if you want to 'save modified buffer', this just means 'Do you want to save the file?' Press Y and then hit enter to save under the same name.
Edit the WPA Supplicant File
This supplicant file is where you tell your Pi which network to connect to, and the password for that network.
In the terminal, type in the following command and press Enter:
Raspberry Pi Wifi Adaptor Driver
There should already be a couple of lines of text in this file. After these lines, enter the following block of text, adding your specific network details where required:
YOUR_SSID is the name of your network. This is the name that comes up when searching for Wi-Fi, like BT-HomeHub12345 or Virgin-Media-6789'.
YOUR_PASSWORD is the password for your network.
You can add multiple blocks if you need your Pi to connect to different networks depending on your location.
Optional Step: Turn off Power Management
If you have any issues with your Wi-Fi adapter dropping connections or becoming unresponsive, it may be the driver's power management setting causing you problems.
You can turn off power management by simply creating a new file with a line of text inside it.
Enter the following command to create this new file:
Then enter the following line of text:
Once again exit the file using Ctrl+X and save under the same name.
Raspberry Pi Wifi Range Extender
Reboot Your Raspberry Pi
That's everything you need to do to set up a Wi-Fi adapter, so now we need to reboot the Pi to put all of these changes into effect.
Type the following command in the terminal to reboot, then hit Enter:
Your Pi should restart and connect to your network within a minute or so.
![Dongle Dongle](/uploads/1/2/6/3/126395053/246420700.jpg)
Troubleshooting
If your Pi doesn't connect, there are a few obvious things you should check:
- Power Supply: Try a different, stronger power supply. Wi-Fi can be demanding on power.
- Adapter: is it fitted properly? The Pi's USB ports can be quite tight at first use.
- Adapter: Is it compatible?
- Network: Is your network up? Are other devices connected?
- Network: Double check the details you entered in the supplicant file.
- Reboot: Try again, just in case.