[Nut-upsdev] TrippLite OMNI1000LCD hiddev

Peter Selinger selinger at mathstat.dal.ca
Tue Nov 8 06:20:23 UTC 2005


Joel Peshkin wrote:
> 
> I hacked in the following additonal changes...
> 
> Index: newhidups.c
> ===================================================================
> RCS file: /cvsroot/nut/nut/drivers/newhidups.c,v
> retrieving revision 1.1.1.1.8.6.2.21
> diff -u -r1.1.1.1.8.6.2.21 newhidups.c
> --- newhidups.c 7 Nov 2005 22:14:20 -0000       1.1.1.1.8.6.2.21
> +++ newhidups.c 8 Nov 2005 05:57:59 -0000
> @@ -27,6 +27,7 @@
> 
>  /* include all known subdrivers */
>  #include "generic-hid.h"
> +#include "tripplite-hid.h"
>  #include "mge-hid.h"
>  #include "apc-hid.h"
>  #include "belkin-hid.h"
> @@ -34,6 +35,7 @@
>  /* master list of avaiable subdrivers */
>  static subdriver_t *subdriver_list[] = {
>         &generic_subdriver,
> +       &tripplite_subdriver,
>         &mge_subdriver,
>         &apc_subdriver,
>         &belkin_subdriver,

Ah, sorry, I had forgotten these. Good catch. 
 
> That made this work with ...
> 
> user=root
> [myups]
>         driver=newhidups
>         vendorid=09AE
>         #tripplite=1
>         port=/dev/usb/hiddev0
> 
> And returned....
> 
> /usr/local/ups/bin/upsc myups at localhost
> driver.name: newhidups
> driver.parameter.port: /dev/usb/hiddev0
> driver.parameter.vendorid: 09AE
> driver.version: 2.1.0
> UPS.BatterySystem.Battery.PresentStatus.Charging: 1
> UPS.BatterySystem.Battery.PresentStatus.Discharging: 0
> UPS.BatterySystem.Battery.PresentStatus.NeedReplacement: 0
> UPS.ffff0010.00ff0001.ffff007d: 8197
> UPS.ffff0015.00ff0001.ffff00c0: 255
> UPS.ffff0015.00ff0001.ffff00c1: -1
> UPS.ffff0015.00ff0001.ffff00c2: 255
> UPS.ffff0015.00ff0001.ffff00c3: -1
> ups.mfr: Tripp Lite
> ups.model: TRIPP LITE UPS
> ups.serial: 692185 A
> ups.status: OB
> 
> (the power was on when I did this)
> 
> 
> I tried a bunch of other variables and it seems that I get the same 
> error no matter what I try.  Am I missing a trick here?
> 
> /usr/local/ups/bin/upsc myups at localhost load.on
> Error: Variable not supported by UPS

There is something fishy going on here. Perhaps related to parts of
the code being unaware of the true length of the report descriptor?
But I am really not sure. There should be a lot more variables,
because they are initially reported during the DumpTree. But later,
they are not found. Do you want to experiment a bit more with setting
the report descriptor length? You might even temporarily try to set it
to a constant value, since the actual length (618) is known for your
device. -- Peter




More information about the Nut-upsdev mailing list