Connecting Raspberry Pi to Wifi
Introduction
First you must connect the wifi dongle you received from mindsensors to a usb socket in your Raspberry Pi. You can either download our PiStorms image which has the drivers already installed HERE, if you have downloaded our PiStorms image skip to STEP 6. If you need to download the correct drivers use STEPS 1-6.
Instructions
Driver installation -- Skip to step 6 if you have a newer version of Rasbian (Jessie, some later wheezy images, PiStorms image from mindsensors.com)
STEP 1 - Connect the wifi module to your raspberry pi and enter the command “lsusb” you should see the device labeled
0bda:0179 Realtek Semiconductor Corp.
STEP 2 - Enter the command “uname -a” this will show you the current version of Linux your Raspberry Pi is using, for example mine is:
“Linux raspberrypi 3.18.7+ #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015 armv6l GNU/Linux”
STEP 3 - We need to download the drivers which can vary depending on the version of Linux you are running and whether you have a Raspberry Pi or a Raspberry Pi 2. I am using a Raspberry Pi 1 model B. So the file I would need to get is 8188eu-20150212.tar.gz, because the version of linux I am running is 3.18.7+ #755 you can find a complete list of the correct driver files corresponding to the linux version HERE, thanks to MrEngman at raspberrypi forums.
STEP 4 - We now to issue the command to actually download the correct driver enter:
wget https://dl.dropboxusercontent.com/u/80256631/”file from previous step here
so for example the command I would enter is:
wget https://dl.dropboxusercontent.com/u/80256631/8188eu-20150212.tar.gz
now just unzip the file you downloaded by issuing the command:
tar xzf “file from previous step here”
so for example I issued the command:
tar xzf 8188eu-20150212.tar.gz
now just install the driver by issueing the command:
./install.sh
STEP 5 – Reboot your Raspberrypi
Wifi Setup
STEP 6 – Issue the command:
sudo ifup wlan0
STEP 7 – Enter:
wpa_cli scan
Now enter:
wpa_cli scan_results
Identify which ssid is the network you are trying to connect to.
Under the flags section you should see your network security type WPA, WPA2, or WEP in the list beside your ssid (you will not see any scurity type if your network is open)
STEP 8 – Now you must edit the wifi configuration file to do this issue the command:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
If you have a WEP security type format the file as (keep your ssid inside quotations)
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="Your ssid here" scan_ssid=1 key_mgmt=NONE wep_tx_keyidx=0 wep_key0= your network password here }
if you have a WPA or WPA2 security type format the file as (keep your ssid inside quotations)
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="Your ssid here" scan_ssid=1 key_mgmt=WPA-PSK psk=your network password here }
if you have a open network you are connecting to format the file as (keep your ssid inside quotations)
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="Your ssid here" key_mgmt=NONE }
After formatting the file correctly, use the shortcut Ctrl+x, then press “y” to save changes.
STEP 9 – Now just issue the command:
sudo reboot
STEP 10 – Now check to see if you are connected to the network by using command ifconfig
You should see an IP address on the second line.