Does anyone have a good technique for measuring the transfer speed between the router and a WLAN client? (OS reported link speed is rarely reflective of reality.)
Most discussion related to this talks either about running canned speed tests hosted on the Internet, which obviously tests WAN speed as well, or they run a test between a WLAN client and some other server (such as a NAS) on their LAN.
It would be nice to have a straight forward technique for doing this that only required the router and what comes bundled with Tomato USB.
So here are some options:
Use a file sharing protocol - smb or NFS. These likely have too much overhead. Plus, you need a big test file (10 MB or larger), which means you also need a USB storage device. This will also end up testing the router's USB I/O performance. Ideally you want to source data from something like /dev/zero or equivalent, but with a finite size, and I'm not sure how you'd accomplish that with these protocols.
Use netcat. It's already on the router, and is probably as close as you can get to "wire" (link) speed, and you can trivially have it read from a pipe or run a command, like 'head' to pull 50 MB from /dev/zero. Two problems: 1. the version of netcat (nc) on Tomato's Busybox doesn't seem to support a listen (-l) option, which makes it more complicated to drive the test from the client, and 2. requiring the user to run netcat on the client is not user friendly.
Use inetd. In theory this could be used to solve the lack of a listening netcat. A config line would cause it to listen on some TCP port and when a connection comes in, it would run some command to stream out a fixed number of bytes. It may even be possible to echo some static HTTP headers such that an HTTP client could retrieve the data. But it appears Tomato's Busybox doesn't include inetd. (At least the symlink isn't there.)
Use HTTP. This lets the user run something like wget on the client, which can be ran on just about anything, and these results should be comparable to Internet speed tests which also use HTTP. Aside from some startup overhead, it's pretty efficient. There is an httpd on Tomato, of course. Running it like:
# /usr/sbin/httpd -p 9950 /tmp
starts up a new server instance listening on port 9950, but unexpectedly it still prompts me to login, and when I do using my usual router credentials, it returns "500 Unknown; Read error."
I'm sure with some digging this could be made to work without requiring a login (and set to listen only on the LAN interface), and 50 MB (or whatever) bytes streamed out using a CGI, but that might have too much CPU overhead.
Any better options?
If not, it would be nice to see this functionality added to the firmware. For example, the GUI could have a speed test page, which at minimum would have an option to enable the speed test service (something that listens for an HTTP connection and efficiently spews out fixed number of bytes), and shows the URL for accessing the test file, with instructions on running wget on the client. A fancier version would embed a Java or HTML5 speed test client that pulls data from the router's speed test service and displays a nice GUI presentation of the results. Handling upload benchmarking would be nice too.
About Tom Metro