[Nut-upsuser] USB problem as user
Czuczy Gergely
czuczy at publishing.hu
Mon Apr 23 13:48:49 UTC 2007
On Mon, 23 Apr 2007 10:39:01 -0300 (ADT)
selinger at mathstat.dal.ca (Peter Selinger) wrote:
> Czuczy Gergely wrote:
> >
> > On Sat, 21 Apr 2007 21:56:53 -0300 (ADT)
> > selinger at mathstat.dal.ca (Peter Selinger) wrote:
> >
> > > In this case, I recommend that you do some testing and figure out
> > > yourself what the problem is.
> > >
> > > The debug output that you sent indicates that newhidups was
> > > unable to find the USB device, not that it was unable to open it.
> > > So perhaps this is not a permissions problem after all. Perhaps
> > > the device got unplugged or unloaded.
> > >
> > > Do you see the device with "lsusb" or "usbview"? Do you see it
> > > with "ls -lr /proc/bus/usb"?
> > >
> > > Try alternating "-u root" and "-u nut" several times to make sure
> > > one always works and the other one doesn't.
> > Yes, as I had already mentioned, I'm all over this.
> >
> > > Also check that no other copy of newhidups is already running; you
> > > can't attach two driver instances to a single device.
> > I've checked it, several times.
> >
> > > Finally, to state the obvious: if your computer is a production
> > > system that cannot be experimented with, then attach the UPS to
> > > another, non-production system, and make sure it works there
> > > first.
> > There it works. and I've only got production systems at that
> > location.
> >
> > So, after suggesting again what I had already done and said
> > I'd done it, have you got _any_ useful comments?
> >
> > Can you give me _any_ clue where to start on this? _anything_
>
> 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.
This is a ubuntu linux, breezy as i can see, on i386.
>
> *Do* you see the device with "lsusb" or "usbview"? *Do* you see it
> with "ls -lr /proc/bus/usb"? The possible answers to these questions
> are "yes" or "no", not "I'm all over this".
I've started the subject as it shows up everywhere, it's everywhere,
it works, but only as root, and not as a user. so, i've written
what i had.
> And if the answers are "yes", then please post the output of these
> commands to the list. And if they are "no", then please post the
> output anyway. And if you get errors, please post them to the
> list. And please also post the full output of newhidups -DD again,
> with and without the "-u root" option. And yes, I know that you have
> already run these commands and send some logs; if you would like us to
> help you, then please run them *again* and post *all* the output.
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.
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
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
Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, Value:
10.000000
Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, Value:
1.000000
Path: UPS.PowerSummary.ACPresent, Type: Input, Value: 1.000000
Path: UPS.PowerSummary.ACPresent, Type: Feature, Value: 1.000000
Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, Value:
0.000000
Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Feature,
Value: 0.000000
Path: UPS.PowerSummary.ShutdownImminent, Type: Input, Value: 0.000000
Path: UPS.PowerSummary.ShutdownImminent, Type: Feature, Value: 0.000000
Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, Value:
-1.000000
Path: UPS.PowerSummary.PresentStatus.Charging, Type: Input, Value:
0.000000
Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, Value:
0.000000
Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Input, Value:
0.000000
Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, Value:
0.000000
Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Input, Value:
1.000000
Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, Value:
1.000000
Path: UPS.PowerSummary.PresentStatus.BatteryPresent, Type: Input,
Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.BatteryPresent, Type: Feature,
Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Input, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Feature, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: Input,
Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: Feature,
Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired, Type:
Input, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired, Type:
Feature, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.CommunicationLost, Type: Input,
Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.CommunicationLost, Type: Feature,
Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Input,
Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Feature,
Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.Overload, Type: Input, Value:
0.000000
Path: UPS.PowerSummary.PresentStatus.Overload, Type: Feature, Value:
0.000000
Path: UPS.PowerSummary.PresentStatus.VoltageNotRegulated, Type: Input,
Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.VoltageNotRegulated, Type:
Feature, Value: 0.000000
and so on...
> Please also give some information about your system. What operating
> system are you running? What version of libusb?
Yes, i had not provided this one, here it is:
ii libusb-0.1-4 0.1.10a-17ubuntu1
--
Üdvözlettel,
Czuczy Gergely
Publishing Factory Kft
http://www.publishing.hu/
More information about the Nut-upsuser
mailing list