You are here

reflashing old WRT54G mesh nodes to OpenWRT

1 post / 0 new
wa2ise
wa2ise's picture
reflashing old WRT54G mesh nodes to OpenWRT
Many of us probably still have one or more of those early hsmm nodes (using Linksys WRT54G routers).  Not that useful in the AREDN world nowadays, as its firmware is very old and outdated.  You could toss or scrap it, but I decided that these things would be more useful reflashed to OpenWRT.
Okay, to do that:

Maybe you forgot the hsmm node's password, (or someone gave it to you and didn't tell you the password) then

HSMM MESH Using Failsafe Mode to reset a forgotten password

Failsafe Mode is a method of booting a node into a minimal configuration which allows you to log in and undo a change that may have broken the node or to change a forgotten password without having an authorized ssh key in place. Since fixing a node is an advanced topic suitable only for developers, here I will just cover how to change a password.

How to use failsafe mode:

connect your computer the the LAN port of the node
use a static ip address of 192.168.1.2 and netmask 255.255.255.0
(default gateway and dns are not necessary)
apply power to the node
just after the DMZ LED illuminates, hold the reset button until DMZ starts blinking
at a command prompt run "telnet 192.168.1.1"
you should now have a prompt that looks like "root@(none)$"
if not, you are not in safe mode and something went wrong along the way, so stop here and start over
type "mount_root"
type "setpasswd abc"
replace abc with the password you want to use
type "exit"

Now power cycle the node and it should accept your new password.
(plajorized from http://hsmm-mesh.blogspot.com/2015/04/using-failsafe-mode-to-reset-forgo...)

Find out the IP address the hsmm node now has.  Disconnect the ethernet cable that goes to you cable or FIOS modem, and plug a cable to your computer and a LAN jack on teh hsmm node.  Bring up the cmd window, and type in "ipconfig". It should tell you what the new default gateway IP address is. 

Then use that address to get to the hsmm node via your browser.
Okay, try that new password.  If it works, then:

Pull that cable from the PC and reconnect to your cable or FIOS modem.

You'll have to download the appropriate version of OpenWRT for your router.  Lets say it's a WRT54G v2
Go to https://openwrt.org/toh/views/toh_fwdownload
(you want the firmware version that is used to update an existing OpenWRT installation, the ones with "trx")
https://archive.openwrt.org/backfire/10.03.1/brcm47xx/
Download it and save it on your PC in a folder you can easily find.

Then disconnect the PC from the cable or FIOS moden and connect the PC to the hsmm node, and you use the above IP address to connect the browser to the hsmm node.  If that works...

Then using SmarTTY and use for the "host name" the IP address x.x.x.x:2222, and root for the user name.  The password will be what you gave it above, like "abc"

It will show a screen asking if you want to save the new SSH key, "save" it and then you should get a screen with some ASCII graphics saying OpwnWRT.
At the top of the window you will see "SCP", clicj it and select "upload a file"  The remote directory is in the hsmm node, and the local file name is the trx file and its location in your PC.  You want the remote directory to be "tmp". 

Click upload.  the SCP window should close.  In the main SmarTTY window do a cd /tmp and then do ls, and you should see a few files and the trx one you just uploaded. then

type in mtd write /tmp/openwrt-brcm47xx-squashfs.trx linux && reboot  (sub the name of your trx file if different) and hit return
You shouls see a bunch of stuff scrolling on the screen, and alternating (w) and (e)
Eventually the SmarTTY window will say it lost connection, and the LEDs on the router will act like the router is rebooting.  Wait for it to finish.

Then you should be able to find the new OpenWRT router at 192.168.1.1 and there will be no password needed to log into it.  Power cycle it if not. You should then see the main screen of OpenWRT, and proceed as you would for a newly flashed from factory router.




 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer