OpenWrt Forum Archive

Topic: Buffalo WZR-HP-G300NH revert to stock images

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

If you are testing OpenWrt and DD-Wrt versions a lot (e.g. being a power user or contributor), or you just tried them for the first time, then you may want to return to Buffalo's stock firmware for different reasons (e.g. testing web upgrade from stock).

For the Buffalo WZR-HP-G300NH you may found Brainslayer's post with a TRX image of Buffalo's stock EU firmware 1.65.
That firmware is already quite old but still fulfills its purpose, but there's also a Buffalo DD-Wrt build you may want to return to.
Additionally the TRX image can not be used to revert from OpenWrt.

Hence I created some "revert to stock images" from Buffalo's EU firmwares for all three cases.
I used my own naming conventions to easily recognize the file type:
* .bin = pure flash image without any headers (e.g. for OpenWrt)
* .trx = TRX flash image (e.g. for DD-Wrt)
* .tftp = TFTP flash image with Buffalo TFTP Header for recovery through U-Boot's tftpserver on router start. Only accepted when "accept_open_rt_fmt 1" is set in U-Boot.
* .img = The original firmware images are encrypted and begin with "bgn". Can always be used for tftp recovery.

Use the images at your own risk: http://ftp.maddes.net/hardware/WZR-HP-G300NH/

Note that Buffalo's DD-Wrt build can also flash the original stock firmware images besides TRX images.
Note that Buffalo's U-Boot recovery TFTP server can also receive original stock firmware images and flash them.

If you know about other "revert to stock images" for the Buffalo WZR-HP-G300NH then feel free to post them here.

Maddes

P.S.:
Buffalo's web page is undergoing an overhaul and not all files are present yet (e.g. for WZR-HP-G300NH).
But you can still access the old support page at http://109.104.88.61/support/downloads (Buffalo DD-Wrt builds: ftp://wzr-hp-g300nh:wzr-hp-g300nh@188.65.163.247/).

P.P.S.:
Please avoid "thank you" and "works for me" posts to avoid noise in the thread.
For TFTP issues please search the forum and wiki, as the images themselves are working and not the reason for your issue.
You can mail/PM me if wanted (use the links at the left of this post).
Thanks in advance.

(Last edited by maddes.b on 5 Feb 2012, 20:30)

The pure binary image starts with the uImage magic word 27 05 19 56 (big endian). There are no additional information or headers in it, just the pure firmware binary.

To create a TRX image with its HDR0 header use the trx command from DD-Wrt's Subversion repository.
I used it succesfully under 64-Bit GNU/Linux Debian 6.0 "Squeeze" AMD64.
Those TRX images can be used with DD-Wrt, but it is mandatory to set the "noheader" flag, otherwise the header will be flashed too and the router won't boot (U-Boot error "bad magic number").

dd-wrt# tools/trx -f noheader -o image.trx image.bin

To create a TFTP image yourself just add the 32 bytes long, static Buffalo TFTP header in front of the pure binary image:

00000000h: 23 20 41 69 72 73 74 61 74 69 6F 6E 20 50 75 62 ; # Airstation Pub
00000010h: 6C 69 63 20 46 6D 74 31 00 00 00 00 00 00 00 00 ; lic Fmt1........
00000020h: 27 05 19 56 .. .. .. .. .. .. .. .. .. .. .. .. ; '..V............

(Last edited by maddes.b on 27 Jul 2012, 21:32)

In OpenWrt `trx` is part of tools/firmware-utils, but it does not support the "flash without header / no header" flag of DD-Wrt.

I created a patch (patchwork #2450) that allows to specify the flag value inside the trx header from the command line.

openwrt# staging_dir/host/bin/trx -c 1 -m 20000000 -o image.trx -f image.bin

will ceate a trx image that can be correctly flashed from DD-Wrt.

(Last edited by maddes.b on 27 Jul 2012, 21:55)

What is the password to sign into the webgui?  I tried root/<blank>, root/admin, root/password, admin/admin, root/root, etc.  No luck.  I downloaded the Buffalo_DD-Wrt_V24-SP2_r14998.zip from your link and flashed my Buffalo router.  Having the password would be great help here.  Thanks. smile

Hi,

i upgraded my router from stock to DD-WRT and then to OpenWRT.
Can i use your .bin file to go back to stock from OpenWRT ?
And can i use OpenWRT webflash to do this ?

EDIT:
Ok, tested ist yesterday and it worked perfectly wink

Thank you wink

(Last edited by DaveRack on 30 Nov 2012, 11:35)

Hi,

I can only find the .bin and .trx inside the zip files.
Where can I find bgn*.img and *.tftp?

Thanks!

The discussion might have continued from here.