Life in the WiFi Fast Lane

Fuzzy WiFi problem
credit: “Fuzzy WiFi problem” by Major Clanger

I’ve been living in a crowded wasteland. The over-crowded 2.4 GHz 802.11b/g WiFi spectrum, to be exact. It used to be the only people using WiFi were the geeks and techies out there. Sometimes one would set up friends and family to be able to work wirelessly, too. But not anymore. You can’t walk down the street in most neighborhoods without discovering at least a few WiFi hot spots. And this is what poses a problem, especially in more densely-packed residential neighborhoods, such as townhouse communities, apartment building, and the like.

Part of the problem is the way that 802.11 channels are allocated in the 2.4 GHz spectrum. In the US, there are 11 available channels, numbered amazingly enough from 1 to 11. Unfortunately, most of those channels overlap each other. There are only 3 available non-overlapping channels for US-based 2.4 GHz WiFi. If everyone broadcasts on only channels 1, 6, and 11, none of those channels will interfere with each other.

For example, channel 2 interferes with channels 1, 3, 4, 5, and 6 (channel 1 will affect 2, 3, 4, and 5). Channel 3 will affect channels 1, 2, 4, 6, 7, and 8. As you move up in channel number, each channel will interfere with four channels lower and higher than its own number. This is why 1, 6, and 11 are the only non-overlapping channels, and why all the other channels will interfere.

This also assumes that if 2 people are both broadcasting on the same channel, they’re far enough away from each other, or using a low enough power level, to not interfere (or at least minimally interfere) with each other. Add in the other channels, and you end up with a lot of noise and interference.

This may have seemed like a good way to allocate the spectrum back when there was an implicit assumption that only businesses could afford wireless technologies, and had some sort of planning so that, even if overlapping channels needed to be used, they’d be broadcasting far enough apart to make the interference seem like background noise. With the explosion of consumer WiFi, due in part to mobile devices, tables, laptops and netbooks, and just about every broadband supplier giving out modems that incorporate WiFi, the spectrum can get pretty crowded pretty quickly.

At my mom’s place, where houses are fairly far apart, and the community is typically retirees, vacationers, and people able to afford multiple homes, I still see 3-4 wireless access points in the corner of the house farthest from any neighbors. At my place, which is in a townhouse1 community? One snapshot counted 18 different access points, across almost all channels, with most clustering on channels 1, 6, and 11. Even sitting about 8 feet from my access point, all three non-overlapping channels were being drowned out by my neighbors.

The over-crowded spectrum, view from my sofa.

One night this week, frustrated that I was having so much trouble staying connected to my network, I launched an app called WiFi Analyzer on my laptop in order to monitor the spectrum and see if there was possibly a channel that was less crowded than the one I was using at the time. I noticed something interesting, though. Periodically on one of the graphs a “2.4” would flash in a box in the upper left. Curiosity getting the better of me, I tap in the area, and the graph switches from the 802.11 b/g 2.4 GHz spectrum to a graph containing the 802.11 a/n 5 GHz spectrum! Even better, there was only intermittently a single wireless access point broadcasting.

Relatively empty 802.11n 5 GHz spectrum, view from my couch.

My tablet was dual band! I had a potential way out of the crowded common 2.4 GHz spectrum to what was essentially a wide-open field of spectrum that almost no one was using. I excitedly waited until my wife got home after I googled her phone model to verify if it could handle dual band connections, too. Results were mixed, so I needed the actual phone to verify. It saw the same intermittent access point, so I knew we had the potential.

I decided to look on Amazon for an affordable wireless router that could handle both 2.4 GHz and 5 GHz frequencies (for fall-back, if I needed it). Eventually, I settled on the TP-Link TL-WR2543ND, a 450Mbps dual band router, because it was both affordable for my technology budget and, more importantly, was able to be reflashed with the OpenWRT third-party firmware if I wanted/needed more flexibility than the vendor-supplied firmware could provide2.

Thanks to Amazon Prime, the router arrived Friday while I was home for lunch. That evening, I set it up, and verified that both my & my wife’s tablets (both the same model) and my wife’s phone were able to see the 5 GHz network. As an added surprise, my wife’s laptop turned out to be dual band as well. Toshiba’s technical specifications page for the model didn’t explicitly state the frequency ranges that it supported, so I wasn’t sure it would work.

