OpenWrt or DD-WRT on the Buffalo WZR-HP-AG300H

A quite new and powerful alternative to the TP-Link TL-WR1043ND running OpenWrt is the Buffalo WZR-HP-AG300H.

About the Hardware

The Buffalo WZR-HP-AG300H contains a powerful set of hardware, maybe the strongest for SOHO routers currently on the market:

CPU Ram Flash Network WiFi USB Serial JTag
Atheros AR7161@680MHz (MIPS) 128MB 32MB 4+1 using an Atheros AR8316 Gigabit Ethernet switch 2x - Atheros AR9220 (dual band, PCI) + AR9223 (single band) - (11a/b/g/n) 1x USB 2.0 Yes ?

Nice features:

  • fast processor
  • concurrent dual-band 2.4 GHz / 5 GHz support
  • 2 (Rx) x 2 (Tx) antennas
  • powered by DD-WRT firmware supported by the producer

Please refer to the OpenWrt wiki entry or to Buffalo's product website for further details on the hardware. Some more information can be found on WZR-HP-AG300H's wikia entry.

The switch supports port mirroring. It can be configured with in /etc/config/network in the switch section by setting the following properties: enable_mirror_rx, enable_mirror_tx, mirror_monitor_port, and mirror_source_port.


Nice photos can be found in my PicasaWebAlbum Buffalo WZR-HP-AG300H Hardware Photos. They include pictures on how to open the case of the router and several snaps of the pcb inside.

OpenWrt Firmware

I have successfully flashed OpenWrt on the device. Didn't use OpenWrt on it extensively so far however (mostly used the DD-WRT firmware that was provided on the router when I bought it).

Firmware choices from as of July 2011:
(Remember that SquashFS is a read only file system and JFFS2 is writable! See File Systems in the OpenWrt Wiki.)

There are:

On 2011-12-11, the jffs2 variant didn't boot for me, but the squashfs one did work.

There had been many changes and bug fixes to OpenWrt concerning the WZR-HP-AG300H:

  • Both radios work since 2011-06-25
  • It's got a default network configuration since 2011-06-25.
  • Sysupgrade works since 2011-07-04
  • USB port is powered since 2011-07-24
  • The JFFS2 OpenWrt image works since 2012-01-27 (also check this)
  • The LAN port was proposed to be tagged with VLAN id 1 in the default configuration on 2012-10-26
  • Some problems concerning the LED control were reported on 2012-11-26

Find more information on the OpenWrt forum by searching for WZR-HP-AG300H.

Custom compile of OpenWrt

If you want to compile OpenWrt from source, it's not difficult and you get your own custom image. Just use the following settings:

  • Target: AR71xx
  • Target Profile: Buffalo WZR-HP-AG300H

Usage of gpio pins, here: "Power on USB Port" (cf. OpenWrt ticket #9684 and RouterStation GPIO Notes):

echo 2 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio2/direction
echo 1 > /sys/class/gpio/gpio2/value

TFTP Flashing/Installation using a Linux Computer

Flashing another firmware (stock easy, stock dd-wrt, openwrt, dd-wrt community edition etc.) is really easy via tftp. The box seems to be almost unbrickable as can almost always save you.

Steps for Ubuntu 11.10:

  1. Connect the network:
    Connect the WZR-HP-AG300H and your computer both to a switch.
  2. Power off (unplug the power cord) of the WZR-HP-AG300H
  3. Start your Ubuntu Linux installation (in my case a virtualized Ubuntu 11.10, connected to the computer networking adapter using the bridged setup!)
  4. Install tftp: sudo apt-get update && sudo apt-get install tftp
  5. Get the latest OpenWrt firmware:
    cd ~/Downloads && wget
  6. Set up an alias for your network adapter and prepare the ARP-Cache:
    sudo ifconfig eth0:1
    sudo arp -s 02:aa:bb:cc:dd:20
  7. Start the TFTP transfer
    echo -e "binary\nput openwrt-ar71xx-generic-wzr-hp-ag300h-jffs2-tftp.bin" | tftp
  8. Immediately afterwards: plug in the power cord of you router. If you see the diag light rapidly flashing after a few seconds the flashing is in progress.
  9. Wait at least 6 minutes after the red flashing LED is off (if you don't you might have to do the same stuff again).
  10. Connect to your newly flashed OpenWrt router via Telnet:
    sudo ifconfig eth0:1 telnet

(More on and

I also flashed it successfully on a Mac OS X based computer (using OS X 10.8 developer preview) with the following commands:
sudo arp -s 02:aa:bb:cc:dd:20 and echo -e "binary\nput openwrt-ar71xx-generic-wzr-hp-ag300h-squashfs-tftp.bin" | sudo tftp .
I had to try it about 10 times until it worked.

The Switch

The switch is an Atheros AR8316 6-port Gigabit Ethernet switch AR8316. You can use the configuration tool swconfig to set it up.

Usage examples:

swconfig dev eth0 show
swconfig dev eth0 port 1 get pvid
swconfig dev eth0 port 1 get link

When OpenWrt is starting up, the file function setup_switch_dev from the file /lib/network/ is calling swconfig dev eth0 load network which let's swconfig read and apply the uci configuration file /etc/config/network.

Using a 3G Modem

Using a usb modem stick to connect to the internet is possible with the WZR-HP-AG300H. I successfully tested it with a Huawei E352s-5. The details can be read in my other blog post Using the Huawei E352s-5 UMTS USB Modem Stick with Ubuntu and OpenWrt.

Going back to the stock firmware

If you want to go back to Buffalo's stock firmware, just download the package and flash this image using the tftp method described above (just replace the openwrt...-tftp.bin file name with the .enc file of Buffalo's firmware). I tested this and it worked for me to go back from OpenWrt to Buffalo's DD-WRT version without problems.

DD-WRT firmware

Increase power

80211n_wlanconfig ath0 set_txpowercap = 30. works.