Flashing the CrySP Buffalo Router (WZR-HP-G300NH2)
This document describes the tftp flashing process for CrySP's Buffalo WZR-HP-G300NH2 router. The router and switch are kept in the cabinet between the lab door and the lounge. If you plan to use the router to establish a wireless access point, you should first request permission from CSCF.
Requirements
- A Linux system configured with "tftp-hpa". Some Linux systems include a different tftp client by default (tftp -V or tftp --version should tell you what version you have installed).
- A network switch
Obtain an Image
The OpenWRT image can be found here:
http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-wzr-hp-g300nh2-squashfs-tftp.bin
- Take special note that images for the similar Buffalo WZR-HP-G300NH router (without the "2") are not compatible.
If you would like to build a custom image (e.g. with custom software), this resource may be helpful:
http://wiki.openwrt.org/doc/howto/buildroot.exigence and
http://wiki.openwrt.org/doc/howto/build
Prepare Your Network
- Connect your computer to the switch
- Connect the router to the switch using the LAN port on the router that is closest to the blue WAN port
- Ensure the router is powered off (i.e., the power cord is not plugged in)
- Configure your computer's ethernet interface with the IP address "192.168.11.2":
sudo ifconfig eth0 192.168.11.2
(the interface name (eth0) should be updated appropriately)
- Add a static ARP entry for the router:
sudo arp -s 192.168.11.1 02:AA:BB:CC:DD:1A
Flash!
Execute the following command, and then immediately plug the power cable into the router:
tftp -m binary 192.168.11.1 -c put openwrt-ar71xx-generic-wzr-hp-g300nh2-squashfs-tftp.bin
- The image file name should be changed appropriately.
The "DIAG" light will start flashing if the router was able to receive the image. When the light stops blinking, the router has finished processing the new image.
Notes
I believe the network switch requirement is to ensure the network connection is online while configuring the static IP address and adding the ARP entry.
Connecting the router to campus network
On campus there are MAC address filtering rules in place and usually routers are not allowed on the network. So in order to get around this, you can change the MAC address of the WAN interface to something that is already registered on the network, using the following commands:
- uci set network.wan.macaddr="mac_address"
- uci commit network
- ifdown wan && ifup wan
Compiling code for router:
The followings have great walk-throughs on how to cross compile on OpenWRT SDK:
You can download the latest SDK here:
More Resources
http://wiki.openwrt.org/toh/buffalo/wzr-hp-g300nh2
How to upgrade router firmware:
http://wiki.openwrt.org/doc/howto/generic.sysupgrade