[Nut-upsuser] Install problems (group permissions) with nut 2.7.2

Rob Groner rgroner at RTD.com
Fri Feb 20 20:15:51 UTC 2015

I think I had a misconception about something..

My goal was that someone could use our UPS with the "default" UPS driver in NUT right out of the box, so they wouldn't have to alter any NUT code to get it working.  NUT config files, yes, but not NUT code.

I thought that if I put in the ups.conf file that I wanted to use the usbhid-ups driver, and then put our vendor and product ID, it would find whatever USB device matched those vid and pid, and then use the usbhid-ups driver with it.

Instead, it seems that the usbhid-ups driver will search through its own list of known devices with vid/pid, and won't "match" my device unless that device exists as an entry in its device table.  Is that correct?

In other words, instead of the ups.conf file saying "Use usbhid-ups with USB device of vid/pid", it is saying "Use usbhid-ups with USB device of vid/pid *if* they are in the list of devices for usbhid-ups"?

Rob Groner

> -----Original Message-----
> From: Charles Lepple [mailto:clepple at gmail.com]
> Sent: Thursday, February 19, 2015 10:09 PM
> To: Rob Groner
> Cc: nut-upsuser List
> Subject: Re: [Nut-upsuser] Install problems (group permissions) with nut
> 2.7.2
> On Feb 19, 2015, at 8:43 AM, Rob Groner <rgroner at RTD.com> wrote:
> > I looked at the file and saw how it was laid out...basically an ATTR for every
> known USB UPS.  Well, since mine is not a known UPS, I had to add my own
> entry.
> If you want, once things are working, we can add an entry to that table (via
> drivers/usbhid-ups.c, which gets parsed into the udev script)
> >  So I added a similar entry to all the others, but putting in my USB vendor
> and product IDs and setting GROUP="nut" (like all the other entries do).
> >
> > ATTR{idVendor}=="04d8", ATTR{idProduct}=="005c", MODE="664",
> GROUP="nut"
> >
> You might need to tell udev to reload, although newer versions seem to re-
> read the rules files automatically.
> Also, I think there is a debug mode for udev that will show what is being
> parsed when.
> > But so far as I can tell, when I plug in the USB cable from the UPS...it is still
> not setting it to nut group permissions.  I am looking at the file in
> /dev/usb/hid/hiddev0 (which goes away when I unplug the UPS).  Either
> way, upsdrvctrl still won't start unless I add "-u root".
> /dev/bus/usb/*/* is the place to look (the hiddev* nodes are not used by
> libusb). Once the permissions there look correct, can you post the output of
> running the driver directly with -D?

More information about the Nut-upsuser mailing list