Using pcDuino's WiFi Dongle With the Pi
This Tutorial is Retired!
This tutorial covers concepts or technologies that are no longer current. It's still here for you to read and enjoy, but may not be as useful as our newest tutorials.
Edit wpa_supplicant.conf
wpa_supplicant.conf is a configuration file for wpa_supplicant, a piece of software used to implement WPA and other security protocols that WiFi networks implement.
Before continuing on, you should know what kind of security protocol (WPA, WPA2, WPA-PSK, WPA2-PSK, etc) your network requires. And, obviously, you'll need to know the name (SSID) of your network as well.
Open wpa_supplicant.conf in Nano with this command:
pi@raspberrypi ~ $ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Lot's of typing! For lazy folk, don't forget you can press Tab
to ask the terminal to try to finish a directory location for you.
By default, wpa_supplicant.conf should have two lines at the top:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1
Leave those be, we'll be adding some extra information below them.
Now it's time to "choose your own adventure". What, exactly, you fill this file out with depends on your network's authentication protocols. Here are a few example configurations for the file:
Open Authentication With No Encryption
This is about as basic as it gets. If you're trying to connect to an open network, all you need to know is the SSID:
network={ ssid="yourNetworkSSID" key_mgmt=NONE }
Just replace yourNetworkSSID with your WiFi network's name.
Network with Authentication (WPA, WPA2-PSK, etc)
If your network does require authentication with a passkey, you'll need to enter two parameters:
network={ ssid="yourNetworkSSID" psk="yourNetworkPassword" }
Again, pretty bare bones. This should work for networks using WPA and WPA2-PSK, and should be agnostic to the cipher (TKIP, CCMP).
Non-Broadcasting Network
If your network does not broadcast its SSID, you'll need to add scan_ssid=1 to the list. For example, here's a configuration for a hidden open network with no authentication:
And the Rest...
There are all sorts of options to be added to this configuration list. You can enforce which cipher is accepted, set up priorities, private keys, etc. For a really great breakdown of everything you can add to wpa_supplicant.conf check out this page.
After editing wpa_supplicant.conf make sure to save, and exit. If you hit CTRL+X
it'll prompt you to save before you exit.
The final step is restarting the network interface. Cross your fingers, and hope that all of the settings here are correct, then jump the penultimate page.