<div dir="ltr"><div>Thanks again.</div><div><br></div><div> So one more bit (other than indeed different libusb versions) that could potentially come into play is bitness - armv7l builds are 32-bit, right?</div><div><br></div><div> One idea from here is to have you run the driver programs directly with high debug verbosity, e.g. `usbhid-ups -DDDDDD -s Liebert` to compare the two walls of text (at some debug level it spews byte data seen from libusb); this might be more convenient to proceed with as a github issue.</div><div><br></div><div> Another idea, if you would be comfortable building NUT from source, would be to check if NUT v2.8.0 (and/or current git master) mis-behaves similarly if built in the Debian 11 32-bit environment against libusb-0.1. So to dissect if the issue is between NUT 2.7.4 and 2.8.0 or in the OS environment/dependencies somehow. This can get you started: <a href="https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests">https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests</a> (take care to `configure --with-usb=libusb-0.1 ...`) - notably, you won't have to *install* this build over what have you in the OS to just test the newly built driver.<br></div><div><br></div><div>Jim</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 21, 2024 at 7:18 AM Juan Carlos Fischer <<a href="mailto:juancarlos.fischer@gmail.com">juancarlos.fischer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:"times new roman",serif">Hello!</div><div class="gmail_default" style="font-family:"times new roman",serif"><br></div><div class="gmail_default" style="font-family:"times new roman",serif">NUT 2.7.4</div><div class="gmail_default" style="font-family:"times new roman",serif"><span style="color:rgb(85,85,85);font-family:Arial,Helvetica,sans-serif">Raspberry Pi 4 Model B Rev 1.5 8 GB </span><span style="font-family:Arial,Helvetica,sans-serif">"Raspbian GNU/Linux 11 (bullseye)" </span><span style="font-family:Arial,Helvetica,sans-serif">Linux raspberrypi 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l GNU/Linux</span><br></div><div class="gmail_default" style="font-family:"times new roman",serif"><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:"times new roman",serif">pi@raspberrypi:~ $ sudo ldd /lib/nut/usbhid-ups</div><div class="gmail_default" style="font-family:"times new roman",serif"><br> linux-vdso.so.1 (0xbec53000)<br> /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6f83000)<br> libusb-0.1.so.4 => /lib/arm-linux-gnueabihf/libusb-0.1.so.4 (0xb6f4e000)<br> libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6f22000)<br> libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6dce000)<br> /lib/ld-linux-armhf.so.3 (0xb6f98000)<span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:"times new roman",serif"><br></div></div><div class="gmail_default" style="font-family:"times new roman",serif">NUT 2.8.0</div><div class="gmail_default" style="font-family:"times new roman",serif"><span style="color:rgb(85,85,85);font-family:Arial,Helvetica,sans-serif">Raspberry Pi 4 Model B Rev 1.5 8 GB "Debian GNU/Linux 12 (bookworm)" </span>Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux<br></div><div class="gmail_default" style="font-family:"times new roman",serif"><br></div><div class="gmail_default" style="font-family:"times new roman",serif">pi@raspberrypi:~ $ sudo ldd /lib/nut/usbhid-ups<br></div><div class="gmail_default" style="font-family:"times new roman",serif"><br></div><div class="gmail_default" style="font-family:"times new roman",serif"> linux-vdso.so.1 (0x0000007f9051c000)<br> libusb-1.0.so.0 => /lib/aarch64-linux-gnu/libusb-1.0.so.0 (0x0000007f90410000)<br> libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f90260000)<br> /lib/ld-linux-aarch64.so.1 (0x0000007f904df000)<br> libudev.so.1 => /lib/aarch64-linux-gnu/libudev.so.1 (0x0000007f90210000)<br> libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f901e0000)<br></div><div class="gmail_default" style="font-family:"times new roman",serif"><br></div><div class="gmail_default" style="font-family:"times new roman",serif">Best regards,</div><div class="gmail_default" style="font-family:"times new roman",serif">-jcf</div><div class="gmail_default" style="font-family:"times new roman",serif"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 20, 2024 at 5:10 PM Jim Klimov <<a href="mailto:jimklimov%2Bnut@gmail.com" target="_blank">jimklimov+nut@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thanks.</div><div><br></div><div> Can you please also check (e.g. with ldd `which usbhid-ups`) which `libusb` variant (1.0 or 0.1) was the 2.7.4 version of the driver running with?<br></div><div> I wonder if the two generations of that library got something differently?..</div><div><br></div><div> The commit I mentioned - <a href="https://github.com/networkupstools/nut/commit/207fed2282" target="_blank">https://github.com/networkupstools/nut/commit/207fed2282</a> - which added the exponent checks, was from 2012 and should be in 2.7.4 as well :-\<br></div><div><br></div><div> Checked: it is - <a href="https://github.com/networkupstools/nut/blob/v2.7.4/drivers/belkin-hid.c#L157-L194" target="_blank">https://github.com/networkupstools/nut/blob/v2.7.4/drivers/belkin-hid.c#L157-L194</a></div><div><br></div><div> Are the two tests running on otherwise the same HW/OS setup?</div><div><br></div><div>Jim<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 20, 2024 at 9:01 PM Juan Carlos Fischer <<a href="mailto:juancarlos.fischer@gmail.com" target="_blank">juancarlos.fischer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-family:"times new roman",serif">Hello!</div><div style="font-family:"times new roman",serif">Thanks for answering.<br>This is the result using version 2.7.4:<br></div><div style="font-family:"times new roman",serif"><br></div><div style="font-family:"times new roman",serif">Network UPS Tools - UPS driver controller 2.7.4<br>Network UPS Tools - Generic HID driver 0.41 (2.7.4)<br>USB communication driver 0.33<br>Using subdriver: Belkin/Liebert HID 0.17<br></div><div style="font-family:"times new roman",serif"><br></div><div style="font-family:"times new roman",serif">battery.charge: 100<br>battery.charge.low: 38<br>battery.charge.warning: 38<br>battery.type: PbAc<br>battery.voltage: 13.9<br>battery.voltage.nominal: 12.0<br>device.mfr: Emerson Network Power<br>device.model: LiebertPSA<br>device.serial: <br>device.type: ups<br><a href="http://driver.name" target="_blank">driver.name</a>: usbhid-ups<br>driver.parameter.bus: 001<br>driver.parameter.pollfreq: 30<br>driver.parameter.pollinterval: 2<br>driver.parameter.port: auto<br>driver.parameter.productid: 0001<br>driver.parameter.synchronous: no<br>driver.parameter.vendorid: 10AF<br>driver.version: 2.7.4<br>driver.version.data: Belkin/Liebert HID 0.17<br>driver.version.internal: 0.41<br>input.frequency: 50.0<br>input.voltage: 221.8<br>output.voltage: 222.6<br>ups.load: 8<br>ups.mfr: Emerson Network Power<br>ups.model: LiebertPSA<br>ups.productid: 0001<br>ups.serial: <br>ups.status: OL CHRG<br>ups.vendorid: 10af<br></div><div style="font-family:"times new roman",serif"><br></div><div style="font-family:"times new roman",serif">Regards,</div><div style="font-family:"times new roman",serif"><br></div><div style="font-family:"times new roman",serif">Juan Carlos</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 20, 2024 at 4:22 PM Jim Klimov <<a href="mailto:jimklimov%2Bnut@gmail.com" target="_blank">jimklimov+nut@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div> For clarity: what changed with the move from NUT v2.7.4 to 2.8.0 - the warnings "became reported", or the highlighted values became zeroes (and were valid non-zero numbers with older NUT - so a regression)?</div><div><br></div><div> It seems the message is specific to the subdriver and comes from commit 207fed2282 and a change to the method involved was just recently experimentally proposed in <a href="https://github.com/networkupstools/nut/issues/2271" target="_blank">https://github.com/networkupstools/nut/issues/2271</a> discussion comments (refinement to consider merging as a pull request pending).<br></div><div><br></div><div>Thanks,</div><div>Jim<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 20, 2024 at 3:33 PM Juan Carlos Fischer via Nut-upsuser <<a href="mailto:nut-upsuser@alioth-lists.debian.net" target="_blank">nut-upsuser@alioth-lists.debian.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello everyone<br><br>I'm using: Raspberry Pi 4 Model B Rev 1.5 8 GB "Debian GNU/Linux 12 (bookworm)"<br><br>It all started when I updated from version 2.7.4 to version 2.8.0 and the consequences were the following:<br><br>pi@raspberrypi:~ $ sudo upsdrvctl start<div><br>Network UPS Tools - UPS driver controller 2.8.0<br>Network UPS Tools - Generic HID driver 0.47 (2.8.0)<br>USB communication driver (libusb 1.0) 0.43<br>Using subdriver: Belkin/Liebert HID 0.18<br>LineVoltage exponent looks wrong, but not correcting.<br>LineVoltage exponent looks wrong, but not correcting.<br>LineVoltage exponent looks wrong, but not correcting.<br>ConfigVoltage exponent looks wrong, but not correcting.<br><br>pi@raspberrypi:~ $ upsc Liebert</div><div><br>Init SSL without certificate database<br>battery.charge: 100<br>battery.charge.low: 38<br>battery.charge.warning: 38<br>battery.type: PbAc<br><b>battery.voltage: 0.0 <------------<br>battery.voltage.nominal: 0.0 <----------</b><br>device.mfr: Emerson Network Power<br>device.model: LiebertPSA<br>device.serial: <br>device.type: ups<br><a href="http://driver.name" target="_blank">driver.name</a>: usbhid-ups<br>driver.parameter.bus: 001<br>driver.parameter.pollfreq: 30<br>driver.parameter.pollinterval: 15<br>driver.parameter.port: auto<br>driver.parameter.productid: 0001<br>driver.parameter.synchronous: auto<br>driver.parameter.vendorid: 10AF<br>driver.version: 2.8.0<br>driver.version.data: Belkin/Liebert HID 0.18<br>driver.version.internal: 0.47<br>driver.version.usb: libusb-1.0.26 (API: 0x1000109)<br>input.frequency: 49.9<br><b>input.voltage: 0.0 <---------------<br>output.voltage: 0.0 <--------------</b><br>ups.load: 9<br>ups.mfr: Emerson Network Power<br>ups.model: LiebertPSA<br>ups.productid: 0001<br>ups.serial: <br>ups.status: OL CHRG<br>ups.vendorid: 10af<br><br>Except for those marked, all values are correct.<br><br>Any help would be appreciated.</div><div><br></div><div><div style="font-family:"times new roman",serif">Regards,</div><div style="font-family:"times new roman",serif"><br></div><div style="font-family:"times new roman",serif">Juan Carlos</div><br></div></div>
_______________________________________________<br>
Nut-upsuser mailing list<br>
<a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank">Nut-upsuser@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>