[Nut-upsuser] FreeBSD usbhid-ups problem
Charles Lepple
clepple at gmail.com
Wed Aug 20 14:34:33 UTC 2008
On Wed, Aug 20, 2008 at 9:38 AM, Arjen de Korte <nut+users at de-korte.org> wrote:
>
>> Hi,
>> I have an MGE Ellipse UPS connected to a FreeBSD 7.0 system and it works
>> OK
>> to begin with but after an hour or so it dies, eg..
>>
>> Starts out OK..
>> debug level is '2'
>> upsdrv_initups...
>> Checking device (0463/FFFF) (/dev/usb2//dev/ugen0)
>> - VendorID: 0463
>> - ProductID: ffff
>> - Manufacturer: MGE UPS SYSTEMS
>> - Product: ELLIPSE
>> - Serial Number: 000000000
>> - Bus: /dev/usb2
>> Trying to match device
>> Device matches
>> ...
>>
>> But some time later I get this..
>> upsdrv_updateinfo...
>> Got 0 HID objects...
>> Quick update...
>> Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID:
>> 0x01, Offset: 0, Size: 1, Value: 1.000000
>> Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature,
>> ReportID: 0x01, Offset: 2, Size: 1, Value: 0.000000
>> Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID:
>> 0x01, Offset: 1, Size: 1, Value: 1.000000
>> Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
>> Feature, ReportID: 0x01, Offset: 3, Size: 1, Value: 0.000000
>> upsdrv_updateinfo...
>> Got 0 HID objects...
>> Quick update...
>> Can't retrieve Report 1: Input/output error
>> upsdrv_updateinfo...
>> Got to reconnect!
>>
>> No appropriate HID device found
>> upsdrv_updateinfo...
>> Got to reconnect!
>>
>> No appropriate HID device found
>> upsdrv_updateinfo...
>> Got to reconnect!
>>
>> I've made sure NUT & libusb are up to date (2.2.2 & 0.1.12_2
>> respectively)
>
> This is a permissions problem. The driver drops privileges soon after
> startup so if it needs to (re)connect later, the USB device node must be
> accessible by the user running the driver (typically 'nut' or 'upsd').
> Usually this is handled by hotplug (old) or udev (new) rules (Linux), but
> apparently this isn't working for you on FreeBSD. I'm not familiar with
> FreeBSD to know if there is something similar available. Preventing the
> driver from dropping privileges is one way to deal with this (add '-u
> root' to the 'upsdrvctl' commandline).
Daniel,
The following was from an email thread about a week ago:
Marius said:
> Everything I did was adding
> perm ugen* 0660
> own ugen* root:uucp
> perm usb* 0660
> own usb* root:uucp
> to /etc/devfs.conf
> The default user für nut is uucp on FreeBSD, so no need to add another user.
> Beware of the security implications with these rules!
What does your devfs.conf look like?
--
- Charles Lepple
More information about the Nut-upsuser
mailing list