Author Topic: Buffalo WZR-HP-G450H Post 20025 Firmware Solution  (Read 162633 times)

bukamilo

  • Calf
  • *
  • Posts: 1
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #120 on: August 29, 2015, 08:11:33 AM »
Bricked while installing r27506 on a european G450H - without resetting settings (during the update process). 30/30/30 doesnt work, because reset doesnt respond.

I have another model of the same router running - but would make it a project to get the first one functioning again.

@JacobD84: May I ask some details on debricking via the serial port and how you do it?
Setup as described in: http://www.overclock.net/t/1331611/guide-recovering-a-bricked-buffalo-airstation-n450-router-wzr-hp-g450h
And debricking process as described in: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=155253

Or do you have a different approach?

I already have an unencrypted copy of the firmware from my second router as a mtd1.dump file on my harddrive (starts with 27 05 19 56) - and am asking, because I see the tutorials diverge in how the ip is associated (to a mac address) and I am a bit weary of the "setenv region EU" command.

Any pointers would be appreciated.

edit: Messed around with some of the steps and understand the process a bit better now. The usb serial dongle is used to troubleshoot the connection to the router (ping! :) ) and catch the tftp time window in those versions of uboot where you cant prevent it from closing.

You might also need to buy a switch - because Windows might not be fast enough to establish (or not drop) a connection, when it detects the router being connected.

Then there are several options to initialize the tftp transfer (tftp via commandline, tcp -i via commandline - followed by a putty command on the router side, pushing via a program called PumpKIN, or letting the router start the transfer and flash via another putty command).

@JacobD84: If you could write down the debricking method you use, I'd still appreciate it - I still have some time until the Serial > USB dongle arrives, and I am open to learn more about the process beforehand.

edit2: Already managed to successfully transfer the (unencrypted, 30mb) firmware image into the routers ram, by using the IP mapping process described in the overclock.net tutorial from within Windows 7, having another router with dhcp disabled in between the PC and the g450h, acting as a switch - and pushing (put) the file using PumpKIN from the PC, whilst catching the time window by plugging in the g450h and then counting to 12. Pumpkin shows the file transfering and indicates successfully pushed - then nothing happens. ;)

I presume - because I still need the serial > usb dongle to get a command line on the router to start the flashing script (run u_fw). ;)

Fun times. ;)

@harlekin

You can unbrick your G450H by installing OpenWRT and converting it to dd-wrt using web-upgrade. Piece of Cake. OpenWRT and dd-wrt are built on technically same or similar foundation and converting one to the other is very easy process. Just commit web-upgrade on OpenWRT using a dd-wrt webupgrade file. After the upgrade process, you will see dd-wrt installed instead of OpenWRT on your G450H.

