I have a MGE Evolution 3000 connected via USB to a linux server (HP
Proliant G3). The server is running kernel 2.4.30 and nut-2.0.3. But
before nut trying to connect to the UPS, I guess HID doesn't work as
long as I get a message like this in dmesg:
--------------------------------------------------
usb.c: new device strings: Mfr=4, Product=136, SerialNumber=50
usb.c: USB device number 2 default language ID 0x409
Manufacturer: MGE UPS SYSTEMS
Product: Evolution
SerialNumber: AF3G03062
usb.c: unhandled interfaces on device
usb.c: USB device 2 (vend/prod 0x463/0xffff) is not claimed by any active
driver.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Length = 18
DescriptorType = 01
USB version = 1.10
Vendor:Product = 0463:ffff
MaxPacketSize0 = 8
NumConfigurations = 1
Device version = 1.00
Device Class:SubClass:Protocol = 00:00:00
Per-interface classes
Configuration:
bLength = 9
bDescriptorType = 02
wTotalLength = 0022
bNumInterfaces = 01
bConfigurationValue = 01
iConfiguration = 00
bmAttributes = e0
MaxPower = 40mA
Interface: 0
Alternate Setting: 0
bLength = 9
bDescriptorType = 04
bInterfaceNumber = 00
bAlternateSetting = 00
bNumEndpoints = 01
bInterface Class:SubClass:Protocol = 03:00:00
iInterface = 00
Endpoint:
bLength = 7
bDescriptorType = 05
bEndpointAddress = 81 (in)
bmAttributes = 03 (Interrupt)
wMaxPacketSize = 0008
bInterval = 14
--------------------------------------------------
cat /proc/bus/usb/devices:
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 4
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB OHCI Root Hub
S: SerialNumber=f88bb000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0463 ProdID=ffff Rev= 1.00
S: Manufacturer=MGE UPS SYSTEMS
S: Product=Evolution
S: SerialNumber=AF3G03062
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 40mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=20ms
So the kernel correctly identifies the device as a HID class, but the
hiddev dev refuses to "claim" the device.
What's happening here? How can I fix this?
Cheers,
Rodrigo Ventura
--
*** Rodrigo Martins de Matos Ventura <yoda@isr.ist.utl.pt>
*** Web page: http://www.isr.ist.utl.pt/~yoda
*** Teaching Assistant and PhD Student at ISR:
*** Instituto de Sistemas e Robotica, Polo de Lisboa
*** Instituto Superior Tecnico, Lisboa, PORTUGAL
*** PGP fingerprint = 0119 AD13 9EEE 264A 3F10 31D3 89B3 C6C4 60C6 4585
Hi Rodrigo, 2006/6/7, Rodrigo Ventura <yoda@isr.ist.utl.pt>:> > I have a MGE Evolution 3000 connected via USB to a linux server (HP > Proliant G3). The server is running kernel 2.4.30 and nut-2.0.3. But > before nut trying to connect to the UPS, I guess HID doesn't work as > long as I get a message like this in dmesg: > > -------------------------------------------------- > usb.c: new device strings: Mfr=4, Product=136, SerialNumber=50 > usb.c: USB device number 2 default language ID 0x409 > Manufacturer: MGE UPS SYSTEMS > Product: Evolution > SerialNumber: AF3G03062 > usb.c: unhandled interfaces on device > usb.c: USB device 2 (vend/prod 0x463/0xffff) is not claimed by any active driver.this is only an informational message, not an error.> ... > > So the kernel correctly identifies the device as a HID class, but the > hiddev dev refuses to "claim" the device. > > What's happening here? How can I fix this?though we've activelly participated in hiddev developments, we've decided to cut this branch and only rely on userspace code, through the newhidups NUT driver. This last relies on libusb, and doesn't need hiddev anymore. With the added benefits that it's able to run on non linux platforms. Finally note that the legacy hidups NUT driver will be removed when NUT 2.2 is released. Arnaud -- Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ OpenSource Developer - http://arnaud.quette.free.fr/
Thanks Arnaud.
Now I'm getting the error::
# cat /etc/ups.conf
[mgeups]
driver = newhidups
port = auto
desc = "MGE UPS at servers room"
# /usr/local/nutups/bin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.0.3
Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.3)
No matching USB/HID UPS found
Driver failed to start (exit status=1)
How can I figure out what's wrong?
Cheers,
Rodrigo
--
*** Rodrigo Martins de Matos Ventura <yoda@isr.ist.utl.pt>
*** Web page: http://www.isr.ist.utl.pt/~yoda
*** Teaching Assistant and PhD Student at ISR:
*** Instituto de Sistemas e Robotica, Polo de Lisboa
*** Instituto Superior Tecnico, Lisboa, PORTUGAL
*** PGP fingerprint = 0119 AD13 9EEE 264A 3F10 31D3 89B3 C6C4 60C6 4585
Let me add the following to my previous email: a strace of upsdrvctl
# strace -ff /usr/local/nutups/bin/upsdrvctl start
execve("/usr/local/nutups/bin/upsdrvctl",
["/usr/local/nutups/bin/upsdrvctl", "start"], [/* 34 vars
*/]) = 0
[...]
[pid 7422] open("/proc/bus/usb/001/002", O_RDONLY) = 5
[pid 7422] read(5, "\22\1\20\1\0\0\0\10c\4\377\377\0\1\4\2102\1", 18)
= 18
[pid 7422] read(5, "\t\2\"\0\1\1\0\340", 8) = 8
[pid 7422] read(5,
"\24\t\4\0\0\1\3\0\0\0\t!\0\1!\1\"T\6\7\5\201\3\10\0\24"..., 26)
= 26
[pid 7422] close(5) = 0
[pid 7422] getdents64(4, /* 0 entries */, 4096) = 0
[pid 7422] close(4) = 0
[pid 7422] open("/proc/bus/usb/001/001", O_RDWR) = -1 EACCES
(Permission denied)
[pid 7422] open("/proc/bus/usb/001/001", O_RDONLY) = 4
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc550) = -1 EPERM (Operation not
permitted)
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc550) = -1 EPERM (Operation not
permitted)
[pid 7422] close(4) = 0
[pid 7422] open("/proc/bus/usb/001/002", O_RDWR) = -1 EACCES
(Permission denied)
[pid 7422] open("/proc/bus/usb/001/002", O_RDONLY) = 4
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc550) = -1 EPERM (Operation not
permitted)
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc550) = -1 EPERM (Operation not
permitted)
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc550) = -1 EPERM (Operation not
permitted)
[pid 7422] ioctl(4, USBDEVFS_CLAIMINTERFACE, 0xbfffc6f4) = -1 EPERM (Operation
not permitted)
[pid 7422] ioctl(4, USBDEVFS_IOCTL, 0xbfffc6d0) = -1 EPERM (Operation not
permitted)
[pid 7422] ioctl(4, USBDEVFS_CLAIMINTERFACE, 0xbfffc6f4) = -1 EPERM (Operation
not permitted)
[pid 7422] ioctl(4, USBDEVFS_IOCTL, 0xbfffc6d0) = -1 EPERM (Operation not
permitted)
[pid 7422] ioctl(4, USBDEVFS_CLAIMINTERFACE, 0xbfffc6f4) = -1 EPERM (Operation
not permitted)
[pid 7422] ioctl(4, USBDEVFS_IOCTL, 0xbfffc6d0) = -1 EPERM (Operation not
permitted)
[pid 7422] ioctl(4, USBDEVFS_CLAIMINTERFACE, 0xbfffc6f4) = -1 EPERM (Operation
not permitted)
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc6c0) = -1 EPERM (Operation not
permitted)
[pid 7422] close(4) = 0
[pid 7422] write(2, "No matching USB/HID UPS found\n", 30No matching
USB/HID UPS found
) = 30
[...]
Seems the driver has no R/W permission, probably because of a change
of UID of the driver.
# ls -laF /proc/bus/usb/001/
total 0
dr-xr-xr-x 1 root root 0 Jun 7 11:07 ./
dr-xr-xr-x 1 root root 0 Jun 7 11:07 ../
-rw-r--r-- 1 root root 18 Jun 7 11:07 001
-rw-r--r-- 1 root root 18 Jun 7 11:07 002
Since this is a usbdevfs, how can I make this read/writable by nutups user?
Cheers,
Rodrigo Ventura
--
*** Rodrigo Martins de Matos Ventura <yoda@isr.ist.utl.pt>
*** Web page: http://www.isr.ist.utl.pt/~yoda
*** Teaching Assistant and PhD Student at ISR:
*** Instituto de Sistemas e Robotica, Polo de Lisboa
*** Instituto Superior Tecnico, Lisboa, PORTUGAL
*** PGP fingerprint = 0119 AD13 9EEE 264A 3F10 31D3 89B3 C6C4 60C6 4585