[Nut-upsuser] suse linux and nut
Marc Collin
collinm at laboiteaprog.com
Sat Aug 26 17:45:30 UTC 2006
Le samedi 26 août 2006 09:13, Peter Selinger a écrit :
> You did "make install", right? (Else upsdrvctl might be trying to
> start an older version of the driver).
./configure --with-user=ups
make
make usb
make install
make install-usb
mkdir -p /var/state/ups
chmod 0700 /var/state/ups
chown nut:nut /var/state/ups
chmod 0600 /dev/hiddev0
chown ups:ups /dev/hiddev0
> Since the first method works and the second does not, this is probably
> a permissions problem. This means that your USB device is not owned by
> the same user that the driver runs as (typically a user called "ups").
>
> Try running upsdrvctl with "-u root". If this works, then it's
> definitely a permissions problem.
/usr/local/ups/bin/upsdrvctl -DDD -u root start
Network UPS Tools - UPS driver controller 2.1.0
Starting UPS: myups
exec: /usr/local/ups/bin/newhidups -a myups
Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)
Detected a UPS: unknown/unknown
Using subdriver: PowerCom HID 0.1
/usr/local/ups/sbin/upsd -u root
Network UPS Tools upsd 2.1.0
Connected to UPS [myups]: myups
Synchronizing...done
dmesg | grep hid
usbcore: registered new driver hiddev
hiddev96: USB HID v1.00 Device [HID 0d9f:0001] on usb-0000:00:0b.0-4
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
usb 2-4: usbfs: USBDEVFS_CONTROL failed cmd newhidups rqt 128 rq 6 len 255
ret -110
usb 2-4: usbfs: USBDEVFS_CONTROL failed cmd newhidups rqt 128 rq 6 len 255
ret -110
usb 2-4: usbfs: USBDEVFS_CONTROL failed cmd newhidups rqt 128 rq 6 len 255
ret -110
if i check /dev/hiddev0 seem to have disapear
/usr/local/ups/bin/upsc myups at localhost ups.status
Error: Variable not supported by UPS
linux64:/home/collinm/Download/trunk # /usr/local/ups/bin/upsc myups at localhost
driver.name: newhidups
driver.parameter.port: /dev/hiddev0
driver.version: 2.1.0
driver.version.data: PowerCom HID 0.1
driver.version.internal: 0.30
powercom.coll2.feature3: 1
powercom.coll2.feature4: 2
powercom.coll2.feature5: 0
powercom.coll2.feature6: 0
powercom.feature1: 130
powercom.feature2: 54
ups.mfr: PowerCom
> You can run upsdrvctl and upsd with "-u root" for now for testing
> purposes. Later, you would have to find a way to change the ownership
> of the USB device to the "ups" user. Since USB devices are created
> dynamically when the device is plugged in, the usual way to do this is
> by setting up hotplugging. See scripts/hotplug and scripts/hotplug-ng.
ok i root with this option for testing
> -- Peter
More information about the Nut-upsuser
mailing list