OpenWRT provides the TFTP image for installation method, which is the only way you can install a firmware on a bricked G450H router. (In fact, you can also make dd-wrt TFTP image however it requires relatively tricky process so I'm not talking about that this time.)

I would assume that you are able to install OpenWRT on your G450H by TFTP method and have already OpenWRT installed on your router and working. If you don't you can just google it. There are tons of guides talking about that.

After installing OpenWRT, you can use web-upgrade feature, select dd-wrt webupgrade file and get dd-wrt back on work. For this, however, you must first modify dd-wrt file little bit so OpenWRT can recognize it as aporopriate file.

1. Download dd-wrt web-upgrade file. I suggest version 06-05-2015-r27240. (http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2015/06-05-2015-r27240/buffalo_wzr_hp_g450h/wzr_hp_g450h-dd-wrt-webupgrade-MULTI.bin)

2. Open the file with any hex edior so you can modify it. (ex: HxD)

3. Delete first 28-byte of the file so the file starts with code "27 05 19 56"

4. Save it and try web-upgrade with modified file.

5. After upgrade process, you will see dd-wrt working on your G450H.

Have a nice day.


EDIT: I didn't read thru whole your post. So you already were trying to install OpenWRT. I just read that overclock.net post and found it total bulls**t. You don't have to do that ridiculous USB-serial cable pin jumping stuff.

U-boot automatically works for about first three seconds after you turn on(plug in dc power) your router. Set your network adapter arp and ip address for TFTP. Commit TFTP command to send a Openwrt firmware file and turn on your router at the same time. Your router will automatically start installing OpenWRT. Here's a tutorial for that. It is written in Korean I don't have a time for translating it into English right now. I think google translate might help you. good luck.

http://takuma99.tistory.com/161
« Last Edit: August 29, 2015, 08:54:10 AM by bukamilo »

JacobD84

  • Tatanka
  • **
  • Posts: 66
  • Bringin the DD-WRT.
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #121 on: September 15, 2015, 05:56:00 AM »
I just read that overclock.net post and found it total bulls**t. You don't have to do that ridiculous USB-serial cable pin jumping stuff.

U-boot automatically works for about first three seconds after you turn on(plug in dc power) your router. Set your network adapter arp and ip address for TFTP. Commit TFTP command to send a Openwrt firmware file and turn on your router at the same time. Your router will automatically start installing OpenWRT. Here's a tutorial for that. It is written in Korean I don't have a time for translating it into English right now. I think google translate might help you. good luck.

http://takuma99.tistory.com/161

I use the USB method all the time for routers that are actually bricked (no red light, not anything), not simply awaiting firmware after failed transfer which seems to be the case in your instance which i agree it is easier to use U-Boot/TFTP. USB Method also avoids having to use the interim OpenWRT firmware before moving to DD-WRT, i am able to simply move the decrypted DD-WRT firmware over.

The main issue with the USB method is mechanical not software in the sense you have to carefully attach header pins with a soldering iron to get a good connection, but if you use L-shaped headers you can solder them on once and the casing will still fit back on once you are done. It also means you can quickly change things again when the inevitable future-bricking happens as you just attach your Serial decoder to the pins and upload.

Personally i try and avoid OpenWRT at all times, but my reasons for that are personal rather than an outright issue with the firmwares.

Nonetheless, first update in a while; I've successfully tested DD-WRT version r27805 across all three routers, it can be found here:

ftp://ftp.dd-wrt.com/betas/2015/09-11-2015-r27805/buffalo_wzr_hp_g450h/

As usual; please DO NOT UPDATE unless you are trying to fix a problem in an earlier firmware (If it isn't broke don't fix it).
If you do update, please report any bugs or issues so i can note them appropriately and report them to the DD-WRT community.
ALWAYS reset to factory defaults on update - For the sake of a pen and some paper to remember settings it solves so many issues ;)

This is the first r27xxx release i'm wholly happy with and the UI at last seems to be as fast loading from the router as the r24xxx releases!

harlekin

  • Calf
  • *
  • Posts: 10
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #122 on: September 17, 2015, 06:28:08 AM »
Router is back alive. (Had to use the USB to serial dongle.) I had a version of uboot on the router, where ctrl+c still works - so I could follow the linked tutorial (the one with the pictures.. ;) ) to the tee.

As suspected, the run u_fw command was needed (USB to serial dongle > putty > shell) - and when you wire the dongle, make sure to read the tutorial very closely - two of the cables have to be switched - I missed that for a couple of minutes..
Also - as ctrl+c worked in my case - I could get rid of the router in between the bricked g450h and the PC, because timing wasnt of the essence anymore. :)

Also I have a strange occurrence to report.

I was able to revive the router (european model) with a hex modified firmware file of r27240 (bukamiio linked and described it) -

but when I then tried to update to r27805 via webupdate (wipe settings) > brick

And not just any brick - but the same kind of error profile that I witnessed on my attempt to update to r27506.

I then took the r27805 update file an stripped the first bytes in the hex editor again to try and flash it directly > brick.

Looking at the shell (putty and USB to serial dongle) the router boots into uboot, then tries to load the kernel - probably successfully (version info is shown), and then only outputs broken symbols.

So right now I'm back on r27240 - and would ask you for some feedback about how this could possibly occur. I'm stumped.
« Last Edit: September 17, 2015, 08:45:36 AM by harlekin »

