Social Icons

Tuesday, March 5, 2013

Implementation of the Raspberry Pi WiFi

Not wanting to pull the network cable into the room, I looked for the Raspberry Pi connect via a USB WiFi WiFi. It's very simple, here's how to proceed.

wifilogo.png
Choice of WiFi key

At first, I had to choose the WiFi key to put on my Raspberry. I wanted a key automatically recognized Raspbian, which is cheap and supports low power Raspberry.

To make my choice, I helped on this page that lists compatible devices Raspbian. After a ride on some websites, I chose the key WiFi TP Link TL-WN725N. This key does not cost much (about € 10) and "Works out of the box on 2012-12-16 Raspbian without a powered USB hub." according to the compatibility page. Perfect!
TL-WN725N-06.jpg
 
Configuring the WiFi key

Once the key is connected to the Rasberry, its configuration is very simple, in the file / etc / network / interfaces, I just had to add these lines:

allow-hotplug wlan0
iface wlan0 inet static
address 192.168.0.150
netmask 255.255.255.0
gateway 192.168.0.1
wpa-ssid "my SSID"
wpa-psk "my password"


As you saw, I decided to put a fixed IP address for my Raspberry (192.168.0.150). If you want to allocate a dynamic IP WiFi, you must add these lines instead:

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "my SSID"
wpa-psk "my password"


Ifdown wlan0 then a small ifup wlan0 and then everything will be in place. You can check with ifconfig.

This configuration works well for two weeks, my running Raspberry 24h/24 only WiFi broadcastant webcam online. I have no problem and no power outage.

No comments:

Post a Comment