I’ve run OpenWRT on my Buffalo WZR-HP-G300NH home router for a week now. So far there has been only one problem: wireless performance. The ath9k driver in OpenWRT Backfire 10.03 has a number of bugs, from poor latency jitter to occasionally dropping the connection. I’ve upgraded the router twice, first to 10.03.1-rc2 and then to 10.03.1-rc3. It appears that 10.03.1 final is only a few weeks away.
The upgrade process is amazingly simple:
- Download the new firmware image to your PC
- Use Luci, the OpenWRT web interface, to upload the image
- Reinstall any additional packages you previously had installed
The Luci upgrade process will preserve your configuration across upgrades, but you should always back up your configuration first. Luci makes this easy, via “System -> Backup/Restore”. The result is a tar.gz of various files, mostly in /etc. You can add custom entries to this list from “Administration”, then “Overview -> User Interface”.
However, the upgrade process doesn’t preserve installed packages or make a list of them. I suggest you keep a list of packages you want to install, or generate a list before upgrading:
opkg list-installed | cut -f 1 -d ' '
For the latest upgrade, I downloaded openwrt-ar71xx-wzr-hp-g300nh-squashfs-sysupgrade.bin from the 10.03.1-rc3/ar71xx section of the Backfire repository.
To use Luci to flash the new firmware, go to “Administration”, then “System -> Flash Firmware”. Select “Browse” and select the firmware image you downloaded, then check “Keep configuration files”. Then select “Upload image”. After uploading, Luci will display the md5sum and size of the new firmware. Verify it, and then select “Proceed”.
The upgrade process goes through several steps, flashing the new firmware and importing the old configurations, and finally rebooting. This takes 5-10 minutes. I recommend doing this over wired Ethernet, although wireless works fine. New firmware images may not include the wireless driver for your hardware, so you may need to use Ethernet after the upgrade to install the needed packages.
After rebooting, edit the package list to point to the new repository and install the missing software. You can do this from the command line or with Luci.
If using the terminal, edit /etc/opkg.conf. If Luci, go to “Administration”, then “System -> Software”, and wait for the page to fully load. Then select “Edit package lists and installation targets”. Change the first line to point to the new repository:
src/gz packages http://downloads.openwrt.org/backfire/10.03.1-rc3/ar71xx/packages
I suspect this would not be necessary if the backup settings excluded /etc/opkg.conf, but it’s easy to work around.
Once that’s done, reload the package list and reinstall any software packages you had previously installed. See the package list in my last post for a handy summary to paste into the terminal.
Finally, enable the services you just installed. In Luci, use “Administration”, then “Services -> Initscripts”. I believe you could avoid this by adding /etc/rc.d to the backup settings before upgrading, but again, it’s easy to work around.
Finally, reboot. All services should start as normal, and everything should work as it did before the upgrade.
Issues with 10.03.1-rc3
As with 10.03, the ath9k driver still cannot support multiple wireless networks with different encryption settings. There are also known issues using PPPoE on the WAN link, but my Internet provider (Virgin Media cable) presents as regular Ethernet so this is not a problem for me.
The nmap package is missing libnl as a dependency.
root@gw-belafonte:~# nmap nmap: can't load library 'libnl.so.1'
Correct it with
opkg install libnl. It is nice to see that OpenWRT has nmap version 5.35DC1, which is newer than the latest Debian/Ubuntu packages.
Comparison of wireless performance among 10.03 images
Each release in the 10.03 series has included a bugfix or improvement to the ath9k wireless driver. To compare them, I re-ran the same iperf/bwm-ng tests from my last post. There appears to have been a small drop in maximum throughput from 10.03 to the 10.03.1 release candidates:
32.5 mbit – Buffalo WZR-HP-G300NH running OpenWRT 10.03
27.8 mbit – Buffalo WZR-HP-G300NH running OpenWRT 10.03.1-rc2
27.2 mbit – Buffalo WZR-HP-G300NH running OpenWRT 10.03.1-rc3
However, there were also major improvements in wireless stability, latency and jitter between 10.03 and 10.03.1-rc2. Using
fping -l from my laptop (on 802.11g wireless) to gozer (on gigabit Ethernet) and frances (another laptop on 802.11g wireless) produced:
# 10.03 gozer : xmt/rcv/%loss = 297/245/18%, min/avg/max = 0.71/182.2/987 frances : xmt/rcv/%loss = 297/239/20%, min/avg/max = 1.60/195.3/979 # 10.03.1-rc2 gozer : xmt/rcv/%loss = 2799/2775/0%, min/avg/max = 0.71/3.11/196 frances : xmt/rcv/%loss = 2798/2770/1%, min/avg/max = 1.60/5.96/206 # 10.03.1-rc3 gozer : xmt/rcv/%loss = 372/369/0%, min/avg/max = 0.58/4.77/150 frances : xmt/rcv/%loss = 372/366/1%, min/avg/max = 1.64/9.73/267
Under both 10.03 and 10.03.1-rc2, I have experienced several drops in the wireless connection to two laptops. This usually happens overnight when our laptops are idle, and is accompanied by syslog errors on the router:
Sep 1 01:51:32 gw-belafonte daemon.info hostapd: wlan0: STA 00:1c:bf:00:00:01 IEEE 802.11: disassociated Sep 1 01:51:32 gw-belafonte daemon.info hostapd: wlan0: STA 00:1c:bf:00:00:01 IEEE 802.11: deauthenticated due to inactivity Sep 1 01:51:32 gw-belafonte daemon.info hostapd: wlan0: STA 00:1c:bf:00:00:01 IEEE 802.11: authenticated
I haven’t seen this happen since upgrading to 10.03.1-rc3, but I won’t be surprised if it does.