2019.06.18 - Nat Tuck - ~3 Minutes
A couple weeks ago I ordered a home router to run OpenWRT on, mostly to see how the performance compared to just using a mini-PC. The Netgear WNDR3700 series all seemed to have good support, so I ordered one on Amazon for $18. Getting it to work turned out to be a little bit more complicated than I expected.
According to the OpenWRT wiki, there are 5 versions of the WNDR3700, numbered v1 through v5. The best version is v4, with twice as much RAM as the earlier versions and 8 times the flash of any other version. The seller on Amazon didn’t specify a version, so I was excited when I saw that I had gotten a v4.
The process to install OpenWRT is reasonably straightforward. You just download the firmware image and upload it to the router through the web interface’s update screen. That plan didn’t work, rejecting the firmware as being for the wrong router model. It wasn’t the wrong model - the router says WNDR3700v4 right on the bottom.
Luckily, there are a couple other ways to install firmware images. Plan B is to get the device into recovery mode and send over the image by tftp. The router seemed to get into recovery mode fine, accepted the tftp transfer, and then completely ignored it.
At this point I noticed that the web UI for this router was a bit weird. Instead of identifying the router as a “WNDR3700v4”, it said “WNDR3700v4SH”. With a little Googling, I discovered that this was a custom firmware distributed on some routers for customers of Shaw Cable in Canada. Looks like they were shipping a custom version of the router that broke firmware updates.
This left me with one more reasonable debugging step: connect a serial console. These routers almost use a standard serial port with a 4 pin connector on the main board. There’s just one minor difference - it runs at 3.3V instead of 12V. Luckily, ordering a 3.3V USB serial adapter wasn’t too hard.
After some fun with Torx screws and a volt meter to figure out which pin was which, I got the thing booted up with a serial console. Surprising result - this router was already running (a really old version of) OpenWRT. Kind of lame of Shaw to use OpenWRT themselves but to make it hard for users to install their own version. Unfortunately, this OpenWRT was old and broken enough (wget segfaulted) that I couldn’t just sysupgrade it to the new version.
Luckily, trying the tftp rescue process again with the serial console showed the error message:
Model ID of image doesn't match device: MODEL ID on board: WNDR3700v4SH MODEL ID on image: WNDR3700v4
A little bit more poking around (“press any key to stop booting”) got me into uboot through the serial console. From there, it was a single command to set the model ID (back) to the correct value. And with that, flashing up to date OpenWRT firmware worked fine.
So now I have my fancy home router from 2013. Is it faster than the dual-NIC mini-pc I have running a Linux firewall distro? Speedtest.net says… no. Netgear home “gigabit” router: 300Mbps; Offbrand mini-PC: 860Mbps.
That’s disappointing but not entirely unexpected. I was hoping there was some hardware offload magic in the Netgear. But it looks like the CPU gets involved, and a quad-core 2017 Intel Celeron is faster than a 2012 single-core MIPS CPU.