1 (edited by phord 2007-11-16 14:55:35)

Topic: Broken web pages on Chumby

I downloaded the update today (finally) and my WiFi stats page is broken now.  It seems the script should be emitting a blank line (header separator) at the start.  (The web server could do this for you, but you wouldn't be able to insert your own custom headers!)

I modified the wifi script like so, and put it in custom/wifi (writable cgi-bin directory), and it worked:

#!/bin/sh

# I added the next two lines
echo "Content-Type: text/html"
echo ""

echo "<html><head>"
echo "<title>Chumby Wireless Status</title>"
echo "<meta http-equiv=\"Refresh\" content=\"5\";>"
echo "</head></html>"
echo "<body>"
echo "<h4>Wireless Stats</h4>"
echo "<pre>"
iwconfig rausb0 |grep -v "Encryption key:"
echo "</pre>"
echo "<pre>"
cat /proc/net/wireless
echo "</pre>"
echo "</body></html>"

The same mod is needed for memstats.

Re: Broken web pages on Chumby

Oooh, good catch!

We'll fix that.

What happened was the little httpd in Busybox keeps changing how it handles HTTP headers between versions - in some versions they do it automatically, and in others they don't.  It looks like we got out of sync somehow.

Re: Broken web pages on Chumby

Does this get fixed when a new control panel is downloaded, or do you need do something special to flash eeproms?  (I noticed it's a read-only file system...)

Re: Broken web pages on Chumby

It requires a firmware update.