Buffalo WZR-HP-G300NH (r1, RTL8366SR)

From TechInfoDepot
(Redirected from Buffalo WZR-HP-G300NH)
Jump to navigationJump to search
multiple revisions of this device, use caution
bgn (N300)
Buffalo AirStation HighPower N300
Buffalo WZR-HP-G300NH.jpg
Wikipedia
InfoDepot Wiki
WikiDevi.wi-cat.ru
3rd Party Firmware
dd-wrt
OpenWrt
Tomato any flavor
Incompatible
Gargoyle
Status Unknown
Platform
BrandModelRev
Buffalo WZR-HP-G300NH (r1, RTL8366SR)
FCC ID
IC ID
Type
wireless router
CPU1
Atheros AR9132
CPU1 Type
MIPS 24K
CPU1 Speed
400 MHz
Flash1 Chip
Brand? Model?
Flash1 Size
32 MiB33,554,432 B <br />262,144 Kib <br />32,768 KiB <br />256 Mib <br />0.0313 GiB <br /> (Parallel)
RAM1 Size
64 MiB67,108,864 B <br />524,288 Kib <br />65,536 KiB <br />512 Mib <br />0.0625 GiB <br />
RAM1 Chip
Brand? Model?
ETH chip1
Atheros AR9132
Switch
Realtek RTL8366SR
Ethernet Port Count
1-1GbE-WAN
4-1GbE-LAN
Wired Standard
IEEE 802.3/3u/3ab

802dot11 OUI: none specified

Stock bootloader
U-Boot
Expansion IF types
none specified
Power
12 VDC, 2 A
Connector type
barrel
Serial Port (UART)
yes
JTAG Port
yes
Other
Manuf/OEM/ODM
3rd Party Firmware Support
DD-WRT • (List)
, LibreWrt, OpenWrt • (List | Dev | DLs)
Retail
Availability End of Life
End of Life date 2016
FCC approval date 04 March 2009
Country of manuf China
Radio 1
Chip1
Atheros AR9132
Chip2
Atheros AR9103
Wireless interface OUI
none specified
Antenna Connector Type
U.FL
MIMO status
2x3:2
Wireless Standard
IEEE 802.11b/g/n
802.11n
up to 300 Mbps
802.11g
up to 54 Mbps
802.11b
up to 11 Mbps
WiFi Operating Frequency
2.4 GHz
 FCC ID
Buffalo WZR-HP-G300NH (r2, RTL8366RB)FDI-09101560-0
 CPU1 brandRadio1 chip1 brandRadio1 chip2 brand
Buffalo WZR-HP-G300NH (r1, RTL8366SR)AtherosAtherosAtheros
Buffalo WZR-HP-G300NH (r2, RTL8366RB)AtherosAtherosAtheros
Buffalo WZR-HP-G300NH2AtherosAtheros

For a list of all currently documented Atheros (QCA) chipsets with specifications, see Atheros.
For a list of all currently documented Realtek chipsets with specifications, see Realtek.

For a list of all currently documented Buffalo device with specifications, see Buffalo.

300 Mbps - 2SS 2.4GHz 802.11n (40MHz chan.) = N300 class

Overview

The device appears to be a Cameo product.

Links of Interest

Flashing

Flashing dd-wrt

Support started version: v24sp2 v13525 20091228
Current supported version: ?

Flashing WZR-HP-G300NH

Buffalo provides a re-branded version of DD-WRT specifically for this router. It can be flashed from the GUI and is available on the Buffalo website:

http://www.buffalotech.com/support/getfile/wzrhpg300nh-pro-v24sp2-14998.zip

Read Me Documentation for Buffalo delivered DD-WRT firmware: http://www.buffalotech.com/support/getfile/wzrhpg300nh-pro-v24sp2-14998.txt

As of Feb 2010, the WZR-HP-G300NH can be flashed with DD-WRT directly from the Buffalo web GUI. To do this, go to http://www.dd-wrt.com/site/support/router-database, look up Buffalo WZR-HP-G300NH, and download the firmware file you need (just one file).

DD-WRT on Buffalo WZR-HP-G300NH (Japanese version)

The official DD-WRT release cannot be pushed by web upload onto the Japanese WZR-HP-G300NH original Buffalo firmware. Buffalo Japan added a "safeguard" that checks for Japanese firmware and rejects western firmware. For people with a Japanese router, see the following two sites for details.

Debricking Info

There have been a few guides out that have reports of success when de-bricking the WZR-HP-G300NH. This however, has been explained by Brainslayer in this post, please use it for referencing info you may need to de-brick your unit, should the occasion arise.

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=87579

