Pi Blog‎ > ‎

Opening credits - Raspberry Pi wireless router

posted 19 Dec 2013, 06:22 by Tom Cooper
Raspberry Pi wireless access point
This is going to be a blog of my various extremely random Raspberry Pi projects. Just to be authentic, this page is being created via a Raspberry Pi configured as a wireless router (see left).

This took about half an hour or so. The instructions at http://elinux.org/RPI-Wireless-Hotspot are pretty complete. The only slight issue I had was getting the Edimax Nano USB EW-7811Un I have to go in to access point mode.

There is a solution to this provided by Dave Conroy at http://www.daveconroy.com/turn-your-raspberry-pi-into-a-wifi-hotspot-with-edimax-nano-usb-ew-7811un-rtl8188cus-chipset/ - just follow the bit to do with installing the hostapd package itself. Don't follow any of the configuration stuff - unless of course you just want a wireless bridge, not a full-on access point.

My only added suggestion is that my DHCP server was failing to start because the wireless interface wasn't yet up and running. This is the error message from the syslog file:

raspberrypi udhcpd[2500]: can't open '/var/lib/misc/udhcpd.leases': No such file or directory

I'm no expert in this area, but I fixed it by moving the service start command to the post-up part of the /etc/network/interfaces file, which now reads like this (the extra bit in yellow):

auto lo

iface lo inet loopback
iface eth0 inet dhcp

#allow-hotplug wlan0
iface wlan0 inet static
address 192.168.42.1
netmask 255.255.255.0
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp

up iptables-restore < /etc/iptables.ipv4.nat
post-up service udhcpd start
I also disabled starting udhcpd on boot with:
sudo update-rc.d udhcpd disable
Comments