Sam Varshavchik
2017-Nov-26 20:15 UTC
[Nut-upsuser] Have any FreeBSD users tried the new libusb-1.0 branch?
Charles Lepple writes:> still looking for volunteers to test the libusb-1.0 code on FreeBSD and > other systems.On Fedora 27, running commit 2999c95f0: # nut-scanner Cannot load USB library (/usr/lib64/libusb-1.0.so.0.1.0) : /usr/lib64/libusb-1.0.so.0.1.0: undefined symbol: usb_get_string_simple. USB search disabled. There's also a bug in the configure script on 64 bit Fedora. The configure script sets systemdsystemshutdowndir to /usr/lib64/systemd/systemd-shutdown which misses the mark, a little bit. The fix: if test -n "${systemdsystemunitdir}"; then - systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" + systemdsystemshutdowndir="`$PKG_CONFIG --variable=systemdshutdowndir systemd`" This experiment also coincides with the delivery and installation of my new Cyberpower CP1500PFCLCD. Slightly hampered by the nut-scanner problem, I grabbed the USB ids from lsusb. It came up without any issues: [root at monster system]# upsc nutdev1 battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 20 battery.mfr.date: CPS battery.runtime: 1410 battery.runtime.low: 300 battery.type: PbAcid battery.voltage: 24.0 battery.voltage.nominal: 24 device.mfr: CPS device.model: CP1500PFCLCD device.serial: 000000000000 device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 10 driver.parameter.port: auto driver.parameter.productid: 0501 driver.parameter.synchronous: no driver.parameter.vendorid: 0764 driver.version: 2.7.4.1 driver.version.data: CyberPower HID 0.4 driver.version.internal: 0.42 driver.version.usb: libusb-1.0 (API: 0x1000105) input.transfer.high: 139 input.transfer.low: 88 input.voltage: 121.0 input.voltage.nominal: 120 output.voltage: 137.0 ups.beeper.status: enabled ups.delay.shutdown: 20 ups.delay.start: 30 ups.load: 28 ups.mfr: CPS ups.model: CP1500PFCLCD ups.productid: 0501 ups.realpower.nominal: 900 ups.serial: 000000000000 ups.status: OL ups.test.result: No test initiated ups.timer.shutdown: -60 ups.timer.start: -60 ups.vendorid: 0764 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20171126/42f655f9/attachment.sig>
Charles Lepple
2017-Nov-26 20:45 UTC
[Nut-upsuser] Have any FreeBSD users tried the new libusb-1.0 branch?
On Nov 26, 2017, at 3:15 PM, Sam Varshavchik wrote:> > Charles Lepple writes: > >> still looking for volunteers to test the libusb-1.0 code on FreeBSD and other systems. > > On Fedora 27, running commit 2999c95f0:Thanks for checking this. I should have been more clear in the second email in the thread, but commit 2999c95f0 is on the original "libusb-1.0" branch, which had a bunch of half-duplicated commits and other junk on it. There is now a "libusb-1.0+0.1" branch with all of that cleaned up. Originally just at https://github.com/zykh/nut.git, it is now on https://github.com/networkupstools/nut with a few additions (currently at revision 80bc452cc).> > # nut-scanner > Cannot load USB library (/usr/lib64/libusb-1.0.so.0.1.0) : /usr/lib64/libusb-1.0.so.0.1.0: undefined symbol: usb_get_string_simple. USB search disabled.Although I suspect that the USB portion of nut-scanner could probably be replaced with a small shell script that parses the output of lsusb, this shouldn't be too hard to fix. Logged, in case it is not as simple as it looks: https://github.com/networkupstools/nut/issues/499> > There's also a bug in the configure script on 64 bit Fedora. The configure script sets systemdsystemshutdowndir to /usr/lib64/systemd/systemd-shutdown which misses the mark, a little bit. The fix:Agreed - looks like we will have that after a merge from master: https://github.com/networkupstools/nut/pull/496/commits/491d088af70a67b6ed1d2a6a6711d83be71dd911
Charles Lepple
2017-Nov-26 23:19 UTC
[Nut-upsuser] Have any FreeBSD users tried the new libusb-1.0 branch?
> >> # nut-scanner >> Cannot load USB library (/usr/lib64/libusb-1.0.so.0.1.0) : /usr/lib64/libusb-1.0.so.0.1.0: undefined symbol: usb_get_string_simple. USB search disabled. > > Although I suspect that the USB portion of nut-scanner could probably be replaced with a small shell script that parses the output of lsusb, this shouldn't be too hard to fix. Logged, in case it is not as simple as it looks: https://github.com/networkupstools/nut/issues/499I don't currently have a physical Fedora test system, but can you see if this works at least as well as it did prior to the libusb-1.0 branch? (I have a few kludges in my tree to make this work on a Raspberry Pi, but they are not ready to push.) https://github.com/networkupstools/nut/commit/170c0ee390c7ecdfb7d86d3b8ee6ca4240f72c2a or checkout branch fix_usb_scan_issue_499 from that Git repo.