Sunday, September 23. 2012
Wi-Fi Pi
Putting the Raspberry Pi into an appliance means that it will not have access to an Ethernet connection and will require USB WiFi.
Which USB Wifi Device?
Adding USB WiFi to a Linux device is generally quite easy however there are limitations which apply to non PC (non x86) applications such as the ARM11 based Raspberry Pi.
The chipset in the WiFi device selected for the Raspberry Pi must be one already supported for the ARM11 device. Simply relying on a chipset vendor to claim Linux support is not enough as this may really mean PC based x86 Linux only. True Linux support means the chipset vendor has made driver source code available to be built for any target CPU.
Two of the best supported chipset vendors are Ralink and Realtek. For my application I have used the 'Netsys Wireless N Model: NET300N' based on the Realtek 8191SU chipset which already as Raspberry Pi driver support using the Realtek r8712u driver.
This USB WiFi device is available from http://dealextreme.com for about $10.
Making It Work
The following two resources provided the general guidelines I used to get the WiFi up and running in my network.
http://mitchtech.net/realtek-wireless-dongle-rt3070-on-the-raspberry-pi/
http://ubuntuforums.org/showthread.php?t=571188
I installed 'lshw' ( apt-get install lshw ) which provides diagnostic information about hardware drivers however as this installation went so smoothly I am not sure this was absolutely necessary.
root@raspberrypi:~# lshw -C network
-network:0
description: Wireless interface
physical id: 1
bus info: usb@1:1.2
logical name: wlan0
serial: 00:0f:11:66:16:d0
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=r8712u multicast=yes wireless=unassociated
-network:1
description: Ethernet interface
physical id: 2
logical name: eth0
serial: b8:27:eb:45:84:2e
size: 100Mbit/s
capacity: 100Mbit/s
capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=smsc95xx driverversion=22-Aug-2005 duplex=full firmware=smsc95xx USB 2.0 Ethernet ip=192.168.10.31 link=yes multicast=yes port=MII speed=100Mbit/s
After manually confirming the following command lines brought up my network,
ifconfig wlan0 down
dhclient -r wlan0
ifconfig wlan0 up
iwconfig wlan0 essid "MYESSID"
iwconfig wlan0 key MYKEY
iwconfig wlan0 mode Managed
dhclient
I then copied thew into '/etc/rc.local' so that the WiFi network would be brought up on boot. An important point for me was that the web article suggests adding the line 'ifconfig eth0 down' to the '/etc/rc.local' file but this would mean that hardwired ethernet would be shutdown and not available should it be needed in an emergency.
The final changes I need to make were to my DHCP server and router configuration so that the 'Pi' always gets a fixed IP address assigned for correct virtual server port forwarding.
Next Steps
You might notice the nice plastic case (from Element14) in the image which will protect the 'Pi' from and ongoing development accidents!
I will now run this setup for a while and look for general stability as a WiFi based web host.
...Robert
(Page 1 of 1, totaling 1 entries)