[Nut-upsdev] Bug#462468: nut: megatec_usb ups not detected since 2.2.1 update anymore

Arnaud Quette aquette.dev at gmail.com
Fri Jan 25 15:30:44 UTC 2008


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/



More information about the Nut-upsdev mailing list