Joined: 28 Jan 2009 Posts: 23 Location: Sarasota, FL
Posted: Sat Jun 01, 2013 3:19 Post subject: WZR-HP-G300NH - How to go from OpenWRT Backfire to DD-WRT?
Hi everyone, just spent the past 3 hours going though various threads and I can't seem to figure out what to do. I started with a bricked router that was stuck in an endless ~30 second reboot loop. I got it as-is and had no idea what the previous owner tried to flash onto it.
After numerous tftp flashing attempts with various firmwares, the only one that would successfully take & boot (without rebooting) was Backfire OpenWRT 10.03 using the file "openwrt-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin" which I found in this debricking guide: https://forum.openwrt.org/viewtopic.php?id=30810 (post #11).
The next steps in that post are as follows:
Quote:
That’s it, you should be in good shape with openwrt. The next step is to get something far more user friendly loaded onto the device.
Download the wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin from http://www.dd-wrt.com/site/support/router-database and place it on your desktop. Also download the windows version of “DD” from http://www.chrysocome.net/dd and place it on your desktop. Heck, while you are in the downloading mood go ahead and grab the original firmware for the Buffalo, don’t bother with Buffalo’s site for this one though because you won’t find it. Register and log in to the dd-wrt forums and download it from this link: http://www.dd-wrt.com/phpBB2/download.php?id=13418. Might as well grab the latest firmware from Buffalo, as of this post it was wzrhpg300nh-176.
Got everything? Good, this is the home stretch to a functional router.
Open a command prompt and change directory to your desktop were all the goodies are. Type the following: dd bs=28 skip=1 if= wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin of=firmware.bin . This is stripping the encrypted header off the firmware and outputting the file as firmware.bin, if you don’t do this the flash will not succeed.
Now to flash the router to our hacked up firmware.bin. Follow the same steps as before when flashing the squashfs firmware above but use the command: tftp -i 192.168.11.1 PUT firmware.bin. Yes, you really do need to walk away from the router for an extended period of time, yes, those lights are still lying to you.
Once done you now have dd-wrt up and running. I wouldn’t call it entirely functional though, it wasn’t stable enough to leave as the production firmware (it locks up just trying to save certain settings) and would go out to lunch if left running for a few hours. But that’s ok because it serves as a stepping stone to a reliable and useable firmware.
At this point you can actually use the web interface to upgrade to the wzrg300nh_original.bin you downloaded from the dd-wrt forums, it will take quite a bit of time to complete this flash. Once this is done you can upgrade to the latest official release from Buffalo.
However, I've followed the steps exactly and after flashing the firmware.bin file the router goes back into a endless reboot loop.
The "openwrt-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin" file will take via tftp every time, and I can get into the webGUI via 192.168.1.1 but from there I can't seem to flash to anything else.
With Backfire OpenWRT running stable, I've also tried all three of the available firmware packages available though Buffalo's website. I've tried flashing them though tftp and webGUI. Even if they flash, the router then goes into an endless ~30 second reboot loop. From there I have to flash the OpenWRT Backfire firmware to get back to something stable.
Any help would be greatly appreciated. Would love to get this router running DD-WRT instead of OpenWRT Backfire...
I went from openwrt to ddwrt last week, the only way that worked turned out to be the simplest, but you need a hex editor like "hxd hex editor"
1. Simply download the proper DD-WRT file, i.e. wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin
2. Using a hex editor, strip the first 28 bytes so that the file begins with 27 05 19 56
3. Flash using web GUI
This is the method that worked for me without having to use tftp.
Joined: 06 Feb 2010 Posts: 7401 Location: Little Rock
Posted: Sat Jun 01, 2013 10:23 Post subject:
TFTP is most likely failing because not only are you not entering the static ARP with the generic MAC address, you guys are using the wrong file - buffalo_to_ddwrt_webflash-MULTI.bin is what you need to use, not wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin
Joined: 28 Jan 2009 Posts: 23 Location: Sarasota, FL
Posted: Sat Jun 01, 2013 13:58 Post subject:
buddee wrote:
TFTP is most likely failing because not only are you not entering the static ARP with the generic MAC address
Yes, I definitely did that. I've successfully tftp'd the files both using the method from Windows 7 (using PumpKIN) also using the Linux method (Ubuntu Live Drive) - the files always show as transferring successfully, and the firmware appears to be installing (flashing diag light) but after about 10-15 minutes the router starts going into a ~30 second boot loop and I can see the NIC showing the network cable becoming "unplugged" and then reconnecting.
buddee wrote:
you guys are using the wrong file - buffalo_to_ddwrt_webflash-MULTI.bin is what you need to use, not wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin
I have the file "buffalo_to_ddwrt_webflash-MULTI.bin" and have not stripped anything out of it. When I upload that file through the OpenWRT Backblaze Firmware Upgrade page, it accepts & asks me to confirm, but after 10-15 minutes the router goes into a ~30 second reboot loop.
I'll give it another try now and report results.
--edit/update #1---
So I tried to flash the file "buffalo_to_ddwrt_webflash-MULTI.bin" from the OpenWRT Backblaze Firmware Upgrade page and after the file uploaded it reported:
Quote:
The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform.
Perhaps I have the wrong version of "buffalo_to_ddwrt_webflash-MULTI.bin"...? Would you mind pointing me to the correct version of this file for me to download? Thanks!
Following advises by LOM in dd-wrt forum. Thanks LOM
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=482188#482188
I've successfully reverted back from openwrt to dd-wrt using openwrt WebGUI update, just need to strip 32 bytes header from wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin file.
dd bs=28 skip=1 if=wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin of=firmware.bin
So firmware binary starts with 5 bytes 27 05 19 56 10
Then we can flash in openwrt WebGUI browser screen.
dd-wrt WebGUI accepts factory firmware.
I took the file "wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin" and stripped out the header using dd.exe. After that I checked the file in HEX editor to confirm first digits read "27 05 19 56 10" (which they did) and I was then able to upload/confirm the modified file to the OpenWRT Backblaze Firmware Upgrade page. At the moment the new firmware is installing (waiting a few more minutes for the router to reboot) so hopefully it doesn't get stuck in a loop agian...will share results soon.
Joined: 28 Jan 2009 Posts: 23 Location: Sarasota, FL
Posted: Sat Jun 01, 2013 14:51 Post subject:
theorie wrote:
I took the file "wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin" and stripped out the header using dd.exe. After that I checked the file in HEX editor to confirm first digits read "27 05 19 56 10" (which they did) and I was then able to upload/confirm the modified file to the OpenWRT Backblaze Firmware Upgrade page. At the moment the new firmware is installing (waiting a few more minutes for the router to reboot) so hopefully it doesn't get stuck in a loop agian...will share results soon.
Update on above...well that didn't work. The modified "wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin" file (with header stripped out) did upload though the OpenWRT Backblaze Firmware Update Page, but after ~8 minutes the router rebooted itself and it's now gone into a ~30 second boot loop.
Going to tftp flash back to OpenWRT Backblaze and try something else...
---edit/update #1---
After a 30/30/30, tftp flashed back to OpenWRT Backblaze to get the router stable again.
I did another 30/30/30 and then tftp flashed the file. It's currently installing (as per a flashing red diag light) so hopefully it reboots itself and becomes stable (without reboot loops!).
---edit/update #2---
After tftp flashing the file listed above, the router has gone into a ~30 second reboot loop yet again.
Becoming very frustrated. Any help would be greatly appreciated.
Joined: 06 Feb 2010 Posts: 7401 Location: Little Rock
Posted: Sat Jun 01, 2013 17:27 Post subject:
Can't really give you any advice, you are using either Win7 or linux to do the TFTP with, neither of which i use to do any router work, only WinXP, and the TFTP method has worked for me everytime using the guide.
Gave that a try. Started on stable Backblaze, webflashed the build you posted above and was able to get into the Web GUI after install/reboot. Then I tried to flash the "wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin" file with the header stripped out...it uploaded, and seemed to install, but then the router went into the ~30 second boot loop cycle.
Was I supposed to web flash a different file (with the header stripped out?)...?
that should have worked since I did the same process a few hours ago, went from the stock garbage buffalo firmware to openwrt then back to dd wrt using the stripped header. If you were able to find 27 05 19 56 in the firmware you had the correct one because the buffalo to ddwrt doesn't have it. On the left side of your router there should be a sticker with a barcode, does it say A0 A3?
Joined: 06 Feb 2010 Posts: 7401 Location: Little Rock
Posted: Sun Jun 02, 2013 2:52 Post subject:
AfterShock wrote:
I went from openwrt to ddwrt last week, the only way that worked turned out to be the simplest, but you need a hex editor like "hxd hex editor"
1. Simply download the proper DD-WRT file, i.e. wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin
2. Using a hex editor, strip the first 28 bytes so that the file begins with 27 05 19 56
3. Flash using web GUI
This is the method that worked for me without having to use tftp.
A little helpful tidbit you may want to include here which you left out... You may want to note which build # and file you are using exactly as not all builds with the first 28 bytes stripped are going to begin with 27 05 19 56.. _________________ Wireless N Config | Linking Routers | DD-WRT Wiki | DD-WRT Builds | Peacock - Broadcom FAQ
I went from openwrt to ddwrt last week, the only way that worked turned out to be the simplest, but you need a hex editor like "hxd hex editor"
1. Simply download the proper DD-WRT file, i.e. wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin
2. Using a hex editor, strip the first 28 bytes so that the file begins with 27 05 19 56
3. Flash using web GUI
This is the method that worked for me without having to use tftp.
A little helpful tidbit you may want to include here which you left out... You may want to note which build # and file you are using exactly as not all builds with the first 28 bytes stripped are going to begin with 27 05 19 56..
Good point, I'm using build 21286 wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin I guess if he's using the latest build that would explain why he's getting the endless reboots. i stripped the 28 bytes and it starts with 27 05 like it should but its bad firmware for buffalo routers, I assumed he would have read through the thread on the latest build and saw all the probs its causing
Joined: 10 May 2008 Posts: 1380 Location: Pacific North West, USA
Posted: Sun Jun 02, 2013 7:24 Post subject:
AfterShock wrote:
I went from openwrt to ddwrt last week, the only way that worked turned out to be the simplest, but you need a hex editor like "hxd hex editor"
1. Simply download the proper DD-WRT file, i.e. wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin
2. Using a hex editor, strip the first 28 bytes so that the file begins with 27 05 19 56
3. Flash using web GUI
This is the method that worked for me without having to use tftp.
This method is your safest and easiest without having to deal with TFTP
I've flashed multiple routers back/forth between DD-WRT and OpenWRT/Gargoyle
You can do it via the web interface in both instances
I RECOMMEND resetting to defaults before flashing back/forth!
The WZR-HP-G300NH is a SLOW flash upgrade process
When you go back/forth - leave the router alone for about 15 minutes after you start the upgrade
When flashing back to DD-WRT - use this file:
wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin
If you want awesome stability for the WZR-HP-G300NH
build your own - use the latest OpenWRT Barrier Breaker trunk code _________________ Soylent Green Is People !
=-=-=-=-=-=-=-=-=-=-=
Netgear Nighthawk R7000 - DD-WRT Build R46220
Linksys EA8500 - OpenWRT IPQ806x Trunk R16375 5.4 Kernel
Joined: 28 Jan 2009 Posts: 23 Location: Sarasota, FL
Posted: Sun Jun 02, 2013 14:27 Post subject:
AfterShock wrote:
that should have worked since I did the same process a few hours ago, went from the stock garbage buffalo firmware to openwrt then back to dd wrt using the stripped header. If you were able to find 27 05 19 56 in the firmware you had the correct one because the buffalo to ddwrt doesn't have it. On the left side of your router there should be a sticker with a barcode, does it say A0 A3?
I attached a screenshot showing my method for stripping & checking the file - that was done with a different version so it's just for reference to the process.
Anyway, I took that new firmware.bin file (that was made from r21286) and flashed it though the OpenWRT Web GUI and the router went into the boot loop again...
Aftershock, maybe you want to try sending me the file you used?