Nut,usb and installation

Tom Diehl tdiehl at rogueind.com
Sun Sep 25 16:20:18 UTC 2005


On Sun, 25 Sep 2005, david walcroft wrote:

> Matthew Saltzman wrote:
> 
> > 
> > All the drivers listed as examples in /etc/sysconfig/ups are for devices 
> > connected by serial cable.
> > 
> > If your UPS is connected via USB, use MODEL=hidups.  (If that doesn't 
> > work, try MODEL=newhidups.  The only other USB-enabled driver is 
> > energizerups, but that's brand specific.)  The DEVICE will be something 
> > like /dev/hiddevX (where X is a digit.  The device will be created at 
> > startup, so you should not need an entry is /etc/udev/rules.d.

I use MODEL=upsdrvctl and then set the ups specific stuff in /etc/ups/ups.conf
I have it working on several systems using serial port ups's just fine. 
One of these systems has 4 ups's attached to it. The problem is that they are
attached to the machine via serial ports. I am still fighting the one that is
attached via usb.

> > 
> > On boot, I see:
> > 
> >   Sep 10 12:43:20 yankee kernel: hiddev96: USB HID v1.10 Device [APC
> >   Back-UPS ES 650 FW:818.w1.D USB FW:w1] on usb-0000:00:04.2-2
> > 
> > The device created is:
> > 
> >   # ls -l /dev/hiddev0
> >   crw-rw----  1 root root 180, 96 Sep 17 12:52 /dev/hiddev0
> > 
> > My /etc/sysconfig/ups has
> > 
> >   MODEL=hidups
> >   DEVICE=/dev/hiddev0
> > 
> Changed my "MODEL=[new]hidups" and booted both with no result,no 
> /dev/hiddev* is generated and syslog has errors:
> 
> Sep 25 21:50:55 reddwarf upsmon[2105]: Set username on [david at reddwarf] 
> failed: Server disconnected
> 
> Sep 25 21:51:05 reddwarf upsmon[2105]: Poll UPS [david at reddwarf] failed 
> - Write error: Bad file descriptor


See if you can talk directly to the ups. Try "/sbin/newhidups -u root -D -a PS1"
where PS1 is the name of the ups you configured in /etc/ups.conf. It should
return a bunch of stuff about your ups. It took me awhile to get that to work
but I think that is the first step. If the driver cannot talk to the ups then
nut will never work :-)

The above works for me, however I still cannot get nut to start. 
I get the following in the logs:
Sep 25 12:17:45 porky upsdrvctl: Network UPS Tools: New USB/HID UPS driver 0.23 (2.0.2)
Sep 25 12:17:45 porky upsdrvctl:
Sep 25 12:17:45 porky upsdrvctl: Network UPS Tools - UPS driver controller 2.0.2
Sep 25 12:17:45 porky upsdrvctl: No USB/HID UPS found
Sep 25 12:17:45 porky upsdrvctl: Driver failed to start (exit status=1)
Sep 25 12:17:45 porky ups: upsdrvctl startup failed
Sep 25 12:17:45 porky upsd[23661]: Can't connect to UPS [PS1] (newhidups-hiddev0): No such file or directory
Sep 25 12:17:45 porky upsd: Can't connect to UPS [PS1] (newhidups-hiddev0): No such file or directory
Sep 25 12:17:45 porky upsd: Network UPS Tools upsd 2.0.2

At this point I suspect that there is something missing from the driver but
I am not sure. :-(

Regards,

Tom Diehl		tdiehl at rogueind.com		Spamtrap address mtd123 at rogueind.com




More information about the users mailing list