Saturday, January 17, 2009

Who knew 802.11b would be better than 802.11g

For the last few days, I've been struggling with wifi issues. Pages would load slow and sometimes never complete. Command-R has become my new best friend in Firefox, as sometimes forcing a reload will fix the issue, but only for the moment.

Being somewhat tech savvy, I decided to investigate.

To begin my investigation, I installed Wireshark, and started a packet capture session on my wireless interface on my Mac Book Pro. I then refreshed one of my web pages, and noticed several tcp retransmissions. This basically means a packet was lost, and had to be resent. This results in more data being sent along with taking longer due to the time waited until the loss is detected.

Since my wired boxes didn't show the same behavior, I was pretty sure that wifi was the culprit, and that there was some new interference causing the issue. My first step was to download AirRadar (an access point scanner for the Mac -- you can use things like NetStumbler for the PC) and see what access points are around me (which there were many, anywhere from 5 to 10), but most are very weak signals. Of the strongest signals, most were on channels 6 and 11, so I opted to switch my router to use channel 1 (since 1, 6 and 11 are the only non overlapping channels for 802.11b/g).

Even after changing the channel, I was still having issues. We do have cordless phones in the house so I thought they might be interfering. I tried a test where I was far from the access point while the cordless phone was in use, and monitored the signal strength in AirRadar, but the signal strength and noise levels didn't change more then they normally would. I tried the same test with my microwave oven running, but no change occurred from it either.

At this point, I thought I was out of luck. I then noticed this article on Slashdot, and noticed the submitter commented:
I found out by accident that setting my access point to '802.11b only' mode appeared to give me a vastly more reliable connection that leaving it in 'mixed 802.11b/g.' Is this a fluke? Or does transmitting at 10 Mbps when everyone else is using 54 Mbps (for their 3 Mbps DSL pipes!) give you a true advantage?"
Since it was one of the only things I hadn't tried yet (other then wrapping my house in aluminum foil, which might get me banned from my neighborhood), I promptly tried it.

I re-ran Wireshark, fired up Firefox and loaded a web page. Viola, no tcp retransmissions detected. While I'd love to keep the faster connection, I mainly browse the web and do a few other low bandwidth (relatively) applications over wifi, so having a stable connection is more important then having it fast, at least for now. Worse case, I can easily toggle back to 'g' mode when I need the speed, and stick to 'b' when I don't.

If you're finding yourself having similar issues, and can do without the speed of 802.11g, see if switching to 802.11b only mode in your router will do the trick. It might not work in all cases, but it worked for me.

No comments: