How to set up a USB WiFi Adapter on a Raspberry Pi
Edimax WiFi adapters are popular because it's compact, cheap, and most popular pi distributions come with installed drivers. Setting this up through the command line is very simple.
Things to prepare
Here's everything you need to complete this tutorial:
- USB WiFi adapter Edimax EW-7811
- Raspberry Pi
How to set up Edimax USB WiFi Adapter on Raspberry Pi
1. Connect the Edimax WiFi adapter and Ethernet cable
Before starting up the Pi, plug in the USB WiFi adapter as well as the Ethernet cable.
2. Start Pi
To start the Pi, simply plug in the power cable.
3. Enable SSH on the Pi
By default, the Raspberry Pi uses the hostname "raspberrypi". So you can enable SSH using:
ssh pi@raspberrypi
The default username is pi and the default password is raspberry. Refer to the tutorial: How to enable SSH on Raspberry Pi for more details.
If you're having trouble with the hostname, follow this guide to find the IP address for your Raspberry Pi.
4. Make sure the Pi recognizes the device and the drivers are loaded
Once you are logged into the Pi, check to see if the Pi recognizes the USB device using the following command:
lsusb
You should see the following:
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Note the first line.
Now you will check to see if the device driver has loaded. To list kernel modules use:
lsmod
You should see the following:
Module Size Used by cfg80211 rfkill 8192cu bcm2835_gpiomem .
8192cu is what you were looking for and it looks like it is installed.
To check one last time, run:
iwconfig
And you'll see the wireless adapter here:
wlan0 unassociated Nickname:"" Mode:Managed Frequency:2.462 GHz Access Point: 20:3D:66:44:C6:70 Bit Rate:72.2 Mb/s Sensitivity:0/0 Retry:off RTS thr:off Fragment thr:off Power Management:off Link Quality=100/100 Signal level=100/100 Noise level=0/100 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
5. Configure wpa_supplicant using WiFi credentials
Now, open the following file to add the network credentials.
sudo vim /etc/wpa_supplicant/wpa_supplicant.conf
For Raspbian Jessie:
network={ ssid="SSID" proto=RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="PASSWORD" }
For Raspbian Stretch:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev network={ ssid="SSID" proto=RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="PASSWORD" }
Of course, you will need to replace your SSID and password.
6. Reboot
Remove the Ethernet cable and reboot with the following command:
reboot
You should now be able to connect over WiFi.
You should read it
- Instructions on how to use wifi adapter Tenda A9
- Top 10 best Wi-Fi cards
- 6 reasons for slow WiFi dongle speed, poor performance
- Top 10 best Wi-Fi USB 2018
- How to turn off WiFi of Raspberry Pi
- Top 5 Powerline Adapter for the best home network 2018
- How to turn a Raspberry Pi into a WiFi Bridge
- Fix Raspberry Pi not connecting to WiFi / Ethernet
May be interested
- How to add an ADC to Raspberry Pi: What you need to knowraspberry pi lacks analog input. this puts it at a disadvantage compared to microcontroller-based boards like the arduino.
- Raspberry Pi Zero vs Model A and B, how are they different?you want to buy a raspberry pi, but when you search, you have a problem: why are there so many raspberry pi models? although all of the different raspberry pi can do many similar tasks, there are tasks that specific boards will be more suitable for.
- Top 5 Powerline Adapter for the best home network 2018powerline adapters (devices that transfer internet via home electrical systems) are really great. although wi-fi for internet access is not disrupted, sometimes users need a stable and fast wired connection especially when the router's location is in hidden places.
- How to boot Raspberry Pi 4 from USB or over the networkthe raspberry pi is a wonderful, flexible piece of software, capable of a wide range of possibilities, from running a media center to using it as a radio.
- What is the Raspberry Pi and how is the Raspberry Pi used?you can use the raspberry pi as a computer because everything needed has been built in. its broadcom bcm2835 soc processor includes cpu, gpu, ram, microsd card slot, wi-fi, bluetooth and 4 usb 2.0 ports.
- How to start Raspberry Pi 3 from USBraspberry pi is a great, versatile software suite, with a variety of capabilities like running a media center or using as a radio.
- Why should people try Raspberry Pi 4?the new raspberry pi 4 has been released, but do you need to upgrade? is raspberry pi 4 really offering more features than the previous raspberry pi 3 b +?
- This is why you should plug in the network cable when playing games instead of using wifialthough wifi technology has made great progress, it is still inferior to the stability network.
- Raspberry Pi AI Kit: Bring AI to Raspberry Pithe raspberry pi ai kit is essentially raspberry pi's new m.2 hat+ board integrated with the hailo-8l acceleration module.
- Learn Pi Imager, How to Use Raspberry Pi Imagerthe raspberry pi foundation recently released a new application for recording sd cards for the raspberry pi. the new program, called raspberry pi imager, launches march 5, 2020.