[Nut-upsuser] USB problem as user

Peter Selinger selinger at mathstat.dal.ca
Mon Apr 23 14:58:05 UTC 2007


Czuczy Gergely wrote:
> 
> Peter Selinger wrote:
> > 
> > Czuczy, I and the other people on this mailing list would *like* to
> > help you, but this is going to be difficult if you do not answer our
> > questions.
> I know, but they are asking questions without reading my problem
> description. They are asking for parts continously what i had already
> provided.

You are asking for free help, which implies a very simple deal: I ask
you questions that I think are useful, and you answer them. If you are
lucky, we find out what the problem is. I ask my questions for good
reasons; I did not need you to argue for three days over whether they
suit your taste. And yes, sometimes it is necessary to repeat an
experiment even if you have done it before.

> This is a ubuntu linux, breezy as i can see, on i386.

Apparently a 2.4.32 kernel.

> lsusb or such is not installed.
> i can give you the output of the /proc/bus/usb/devices file:
> T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
> B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
> D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor=0000 ProdID=0000 Rev= 0.00
> S:  Product=USB UHCI-alt Root Hub
> S:  SerialNumber=d000
> 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=   8 Ivl=255ms
> T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
> B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
> D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor=0000 ProdID=0000 Rev= 0.00
> S:  Product=USB UHCI-alt Root Hub
> S:  SerialNumber=d400
> 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=   8 Ivl=255ms
> T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
> B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
> D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor=0000 ProdID=0000 Rev= 0.00
> S:  Product=USB UHCI-alt Root Hub
> S:  SerialNumber=d800
> 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=   8 Ivl=255ms
> T:  Bus=02 Lev=01 Prnt=01 Port=00 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=051d ProdID=0002 Rev= 1.06
> S:  Manufacturer=American Power Conversion
> S:  Product=Back-UPS RS 1500 FW:8.g9 .I USB FW:g9
> S:  SerialNumber=JB0508016805
> C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 24mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbdevfs
> E:  Ad=81(I) Atr=03(Int.) MxPS=   6 Ivl=10ms
> T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6
> B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
> D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1
> P:  Vendor=0000 ProdID=0000 Rev= 2.04
> S:  Manufacturer=Linux 2.4.32-spnb ehci_hcd
> S:  Product=Intel Corp. 82801DB USB2
> S:  SerialNumber=00:1d.7
> 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=256ms
> 
> It's there as you can see.

Excellent. 

> currently nut runs as root.
> ~# /lib/nut/newhidups -u nut -DD -a ups1
> Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30
> (2.0.5)
> 
> debug level is '2'
> No appropriate HID device found
> No matching HID UPS found
> 
> # /lib/nut/newhidups -u root -DD -a ups1 2> ups1
> Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30
> (2.0.5)
> debug level is '2'
> Checking device (0000/0000) (004/001)
> - VendorID: 0000
> - ProductID: 0000
> - Manufacturer: unknown
> - Product: USB UHCI-alt Root Hub
> - Serial Number: d000
> - Bus: 004
> Trying to match device
> Device does not match - skipping
> Checking device (0000/0000) (003/001)
> - VendorID: 0000
> - ProductID: 0000
> - Manufacturer: unknown
> - Product: USB UHCI-alt Root Hub
> - Serial Number: d400
> - Bus: 003
> Trying to match device
> Device does not match - skipping
> Checking device (0000/0000) (002/001)
> - VendorID: 0000
> - ProductID: 0000
> - Manufacturer: unknown
> - Product: USB UHCI-alt Root Hub
> - Serial Number: d800
> - Bus: 002
> Trying to match device
> Device does not match - skipping
> Checking device (051D/0002) (002/002)
> - VendorID: 051d
> - ProductID: 0002
> - Manufacturer: American Power Conversion
> - Product: Back-UPS RS 1500 FW:8.g9 .I USB FW:g9
> - Serial Number: JB0508016805
> - Bus: 002
> Trying to match device
> Device matches
> HID descriptor retrieved (Reportlen = 1022)
> Report descriptor retrieved (Reportlen = 1022)
> Found HID device

See, you can provide some useful information. It seems to me that the
problem is outside of NUT, but we might be able to find out more about
it.

(1) Could you please run the two commands again, but this time, with
the environment variable USB_DEBUG=3, i.e., like this (assuming you
are using bash):

USB_DEBUG=3 /lib/nut/newhidups -u nut -DD -a ups1
USB_DEBUG=3 /lib/nut/newhidups -u root -DD -a ups1

Please post the output. 

(2) is your machine running any access control system, such as
SELinux, which might restrict access to the USB system?

(3) I assume that you have run the command "/lib/nut/newhidups -u nut
-DD -a ups1" as the root user. Is this correct? 

(4) I would still like to see the output of "ls -lr /proc/bus/usb". 

Thanks, -- Peter





More information about the Nut-upsuser mailing list