Freitag, 9. Mai 2014

Connect RaspPI to WiFi

Recently I've ordered two WiFi dongles for my Raspberry PI home project and today I received a parcel.

Prices:
2 x Wireless Adapter Network LAN Card 802.11n/g/b 2.4GHz - $3.41 / piece

Honestly said I had to investigate this topic before purchase, but in fact when I connected it to PI and set up wireless connection I was upset - it seemed not working.



As soon as first shock disappeared, I googled for my problem. The first that I've found was the list of Rasp PI compatible WiFi equipment.

Then I ran following command in the console and found out that the manufacturer in Realtek.

 pi@raspberrypi ~ $ lsusb  
 Bus 001 Device 004: ID 0bda:0179 Realtek Semiconductor Corp.   

After short search I've found this page with very accurate instruction where to find and how to setup adapter drivers.

 pi@raspberrypi ~ $ uname -a  
 Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux  

Using this information I found the driver for my Linux version and installed it.

 pi@raspberrypi ~ $ wget https://dl.dropboxusercontent.com/u/80256631/8188eu-20130830.tar.gz  
 pi@raspberrypi ~ $ tar -zxvf 8188eu-20130830.tar.gz  
 pi@raspberrypi ~ $ sudo install -p -m 644 8188eu.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless  
 pi@raspberrypi ~ $ sudo insmod /lib/modules/$(uname -r)/kernel/drivers/net/wireless/8188eu.ko  
 pi@raspberrypi ~ $ sudo depmod -a  

In my case I also had to slightly change network config.

 pi@raspberrypi ~ $ sudo nano /etc/network/interfaces  

By adding following lines:

 auto wlan0  
 iface wlan0 inet static  
     address 192.168.0.8  
     netmask 255.255.255.0  
     gateway 192.168.0.1  

There is a short article how to setup wifi on RPI via command line.

After rebooting I successfully connected to PI via WiFi, which meant I had one wire less on my desk.

For those of you who want to repeat my experiment I suggest checking adapter model before purchase :) It can save you nerves!

Have fun with your hobbies!

Keine Kommentare:

Kommentar veröffentlichen