![]() |
clewarecontrolContents:IntroductionClewarecontrol lets you control the USB-devices made by Cleware GmbH.You can measure the temperature or humidity, switch on and off and configure switches, control the watchdog, etc. List of their products: click here. Some of the devices supported (clewarecontrol supports all Cleware devices, these are just examples): What you'll find in the tgz-fileThe package consists of 'clewaretool' - the tool to manage the Cleware devices under Linux.Also you'll find in the 'examples'-directory a couple of scripts:
DownloadPlease note that a Linux kernel of at least version 2.6.8 is required.For older kernels, please contact me.
Tested on
Frequently asked questionsValues retrieved are invalidOccasionally the values retrieved are invalid. E.g. a temperature of 170 degrees and such. In that case you can reset the device (might need to reset it multiple times!) and then it'll work.e.g.: clewarecontrol -ar It does not compile on SuSE Enterprise Linux 10Insert in file USBaccessBasic.c at line 17 (that is BEFORE the line including usbdevice_fs.h!) the following line:#define __user clewarecontrol -l doesn't list any devicesThe Cleware USB library expects the following files to exist:crw-rw-rw- 1 root root 180, 96 May 9 2005 /dev/usb/hiddev0 crw-rw-rw- 1 root root 180, 97 May 9 2005 /dev/usb/hiddev1 ... crw-rw-rw- 1 root root 180, 110 May 9 2005 /dev/usb/hiddev14 crw-rw-rw- 1 root root 180, 111 May 9 2005 /dev/usb/hiddev15If those do not exist then 2 situations are possible:
mount | grep udevWhen your system uses udev, this will return something looking like this: udev on /dev type tmpfs (rw,mode=0755)When using SuSE 9.1 you can replace USBaccessBasic.c by USBaccessBasic-noHIDIOCGSTRING.c and then recompile. I have not tested this myself but I heard it works. Systems using udevAppend the following line to /etc/udev/rules.d/10-local.rules:SUBSYSTEM=="usb", KERNEL=="hiddev[0-9]", NAME="usb/hiddev%n", MODE="0666"After that either reboot your system (preferred) or restart udev with the device unplugged(!). Systems not using udevThese commands will create the neccessary files:mkdir -p /dev/usb for i in `seq 0 15` ; do MINOR=$((i + 96)) ; mknod /dev/usb/hiddev$i c 180 $MINOR ; done clewarecontrol still can't find any devicesIf that still does not give any output then please e-mail me the output of the following commands:uname -a lsusb lsmod strace clewarecontrol -l ps -deaf | grep udev ls -la /dev/usb/hiddev*Please also tell me what distribution (e.g. redhat/suse/ubuntu) and what version you're using. Using the 'ampel' (traffic light) deviceYou might think you need to use the -al commandline parameter to toggle each light. That is not correct. The ampel-device in reality acts as a switch. So you need to use the -as commandline parameter. E.g.:clewarecontrol -as 2 0 clewarecontrol -as 0 1In the example above, the first command (the one toggling switch '2') switches off the green lights while the second command switches on light '0' which are the red lights. You can interface the ampel device to Nagios using NagAmp. Using the humidity sensorsThat happens when the device was not started. In that case, run clewarecontrol with the -ag commandline parameter. After that you can run clewarecontrol with the -rh parameter as often as you like. E.g.:clewarecontrol -ag clewarecontrol -rhPlease note that after a power toggle you need to restart the device again before you can use it. Changes1.0 Added a script for graphing temperature/humidity with munin. Made the Nagios check-script more robust. Can now give an offset for temperature/humidity values.0.8 cosmetic bug in the 'set switch' output, fixes in the man-page, one can now reprogram a switch/watchdog/autoreset to become one of these three, added some more examples (e.g. use with Nagios) 0.7 switching switches required an switch-index with an offset, that is now fixed. also added example usage scripts for temperature sensor 0.6 fixes to make this tool compile & run on 64 bit systems as well 0.5 temperatures (and possibly humidity too) were not always measured correctly. fixed 0.4 Switching the USB-switch on and off did not work. That is now fixed. 0.3 fixed bug: older versions did not correctly work with switches. that is now fixed 0.3 added a switch making the program output better machine parseable output 0.2 added support for the USB-IO16 0.1 initial release Problems/bugs?Please DO NOT contact Cleware if you encounter any problems while using clewarecontrol with Cleware-devices, instead contact me.Commercial
|
| Menu with my UNIX/Linux software | Feeling generous? | e-mail me at: folkert@vanheusden.com |
| July 9, 2010 | Please support Seti@Home | |