JacobD84

  • Tatanka
  • **
  • Posts: 66
  • Bringin the DD-WRT.
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #123 on: September 17, 2015, 03:43:50 PM »
Hi harlekin

Thanks for the comprehensive report; can you pass me any revision numbers from the PCB please?

Additionally; did you decrypt the r27805 firmware? You shouldn't need to remove any values from new releases once the older decrypted firmware has already been installed.

Finally, can you try both the webupdate and factory-DDWRT versions of r27805 please?

harlekin

  • Calf
  • *
  • Posts: 10
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #124 on: September 18, 2015, 01:00:05 AM »
My understanding was, that ddwrt firmwares are always decrypted.

What I did so far:

- Installed r27240 via run u_fw after stripping the first bits until it starts with "27 05 19 56" - successfully

Then >

- Installed the unmodified r27805 webupdate file via webupdate > brick
- Installed r27805 after stripping the first bits until it starts with "27 05 19 56" via run u_fw > brick

Also installed r27240 ("27 05 19 56") in between those two steps in a second attempt, r27805 still bricked the router.

I also noticed that r27805 is a bit larger than r27240 and was wondering if it could be something that has gone wrong on the file system level (allthough run u_fw restores on the block level...).

I'll be looking out for serial/revision numbers on the PCB, also I will try the factory image as well. Should be able to report back today.


harlekin

  • Calf
  • *
  • Posts: 10
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #125 on: September 18, 2015, 03:32:31 AM »
Ok - long story short - same result.

I now took a backup from the other router (r26446) as the base restore file for run u_fw (which was larger than all the other firmware packages, so the issue is not block size) - and it restored fine.

I then updated to r27240 via web update (unmodified web update file, clear settings checked) and it updated fine.

I then updated to r27805 via web update (unmodified web update file, clear settings checked) and it bricked the router (downloaded the firmware .bin several times, checked the md5 checksum, ...).

When I tried to update with any factory>ddwrt file from web update, the router simply wouldnt update (file gets transfered, router then rejects it and reboots - message in the browser says "successfully updated" - but thats simply the mask that gets triggered, the router doesnt update).

When I tried to flash the factory>ddwrt file with run u_fw (file doesnt start with the correct row of bits - in fact, this row is nowhere to be found) - which IS NOT RECOMMENDED (because it will most certainly brick your router) > brick.

But this time the error messages were different from the bricks before, complaining about magic numbers not matching and not having any valid firmware in any of the two "blocks" the router checks on bootup.
-

So in fact, the brick I get when trying to update to r27805 seems to be caused by the update itself.

Sticker on the PCB says rev0.

This is the exact moment, when the router crashes on those newer firmwares:


And the most current Firmware I was able to successfully install on my european g450h remains
r27240

Sad to report it that way, but thats what happens in my case.
« Last Edit: September 18, 2015, 04:22:21 AM by harlekin »

harlekin

  • Calf
  • *
  • Posts: 10
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #126 on: September 18, 2015, 04:05:26 AM »
If anyone else needs the USB to serial dongle and the pin header to connect via the routers serial port - after a bad flash - you can get everything you need for 5Eur (no delivery cost to most countries) from dx.com

Those are the sku numbers I ordered:


Soldering is not required - especially if your router comes with a uboot version that still supports the ctrl+c interrupt. You can manually hold the contacts while pluging the router in and then press ctrl+c until the prompt triggers and the router stops the booting process, then you can let the pin headers "fall through", ensuring that there is a little pressure on them from the cable. As long as additional ctrl+c  presses show up in the prompt, you should be fine. If you follow the linked tutorial (the one with the pictures), you'll make sure, that the actual firmware file gets pulled over the ethernet port, and the ping, the tftpboot f8100000 and the run u_fw command usually go through as they should (just dont jiggle the connections once crtl+c works a few times in a row.).

The USB to serial dongle needs drivers which can be found here:
http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41

