Buffalo WZR-HP-G300NH (r1, RTL8366SR)

Overview
The device appears to be a Cameo product.

Links of Interest
On the OpenWrt wiki On the DD-WRT wiki

Flashing dd-wrt
Flashing WZR-HP-G300NH

Flashing OpenWrt
Flashing WZR-HP-G300NH

Pictures
Images 

Recovery
tested and verfied........There is a easy process to unbrick your router, tested on wzr-hp-g300nh v1,it was tested under the following brick conditions 1) flashing green router light constant 2)blinking red diag light 3)solid red diag light and it works, so if you follow these instructions step by step you will be back in business.This was done in windows 7 ultimate.

How to set up a TFTP environment in Windows Vista/7:

1) Set up your network on the Laptop/Desktop. The boot environment uses an IP of 192.168.11.1 on the router, regardless of what you have it set to in OpenWRT.  Set the NIC card on the Laptop/Desktop to 192.168.11.2 for the IP, 255.255.255.0 for the Subnet Mask and 192.168.11.1 for the Gateway.

2) Set a static arp entry. The arp command wouldn't work for me to set a static entry, apparently it's a bug in windows that will happen occasionally.  Instead, I needed to use netsh.  Open a command prompt as an administrator (right click on command prompt and select run as administrator).  After a command prompt is open, type the following command: netsh -c "interface ipv4" .  Use the quotes and hit enter after typing this.  It will bring you to a "netsh interface ipv4>" command prompt.  Once here type the following: set neighbors "Local Area Connection" 192.168.11.1 02-aa-bb-cc-dd-1a .  "Local Area Connection" is the name of the NIC card you configured for the 192.168.11.2 address earlier.  Use the quotes.  The name can be found in network connections in the control panel, this is the only part of the command that might differ for you, though it shouldn't if you only have one NIC in your system. Hit enter after typing this command.

3) Verify the arp entry by typing arp -a, you should see a static entry for 192.168.11.1 with a MAC of 02-aa-bb-cc-dd-1a. If you screwed up the command delete it using: arp –d 192.168.11.1 or if you screwed up the IP address type the incorrect IP address there instead.  This in essence gives you a free pass through the door you cracked open earlier.  You don’t need to ask for directions to do anything so to speak, you have a map to the destination.

4) Install TFTP client. Go into control panel, program and features, click on turn windows features on or off.  Scroll down until you see TFTP client, check this box and hit OK.  After it finishes installing reboot your Laptop/Desktop.

So now that you have a environment conducive to flashing, the real “fun” begins.

download the openwrt-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin firmware:

Open command prompt and change directory to the download location. In my case “cd c:\users\username\desktop” without the quotes. Type: tftp -i 192.168.11.1 PUT openwrt-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin. Don’t hit enter yet though. Unplug the power from your router and plug it back in again, immediately hit the enter key on your desktop/laptop. Apparently,during boot up the router waits for a short period to see if it should accept a new firmware package, this is your window of opportunity to upload the openwrt firmware. It should only take about a second to finish the upload, DO NOT touch your router, walk away from it for 15 minutes. Do not believe any of the lights on the router. They are lying to you, they are begging for you to brick the router. When you come back you MIGHT be in good shape, change your IP to 192.168.1.1 (no need to delete the arp entry yet) and try to telnet into it. If you can, change the password using the passwd command, exit the telnet session and restart the router. You should be able to get to the web interface (192.168.1.1). If you can’t do any of this try holding down the reset button for 30 seconds, then unplug the power, release the button and hold again for another 30, plug the power in, release the button and hold for another 30. If all else fails try this entire step again and wait 15 more minutes. 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. 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= (if u cant do this just rename the file to firmware.bin) 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.

That’s it! You’re done! After all this I can say without a doubt the original firmware is the most “reliable” and rather feature packed. DD-WRT is buggy and doesn’t really offer anything over the stock firmware. I would have never been able to do dev work without OpenWRT though, great firmware, terrible support for this router. I did what I needed to do on it though and learned a lot of useful information along the way so it was a positive experience, downright maddening but still positive