Greetings all; Back to a thread I started back in May of 2008 I think. I never did get this belkin and nut to talking, so I thought I'd make another run at it. Trying to run the driver as the user gene, I'm getting this: --------------------------- [root at coyote ups]# su gene -c "/sbin/belkin -D -a myups" Network UPS Tools - Belkin Smart protocol driver 0.21 (2.2.2) debug level is '1' Unable to open /dev/hidraw0: Permission denied Current user id: gene (501) Serial port owner: root (0) Serial port group: root (0) Mode of port: 0660 Things to try: - Use another port (with the right permissions) - Fix the port owner/group or permissions on this port - Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf). See upsdrvctl(8) and ups.conf(5). Fatal error: unusable configuration ------------------------ And, /dev/hidraw0 (and all associated) is owned by root:root despite 62_*.rules for udev stating it should be uucp. ------------------------ [root at coyote ups]# ls -l /dev/hid* crw-rw---- 1 root root 180, 0 2009-12-27 08:52 /dev/hiddev0 crw-rw---- 1 root root 180, 1 2009-12-26 11:17 /dev/hiddev1 crw-rw---- 1 root root 253, 0 2009-12-27 08:52 /dev/hidraw0 crw-rw---- 1 root root 253, 1 2009-12-26 11:17 /dev/hidraw1 crw-rw---- 1 root root 253, 2 2009-12-26 11:17 /dev/hidraw2 crw-rw---- 1 root root 253, 3 2009-12-26 11:17 /dev/hidraw3 crw-rw---- 1 root root 253, 4 2009-12-26 11:17 /dev/hidraw4 --------------------------------- /dev/hidraw0 was _not_ created during boot time discovery, and was only created when I momentarily unplugged the data cable, which when I plugged it back in, which returned this in the messages log: ----------------------------- Dec 27 08:52:39 coyote kernel: [77690.153405] usb 1-10.1: new low speed USB device using ehci_hcd and address 16 Dec 27 08:52:39 coyote kernel: [77690.368022] usb 1-10.1: New USB device found, idVendor=050d, idProduct=0751 Dec 27 08:52:39 coyote kernel: [77690.368027] usb 1-10.1: New USB device strings: Mfr=4, Product=20, SerialNumber=0 Dec 27 08:52:39 coyote kernel: [77690.368030] usb 1-10.1: Product: Belkin UPS Dec 27 08:52:39 coyote kernel: [77690.368031] usb 1-10.1: Manufacturer: Belkin Dec 27 08:52:39 coyote kernel: [77690.368117] usb 1-10.1: configuration #1 chosen from 1 choice Dec 27 08:52:40 coyote kernel: [77691.098585] generic-usb 0003:050D:0751.0006: hiddev0,hidraw0: USB HID v1.11 Device [Belkin Belkin UPS] on usb-0000:00:02.1-10.1/input0 ------------------------------ The user & passwd in the .conf files is me, not root. Where do I go next folks? It won't even get that far when launched as root. -- Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) I'm DESPONDENT ... I hope there's something DEEP-FRIED under this miniature DOMED STADIUM ...
On Dec 27, 2009, at 9:49 AM, Gene Heskett wrote:> Greetings all; > > Back to a thread I started back in May of 2008 I think. I never did > get this > belkin and nut to talking, so I thought I'd make another run at it. > > Trying to run the driver as the user gene, I'm getting this: > --------------------------- > [root at coyote ups]# su gene -c "/sbin/belkin -D -a myups" > Network UPS Tools - Belkin Smart protocol driver 0.21 (2.2.2) > debug level is '1' > > Unable to open /dev/hidraw0: Permission deniedHey Gene, At the moment (this applies to both 2.2.2 and 2.4.1), none of our drivers will use /dev/hidraw* devices. Serial port drivers use /dev/ ttyS* and /dev/ttyUSB*, and the USB drivers use a matching scheme based on vendor and product IDs.> /dev/hidraw0 was _not_ created during boot time discovery, and was > only > created when I momentarily unplugged the data cable, which when I > plugged it > back in, which returned this in the messages log:Not sure why it didn't appear at boot time, but since our drivers don't use that interface, it is soon to become a moot point. One of the side effects of the usbhid-ups driver is that it will tell the kernel HID driver to release the /dev/hid* device when it connects, so that /dev entry will disappear.> ----------------------------- > Dec 27 08:52:39 coyote kernel: [77690.153405] usb 1-10.1: new low > speed USB > device using ehci_hcd and address 16 > Dec 27 08:52:39 coyote kernel: [77690.368022] usb 1-10.1: New USB > device > found, idVendor=050d, idProduct=0751Looking in the Hardware Compatibility List under Belkin, we can see that a number of devices mention Vendor ID 050d: http://new.networkupstools.org/stable-hcl.html They are all listed next to the "usbhid-ups" driver. You should be able to run with the following entry in ups.conf: [myups] driver = usbhid-ups port = auto vendorid = 050d If not, please send us the error you get when starting the driver, and remind us which distribution of Linux you are running.> The user & passwd in the .conf files is me, not root.We're starting to make a bigger distinction in the documentation, but there are two types of "users" in NUT configuration files: system (login) usernames, which tell NUT which non-root user to run as, and upsd user/password pairs, which do not have to match any other login name (they are used to prevent a random network user from logging in and shutting down a system). You never have to put a system login password into a configuration file - the startup scripts run as root, so they can change to the non- root user without a password. - Charles
[cc'ing the list] On Dec 27, 2009, at 12:14 PM, Gene Heskett wrote:> On Sunday 27 December 2009, Charles Lepple wrote: >> On Dec 27, 2009, at 9:49 AM, Gene Heskett wrote: >>> Greetings all; >>> >>> Back to a thread I started back in May of 2008 I think. I never did >>> get this >>> belkin and nut to talking, so I thought I'd make another run at it. >>> >>> Trying to run the driver as the user gene, I'm getting this: >>> --------------------------- >>> [root at coyote ups]# su gene -c "/sbin/belkin -D -a myups" >>> Network UPS Tools - Belkin Smart protocol driver 0.21 (2.2.2) >>> debug level is '1' >>> >>> Unable to open /dev/hidraw0: Permission denied >> >> Hey Gene, >> >> At the moment (this applies to both 2.2.2 and 2.4.1), none of our >> drivers will use /dev/hidraw* devices. Serial port drivers use /dev/ >> ttyS* and /dev/ttyUSB*, and the USB drivers use a matching scheme >> based on vendor and product IDs. >> >>> /dev/hidraw0 was _not_ created during boot time discovery, and was >>> only >>> created when I momentarily unplugged the data cable, which when I >>> plugged it >>> back in, which returned this in the messages log: >> >> Not sure why it didn't appear at boot time, but since our drivers >> don't use that interface, it is soon to become a moot point. One of >> the side effects of the usbhid-ups driver is that it will tell the >> kernel HID driver to release the /dev/hid* device when it connects, >> so >> that /dev entry will disappear. >> >>> ----------------------------- >>> Dec 27 08:52:39 coyote kernel: [77690.153405] usb 1-10.1: new low >>> speed USB >>> device using ehci_hcd and address 16 >>> Dec 27 08:52:39 coyote kernel: [77690.368022] usb 1-10.1: New USB >>> device >>> found, idVendor=050d, idProduct=0751 >> >> Looking in the Hardware Compatibility List under Belkin, we can see >> that a number of devices mention Vendor ID 050d: >> >> http://new.networkupstools.org/stable-hcl.html >> >> They are all listed next to the "usbhid-ups" driver. >> >> You should be able to run with the following entry in ups.conf: >> >> [myups] >> driver = usbhid-ups >> port = auto >> vendorid = 050d >> >> If not, please send us the error you get when starting the driver, >> and >> remind us which distribution of Linux you are running. > > Fedora F10, kernel 2.6.32 > > I made it so in /etc/ups/ups.conf: > > [root at coyote ups]# /sbin/belkin -D -a myups > Network UPS Tools - Belkin Smart protocol driver 0.21 (2.2.2) > > Fatal error: 'vendorid' is not a valid variable name for this driver./sbin/belkin is only for RS-232 serial connections to Belkin hardware. (Most of the NUT drivers were named well before USB UPSes were commonplace.) You probably want /sbin/usbhid-ups.>> We're starting to make a bigger distinction in the documentation, > > What docs? No man nut or pinfo nut pages seem to exist. Newbies > need a > starting point.Each driver has its own man page (e.g. "man belkin"), and they refer to the "nutupsdrv" generic man page for all NUT drivers. Again, the "belkin" driver predates the USB-enabled Belkin units, so when the USB drivers were introduced, the older serial driver documentation was not updated to reflect the new USB-enabled hardware. The documentation is also available online: http://www.networkupstools.org/documentation.html We are still in the middle of deploying it, so please let us know if you run across any broken links, or other inconsistencies there.