Flashing OpenWrt

On the OpenWrt ToH (techdata entry)
On the OpenWrt Wiki
On the OpenWrt Forum
OpenWrt Target: ath79
OpenWrt Subtarget: generic
OpenWrt Package architecture: mips_24kc
Support started version: 10.03.1
Current supported version: 23.05.5
Flashing WZR-HP-G300NH

Please insert instructions here

USB Info

Samba Configuration

The latest build has already include simple UI to configure Samba
DD-WRT already includes a built-in Samba server, but is missing UI to configure it. These instructions provide a simple way to setup Samba. They are based on instructions from http://g300nh.blogspot.com/2010/06/samba-sharing-in-dd-wrt.html, but have been modified for users not familiar with Linux. All setup can be done from within the DD-WRT interface without requiring the use of a remote shell.

Pre Requirements

DD-WRT doesn't have any tools to format an HDD, so you must have an preformatted HDD in a format that DD-WRT can understand (FAT32, EXT3, etc.)

Go to Services/USB within DD-WRT and change the settings as indicated below:

Core USB Support: Enable
USB 2.0 Support: Enable 
USB Storage Support: Enable 
ext2 / ext3 File System Support: Enable
FAT File System Support: Enable
Automatic Drive Mount: Enable 
Disk Mount Point: /mnt

After apply the changes, if you have already plugged in an HDD, you should see its information in the UI.

Anonymous Sharing Setup

These step will share a disk that is already mounted at /mnt. It will be publicly available to everyone on the network and won't require a username or password to connect.

Go to Administrators/Commands in DD-WRT and copy the script below into the textbox then choose Save Startup

# Stop samba service
killall smbd
killall nmbd
sleep 2

# Configure samba
mkdir -p /tmp/etc/samba
echo "
[global]
	netbios name = DD-WRT
	workgroup = WORKGROUP
	server string = DD-WRT
	syslog = 10
	obey pam restrictions = yes
	socket options = TCP_NODELAY
	preferred master = no
	os level = 20
	
	security = share
	guest account = nobody
	invalid users = root, mail, deamon, reboot
	null passwords = yes
	guest only = yes	
	map to guest = Bad User

	private dir = /tmp/etc/samba/
	lock directory = /var/lock/
	pid directory = /var/run/

	unix charset = UTF-8
	dos charset = UTF-8
	map archive = No
	map hidden = No
	map system = No

[Share]
	path = /mnt/
	read only = no
	create mask = 0700
	directory mask = 0700
" > /tmp/etc/samba/smb.conf

# Add user for samba
# guest user
grep -q nobody /etc/passwd || echo 'nobody:x:65534:65534:nobody:/mnt:/bin/false' >> /etc/passwd

# Start samba service
SMBOPTIONS="-s /tmp/etc/samba/smb.conf"
/usr/sbin/smbd $SMBOPTIONS
/usr/sbin/nmbd $SMBOPTIONS

Setup Sharing with Username/Password

Because smbpasswd program build-in DD-WRT always treats /etc/samba/smbpasswd as the samba password file, and /etc is a readonly file system, we must temporary bind /tmp/etc to /etc when adding a user. Change # Add user for samba section like below:

# Add user for samba
mount -o bind /tmp/etc /etc

# clear samba user if exists
echo "" > /tmp/etc/samba/smbpasswd

# guest user
grep -q nobody /etc/passwd || echo 'nobody:x:65534:65534:nobody:/mnt:/bin/false' >> /etc/passwd

# add user: username=share, password=sharepassword
grep -q share /etc/passwd || echo 'share:x:65534:65534:nobody:/mnt/:/bin/false' >> /etc/passwd
smbpasswd share sharepassword

umount /etc

If you need add more users, you can repeat these lines with the desired usernames and passwords

# add user: username=share, password=sharepassword
grep -q share /etc/passwd || echo 'share:x:65534:65534:nobody:/mnt/:/bin/false' >> /etc/passwd
smbpasswd share sharepassword

In the [global] section of Samba configuration, update the config value as indicated below:

	encrypt passwords = true
	passdb backend = smbpasswd
	security = user
	null passwords = no
	guest only = no	
	smb passwd file = /tmp/etc/samba/smbpasswd

Configuration Share Folder

add later

Setup DD-WRT as Windows Name Server

If your network has more than one subnet, you might need to setup a Windows Name Server (WINS server), You can make you router become a WINS server even if you don't have a USB HDD or you don't need a sharing setup. Just user script like Anonymous Sharing Setup but change the below setting in the [global] section:

wins support = yes

Go to Setup/Basic section in DD-WRT and set WINS server in DHCP group to your LAN IP address (ex: 192.168.11.1)

