Tons of hacks going around these days about setting your raspberry pi as a wifi router. But the difficulty is, there’s no plug and play solution. It all depends on your wifi dongle, version of raspbian, etc.
Doing this with the intention of completing this article: http://www.makeuseof.com/tag/how-to-make-a-wifi-network-that-only-transmits-cat-pictures-with-a-raspberry-pi/
I’m gonna write about what worked for me. First off I’m using an edimax dongle. It’s cheap and easy, except they say you can’t become an access point with it.
Wrong.
Ok let’s get started. First off follow the directions here: http://www.makeuseof.com/tag/build-your-own-safeplug-tor-proxy-box/ until you get to the line where you actually test to see if it worked. this line:
sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
It will fail, giving you an error about “nl80211”. That’s ok, we just don’t have the drivers we need for edimax. This is because they actually have a version of hostapd they want you to use instead. There’s a precompiled app here: http://www.daveconroy.com/turn-your-raspberry-pi-into-a-wifi-hotspot-with-edimax-nano-usb-ew-7811un-rtl8188cus-chipset/. Here’s what you do:
wget http://www.daveconroy.com/wp3/wp-content/uploads/2013/07/hostapd.zip unzip hostapd.zip sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.bak sudo mv hostapd /usr/sbin/hostapd.edimax sudo ln -sf /usr/sbin/hostapd.edimax /usr/sbin/hostapd sudo chown root.root /usr/sbin/hostapd sudo chmod 755 /usr/sbin/hostapd
Now we have hostapd with the correct driver. Let’s update our hostapd config file:
sudo pico /etc/hostapd/hostapd.conf
Comment the old drive line and add in the new one, should look like this:
#driver=nl80211 driver=rtl871xdrv
Now restart your pi:
sudo reboot
When you get back in, let’s test the wifi before we add it to services:
sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
If that worked, you’re all set, you should be able to connection to a network name “PiTest” or whatever you changed the ssid to be. If everything is grand, let’s make it permanent by adding to our services and start on boot.
sudo service hostapd start sudo service isc-dhcp-server start sudo update-rc.d hostapd enable sudo update-rc.d isc-dhcp-server enable
I’ve also uploaded an exact copy of the pi image with this setup here: https://s3-us-west-2.amazonaws.com/iwearshorts-pi-images/pi-wifi.img
Just in case you don’t feel like mucking around with it… 🙂
The resources I used to get this going:
http://www.makeuseof.com/tag/build-your-own-safeplug-tor-proxy-box/
http://sirlagz.net/2013/02/10/how-to-use-the-raspberry-pi-as-a-wireless-access-pointrouter-part-3b/
http://www.raspberrypi.org/forums/viewtopic.php?f=36&t=16849
http://www.raspberrypi.org/forums/viewtopic.php?f=36&t=63048