2008/4/10, David Erosa <[EMAIL PROTECTED]>: > Public bug reported: > > Binary package hint: nut > > After updating to last nut package (2.2.1-2.1ubuntu6), the megatec_usb > driver seems to be working, except for the charge percentage: > > $ /lib/nut/megatec_usb -DDDDD -a SAI > ... > Checking device (0665/5161) (001/007) > - VendorID: 0665 > - ProductID: 5161 > - Manufacturer: Cypress Semiconductor > - Product: USB to Serial > - Serial Number: unknown > - Bus: 001 > Trying to match device > Device matches > get_data_agiler: raw dump: (0 bytes) => > get_data_agiler: raw dump: (0 bytes) => > Starting UPS detection process... > Asking for UPS status [Q1]... > Q1 => OK [(225.4 225.4 225.4 042 50.1 13.6 25.0 00001001] > Asking for UPS status [Q1]... > Q1 => OK [(225.4 225.4 225.4 042 50.1 13.6 25.0 00001001] > Asking for UPS status [Q1]... > Q1 => OK [(225.0 225.0 225.0 042 50.1 13.6 25.0 00001001] > Asking for UPS status [Q1]... > Q1 => OK [(225.4 225.0 225.0 043 50.1 13.6 25.0 00001001] > Asking for UPS status [Q1]... > Q1 => OK [(225.4 225.4 225.4 043 50.1 13.6 25.0 00001001] > 0 out of 5 detection attempts failed (minimum failures: 2). > Asking for UPS information [I]... > get_data_agiler: raw dump: (0 bytes) => > I => FAILED [short read] > I detail: (0 bytes) => > Megatec protocol UPS detected. > Cancelling any pending shutdown or battery test. > Asking for UPS power ratings [F]... > get_data_agiler: raw dump: (0 bytes) => > F => FAILED [short read] > F detail: (0 bytes) => > Cannot calculate charge percentage for this UPS. <-**************** > Done setting up the UPS. > Asking for UPS status [Q1]... > Q1 => OK [(225.4 225.4 225.4 042 50.1 13.6 25.0 00001001] > dstate_init: sock /var/run/nut/megatec_usb-SAI open on fd 5 > Asking for UPS status [Q1]... > Q1 => OK [(225.4 225.4 225.4 042 50.1 13.6 25.0 00001001] > Asking for UPS status [Q1]... > Q1 => OK [(225.4 225.4 225.0 042 50.1 13.6 25.0 00001001] > ... > > So I tried the svn version (as today, revision 143) and the result is: > $ drivers/megatec_usb -DDDDD -a SAI > ... > Checking device (0665/5161) (001/007) > - VendorID: 0665 > - ProductID: 5161 > - Manufacturer: Cypress Semiconductor > - Product: USB to Serial > - Serial Number: unknown > - Bus: 001 > Trying to match device > Device matches > get_data_agiler: raw dump: (0 bytes) => > Starting UPS detection process... > Asking for UPS status [Q1]... > get_data_agiler: raw dump: (0 bytes) => > Q1 => OK [(226.9 226.9 226.9 044 50.1 13.6 25.0 00001001] > Asking for UPS status [Q1]... > get_data_agiler: raw dump: (0 bytes) => > Q1 => OK [(226.9 226.9 226.9 044 50.1 13.6 25.0 00001001] > Asking for UPS status [Q1]... > get_data_agiler: raw dump: (0 bytes) => > Q1 => OK [(226.9 227.4 226.9 043 50.1 13.6 25.0 00001001] > Asking for UPS status [Q1]... > get_data_agiler: raw dump: (0 bytes) => > Q1 => OK [(227.4 227.4 227.4 042 50.1 13.6 25.0 00001001] > Asking for UPS status [Q1]... > get_data_agiler: raw dump: (0 bytes) => > Q1 => OK [(227.4 227.4 226.9 044 50.1 13.6 25.0 00001001] > 0 out of 5 detection attempts failed (minimum failures: 2). > Cancelling any pending shutdown or battery test. > Asking for UPS information [I]... > get_data_agiler: raw dump: (0 bytes) => > get_data_agiler: raw dump: (0 bytes) => > I => FAILED [short read] > I detail: (0 bytes) => > Megatec protocol UPS detected. > Parameter [ignoreoff]: [false] > Asking for UPS power ratings [F]... > get_data_agiler: raw dump: (0 bytes) => > get_data_agiler: raw dump: (24 bytes) => 23 32 33 30 2e 30 20 30 30 32 20 > 31 32 2e 30 30 20 35 30 2e 30 0d 30 30 > F => OK [#230.0 002 12.00 50.0] > 12.0V battery, interval [9.7V, 13.7V]. <-----**************** > Done setting up the UPS. > Asking for UPS status [Q1]... > get_data_agiler: raw dump: (0 bytes) => > Q1 => OK [(227.4 227.4 227.4 043 50.1 13.6 25.0 00001001] > Calculated battery charge: 97.5% <-----**************** > dstate_init: sock /var/run/nut/megatec_usb-SAI open on fd 5 > Asking for UPS status [Q1]... > get_data_agiler: raw dump: (0 bytes) => > Q1 => OK [(227.4 226.9 227.4 042 50.1 13.6 25.0 00001001] > Calculated battery charge: 97.5% > Asking for UPS status [Q1]... > get_data_agiler: raw dump: (0 bytes) => > Q1 => OK [(227.4 226.9 226.9 044 50.1 13.6 25.0 00001001] > Calculated battery charge: 97.5% > ...
was it previously working out of the box? megatec compliant units have a known problem for batt charge calculation, and (may) need to be given a "battvolts" parameter (in ups.conf) to adjust it Have a look at megatec_usb manpage for more info... 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/ -- No battery charge percentage on belkin usb avr https://bugs.launchpad.net/bugs/215389 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to nut in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs