Hi everybody, If we let the feature running, it appears that the driver gets unbound after a while ( variable from quarter of hour to 6 hours ) and cannot reconnect. This behavior appear with both MGE Ellipse ASR and non-ASR models with connection to an UHCI and OHCI controllers. The USB core is from 2.4.28 kernel. We use nut-2.0.3. Start, powerfail and recovery detections, UPS shutdown work very well. Only continous scanning seems to fail. Following are the logs: [root@xa000000 root]# newhidups -a ups_on_usb -DD <...> Time range from 15mn to 6 hours, depending... upsdrv_updateinfo... Waiting for notifications... process_status_info: online process_status_info: !dischrg process_status_info: chrg process_status_info: !shutdownimm process_status_info: !lowbatt upsdrv_updateinfo... Waiting for notifications... process_status_info: online process_status_info: !dischrg process_status_info: chrg process_status_info: !shutdownimm Can't retrieve Report 1 (-32/32): Broken pipe ================================================== device has been disconnected, try to reconnect =================================================Closing device Reopening device Checking device (0000/0000) (003/001) - VendorID: 0000 - ProductID: 0000 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 003 Trying to match device Device does not match - skipping Checking device (0000/0000) (002/001) - VendorID: 0000 - ProductID: 0000 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 002 Trying to match device Device does not match - skipping Checking device (0463/FFFF) (002/002) - VendorID: 0463 - ProductID: ffff - Manufacturer: unknown - Product: unknown - Serial Number: 1HDF44001 - Bus: 002 Trying to match device Device does not match - skipping Checking device (0000/0000) (001/001) - VendorID: 0000 - ProductID: 0000 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 001 Trying to match device Device does not match - skipping No appropriate HID device found upsdrv_updateinfo... =>Got to reconnect! ================================================== device has been disconnected, try to reconnect =================================================Closing device Reopening device Segmentation fault [root@xa000000 root]# Looking about the reason of the disconnection, I tried gdb but it failed ( received : warning: Couldn't get registers ). Any ideas about what I could also try ? For the non-reconnection problem, I suspect a pointer problem, but with no more precision. I had less time to dig further. Let me know if you need other logs. Any help will be appreciated. Regards, Patrick Agrain
Yes, I'd also like to see the log of the initial connection, i.e., the beginning of "newhidups -a ups_on_usb -DD". What is your device's actual vendor/product ID? Is it 0463/FFFF? -- Peter Patrick Agrain wrote:> > Hi everybody, > > If we let the feature running, it appears that the driver gets unbound > after a while ( variable from quarter of hour to 6 hours ) and cannot > reconnect. > This behavior appear with both MGE Ellipse ASR and non-ASR models with > connection to an UHCI and OHCI controllers. > The USB core is from 2.4.28 kernel. > We use nut-2.0.3. > > Start, powerfail and recovery detections, UPS shutdown work very well. Only > continous scanning seems to fail. > > Following are the logs: > [root@xa000000 root]# newhidups -a ups_on_usb -DD > > <...> Time range from 15mn to 6 hours, depending... > > upsdrv_updateinfo... > Waiting for notifications... > process_status_info: online > process_status_info: !dischrg > process_status_info: chrg > process_status_info: !shutdownimm > process_status_info: !lowbatt > upsdrv_updateinfo... > Waiting for notifications... > process_status_info: online > process_status_info: !dischrg > process_status_info: chrg > process_status_info: !shutdownimm > Can't retrieve Report 1 (-32/32): Broken pipe > =================================================> = device has been disconnected, try to reconnect > =================================================> Closing device > Reopening device > Checking device (0000/0000) (003/001) > - VendorID: 0000 > - ProductID: 0000 > - Manufacturer: unknown > - Product: unknown > - Serial Number: unknown > - Bus: 003 > Trying to match device > Device does not match - skipping > Checking device (0000/0000) (002/001) > - VendorID: 0000 > - ProductID: 0000 > - Manufacturer: unknown > - Product: unknown > - Serial Number: unknown > - Bus: 002 > Trying to match device > Device does not match - skipping > Checking device (0463/FFFF) (002/002) > - VendorID: 0463 > - ProductID: ffff > - Manufacturer: unknown > - Product: unknown > - Serial Number: 1HDF44001 > - Bus: 002 > Trying to match device > Device does not match - skipping > Checking device (0000/0000) (001/001) > - VendorID: 0000 > - ProductID: 0000 > - Manufacturer: unknown > - Product: unknown > - Serial Number: unknown > - Bus: 001 > Trying to match device > Device does not match - skipping > No appropriate HID device found > upsdrv_updateinfo... > > =>Got to reconnect! > > =================================================> = device has been disconnected, try to reconnect > =================================================> Closing device > Reopening device > Segmentation fault > [root@xa000000 root]# > > Looking about the reason of the disconnection, I tried gdb but it failed ( > received : warning: Couldn't get registers ). Any ideas about what I could > also try ? > For the non-reconnection problem, I suspect a pointer problem, but with no > more precision. I had less time to dig further. > > Let me know if you need other logs. > > Any help will be appreciated. > Regards, > Patrick Agrain > > > _______________________________________________ > Nut-upsdev mailing list > Nut-upsdev@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev >
At 16:45 02/05/2006, you wrote:>Yes, I'd also like to see the log of the initial connection, i.e., the >beginning of "newhidups -a ups_on_usb -DD". What is your device's >actual vendor/product ID? Is it 0463/FFFF? -- PeterHi Peter, Thanks to have interest in this.>Vendor/product ID is indeed 0463/FFFF. This is the identification of all >available (here) UPS from MGE ( Ellipse, Ellipse ASR and Extreme C models ).Here are the logs when newhidups starts: [root@xa000000 root]# newhidups -a ups_on_usb -DD Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.3) debug level is '2' Checking device (0000/0000) (001/001) - VendorID: 0000 - ProductID: 0000 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 001 Trying to match device Device does not match - skipping Checking device (0463/FFFF) (001/002) - VendorID: 0463 - ProductID: ffff - Manufacturer: MGE UPS SYSTEMS - Product: ELLIPSE - Serial Number: 1HDF44001 - Bus: 001 Trying to match device Device matches failed to claim USB device, trying 2 more time(s)... detaching kernel driver from USB device... trying again to claim USB device... HID descriptor retrieved (Reportlen = 769) Report descriptor retrieved (Reportlen = 769) Found HID device Report Descriptor size = 769 Detected a UPS: MGE UPS SYSTEMS/ELLIPSE Using subdriver: MGE HID 0.8 Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.Good, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Input, Value: 1.000000 Path: UPS.PowerSummary.PresentStatus.Charging, Type: Input, Value: 1.000000 Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.Good, Type: Input, Value: 1.000000 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.OverLoad, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.OverLoad, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.CommunicationLost, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.PresentStatus.CommunicationLost, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, Value: 100.000000 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, Value: 3406.000000 Path: UPS.PowerSummary.RemainingCapacity, Type: Input, Value: 100.000000 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, Value: 3406.000000 Path: UPS.PowerSummary.RemainingCapacityLimitSetting, Type: Feature, Value: 30.000000 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, Value: 3406.000000 Path: UPS.PowerSummary.PercentLoad, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, Value: 30.000000 Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, Value: -1.000000 Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, Value: -10.000000 Path: UPS.PowerSummary.CapacityMode, Type: Feature, Value: 2.000000 Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.DesignCapacity, Type: Feature, Value: 100.000000 Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, Value: 100.000000 Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, Value: 5.000000 Path: UPS.PowerSummary.iManufacturer, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.iProduct, Type: Feature, Value: 2.000000 Path: UPS.PowerSummary.iSerialNumber, Type: Feature, Value: 4.000000 Path: UPS.PowerSummary.PowerSummaryID, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.FlowID, Type: Feature, Value: 4.000000 Path: UPS.PowerSummary.iModel, Type: Feature, Value: 3.000000 Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, Value: 2.000000 Path: UPS.PowerSummary.AudibleAlarmControl, Type: Input, Value: 2.000000 Path: UPS.OutletSystem.OutletSystemID, Type: Feature, Value: 1.000000 Path: UPS.OutletSystem.Outlet.00ff0001.OutletID, Type: Feature, Value: 1.000000 Path: UPS.OutletSystem.Outlet.00ff0001.FlowID, Type: Feature, Value: 4.000000 Path: UPS.OutletSystem.Outlet.00ff0001.PresentStatus.Switchable, Type: Feature, Value: 0.000000 Path: UPS.OutletSystem.Outlet.00ff0002.OutletID, Type: Feature, Value: 2.000000 Path: UPS.OutletSystem.Outlet.00ff0002.FlowID, Type: Feature, Value: 1.000000 Path: UPS.OutletSystem.Outlet.00ff0002.PresentStatus.Switchable, Type: Feature, Value: 0.000000 Path: UPS.Flow.00ff0004.FlowID, Type: Feature, Value: 4.000000 Path: UPS.Flow.00ff0004.ConfigFrequency, Type: Feature, Value: 50.000000 Path: UPS.Flow.00ff0004.ConfigApparentPower, Type: Feature, Value: 1500.000000 Path: UPS.Flow.00ff0004.ConfigVoltage, Type: Feature, Value: 230.000000 Path: UPS.PowerConverter.PowerConverterID, Type: Feature, Value: 0.000000 Path: UPS.PowerConverter.Output.0084001d, Type: Feature, Value: 0.000000 Path: UPS.PowerConverter.Output.Voltage, Type: Feature, Value: 230.000000 Path: UPS.PowerConverter.Output.LowVoltageTransfer, Type: Feature, Value: 184.000000 Path: UPS.PowerConverter.Output.HighVoltageTransfer, Type: Feature, Value: 264.000000 Path: UPS.ffff0018.ffff0019, Type: Feature, Value: 1.000000 Path: UPS.ffff0018.ffff001a.00ff0001.ffff0090, Type: Feature, Value: 0.000000 Path: UPS.ffff0018.ffff001a.00ff0001.ffff001b, Type: Feature, Value: 1.000000 Path: UPS.ffff0018.ffff001a.00ff0001.ffff0094, Type: Feature, Value: 0.000000 Path: UPS.ffff0018.ffff001a.00ff0001.ffff0092, Type: Feature, Value: 0.000000 Path: UPS.ffff0018.ffff001a.00ff0001.ffff0091, Type: Feature, Value: -12298864.000000 Path: UPS.ffff0018.ffff001a.00ff0001.PresentStatus.ffff0093, Type: Feature, Value: 0.000000 Path: UPS.ffff0018.ffff001a.00ff0001.PresentStatus.ffff0093, Type: Input, Value: 0.000000 Path: UPS.ffff0018.ffff001a.00ff0002.ffff0090, Type: Feature, Value: 0.000000 Path: UPS.ffff0018.ffff001a.00ff0002.ffff001b, Type: Feature, Value: 2.000000 Path: UPS.ffff0018.ffff001a.00ff0002.ffff0094, Type: Feature, Value: 0.000000 Path: UPS.ffff0018.ffff001a.00ff0002.ffff0092, Type: Feature, Value: 0.000000 Path: UPS.ffff0018.ffff001a.00ff0002.ffff0091, Type: Feature, Value: -16347728.000000 Path: UPS.ffff0018.ffff001a.00ff0002.PresentStatus.ffff0093, Type: Feature, Value: 0.000000 Path: UPS.ffff0018.ffff001a.00ff0002.PresentStatus.ffff0093, Type: Input, Value: 0.000000 Path: UPS.BatterySystem.Battery.AudibleAlarmControl, Type: Feature, Value: 1.000000 entering identify_ups(0x0463, 0xffff) -> String: 1500 (len = 4/4) get_model_name(ELLIPSE, 1500) comparing with: ellipse 300 comparing with: ellipse 500 comparing with: ellipse 650 comparing with: ellipse 800 comparing with: ellipse 1200 comparing with: ellipse premium 500 comparing with: ellipse premium 650 comparing with: ellipse premium 800 comparing with: ellipse premium 1200 comparing with: Ellipse 600 comparing with: Ellipse 750 comparing with: Ellipse 1000 comparing with: Ellipse 1500 Found Ellipse 1500 Can't find object UPS.BatterySystem.Battery.Temperature Can't find object UPS.PowerSummary.Voltage Can't find object UPS.BatterySystem.ConfigVoltage Can't find object UPS.PowerSummary.DelayBeforeReboot Can't find object UPS.BatterySystem.Battery.Test Can't find object UPS.BatterySystem.Battery.TestPeriod Can't find object UPS.PowerSummary.Temperature process_status_info: online process_status_info: !dischrg process_status_info: chrg process_status_info: !shutdownimm process_status_info: !lowbatt process_status_info: !overload process_status_info: !replacebatt Can't find object UPS.PowerConverter.Input.[1].PresentStatus.Buck Can't find object UPS.PowerConverter.Input.[1].PresentStatus.Boost process_status_info: !off Can't find object UPS.PowerConverter.Input.[1].Voltage Can't find object UPS.PowerConverter.Input.[1].Frequency Can't find object UPS.PowerConverter.Output.LowVoltageBoostTransfer Can't find object UPS.PowerConverter.Output.HighVoltageBoostTransfer Can't find object UPS.PowerConverter.Output.LowVoltageBuckTransfer Can't find object UPS.PowerConverter.Output.HighVoltageBuckTransfer Can't find object UPS.PowerConverter.Output.Current Can't find object UPS.PowerConverter.Output.Frequency Can't find object UPS.PowerSummary.ConfigVoltage Can't find object UPS.PowerSummary.ConfigVoltage Can't find object UPS.OutletSystem.Outlet.[2].PresentStatus.SwitchOn/Off Can't find object UPS.OutletSystem.Outlet.[2].RemainingCapacityLimit Can't find object UPS.OutletSystem.Outlet.[2].DelayBeforeShutdown Can't find object UPS.OutletSystem.Outlet.[2].DelayBeforeStartup Can't find object UPS.OutletSystem.Outlet.[3].OutletID Can't find object UPS.OutletSystem.Outlet.[3].OutletID Can't find object UPS.OutletSystem.Outlet.[3].PresentStatus.Switchable Can't find object UPS.OutletSystem.Outlet.[3].PresentStatus.SwitchOn/Off Can't find object UPS.OutletSystem.Outlet.[3].RemainingCapacityLimit Can't find object UPS.OutletSystem.Outlet.[3].DelayBeforeShutdown Can't find object UPS.OutletSystem.Outlet.[3].DelayBeforeStartup Can't find object UPS.BatterySystem.Battery.Test Can't find object UPS.BatterySystem.Battery.Test Can't find object UPS.BatterySystem.Battery.Test upsdrv_updateinfo... process_status_info: online process_status_info: !dischrg process_status_info: chrg process_status_info: !shutdownimm process_status_info: !lowbatt process_status_info: !overload process_status_info: !replacebatt process_status_info: !off dstate_init: sock /var/state/ups/newhidups-auto open on fd 5 upsdrv_updateinfo... Waiting for notifications... process_status_info: online process_status_info: !dischrg process_status_info: chrg process_status_info: !shutdownimm process_status_info: !lowbatt upsdrv_updateinfo... Waiting for notifications... process_status_info: online process_status_info: !dischrg process_status_info: chrg process_status_info: !shutdownimm process_status_info: !lowbatt <...> Thank in advance for your help. Regards, Patrick Agrain
Patrick Agrain wrote:> > Hello Peter, > > This morning, I told about a problem when CONFIG_USB_HID is not set. The > problem exist, but not as I described it. > [...] > > But I think you're right. The reconnection problem is due to the "unknown" > state of Vendor and Product and not to the fact that Driver=(none).Yes, the kernel driver has nothing to do with that. I usually use a USB mouse, so I have to have USB support in the kernel. The kernel will usually attach itself to any device that it thinks might be a mouse or a keyboard, even if it turns out not to be. This is when you see "Driver=hid". NUT causes the kernel to detach its internal driver from the device; this is why you see: failed to claim USB device, trying 2 more time(s)... detaching kernel driver from USB device... trying again to claim USB device... HID descriptor retrieved (Reportlen = 769) After this, NUT attaches its own driver to the device, which is when you see "Driver=usbdevfs". The details of this could vary between operating systems and versions. Anyway, I agree that none of this is the source of your problems. The problem seems to be an inability to get the vendor and product strings after a reconnect. This is a bit unusual. Do you have the latest libusb installed? Check /usr/lib/libusb*. Should be at least libusb-0.1.so.4.4.2 or so. -- Peter
Patrick Agrain
2006-May-05 06:30 UTC
[Nut-upsdev] Newhidups gets unbound after a while - more logs
Hi everybody, New logs available concerning this problem ( or these problems ). I performed some modifications on the libusb-0.1.10a package - increase the timeout of usb_get_string() from 1000 to 4000 ( chosen arbitrary ). - modify the usb_get_string_simple() so that it looks like the usb_string() from USB core. Disconnection is still a mystery ( it will be cleared later ), but concerning the non-reconnection, I've got now this : Waiting for notifications... process_status_info: online process_status_info: !dischrg process_status_info: chrg Can't retrieve Report 2 (-32/32): Broken pipe ================================================== device has been disconnected, try to reconnect =================================================Closing device Reopening device Checking device (0000/0000) (001/001) No Manufacturer string Index Found Product Index :2 usb_get_string_simple returns -1 - VendorID: 0000 - ProductID: 0000 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 001 Trying to match device Device does not match - skipping Checking device (0463/FFFF) (001/007) Found Manufacturer Index :1 usb_get_string_simple returns -32 <----- now returns broken pipe, before returned -110 timeout. Found Product Index :2 - VendorID: 0463 - ProductID: ffff - Manufacturer: unknown - Product: ELLIPSE <----- Now we succeed for the Product string - Serial Number: 1HDF44001 - Bus: 001 Trying to match device Device does not match - skipping No appropriate HID device found upsdrv_updateinfo... =>Got to reconnect! ================================================== device has been disconnected, try to reconnect =================================================Closing device Reopening device Segmentation fault [root@xa000000 tmp]# Seems that it still a problem on getting back a string through USB. But hope is back. Regards, Patrick Agrain
[back from a short week of holidays, just quickly passing by...] salut Patrick et all, 2006/5/2, Patrick Agrain <patrick.agrain@alcatel.fr>:> ... > =================================================> = device has been disconnected, try to reconnect > =================================================> Closing device > Reopening device > Segmentation faultif this segfault isn't due to some badly handled ctrl+c, then this is a known bug (ie http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=354305) I still have to find a bit of time for releasing 2.0.4. Arnaud