Ramblings of an aging IT geek
← Ramblings of an aging IT geek
hardware

Reflashing a Router I Should Have Left Alone

A perfectly good router, a flash gone wrong, and the soldered-on serial header that saved me from the bin.

A soldering iron and electronics on a workbench

The router was working fine. That is the important part. It routed packets, it held WiFi, it had done so uncomplainingly for three years. But the OpenWrt release notes mentioned a fix I wanted, and so, against all good sense, I decided to flash it on a weeknight.

The flash went in cleanly. The reboot did not come back. No lights doing anything sensible, no DHCP, no ping. I had bricked a device whose only crime was being slightly out of date.

What saved me was the four-pin serial header on the board, which I'd soldered a connector onto years ago for exactly this kind of stupidity. A USB-to-TTL adapter, 115200 baud, and suddenly I could watch U-Boot stop halfway through and complain about a bad image. From there it was a TFTP recovery: interrupt the bootloader, point it at a known-good image on my laptop, and let it pull the firmware over the wire.

ath> setenv serverip 192.168.1.10
ath> tftpboot 0x80060000 openwrt-recovery.bin
ath> erase 0x9f050000 +$filesize
ath> cp.b 0x80060000 0x9f050000 $filesize

Twenty nervous minutes later it booted. The lesson is not "don't flash routers", it's the thing I keep relearning: solder the serial header on before you need it, while the device still works and you've nothing to lose.