Attention _this_ USB dongle does not work with Windows 8, 8.1, or 10. Look for another one with a chipset those operating systems support - if you only have access to machines running those.
« Last Edit: September 18, 2015, 04:36:36 AM by harlekin »

JacobD84

  • Tatanka
  • **
  • Posts: 66
  • Bringin the DD-WRT.
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #127 on: September 18, 2015, 04:15:25 AM »
OK, this is looking more like i feared as that form of crash is familiar, and i hark back to a problem with my ancient G125 here that refused to accept firmwares larger than 24MB despite releases being available:

Namely, there appears to be a limit on firmware size for some routers, with your G450 being Rev0 i am considering this a possibility (Im not sure on what the most current revision is but mine are 1; maybe the Buffalo staff can fill us in?).

r27240 is 25905KB (<26MB)
r27805 is 26869KB (>26MB and nearly an entire MB larger)

Can you try update from r27240 to r27600 (which is also >26MB but only half a MB larger than r27240) here:
ftp://ftp.dd-wrt.com/betas/2015/08-11-2015-r27600/buffalo_wzr_hp_g450h/

If it refuses to accept r27600 the firmware size is looking more like the issue. I've temporarily updated the FP to report the two most current working versions reported (Thanks harlekin)


On the subject of USB-TTL units; for those in the UK here are the ones i use (ebay.co.uk):

FT232RL To Serial Module USB To TTL level + USB Cable+Dupont Arduino Brush mode
http://www.ebay.co.uk/itm/271875595105?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

USB To Serial TTL level CP2102 With 3.3v Output with DUPONT Line
http://www.ebay.co.uk/itm/301466387863?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
« Last Edit: September 18, 2015, 04:36:19 AM by JacobD84 »

harlekin

  • Calf
  • *
  • Posts: 10
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #128 on: September 18, 2015, 05:41:18 AM »
r27600 bricks it as well (webupdate, unmodified, clear settings), same cryptic error profile as the one posted before.



Also how lucky are we, that someone in our midst can read cryptic sign error messages.. ;)

Unexpected firmware size limits on earlier revisions, ey? Ts ts ts, how very disappointing... ;)

edit: Image added.

edit2: Just opened up my second (european) g450h, sadly its a rev0 as well, so I cant do a direct comparison myself.
« Last Edit: September 18, 2015, 06:49:05 AM by harlekin »

JacobD84

  • Tatanka
  • **
  • Posts: 66
  • Bringin the DD-WRT.
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #129 on: September 18, 2015, 01:35:45 PM »
Hmmm; OK, last try if you can please?

r27332 is the first revision to break the 26MB barrier, can you get this to work?
ftp://ftp.dd-wrt.com/betas/2015/06-16-2015-r27332/buffalo_wzr_hp_g450h/

If this doesn't work either I'll state r27240 as the last supported revision for the Rev0 G450H as i have no means of testing the things myself having only Rev1's.

harlekin

  • Calf
  • *
  • Posts: 10
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #130 on: September 19, 2015, 02:18:36 AM »
r27332 is still below 26MB and therefore works.

The last release still below 26MB is

r27343 and it still works.



The first release above 26MB is

r27360 and sure enough it bricks the router (rev0, european, G450H).

« Last Edit: September 19, 2015, 03:09:49 AM by harlekin »

crammed

  • Calf
  • *
  • Posts: 17
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #131 on: September 19, 2015, 08:54:32 AM »
Sticker on the PCB says rev0.
I'd like to upgrade to one of the r27xxx builds, but I don't think that I have the patience/skill to unbrick my router.

In my "Status" tab in DD-WRT (r24461), the "CPU Model" shows as "Atheros AR7242 rev 1.1 (0x1101)". Can I assume that means PCB rev. 1.1 and that I am good to go with r27805?

Thanks for your help.

harlekin

  • Calf
  • *
  • Posts: 10
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #132 on: September 19, 2015, 09:17:03 AM »
No, I'm afraid not - I have rev1.1 showing on my routers there as well - and we know those are rev0 versions as far as Buffalo is concerned.

