DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. IoT
  4. How to Install a Wireless USB Network Card on Raspberry Pi

How to Install a Wireless USB Network Card on Raspberry Pi

Installing a WiFi module is quite easy on Raspberry Pi. Berry easy indeed.

Jeremy Morgan user avatar by
Jeremy Morgan
CORE ·
Apr. 09, 16 · Tutorial
Like (8)
Save
Tweet
Share
5.81K Views

Join the DZone community and get the full member experience.

Join For Free


I have recently completed a course called "Hands on Internet of Things" that takes you step by step through actual projects with a Raspberry Pi. I am offering a special code for DZone readers to get the full 3 hour course for only $10!! Click here to redeem it!

Today I’m going to show you how to install a wireless networking card on your Raspberry Pi. I’m using the ultra cheap Ralink wireless card, but the instructions are similar for any Wireless Device.

Update Your System

For this tutorial I’m using Raspian. This is a great beginner OS for the Pi and quite easy to use.

You’ll want to make sure you’re at least wired in so you can do an update:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove

Get Started

We’re going to do this from SSH, though it’s easier to do from the desktop. But you got a Raspberry Pi to learn didn’t you? Many people use their pi strictly over SSH and don’t run a desktop at all. I have decided to include those kinds of instructions rather than do it the graphical way.

1. Plug in your USB device and find it

Once plugged in, again we’ll look at our USB devices:

lsusb

It looks like in my case it’s installed, so now we’ll make a copy of the WPA supplicant file:

sudo cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf.bak

Now open up the file:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

And add the following:

network={
    ssid="[YOUR NETWORK SSID]"
    psk="[YOUR NETWORK PASSWORD]"
}

It should look like this:

Now, save the file. CTRL + X - Save “Y”

Start up Your Adapter

Now we need to stop the wlan service:

sudo wpa_action wlan0 stop

Then bring it back up:

sudo ifup wlan0

Test Connectivity

sudo wpa_cli status

You should see something like this:

If not, double check your network SSID and Password, that’s the most common problem. You may have a card that isn’t supported by the Raspberry Pi, if not get a new one! They’re super cheap and well worth it.

Conclusion

I hope this has helped to show you how to install a wireless USB card on the Raspberry Pi. Raspian has a lot of firmware already built in and a lot of USB Wifi adapters are supported right out of the box. Wpa_supplicant makes things really easy. I decided to show how to do it from the prompt for those who want to learn more about the prompt, or install from SSH.

The Raspberry Pi is all about learning so I encourage you to experiment with this stuff as much as possible. The worst that will happen is you’ll need to reinstall the OS. Remember, you’re learning Linux at the same time which opens a lot of doors for your projects. Enjoy!

Do You Like My Rasbperry Pi Tutorials?

I’m constantly hacking on stuff with the Raspberry Pi. Get notified when I post a new article! Sign up for the Raspberry Pi Newsletter spam free! 

Or follow me on GitHub!

USB raspberry pi Cards (iOS) Network

Published at DZone with permission of Jeremy Morgan, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • ChatGPT: The Unexpected API Test Automation Help
  • Load Balancing Pattern
  • Stream Processing vs. Batch Processing: What to Know
  • An Introduction to Data Mesh

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: