[Nut-upsdev] Belkin F6C100-UNV + newhidups

Peter Selinger selinger at mathstat.dal.ca
Fri Feb 16 23:36:54 CET 2007


That is highly strange. Here is the literal source code from
nut-2.0.5 (file drivers/belkin-hid.c):

      if (getval("productid")) {
         return 1;
      } else {
         upsdebugx(1,
"This particular Belkin device (%04x/%04x) is not (or perhaps not yet)\n"
"supported by newhidups. Try running the driver with the '-x productid=%04x'\n"
"option. Please report your results to the NUT developer's mailing list.\n",
                   hd->VendorID, hd->ProductID, hd->ProductID);
         return 0;
      }

So if productid is set, then this error message should never be printed. 
Strange...

Aha! You wrote

/lib/nut/newhidups -D 3 -x productid=0910 /dev/usb/hiddev0

This is wrong, because the "-D" option does not take an argument.
Therefore, NUT considers "3" to be the device name, and ignores
everything following. What you wrote in ups.conf does not matter in
this case, since you did not define a device called "3". 

Just do it without the "3" and it should work fine. If you need more
debugging output, try -DD instead of -D. 

I will go and fix the main() function so that this does not happen
again.

-- Peter




James Rose wrote:
> 
> I'll concede my config files were all screwed up, and I was missing a few
> (including upsd.conf).  Thanks for the pointers.
> 
> It's strange that the debian packages didn't create any of the
> configuration files in /etc/nut (but they were in the
> /usr/share/doc/nut/examples).  I can't recall another package that
> doesn't.  Perhaps that's worthy of filing a debian bug.
> 
> 
> FYI, I had tried calling the driver with the productid code (it's just not
> the example I posted [sorry]).  The results were the same.
> 
> 
> NEW CONFS
> =======ups.conf=======
> [myups]
>         driver = newhidups
>         port = auto
>         desc="belkin f6c100"
> 
> =======upsd.conf=======
> ACL all 0.0.0.0/0
> ACL localhost 127.0.0.1/32
> ACCEPT localhost
> REJECT all
> 
> =======upsd.users=======
> [admin]
>         password = password
>         allowfrom = localhost
>         actions = SET
>         instcmds = ALL
>         upsmon master
> 
> =======upsmon.conf=======
> MONITOR myups at localhost 0 admin password master #0 for now till this works
> MINSUPPLIES 1
> SHUTDOWNCMD "/sbin/shutdown -h +0"
> POLLFREQ 5
> POLLFREQALERT 5
> HOSTSYNC 15
> DEADTIME 15
> POWERDOWNFLAG /etc/killpower
> RBWARNTIME 43200
> NOCOMMWARNTIME 300
> FINALDELAY 5
> 
> =======upssched.conf=======
> CMDSCRIPT /usr/local/ups/bin/upssched-cmd
> 
> 
> =======end config files=======
> 
> =======rerun after config changes=======
> 
> # /lib/nut/newhidups -D 3 -x productid=0910 /dev/usb/hiddev0
> 
> Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.0.5)
> 
> debug level is '1'
> This particular Belkin device (050d/0910) is not (or perhaps not yet)
> supported by newhidups. Try running the driver with the '-x productid=0910'
> option. Please report your results to the NUT developer's mailing list.
> 
> No matching HID UPS found
> 
> 
> =======For my own sanity=======
> 
> # ls -l /dev/usb/hiddev0
> crw-rw---- 1 root root 180, 96 Feb 15 15:34 /dev/usb/hiddev0
> 
> 
> =======Also tried with productid enabled and disabled in ups.conf=======
> 
> # upsdrvctl  -D start
> Network UPS Tools - UPS driver controller 2.0.5
> Starting UPS: myups
> Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.0.5)
> 
> No matching HID UPS found
> Driver failed to start (exit status=1)
> 
> ===
> 
> Regards,
> 
> James
> 




More information about the Nut-upsdev mailing list