[Nut-upsuser] USB problem as user

Czuczy Gergely czuczy at publishing.hu
Mon Apr 23 18:24:31 UTC 2007


On Mon, 23 Apr 2007 11:58:05 -0300 (ADT)
selinger at mathstat.dal.ca (Peter Selinger) wrote:

> 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
debug level is '2'
usb_set_debug: Setting debugging level to 3 (on)
usb_os_init: Found USB VFS at /dev/usb
usb_os_find_busses: Found lp10
usb_os_find_busses: Found lp0
usb_os_find_busses: Found ez0
usb_os_find_busses: Found mouse0
usb_os_find_busses: Found lp1
usb_os_find_busses: Found scanner0
usb_os_find_busses: Found hiddev0
usb_os_find_busses: Found ez1
usb_os_find_busses: Found mouse1
usb_os_find_busses: Found lp2
usb_os_find_busses: Found scanner1
usb_os_find_busses: Found hiddev1
usb_os_find_busses: Found ez2
usb_os_find_busses: Found mouse2
usb_os_find_busses: Found lp3
usb_os_find_busses: Found scanner2
usb_os_find_busses: Found hiddev2
usb_os_find_busses: Found ez3
usb_os_find_busses: Found mouse3
usb_os_find_busses: Found lp4
usb_os_find_busses: Found scanner3
usb_os_find_busses: Found hiddev3
usb_os_find_busses: Found ez4
usb_os_find_busses: Found mouse4
usb_os_find_busses: Found lp5
usb_os_find_busses: Found scanner4
usb_os_find_busses: Found hiddev4
usb_os_find_busses: Found ez5
usb_os_find_busses: Found mouse5
usb_os_find_busses: Found lp6
usb_os_find_busses: Found scanner5
usb_os_find_busses: Found hiddev5
usb_os_find_busses: Found ez6
usb_os_find_busses: Found mouse6
usb_os_find_busses: Found lp7
usb_os_find_busses: Found scanner6
usb_os_find_busses: Found hiddev6
usb_os_find_busses: Found ez7
usb_os_find_busses: Found mouse7
usb_os_find_busses: Found lp8
usb_os_find_busses: Found scanner7
usb_os_find_busses: Found hiddev7
usb_os_find_busses: Found ez8
usb_os_find_busses: Found mouse8
usb_os_find_busses: Found lp9
usb_os_find_busses: Found scanner8
usb_os_find_busses: Found hiddev8
usb_os_find_busses: Found ez9
usb_os_find_busses: Found mouse9
usb_os_find_busses: Found scanner9
usb_os_find_busses: Found hiddev9
usb_os_find_busses: Found mouse10
usb_os_find_busses: Found ez10
usb_os_find_busses: Found scanner10
usb_os_find_busses: Found hiddev10
usb_os_find_busses: Found lp11
usb_os_find_busses: Found mouse11
usb_os_find_busses: Found ez11
usb_os_find_busses: Found scanner11
usb_os_find_busses: Found hiddev11
usb_os_find_busses: Found lp12
usb_os_find_busses: Found mouse12
usb_os_find_busses: Found ez12
usb_os_find_busses: Found scanner12
usb_os_find_busses: Found hiddev12
usb_os_find_busses: Found lp13
usb_os_find_busses: Found mouse13
usb_os_find_busses: Found ez13
usb_os_find_busses: Found lp14
usb_os_find_busses: Found scanner13
usb_os_find_busses: Found hiddev13
usb_os_find_busses: Found mouse14
usb_os_find_busses: Found ez14
usb_os_find_busses: Found scanner14
usb_os_find_busses: Found hiddev14
usb_os_find_busses: Found lp15
usb_os_find_busses: Found mouse15
usb_os_find_busses: Found ez15
usb_os_find_busses: Found scanner15
usb_os_find_busses: Found hiddev15
usb_os_find_busses: Found rio500
usb_os_find_busses: Skipping non bus directory usblcd
usb_os_find_busses: Found cpad0
USB error: couldn't opendir(/dev/usb/lp10): Not a directory
No appropriate HID device found
No matching HID UPS found