Since I knew that my laptop definitely did not support 802.11n in any way, shape, or form, I started looking at USB WiFi adapters that were dual band. There were some from all the major typical networking players, but few if any mentioned Linux support (I’ve been running Linux on my personal hardware since 1999, and make purchases that will be supported by it). A few “no name” vendors also showed up in my searches, and to my surprise, most listed Linux as a supported operating system. Based on reviews, I ended up settling on the Sapido AU-5015 because it explicitly mentioned Linux, was reasonably priced, and the WikiDevi page for it seemed more complete than most. Instead of downloading the linked driver from WikiDevi, which goes to RealTek’s (the chipset manufacturer) site, I downloaded the Sapido-supplied version.

Installation went surprisingly well. I unzipped the file I downloaded from Sapido, then entered the directory it created. The readme file wasn’t very helpful, but there was a driver directory containing a .tar.gz file, containing the code and a Makefile. Already having the build environment I needed installed (compiler, tools, current kernel headers for my running kernel, etc), all I had to do was run make. Since I’m paranoid, I decided to not run make install as root, instead deciding to run the command with make’s “-n” so I could see the commands that would be run. All they did was copy the compiled module and re-run depmod. After that, inserting the device caused it to not only be recognized (which it was beforehand), but also create both a wlan1 and wlan2 device3.

The expanded file also included a directory that had patches, documentation, and configuration file snippets to make the device work with the various supporting software (for me, all I cared about was the wpa_supplicant configuration snippet). Copying the relevant configuration into a new config file for wpa_supplicant and updating my /etc/network/interfaces file4 for the 2 new devices5, I was able to bring up the network interface, and successfully obtain a DHCP lease for a new IP address.

Getting to this point so quickly (total elapsed time at this point was maybe 20 minutes) actually surprised me. In the past, taking “proprietary” hardware that needed third-party drivers to work, has typically involved days of time and frustration, searching out one error after another. Often times, I’ve needed to edit code myself, submit numerous bug reports, and troll forums looking for how others had managed to get it working. This? This was pleasantly straight-forward!

Where I ran into problems was after I got the network interface up and connected. And this was entirely my own fault… I couldn’t at first figure out why I could get a new IP address on my network, but be totally unable to talk to any other machines. After about 10 minutes of troubleshooting, it suddenly dawned on me. When obtaining an IP address, there was no firewall in place. After that, there was. I had completely forgotten I was running a firewall locally, and needed to tell it about the new network interfaces! After telling the firewall about both wlan1 and wlan2 (and figuring out that the identifiers needed to be 5 characters or less), everything worked beautifully.

I’ve been running exclusively on 802.11n 5 GHz for about 7 hours now on my netbook, and have seen none of the slowness or disconnect problems that have been getting steadily worse for me on 802.11g 2.4 GHz for the last several months. Faster speeds, less interference, no disconnects? I’m now definitely living like in the WiFi fast lane!

Be Sociable, Share!
  1. “Townhouse”, “row home”, “multi-family dwelling”, it’s 1 building, which every 20-30 feet is divided into another independently-owned dwelling. These days, there are firewalls between them. Older homes of this sort may just have a brick wall or even just a slightly-thicker normal wall between each dwelling. The fronts are usually offset these days, to add to the illusion that they’re all individual buildings that just happen to touch each other.[back]
  2. My other two wireless access points, both from Linksys, are running various versions of OpenWRT. This allowed me to add additional software to enhance the functionality of the hardware, and allowed me to do things never envisioned by Linksys[back]
  3. wlan stands for “wireless LAN”, which is the wireless network adapter. wlan0 is the internal adapter on my system[back]
  4. This is for Debian and Ubuntu. RedHat, Fedora, and other systems will likely have other locations for this information[back]
  5. It turns out that the reason there are two devices created is because the first one (wlan1 in my case) is the 2.4 GHz adapter, which can talk 802.11 b/g/n, and the second one (wlan2) is the 5 GHz adapter, which can talk 802.11 a/n. I’m primarily interested in this second interface at this point, so that’s the one on which I concentrated.[back]

Leave a Reply