Motivation

We have had our computers connected by wired Ethernet for years, but when I take a computer to a school where I teach, I need to use a wireless connection. With help, I could get connected, but I wanted to know more about how it operated. Also, we occasionally have visitors to our ranch that need a wireless connection. Setting up a home wireless system is the best way to learn about wireless technology and security.

References

Hardware

Edimax EW-7811Un USB Adapter

I first bought a very nice tiny wireless dongle Edimax EW-7811Un to use when I demonstrated a Raspberry Pi at schools where I taught. Its range was fairly limited and three rooms from the nearest wireless access point it had trouble connecting. Still, it was only about $9 and worked fine when an access point was nearby. When plugged in, Linux set it up as wlan0 (the driver appears to be in the Raspbian firmware) and the wireless connection GUI program wpa-gui could make the connection once it was given the correct encryption parameters for the local wireless access points. Its short range and my lack of understanding of wireless terminology, however, made the initial set-up difficult.

Dave Conroy has shown how the Edimax-7811Un can be used for a wireless access point even though the manufacturer does not support its use in that manner. I decided, however, to use the Panda 300 adapter for my wireless access point as described below.

Panda 300Mbps Wireless-N USB Adapter

For a bit higher cost ($16), I bought a Panda 300Mbps Wireless-N USB Adapter. It has a longer range and is more easily configurable since it is designed to be a wireless access point. It is suppored in Linux by the nl80211 driver module.

The Raspberry Pi as a wireless access point

I followed the excellent installation instructions for making a Raspberry Pi into a wireless access point. and it worked without difficulty when tested using a second Raspberry Pi equipped with a Edimax EW-7811Un USB adapter. The Pi with the access point was connected to my server via a wired Ethernet connection and then transmitted to the second Pi. The second Pi could then access the internet through the access-point Pi, my Server, and the DSL-to-Ethernet box from the phone company.

My Ubuntu 14.04 server as a wireless access point.

Getting my server to act as a wireless access point forced me to learn a few more things. I followed the instructions from Christopher Berner, but I ran into some difficulties.

First, as soon as I plugged the Panda adapter into a USB port and looked and ran ifconfig to see the interfaces, I found that the wireless interface was wlan1 rather than wlan0 as it had been on the Pi. This happened because the a driver (I'm not sure which driver) supporting access point operation automatically set up wlan1. I presume this is to avoid conflicts in computers which also have a non-access point wireless adapter which would be expected to be on the wlan0 interface. As a result, all references to wlan0 in Christopher Berner's instructions need to refer to wlan1.

A second problem was that my firewall was allowing 192.168.2.0/16 (eth0) addresses, but not 10.0.0.0/8 (wlan1) addresses for local access. I fixed that by doing some ufw commands. I also allowed 10.0.0.0/8 access to 192.168.2.0/16 addresses. To have the 10.0.0.0/8 addresses masqueraded on output to the Internet, I edited the end of /etc/ufw/before.rules.

Initially I installed the dnsmasq package as directed by the instructions, but since I had my own DHCP and DNS service running, dnsmasq was unnecessary. Its logging messages reported conflicts when it tried to used some of the interfaces already controlled by my DHCP and DNS daemons. I then uninstalled dnsmasq.

With those adjustments, Christopher Berner's instructions worked to get a wireless connection to a nearby Pi, but the Pi did not receive any address. I then added an appropriate section to /etc/dhcp/dhcpd.conf for the 10.0.0.0/8 network I used for the wireless adapter, but it still did not work. After much fumbling around, I realized that my DHCP deamon was configured to only listen to interface eth0. Changing the INTERFACES="eth0" line in /etc/default/isc-dhcp-daemon to INTERFACES="eth0 wlan1" and restarting the DHCP daemon with service isc-dhcp-daemon restart solved that problem and the Pi then received an appropriate address.

Now, the Pi makes its connection as soon as it given power even without a monitor or keyboard connected. I enabled ssh in the Pi so I can work with the Pi from any computer in my local network.


Last updated: December 14, 2014

Valid CSS! Valid XHTML 1.0 Strict

Contact Craig Van Degrift if you have problems or questions with this web site.