Well, i’ve had a couple of days to muck around with the ASUS WL-520G (hereafter revered to as “the ASUS” or “the router”) and OpenWRT. I have had a modicum of success, as well as a modicum of failure, so I thought I’d give an update.
For my beacon transmitter, it is important that the router maintain a fairly accurate clock, because WSPR beacon transmissions occur at the beginning of even number minutes. So, I thought the first thing that I should be do is to get ntp running on the router, to make sure that the clock timing was good. There is a minimal ntp client called, quite appropriately, ntpclient, which I added to the configuration. I also thought that it would be good to add a slightly more capable HTTP server, rather than the minimal one built into busybox. I recompiled and installed.
And immediately found out that ntpclient didn’t work. It set the clock initially, but the clock was immediately sliding away from synchronization. I killed ntpclient, and it was still slipping sharply, losing about 11 seconds every minute. I knew that there were limits to how big a drift that ntp could correct, so I did some careful googling.
It appears that there is some lingering problem with this particular device. Without getting too far into it, there is code in the sbmips.c file which claims that the clock rate for this box is 240Mhz, but in reality, it appears to be 200Mhz. Changing this number and recompiling results in a clock which is reasonably accurate, and which ntpclient can easily correct, but also appears to cause a problems with the flash memory “mtd” driver. I’m currently trying to work that out.
Addendum: Hmm. I shifted to the “trunk” instead of the stable 8.09 release, and this problem seems to have gone away. I still needed to patch sbmips.c, but it seems to work fine now.