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.
Photos
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 http://downloads.openwrt.org/snapshots/trunk/ar71xx/ 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:
openwrt-ar71xx-generic-wzr-hp-ag300h-jffs2-factory.bin
openwrt-ar71xx-generic-wzr-hp-ag300h-jffs2-sysupgrade.bin
openwrt-ar71xx-generic-wzr-hp-ag300h-jffs2-tftp.bin
openwrt-ar71xx-generic-wzr-hp-ag300h-squashfs-factory.bin
openwrt-ar71xx-generic-wzr-hp-ag300h-squashfs-sysupgrade.bin
openwrt-ar71xx-generic-wzr-hp-ag300h-squashfs-tftp.bin
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:
- Connect the network:
Connect the WZR-HP-AG300H and your computer both to a switch. - Power off (unplug the power cord) of the WZR-HP-AG300H
- Start your Ubuntu Linux installation (in my case a virtualized Ubuntu 11.10, connected to the computer networking adapter using the bridged setup!)
- Install tftp:
sudo apt-get update && sudo apt-get install tftp - Get the latest OpenWrt firmware:
cd ~/Downloads && wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-wzr-hp-ag300h-jffs2-tftp.bin - Set up an alias for your network adapter and prepare the ARP-Cache:
sudo ifconfig eth0:1 192.168.11.2
sudo arp -s 192.168.11.1 02:aa:bb:cc:dd:20 - Start the TFTP transfer
echo -e "binary\nput openwrt-ar71xx-generic-wzr-hp-ag300h-jffs2-tftp.bin" | tftp 192.168.11.1 - 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.
- 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).
- Connect to your newly flashed OpenWrt router via Telnet:
sudo ifconfig eth0:1 192.168.1.2telnet 192.168.1.1
(More on https://forum.openwrt.org/viewtopic.php?pid=138610#p138610 and http://wiki.openwrt.org/toh/buffalo/wzr-hp-ag300h#oem.installation.using.the.tftp.method)
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 192.168.11.1 02:aa:bb:cc:dd:20
and
echo -e "binary\nput openwrt-ar71xx-generic-wzr-hp-ag300h-squashfs-tftp.bin" | sudo tftp 192.168.11.1 .
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/switch.sh 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
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=612310#612310
80211n_wlanconfig ath0 set_txpowercap = 30. works.
References
- If you want to buy it in Germany (Comparison of prices for the German market):
http://geizhals.at/deutschland/a651422.html - Buffalo’s Datasheet for the WZR-HP-AG300H
- OpenWrt Wiki entry on the Buffalo WZR-HP-AG300H: http://wiki.openwrt.org/toh/buffalo/wzr-hp-ag300h
- In the US, you can get it for 90 USD from newegg (2011-07-14):
http://www.newegg.com/Product/Product.aspx?Item=N82E16833162047 - Official downloads (dd-wrt firmware, manual, cd image) can be found when looking for WZR-HP-AG300H on http://www.buffalotech.com/support/downloads/.
Hi, I really appreciate your site; this post was really useful for me for flashing the router. I’ve bought an wzr hp ag300h and I’ve tried many firmware versions (both from the community and official website) of ddwrt, openwrt and also the user friendly from buffalo. I can’t decide wich one of this would be the better choice, considering that all ddwrt versions had problems in installing packages (ipkg problems). My primary needs are an HDD for backups, printer sharing and torrent downloading. Do you have any advices? Is ipkg working for you?
Hi Stefabo, I’m glad the post was useful for you. I didn’t try installing ipgk packages on the dd-wrt firmware. If you know your way around with Linux, OpenWrt would probably the best choice. It’ll take me ~ a couple more weeks until I can play with my router and it’ll make it easier to talk about that stuff. Hope you’ll figure out what works best for you. Sorry, I can’t be of more help. Please let me know what solution you are going with as soon as you decide about it. Appreciate it.
Hi, sorry for the wait! I wanted to let you know the best setup I’ve tried! I tried everything that’s on the web, and I can say that the best solution is OpenWrt! I managed to do almost everything I needed for that Print Sharing, but I think it’s the fault of my printer.
Hi Stefano! Thanks for your answer. I’m using the router with the latest OpenWrt snapshot / trunk version now and it works perfectly for me. I don’t use printer sharing though… All in all, the selection of installable up-to-date packages on OpenWrt is just impressive!
Hi Stephano & Philips, thanks for your post it help me understand a little bit more about my new WZR-HP-AG300H.
If I understand it correctly, the best firmware that you have tested among all there is available is the OpenWrt ?
Previously I was running the DD-Wrt on my Asus WL-500W with the Optware The Right Way with “Lighttpd” & “Samba”.
I would like to do the same, but I’m a bit confuse. Could you tell me if I am ok with what I think
1- I should install the OpenWrt firmware, as today what is the latest version that I should install for my need
Probably the jfss2 should be my choice given it is writable Vs the squashfs (read only)
Before proceeding to step 2, Do I have to connect USB stick or USB Hard drive in the router and have it formatted in a specific way? On DD-WRT I had a 32 Gig USB key connected with 3 partition
Should I do the same with OpenWrt ?
Step 2 – Then Is there and Optware The Right Way package on OpenWrt ?
Step 3. How do I install lighttpd and samba ?
If you have any other suggestion let me know they are very welcome
Thanks
Eric
[...] I’m also planning to use on my Buffalo WZR-HP-AG300H WiFi router. This blog post documents some of its features and [...]
Hi Philip when I execute sysupgrade, the router settings is being lost? thx
Hi tbarat, usually the settings (i.e. the files in the folder /etc) are being retained when you do a sysupgrade and you can continue with the old settings. But you need to install the packages again (so take a note of your installed packages using
opkg list-installed). You can, however, get into trouble, especially when upgrading from a trunk version to another trunk version, as some software configurations may have changed and aren’t compatible anymore. This is more likely the larger the step is you want to make (like upgrading from a really old trunk to the latest trunk). If your settings do not work anymore, you can still erase them via the OpenWrt factory reset procedure. You’re Welcome!okey, I think the upgrading is not a realy surgent work. what is the time interval when the upgradig is recommended.What do you think?
Well, it depends. I upgrade my own main router ~ every 2 months. If I set them up for other people they may stay the way they are for years.
Hi Philip.
Can I connect this antenna for our buffalo router? link:
http://n2.vatera.hu/photos/bb/3b/5dc5_1_big.jpg
thx.
I think this:
https://lh6.googleusercontent.com/-8-qe1jOqWw0/T2rNChJVsgI/AAAAAAAAANE/MSjCXaLVR9M/s1152/IMAG0175.jpg
one side there is a mini connector (this connector will be good?) the other side I want a rp-sma female.
Hi! I’m sorry, I don’t know what kind the connector on the board is and I don’t have it at hand and thus cannot open it at the moment.
You may check the full size version of this photo of the PCB.
I resolved the problem. the connector is u.fl
I connect rp-sma typed antenna, and it works good!
the other question is: Can I boost the wifi range in mW anywhere in the openWRT system?
thx
In general, you can change the transmit power via the config option
txpowerin the /etc/conf/wireless config file (See http://wiki.openwrt.org/doc/uci/wireless?s=txpower ). I don’t know about the possibilities and perspectives of setting this value on the Buffalo WZR-HP-AG300H though. You can also set the transmit power directly on the command line. Here is an example to set it to 20dBm:iw dev wlan0 set txpower fixed 2000(or using the deprecatediwconfig wlan0 txpower 20dBm). You can check the current value viaiwlist txpoweror viaiwconfig wlan0. By the way: If you want to convert between dBm (or mBm: 1 mBm = 1 dBm / 100) and mW check out http://blog.philippklaus.de/2011/06/convert-between-power-and-dbm/ .thx,
1. so the next step is the java application running. which jdk is must to have been installed, or how.
Concerning Java: You may want to read https://forum.openwrt.org/viewtopic.php?pid=152431#p152431
Concerning C/C++: http://wiki.openwrt.org/about/toolchain
root@OpenWrt:~# iw dev wlan0 set txpower fixed 2500 root@OpenWrt:~# iwconfig wlan0 wlan0 IEEE 802.11bgn Mode:Master Frequency:2.462 GHz Tx-Power=15 dBm RTS thr:off Fragment thr:off Power Management:on root@OpenWrt:~#my options is:
root@OpenWrt:~# cat /etc/config/wireless config wifi-device radio0 option type mac80211 option channel 11 option macaddr 4c:e6:76:f9:5e:e2 option hwmode 11ng option htmode HT20 list ht_capab SHORT-GI-40 list ht_capab TX-STBC list ht_capab RX-STBC1 list ht_capab DSSS_CCK-40 config wifi-iface option device radio0 option network lan option mode ap option ssid Romzsa (buffalo) option encryption psk2 option key *******so the news is:
the router deny to set above 15 dBm and I don’t know why…
Hi! It helps to read and work through http://wiki.openwrt.org/doc/uci/wireless .
When my WiFi regulatory domain was set to
USI also wasn’t able to set wlan0 (2,4GHz) to more than 16dBm and wlan1 (5GHz) to more than 13 dBm. You can check the regulatory domain viaiw reg getand set it viaiw reg set xxwhere xx is the country code (such asDEfor Germany).The maximum power you can set depends on the regulatory domain set, the channel in use and possibly also on a calibration from the manufacturer stored in the EEPROM of the device.
To get more information, check the regulatory domain info (telling you what frequencies you are allowed to use at which band widths and the transmit power allowed – the second number in the brackets):
For more information on the corresponding channels check them out this way:
The used mac80211 wifi driver does not yet support DFS (Dynamic Frequency Selection), however, DFS is mandatory for many channels in the 5GHz band if you’re in France or Germany for example!
After all, replacing the antenna usually gives you a much better result than configuring the router to send with one more dBm.
To test this quickly, change your config file
/etc/config/wirelessand apply the settings directly by entering the commandwifi.Another helpful resource about this issue might be http://wiki.openwrt.org/toh/netgear/wndr3700#wireless.regulatory.issues
Have you tried setting up dual wan? I tried in DD-WRT on the AG300H without success.
Hi Anontio,
No idea about DD-WRT. I’m sure it’s possible via OpenWrt though. To use it you have to assign one port of the switch to a new VLAN and add it as a second WAN port. More to be found on http://wiki.openwrt.org/doc/uci/multiwan and in the detailed step by step guide http://www.guideband.com/datasheets/EQ-NR-041-guide.pdf .
For DD-WRT you may want to check out the guides [1], [2], [3] and [4].
Regards
Hi Philip
I can not install the iptables some elements e.g.:
why is this problem? how can I solve it?
I need iprange, connlimit,,…
thx
Hi Barát,
yeah, that’s the problem with the trunk/snapshot Version of OpenWrt. You flash it, wait for a couple of days / weeks and then you cannot install new software packages anymore because the packages are then compiled for a newer version of the kernel (for the latest snapshot).
There are three ways out of this problem:
I would go with the latter choice: Usually this is really painless. Just create a backup of the /etc configuration folder on your router (and add you own custom config files to /etc/sysupgrade.conf in order to keep them while sysupgrading). Also take a not of your installed packages using
opkg list-installedand you’re good to go. Afterwards reinstall your custom packages and the new additional ones you had to run the sysupgrade for.I know this is somehow awkward but that’s the way it is when there is no stable OpenWrt version supporting the router.
Dear Philip, I think the the easiest way is the LuCI Web Upgrade Process, so the least I can cause trouble.
I think, when I sysupgraded and I want to install the packages (list-installed) e.g.opkg install samba. The installation process create a new /etc/smb.conf file,and rename the new files, directories. I’m worry
thank you very much
The LuCI Web Upgrade Process is not much different from the sysupgrade process.
Actually the
opkgtool of OpenWrt is quite smart. So if a/etc/smb.conffile already exists (left over from thesysupgradeprocess), opkg won’t overwrite it. Instead it will write the default configuration file to/etc/smb.conf-opkg. But to be save, you should copy all the configuration files to your computer before sysupgrading (as I wrote). This can be done by creating an archive of /etc on your router usingtar cvzf /tmp/etc.tar.gz /etcand then transferring it to your computer by runningscp root@routerip:/tmp/etc.tar.gz ~/Desktopon your PC. This way the sysupgrade should be as safe as needed.how can I re-change the default config file?
I don’t really understand your question I think. The configuration file in use when you start samba after installing it again (after the sysupgrade) is still the one called
/etc/smb.conf. In case something doesn’t work anymore (very rarely the case) you can check if the structure of the configuration file has changed by having a look into the default config file/etc/smb.conf-opkg.so, I had one probe. I uninstall the samba, but the /etc/smb.conf file remained. then I re-install the samba, and I have a new configuration file named: /etc/smb.conf-opkg. The important question is: how can we set for samba, the configuration file path?
This is being taken care of by the init script that samba comes with:
/etc/init.d/samba. While you can change this, you should know that changes to it will be overwritten when upgrading the samba package.When I reinstall the packages after sysupgrade, there will be two config file for every package (I think). Because I set the backup save button in Luci and this reserve /etc/config/* files.
This is correct. The config file being used is the old one. In case you want to discard your changes and start with a clean/fresh/new configuration file, you can replace the one containing your custom changes with the config file
*-opkg. You should simply try it.sorry, I don’t have that command “config”. :( or I don’t understand what you think.
“config” is just a short form for “configuration”: http://en.wiktionary.org/wiki/config .
It is not a command.
Hi Mr Philipp Klaus, I was flashed the openwrt firmware for my router AH300H and installed LuCI as link: http://wiki.openwrt.org/doc/howto/luci.essentials But have troubles: sometime cannot log in router LuCI web, although a few minutes before had log in its. When happened like that, i must be used Putty and follow this instruction to reset: http://wiki.openwrt.org/doc/howto/generic.failsafe Now, i want to re-flash this Openwrt firmware so it is possible or impossibe? Pls. kindly instructed me step by step (My PC used Window XP & 7)
P/s: My Router: Buffalo AG300H, present firmware: http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-wzr-hp-ag300h-squashfs-factory.bin
Thank you in advance!
Hi Philip. I using transmission bittorrent client, but when I put the torrent file, the transmission program use upp all memory.. do you think what is this problem? thx.