If your network has any device that uses a static IP address, find the WINS section and point to DD-WRT LAN IP address (If you use Windows, choose properties of you adapter, click Advanced, goto WINS tag. If you use Linux, add wins server = xxx.xxx.xxx.xxx in [global] section of samba)

Optware on Atheros

Running Optware on Atheros is somewhat different than broadcom. This post explains how to install and setup Optware on Atheros.

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=86912

Pictures

Images
FCCID FDI-09101560-0

Notes

Fix for WiFi Dropouts

Many users of Buffalo DD-WRT (v24SP2) routers, like me, experience frequent WiFi dropouts, even after tweaking WiFi settings for strong reliable signals.

This startup script monitors a WiFi-connected device on your network that is always on to monitor WiFi dropouts. If there are two missed pings, then it restarts the WiFi interface to restore the connection. The script has been modified from this one for Broadcom hardware, to get it to work on Atheros hardware.

To get startup scripts to run, you will first need to follow these instructions. I prefer the shell script method which, as the prerequisites list, requires that you you are set up for SSH (or Telnet) and SCP connections to the router. It also requires that you set up the jffs flash file system, so that you have somewhere permanent to store and run the script after reboots.

As with all startup scripts, you should first run this manually from a temporary location to make sure it is working correctly. Once you have it working properly, you can then make it a startup script (by giving it a '.startup' extension, making it executable (chmod to '700'), and placing it in /jffs/etc/config/ (or other auto startup directory)).

#!/bin/sh

# This script fixes problems with intermittent dropouts of the WiFi radio.
# It pings a Wifi client to monitor when the connection has dropped (2 missed pings)
# It then closes and restarts the WiFi interface to restore WiFi connections.
# Modified (for Atheros chips, e.g., Buffalo DD-WRT WZR-HP-G300NH) from:
# http://www.dd-wrt.com/wiki/index.php/Useful_Scripts#Reset_Wireless_Radio
# (Original script was for Broadcom chip, but Atheros has no 'wl' command)

# A wireless client that should always be up, to monitor (modify this for your own network)
CLIENT_IP=192.168.2.160

# Wireless interface that disappears
# (The command below will generate this automatically
# Should return 'atho' for Atheros hardware)
INTERFACE=`nvram get wl0_ifname`

# seconds between checks
CHECK_EVERY=60

# seconds to wait after failed ping to try again
FAIL_AGAIN=10

# after cycling, wait this many seconds (limits excessive refreshes if the monitored device is off)
AFTER_CYCLE=9000

# Client must be up before starting main loop
while true
do
  if ping -c 1 ${CLIENT_IP} >/dev/null
  then
    echo "${CLIENT_UP} ok - begining main loop"
    break
  fi
done

# main script to restart wireless interface
while sleep ${CHECK_EVERY}
do
  if ping -c 1 ${CLIENT_IP} >/dev/null
  then
    echo "${CLIENT_IP} ok"
  else
    echo "${CLIENT_IP} dropped one"
    sleep ${FAIL_AGAIN}
    if ! ping -c 1 ${CLIENT_IP} >/dev/null
    then
      echo "${CLIENT_IP} dropped two, restarting ${INTERFACE} (WiFi)"
      # wl -i ${INTERFACE} down  **** NO wl command for Atheros hardware, replace
      ifconfig ${INTERFACE} down
      sleep 3
      # wl -i ${INTERFACE} up
      ifconfig ${INTERFACE} up
      sleep ${AFTER_CYCLE}
    fi
  fi
done 2>&1

Alternate WiFi Dropout Fix

My WiFi dropouts are always preceded by the following message in /var/log/messages

user.warn kernel: Sending cwmmode action frame to ff:ff:ff:ff:ff:ff

I wrote a simple script to look for this string in the logs and restart the WiFi interface. It looks for the string every 56 seconds in the current 10 minute interval of logs. For example, when run at 11:47, it will look for the string from 11:40 on. If found, it will restart the interface and sleep for 10 minutes before checking again. I find this triggers around every other day.

After enabling Syslogd under Services->Services->System Log, with no remote server specified

With ssh or telnet access, run the following command and then reboot the router

nvram set rc_startup='while sleep 57; do if grep ^"`date  +"%b %e %H:%M"|cut -c1-11`" /var/log/messages|fgrep ff:ff:ff:ff:ff:ff > /dev/null ; then ifconfig ath0 down; sleep 4; ifconfig ath0 up; logger "wifi hang, restarting"; sleep 542; fi; done'

Please read the previous WiFi fix for more details on scripting options.

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