> USB_DEBUG=3 /lib/nut/newhidups -u root -DD -a ups1
debug level is '2'
usb_set_debug: Setting debugging level to 3 (on)
usb_os_init: Found USB VFS at /proc/bus/usb
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_busses: Skipping non bus directory drivers
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
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
Report Descriptor size = 1022
Detected a UPS: American Power Conversion/Back-UPS RS 1500 FW:8.g9 .I
USB FW:g9
Using subdriver: APC/CyberPower HID 0.9
Path: UPS.PowerSummary.iProduct, Type: Feature, Value: 1.000000
Path: UPS.PowerSummary.iSerialNumber, Type: Feature, Value: 2.000000
Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, Value: 4.000000
Path: UPS.PowerSummary.iOEMInformation, Type: Feature, Value: 3.000000
Path: UPS.PowerSummary.Rechargeable, Type: Feature, Value: 1.000000
Path: UPS.PowerSummary.Charging, Type: Input, Value: 0.000000
Path: UPS.PowerSummary.Charging, Type: Feature, Value: 0.000000
Path: UPS.PowerSummary.Discharging, Type: Input, Value: 0.000000
Path: UPS.PowerSummary.Discharging, Type: Feature, Value: 0.000000
Path: UPS.PowerSummary.APCStatusFlag, Type: Input, Value: 8.000000
Path: UPS.PowerSummary.APCStatusFlag, Type: Feature, Value: 8.000000
Path: UPS.PowerSummary.ManufacturerDate, Type: Feature, Value:
12880.000000 Path: UPS.PowerSummary.ConfigVoltage, Type: Feature,
Value: 24.000000 Path: UPS.PowerSummary.Voltage, Type: Feature, Value:
26.930000 Path: UPS.PowerSummary.iManufacturer, Type: Feature, Value:
3.000000 Path: UPS.PowerSummary.CapacityMode, Type: Feature, Value:
2.000000 Path: UPS.PowerSummary.RemainingCapacity, Type: Input, Value:
100.000000 Path: UPS.PowerSummary.RemainingCapacity, Type: Feature,
Value: 100.000000 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input,
Value: 5248.000000 Path: UPS.PowerSummary.RunTimeToEmpty, Type:
Feature, Value: 5248.000000 Path: UPS.PowerSummary.DesignCapacity,
Type: Feature, Value: 100.000000 Path:
UPS.PowerSummary.FullChargeCapacity, Type: Feature, Value: 100.000000
Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature, Value:
50.000000 Path: UPS.PowerSummary.CapacityGranularity2, Type: Feature,
Value: 1.000000

> 
> Please post the output. 
> 
> (2) is your machine running any access control system, such as
> SELinux, which might restrict access to the USB system?
nope. only grsecurity, but this part is not restricted i think.
we usually do network-related restrictions.

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

> (4) I would still like to see the output of "ls -lr /proc/bus/usb". 
# ls -lR /proc/bus/usb
/proc/bus/usb:
total 0
dr-xr-xr-x  1 nut  nut  0 2006-04-06 17:10 .
dr-xr-x---  4 root 6661 0 2006-04-06 17:10 ..
dr-xr-xr-x  1 nut  nut  0 2006-04-06 17:10 001
dr-xr-xr-x  1 nut  nut  0 2006-04-06 17:10 002
dr-xr-xr-x  1 nut  nut  0 2006-04-06 17:10 003
dr-xr-xr-x  1 nut  nut  0 2006-04-06 17:10 004
-r--r--r--  1 nut  nut  0 2006-04-06 17:10 devices
-r--r--r--  1 nut  nut  0 2006-04-06 17:10 drivers

/proc/bus/usb/001:
total 1.0K
dr-xr-xr-x  1 nut nut  0 2006-04-06 17:10 .
dr-xr-xr-x  1 nut nut  0 2006-04-06 17:10 ..
-rw-r--r--  1 nut nut 18 2006-04-06 17:10 001

/proc/bus/usb/002:
total 2.0K
dr-xr-xr-x  1 nut nut  0 2006-04-06 17:10 .
dr-xr-xr-x  1 nut nut  0 2006-04-06 17:10 ..
-rw-rw----  1 nut nut 18 2007-04-23 20:21 001
-rw-rw----  1 nut nut 18 2007-04-23 20:21 002

/proc/bus/usb/003:
total 1.0K
dr-xr-xr-x  1 nut nut  0 2006-04-06 17:10 .
dr-xr-xr-x  1 nut nut  0 2006-04-06 17:10 ..
-rw-r--r--  1 nut nut 18 2007-04-23 20:21 001

/proc/bus/usb/004:
total 1.0K
dr-xr-xr-x  1 nut nut  0 2006-04-06 17:10 .
dr-xr-xr-x  1 nut nut  0 2006-04-06 17:10 ..
-rw-r--r--  1 nut nut 18 2007-04-23 20:21 001

> 
> Thanks, -- Peter
thank you very much, and sorry for the late reply, i
had some things to do in the office.

-- 
Üdvözlettel,

Czuczy Gergely
Publishing Factory Kft
http://www.publishing.hu/



More information about the Nut-upsuser mailing list