Monday, November 7, 2011

My Evening Grapple With dd-wrt

I've got a Linksys WRT54GL router, which I immediately flashed to the infinitely superior, open source router firmware project dd-wrt. I've had close to zero issues with it, but today the wireless functionality completely cut out. SSID stopped transmitting, and I was unable to connect even by manually entering in the router's wireless info. All of the wired networking stuff continued to work like a champ, so when I logged into the control panel and checked out the Wireless Status tab, I noticed that 100% of the transmit (TX) packets were errors. And it was throwing about 10 per second.

At first I thought it was a problem with someone at the apartment complex, so I did a site survey and found about 6 devices operating on channel 1. My router was operating on channel 1 as well, so I tried to change it to the most unused channel (which happened to be 14 for me). To no avail.

Next, I tried to move the router away from my plasma TV, thinking that somehow the radiation from the TV was interfering with the transmission. I also unscrewed the antennas and re-screwed them back in. Doing that obviously caused me to unplug the router and plug it back in elsewhere. Again, no luck.

Then I tried to change the security mode on the router. Partial success! When I disabled all of the wireless security features, SSID broadcast worked and it started working perfectly. Except of course, this was unencrypted data flying through the air in an apartment complex. Unacceptable. Changing the wireless security mode back to WPA2 causes the previous symptoms to reappear, so we're kind of back to square one.

At this point, I noticed that the Wireless Status page was no longer showing information in the Wireless Packet Info section. It was completely blank to the right of the Received and Transmitted text blocks. Checking with Firebug and Chrome's Developer Tools, I noticed that there was a JavaScript syntax error occurring on Status_Wireless.asp. Weird, I thought.

After that, I tried to change the the dd-wrt firmware. I was running build 13064, which was the recommended version for my router. That build was a pre-SP2 beta, but it was running amazingly stable up until now. I decided to downgrade all the way down to SP1. I uploaded the firmware through dd-wrt's control panel, choosing to retain previous data. Still not working. The weird JavaScript syntax error was still happening, too.

Feeling pretty frustrated, I decided to upgrade back to build 13064, but this time I decided to go ahead and reset the router to factory conditions. When it came back to life, I proceeded to set up the wireless security to what it was before, WPA2 Personal with AES encryption. I refreshed the wireless networks on my MacBook Air, and there was my router, lock and all, ready to be connected to.

I'm still not exactly sure what happened, but a full setting reset seemed to work. Lame fix, but now it works. I'm more interested as to how the JavaScript error cropped up completely out of the blue.