When using the Ethernet and a wireless adapter, is it possible to set up the device as a wireless router? If so, what software (and/or additional hardware) would be needed?
|
In principle, yes. You can follow any tutorial for setting up a Linux PC as a router. Useful Tutorials |
|||||||||||||||||||||
|
|
I'll show steps for Arch Linux because that's the distro I'm familiar with, but instructions for Raspbian shouldn't be very different. Note that not all wlan0 interfaces support AP mode. The setup would be
where the RPI is the router (and AP) providing wireless internet from ethernet. Install needed software and drivers.
Build the Router. Build the AP Edit The wireless router should be now working. |
||||
|
|
|
Easily with the RALink RT5370, which works straight in the Pi even with the polyfuses. Full instructions here on my blog - http://sirlagz.net/?p=589 |
|||||||||||
|
|
From my experience of trying to getting my Raspberry Pi working with a RTL8188CU based tiny wifi dongle, there are more troubles than you thought. The major difference here is: The power supply of pi's onboard usb is not enough, since each usb limits to 140mA on pi. While this is enough for using the pi as a "client" connecting to real wifi routers, it is usually not enough to act as one. Although one could probably put the dongle into master mode, it could be very unstable. A possible solution is to bypass the poly fuses. But I have not tried that. Even if the power supply is enough, the linux driver for the wifi dongle is the next problem. The driver in the "official linux kernel" cannot put my dongle as a client. I had to download a driver from Realtek website (the script here is very helpful). Then a program called hostapd is needed to make it a working AP. Someone failed on that. I didn't succeed either, even on a desktop with latest arch linux. In the end, I just gave up. I suggest buying a proper wireless router is the way to go. The pi is just not designed for this kind of task. |
|||||
|
|
Why not install the version of OpenWRT for the rpi? |
|||||||
|
|
Yes, it is definitely possible and there are SD images ready for it: http://www.pi-point.co.uk/ |
|||
|
|
|
In addition to the good points in the other answers: get a WiFi device with good Linux support. You want one that works in access-point or managed mode. Many devices do not work in this mode in Linux, even if they work fine as a client. How well a device works depends on the state of the device driver. Before you buy anything, check the state of the various drivers at linuxwireless.org. Choose a driver with good support (at least the AP mode), then find a device containing that chip. I got a TL-WN722N USB device supported by the ath9k_htc driver. This works very well with hostapd and WPA2 encryption. I wrote a blog post on my wlan router setup here. Regarding the CPU demands mentioned in the comments of the question: I have not had problems with high CPU load. With |
|||
|
|
managedmode. Not sure in practice how it would cope as routing packets is pretty cpu intense. I'd make sure the RAM is split in-favor of the cpu and overclock too turbo. I'd be interested to see the performance if you get it working. – sudo_O Oct 15 '12 at 19:04