Unbricking your router with a Raspberry Pi
Now there are some tutorials on the internet on how to unbrick this router, one involves a USB-TTL cable and one uses a method which short circuits 2 pins on the mainboard.
The second method helped me out when I bricked my router, the Netgear WNR3500Lv1 (note the v1), but the v2 has a different chip layout and we could not find the right chip on his model.
The first method seems a bit less dangerous, but requires a USB-TTL cable, which I don't happen to have. What I do have is a Raspberry Pi, which has a serial port connection.
- Raspberry Pi running Raspbian
- Some cables
- Broken WNR3500Lv2
I'm connecting to my RPi via SSH.
To be able to use the serial port we first need to disable the console login that the RPi automatically starts up on the serial port when booting.
This is done by commenting out the following line in /etc/inittab
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Now after rebooting the RPi, we can use the serial port for our own purposes.
Connecting the RPi to the router
The Raspberry Pi serial ports are on GPIO 14 and 15:
We connect these ports to the RX and TX on the router (make sure the router is turned off!). We also connect the GND.
From left to right: GND, RX, TX
I am using a breadboard here in between, you can ignore this and all the wires on it, the only reason I used it is because I didn't have any Female-Female cables. Connecting the RPi directly to the router is how it works.
Restoring the firmware
Now to get the serial interface working we use minicom. Install it first on the RPi with
sudo apt-get install minicom
Then run minicom on the serial port of the RPi
sudo minicom -b 115200 -o -D /dev/ttyAMA0
We are now connected directly to the router with our Raspberry Pi. Feeling like a hacker already?
Now power on the router while holding Ctrl + C in the terminal window:
When this is done just execute the command
Now what I did was connecting a laptop to the router with a static IP address (since I was using my main PC to control the Pi) so that we can reach the router on 192.168.1.1.
When this is done we can download the original firmware for the WNR3500Lv2 and push this to the router with tftp
tftp -i 192.168.1.1 put FIRMWARE_FILE
After this the router rebooted and I could access the admin interface on 192.168.1.1 in my browser.
If you want to try this for yourself, the following guides can be helpful:
SSH connection to your RPi
Using the RPi serial port
http://www.myopenrouter.c...USB-TTL-Cable-on-Windows/ (step 9 and further explain how to put the firmware on the router)
http://www.myopenrouter.c...-A-Serial-Cable-on-Linux/ (explains how to use this method on linux, you could use this to push the firmware from your RPi)
Glad my router works again
Omdat ik (zie 3e alinea) niet zo'n kabel hebwartos wrote on Sunday 24 February 2013 @ 20:20:
Waarom heb je hier een RPi voor gebruikt? Ik bedoel, een gewone PC met een usb-serial adapter werkt evengoed...
En toen was ik redelijk teleurgesteld dat het dus niet mocht