Arnaud Quette
2008-Jan-25 09:37 UTC
[Nut-upsdev] Bug#462468: nut: megatec_usb ups not detected since 2.2.1 update anymore
Hi Sven, 2008/1/25, Sven Koch <haegar at sdinet.de>:> Package: nut > Version: 2.2.1-1 > Severity: normal > > I am using a Mustec PowerMust 1000 USB, connected with a USB cable to > the PC. > > With nut 2.2.0-2.1 everything works without problems - but since the > 2.2.1-1 update the "upsdrvctl start" from the init script just fails, > executing the command manually outputs that it can't find a Megatec > Protocol UPS. > > Straceing it there is a loop of: > > ... > [pid 23913] ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfac4d18) = -1 EAGAIN (Resource temporarily unavailable) > [pid 23913] select(5, NULL, [4], NULL, {0, 1000}) = 0 (Timeout) > [pid 23913] gettimeofday({1201220631, 708379}, NULL) = 0 > [pid 23913] ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfac4d18) = -1 EAGAIN (Resource temporarily unavailable) > [pid 23913] select(5, NULL, [4], NULL, {0, 1000}) = 0 (Timeout) > [pid 23913] gettimeofday({1201220631, 712517}, NULL) = 0 > [pid 23913] ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfac4d18) = -1 EAGAIN (Resource temporarily unavailable) > [pid 23913] ioctl(4, USBDEVFS_DISCARDURB, 0xbfac4cd4) = 0 > [pid 23913] ioctl(4, USBDEVFS_REAPURB, 0xbfac4d18) = 0 > [pid 23913] write(2, "Megatec protocol UPS not detecte"..., 35Megatec protocol UPS not detected. > ) = 35 > > > I'm back to 2.2.0-2.1 for now. > > If you have further questions or something for me to test please mail, > I can play with it as it is only my home server. > > Greetings, > Haegar > > > > -- System Information: > Debian Release: lenny/sid > APT prefers oldstable > APT policy: (500, 'oldstable'), (500, 'unstable'), (1, 'experimental') > Architecture: i386 (i686) > > Kernel: Linux 2.6.20-sdinet41-tokamak (SMP w/2 CPU cores) > Locale: LANG=C, LC_CTYPE=de_DE.ISO-8859-1 (charmap=ISO-8859-1) > Shell: /bin/sh linked to /bin/bash > > Versions of packages nut depends on: > ii adduser 3.105 add and remove users and groups > ii debconf 1.5.18 Debian configuration management sy > ii libc6 2.7-6 GNU C Library: Shared libraries > ii libusb-0.1-4 2:0.1.12-9 userspace USB programming library > ii lsb-base 3.1-24 Linux Standard Base 3.1 init scrip > ii udev 0.114-2 /dev/ and hotplug management daemo > > nut recommends no packages.can you reinstall 2.2.1 and post the following: - lsusb - ls -lR /dev/bus/usb - megatec_usb -DDDDD -a upsname @Carlos: can you give us a bit of light about this? thanks, Arnaud -- Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ Free Software Developer - http://arnaud.quette.free.fr/
Carlos Rodrigues
2008-Jan-25 10:08 UTC
[Nut-upsdev] Bug#462468: nut: megatec_usb ups not detected since 2.2.1 update anymore
On Jan 25, 2008 9:37 AM, Arnaud Quette <aquette.dev at gmail.com> wrote:> > [pid 23913] ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfac4d18) = -1 EAGAIN (Resource temporarily unavailable) > > [pid 23913] select(5, NULL, [4], NULL, {0, 1000}) = 0 (Timeout) > > [pid 23913] gettimeofday({1201220631, 708379}, NULL) = 0 > > [pid 23913] ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfac4d18) = -1 EAGAIN (Resource temporarily unavailable) > > [pid 23913] select(5, NULL, [4], NULL, {0, 1000}) = 0 (Timeout) > > [pid 23913] gettimeofday({1201220631, 712517}, NULL) = 0 > > [pid 23913] ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfac4d18) = -1 EAGAIN (Resource temporarily unavailable) > > [pid 23913] ioctl(4, USBDEVFS_DISCARDURB, 0xbfac4cd4) = 0 > > [pid 23913] ioctl(4, USBDEVFS_REAPURB, 0xbfac4d18) = 0 > > [pid 23913] write(2, "Megatec protocol UPS not detecte"..., 35Megatec protocol UPS not detected. > > @Carlos: can you give us a bit of light about this?Looks like something USB specific. Maybe a permissions issue. -- Carlos Rodrigues
Sven-Haegar Koch
2008-Jan-25 15:12 UTC
[Nut-upsdev] Bug#462468: nut: megatec_usb ups not detected since 2.2.1 update anymore
On Fri, 25 Jan 2008, Arnaud Quette wrote:> 2008/1/25, Sven Koch <haegar at sdinet.de>: > > Package: nut > > Version: 2.2.1-1 > > Severity: normal > > > > I am using a Mustec PowerMust 1000 USB, connected with a USB cable to > > the PC. > > > > With nut 2.2.0-2.1 everything works without problems - but since the > > 2.2.1-1 update the "upsdrvctl start" from the init script just fails, > > executing the command manually outputs that it can't find a Megatec > > Protocol UPS.> can you reinstall 2.2.1 and post the following: > - lsusbBus 005 Device 003: ID 04b4:6830 Cypress Semiconductor Corp. USB-2.0 IDE Adapter Bus 005 Device 004: ID 04fc:0c15 Sunplus Technology Co., Ltd Bus 005 Device 001: ID 0000:0000 Bus 001 Device 004: ID 0665:5161 Bus 001 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 Bus 004 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 (The 0665:5161 is the UPS, the other two are external harddisks, all three directly connected to the PC)> - ls -lR /dev/bus/usb/dev/bus/usb: total 0 drwxr-xr-x 2 root root 80 Jan 25 00:19 001 drwxr-xr-x 2 root root 60 Jan 25 00:19 002 drwxr-xr-x 2 root root 60 Jan 25 00:19 003 drwxr-xr-x 2 root root 60 Jan 25 00:19 004 drwxr-xr-x 2 root root 100 Jan 25 00:19 005 /dev/bus/usb/001: total 0 crw-rw---- 1 root root 189, 0 Jan 25 00:19 001 crw-rw-r-- 1 root nut 189, 3 Jan 25 16:00 004 /dev/bus/usb/002: total 0 crw-rw---- 1 root root 189, 128 Jan 25 00:19 001 /dev/bus/usb/003: total 0 crw-rw---- 1 root root 189, 256 Jan 25 00:19 001 /dev/bus/usb/004: total 0 crw-rw---- 1 root root 189, 384 Jan 25 00:19 001 /dev/bus/usb/005: total 0 crw-rw---- 1 root root 189, 512 Jan 25 00:19 001 crw-rw---- 1 root root 189, 514 Jan 25 00:19 003 crw-rw---- 1 root root 189, 515 Jan 25 00:19 004> - megatec_usb -DDDDD -a upsnameOutput from 2.2.1-1: tokamak:~# /lib/nut/megatec_usb -DDDDD -a myups Network UPS Tools 2.2.1- - Megatec protocol driver 1.5.9 [megatec_usb] Carlos Rodrigues (c) 2003-2007 Serial-over-USB transport layer for Megatec protocol driver [megatec_usb] Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c) 2007 debug level is '5' Checking device (0665/5161) (001/004) - VendorID: 0665 - ProductID: 5161 - Manufacturer: Cypress Semiconductor - Product: USB to Serial - Serial Number: unknown - Bus: 001 Trying to match device Device matches Starting UPS detection process... Asking for UPS status [Q1]... Q1 => FAILED [timeout] Asking for UPS status [Q1]... Q1 => FAILED [timeout] Asking for UPS status [Q1]... Q1 => FAILED [timeout] Asking for UPS status [Q1]... Q1 => FAILED [timeout] Asking for UPS status [Q1]... Q1 => FAILED [timeout] 5 out of 5 detection attempts failed (minimum failures: 2). Megatec protocol UPS not detected. tokamak:~# The same with 2.2.0-2.1: Network UPS Tools 2.2.0- - Megatec protocol driver 1.5.4 [megatec_usb] Carlos Rodrigues (c) 2003-2007 Serial-over-USB transport layer for Megatec protocol driver [megatec_usb] debug level is '5' Checking device (0665/5161) (001/004) - VendorID: 0665 - ProductID: 5161 - Manufacturer: Cypress Semiconductor - Product: USB to Serial - Serial Number: unknown - Bus: 001 Trying to match device Device matches Starting UPS detection process... Attempting to detect the UPS... Sending "Q1" command... "Q1" command successful. Attempting to detect the UPS... Sending "Q1" command... "Q1" command successful. Attempting to detect the UPS... Sending "Q1" command... "Q1" command successful. Attempting to detect the UPS... Sending "Q1" command... "Q1" command successful. Attempting to detect the UPS... Sending "Q1" command... "Q1" command successful. 0 out of 5 detection attempts failed (minimum failures: 2). Asking for UPS information ("I" command)... UPS doesn't return any information about itself. Megatec protocol UPS detected. Asking for UPS power ratings ("F" command)... UPS power ratings: #220.0 004 24.00 50.0 Asking for UPS status ("Q1" command)... UPS status: (226.7 226.7 225.7 026 50.1 26.8 25.0 00001001 24.0V battery, interval [19.4V, 27.4V]. Done setting up the UPS. Asking for UPS status ("Q1" command)... UPS doesn't return any information about its status. dstate_init: sock /var/run/nut/megatec_usb-myups open on fd 5 Asking for UPS status ("Q1" command)... UPS status: (227.2 226.7 226.1 026 50.1 26.8 25.0 00001001 Charge: 92.5% new connection on fd 6 Asking for UPS status ("Q1" command)... UPS status: (226.7 226.7 225.7 026 50.1 26.8 25.0 00001001 Charge: 92.5% Asking for UPS status ("Q1" command)... UPS status: (226.7 226.7 225.3 026 50.1 26.8 25.0 00001001 Charge: 92.5% Asking for UPS status ("Q1" command)... (and looping charge-readouts from here on) The output of lsusb and ls -lR /dev/bus/usb is the same for the two versions. c'ya sven -- The Internet treats censorship as a routing problem, and routes around it. (John Gilmore on http://www.cygnus.com/~gnu/)
Arnaud Quette
2008-Jan-25 15:30 UTC
[Nut-upsdev] Bug#462468: nut: megatec_usb ups not detected since 2.2.1 update anymore
2008/1/25, Sven-Haegar Koch <haegar at sdinet.de>:> On Fri, 25 Jan 2008, Arnaud Quette wrote: > > > 2008/1/25, Sven Koch <haegar at sdinet.de>: > > > Package: nut > > > Version: 2.2.1-1 > > > Severity: normal > > > > > > I am using a Mustec PowerMust 1000 USB, connected with a USB cable to > > > the PC. > > > > > > With nut 2.2.0-2.1 everything works without problems - but since the > > > 2.2.1-1 update the "upsdrvctl start" from the init script just fails, > > > executing the command manually outputs that it can't find a Megatec > > > Protocol UPS. > > > can you reinstall 2.2.1 and post the following: > > - lsusb > Bus 005 Device 003: ID 04b4:6830 Cypress Semiconductor Corp. USB-2.0 IDE Adapter > Bus 005 Device 004: ID 04fc:0c15 Sunplus Technology Co., Ltd > Bus 005 Device 001: ID 0000:0000 > Bus 001 Device 004: ID 0665:5161 > Bus 001 Device 001: ID 0000:0000 > Bus 002 Device 001: ID 0000:0000 > Bus 004 Device 001: ID 0000:0000 > Bus 003 Device 001: ID 0000:0000 > > (The 0665:5161 is the UPS, the other two are external harddisks, all > three directly connected to the PC) > > > - ls -lR /dev/bus/usb > /dev/bus/usb: > total 0 > drwxr-xr-x 2 root root 80 Jan 25 00:19 001 > drwxr-xr-x 2 root root 60 Jan 25 00:19 002 > drwxr-xr-x 2 root root 60 Jan 25 00:19 003 > drwxr-xr-x 2 root root 60 Jan 25 00:19 004 > drwxr-xr-x 2 root root 100 Jan 25 00:19 005 > > /dev/bus/usb/001: > total 0 > crw-rw---- 1 root root 189, 0 Jan 25 00:19 001 > crw-rw-r-- 1 root nut 189, 3 Jan 25 16:00 004 > > /dev/bus/usb/002: > total 0 > crw-rw---- 1 root root 189, 128 Jan 25 00:19 001 > > /dev/bus/usb/003: > total 0 > crw-rw---- 1 root root 189, 256 Jan 25 00:19 001 > > /dev/bus/usb/004: > total 0 > crw-rw---- 1 root root 189, 384 Jan 25 00:19 001 > > /dev/bus/usb/005: > total 0 > crw-rw---- 1 root root 189, 512 Jan 25 00:19 001 > crw-rw---- 1 root root 189, 514 Jan 25 00:19 003 > crw-rw---- 1 root root 189, 515 Jan 25 00:19 004 > > > - megatec_usb -DDDDD -a upsname > > Output from 2.2.1-1: > > tokamak:~# /lib/nut/megatec_usb -DDDDD -a myups > Network UPS Tools 2.2.1- - Megatec protocol driver 1.5.9 [megatec_usb] > Carlos Rodrigues (c) 2003-2007 > > Serial-over-USB transport layer for Megatec protocol driver [megatec_usb] > Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c) > 2007 > > debug level is '5' > Checking device (0665/5161) (001/004) > - VendorID: 0665 > - ProductID: 5161 > - Manufacturer: Cypress Semiconductor > - Product: USB to Serial > - Serial Number: unknown > - Bus: 001 > Trying to match device > Device matches > Starting UPS detection process... > Asking for UPS status [Q1]... > Q1 => FAILED [timeout] > Asking for UPS status [Q1]... > Q1 => FAILED [timeout] > Asking for UPS status [Q1]... > Q1 => FAILED [timeout] > Asking for UPS status [Q1]... > Q1 => FAILED [timeout] > Asking for UPS status [Q1]... > Q1 => FAILED [timeout] > 5 out of 5 detection attempts failed (minimum failures: 2). > Megatec protocol UPS not detected. > tokamak:~# > > > The same with 2.2.0-2.1: > > Network UPS Tools 2.2.0- - Megatec protocol driver 1.5.4 [megatec_usb] > Carlos Rodrigues (c) 2003-2007 > > Serial-over-USB transport layer for Megatec protocol driver [megatec_usb] > > debug level is '5' > Checking device (0665/5161) (001/004) > - VendorID: 0665 > - ProductID: 5161 > - Manufacturer: Cypress Semiconductor > - Product: USB to Serial > - Serial Number: unknown > - Bus: 001 > Trying to match device > Device matches > Starting UPS detection process... > Attempting to detect the UPS... > Sending "Q1" command... > "Q1" command successful. > Attempting to detect the UPS... > Sending "Q1" command... > "Q1" command successful. > Attempting to detect the UPS... > Sending "Q1" command... > "Q1" command successful. > Attempting to detect the UPS... > Sending "Q1" command... > "Q1" command successful. > Attempting to detect the UPS... > Sending "Q1" command... > "Q1" command successful. > 0 out of 5 detection attempts failed (minimum failures: 2). > Asking for UPS information ("I" command)... > UPS doesn't return any information about itself. > Megatec protocol UPS detected. > Asking for UPS power ratings ("F" command)... > UPS power ratings: #220.0 004 24.00 50.0 > Asking for UPS status ("Q1" command)... > UPS status: (226.7 226.7 225.7 026 50.1 26.8 25.0 00001001 > 24.0V battery, interval [19.4V, 27.4V]. > Done setting up the UPS. > Asking for UPS status ("Q1" command)... > UPS doesn't return any information about its status. > dstate_init: sock /var/run/nut/megatec_usb-myups open on fd 5 > Asking for UPS status ("Q1" command)... > UPS status: (227.2 226.7 226.1 026 50.1 26.8 25.0 00001001 > Charge: 92.5% > new connection on fd 6 > Asking for UPS status ("Q1" command)... > UPS status: (226.7 226.7 225.7 026 50.1 26.8 25.0 00001001 > Charge: 92.5% > Asking for UPS status ("Q1" command)... > UPS status: (226.7 226.7 225.3 026 50.1 26.8 25.0 00001001 > Charge: 92.5% > Asking for UPS status ("Q1" command)... > (and looping charge-readouts from here on) > > The output of lsusb and ls -lR /dev/bus/usb is the same for the two > versions.thanks for your quick feedback Sven. @Carlos: there is a clear regression here. I'm thinking of a recent timeout problem (was 1000 instead of 5000). Do you see something? Arnaud -- Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ Free Software Developer - http://arnaud.quette.free.fr/