NetWinder utility programs
==========================

This package contains several utility programs for the NetWinder.  Some of
them depend on features that must be built into the kernel or be included
as a loadable module.  The source for those modules is a part of the kernel
source and is not distributed in this archive.  

-Ralph Siemsen <ralphs@netwinder.org>

===========================================================================
Woody's original notes follow:
(note that the kernel drivers are moved into the kernel source now).
===========================================================================


Therm driver (kernel 1.x, 2.0.x)
------------

To compile therm.c and therm.h into therm.o as a module
	gcc -O -DMODULE -D__KERNEL__ -m6 -c therm.c

To load:
	cd /dev
	mknod -m 666 /dev/temperature c 10 131

We suggest adding (for back compability with 2.0 kernel) 
	ln -s temperature therm
so that programs willing to talk to /dev/therm will succeed.

This will create device node in /dev directory

Then 
	insmod -v [-f] therm.o	

To program the thermostat's temperature setting:
	set_therm temperature(C), e.g. set_therm 45 42

Running set_therm without parameters will report current setting.

Once programmed, remove the device driver:
	rmmod therm

The setting will remain valid till changed again.


Additionally the current temperature and thermostate setting can be monitored
with a 0.5C resolution by reading /proc/therm entry, e.g.

	cat /proc/therm

For compatibility with WDT501 chip driver, the /dev/temperature can be read,
it will return 1 byte with current temperature in Fahrenheit (or cubits ;-).

For people, who do not want to hear the fan - there is a utility fan_ctrl.
Syntax: fan_ctrl ON or OFF or START.

The START option is designed to kick the fan to HI for 2 seconds, as
sometimes it seems to be stuck, when in LOW gear. After 2 seconds, it goes
to its default.

If you wish to turn the fan off, do it on your own risk! I tried to run the
Netwinder vertically, on the stand (stand _is_ important!), in a 20C room
with no fan, seemed OK, but....

Also, since the fan may get "sticky", it may not be able to start if set to
low speed. Hence it should be "kicked" into hi-speed first, and then moved
to low speed.


Watchdog
---------

To compile watchdog.c into watchdog.o
	gcc -O -DMODULE -D__KERNEL__ -m6 -c watchdog.c

To load:
	cd /dev
	mknod -m 666 /dev/watchdog c 10 130

This will create device node in /dev directory

Then 
	insmod -v [-f] watchdog.o [timeout=nn] [testmode=1]

if timeout is specified, it will replace default 3 min.

if testmode is specified, in case of timeout the Netwinder will not reboot,
but the front LED will start blinkinking.

woody@netwinder.org