The only method I know of - to get the "Buffalo revision version" (without a USB serial dongle ;) ) is from the sticker on the PCB.
Opening the G450H isnt that hard - if you have got the right screw bit. The screws are Torx screws (6 pointed stars) > https://upload.wikimedia.org/wikipedia/commons/1/1c/Torx-Bits_T15-T20-T25-T30.jpg

If you want to be safe - flash nothing above r27343 (ie. no firmware that is above 26MB).

Im testing this one right now - but it will be a limited test, since I do not use the routers Wifi function for my purposes. :)

Also - if you have a jffs or an opt partition on the harddrive you are connecting to the router (you would have had to create those in the first place.. ;) ), somewhere above version r26446 dd-wrt started not displaying a webinterface, once a harddrive is connected - to fix this, I had to delete all files on the jffs and opt partitions on the harddrive (not using them at the moment anyhow). Not sure what triggered it specifically, but since then, connecting a harddrive works fine again.
« Last Edit: September 19, 2015, 09:39:40 AM by harlekin »

crammed

  • Calf
  • *
  • Posts: 17
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #133 on: September 19, 2015, 11:04:08 AM »
No, I'm afraid not - I have rev1.1 showing on my routers there as well - and we know those are rev0 versions as far as Buffalo is concerned.

The only method I know of - to get the "Buffalo revision version" (without a USB serial dongle ;) ) is from the sticker on the PCB.
Opening the G450H isnt that hard - if you have got the right screw bit. The screws are Torx screws (6 pointed stars) > https://upload.wikimedia.org/wikipedia/commons/1/1c/Torx-Bits_T15-T20-T25-T30.jpg

If you want to be safe - flash nothing above r27343 (ie. no firmware that is above 26MB).

Im testing this one right now - but it will be a limited test, since I do not use the routers Wifi function for my purposes. :)

Also - if you have a jffs or an opt partition on the harddrive you are connecting to the router (you would have had to create those in the first place.. ;) ), somewhere above version r26446 dd-wrt started not displaying a webinterface, once a harddrive is connected - to fix this, I had to delete all files on the jffs and opt partitions on the harddrive (not using them at the moment anyhow). Not sure what triggered it specifically, but since then, connecting a harddrive works fine again.

Thanks for the quick reply. I do have a Torx set that should work to open up the case.  :)

BUT...  :-[

Against all logic, I tried to do the webupdate to r27805 a couple of times without waiting for your answer (as quick as it was) and got an "Update Failed" error message (no brick) after about 20 seconds. Then I tried again and got an "Upgrade successful. Unit is rebooting now. Please wait a moment..." message.  :)

This wasn't the good news that I thought. Now it looks like it may have bricked. So, I have switched over to the router built into my modem for now. When I have a chance, I'll see if I can get the WZR-HP-G450H back up and running.  :-\

harlekin

  • Calf
  • *
  • Posts: 10
Re: Buffalo WZR-HP-G450H Post 20025 Firmware Solution
« Reply #134 on: September 19, 2015, 11:31:49 AM »
It really isnt that hard - once you've got the USB to serial dongle at the ready. All information is spread about in the only tutorial you should follow (the one with the images.. :) ) and this thread.

Parts of the tutorial are concerned with identifying the router to the Windows machine via the Mac address it outputs in uboot mode, but in practice - these steps can be skipped over, as long as the router can see the windows machine (which is tested via ping 192.168.11.2 from within putty), which was the case for me regardless. Also, as long as the ctrl+c interrupt in putty works - there is no need for any timing based tricks or something along these lines.

There are many potential points of failure along the unbricking process (dongle, drivers, wireing), but the actual unbricking is pretty simple and straight forward.

edit: I used HxD as a hex editor to modify the ddwrt webupdate files. They have to start with "27 05 19 56" to be flashable via run u_fw (use one that is below 26MB, r27240 works and r27343 should work fine as well (installed this one only via webupdate myself)) successfully, btw. Just as another bit of information.
« Last Edit: September 19, 2015, 11:45:34 AM by harlekin »