Charles Lepple
2017-Nov-23 00:39 UTC
[Nut-upsuser] Have any FreeBSD users tried the new libusb-1.0 branch?
Hi all, I am doing some final testing of the libusb-1.0 branch (specifically https://github.com/zykh/nut.git branch libusb-1.0+0.1 @ dfd514e7), and I am running across a regression in usbhid-ups relative to the previous libusb-0.1 code running on FreeBSD. Basically, the master (2.7.4+; c703fa75) code was able to start running as root, drop privileges (usually to uucp, the default for the ports tree), and then attach to the USB device. The new branch will only attach to the device if I pass the '-u root' flag to usbhid-ups. So far, I have tested this on FreeBSD 11.0-RELEASE and 11.1-RELEASE. The error I get seems to be around where it claims the device. Are there any FreeBSD users who have dealt with these sorts of USB issues before, or are willing to help debug this? At this point, I am not sure if I am just seeing weird build issues, and both test machines are kind of slow. -- Thanks, - Charles Lepple https://ghz.cc/charles/
Charles Lepple
2017-Nov-26 15:31 UTC
[Nut-upsuser] Have any FreeBSD users tried the new libusb-1.0 branch?
On Nov 22, 2017, at 7:39 PM, Charles Lepple <clepple at gmail.com> wrote:> > The new branch will only attach to the device if I pass the '-u root' flag to usbhid-ups.fixed: https://github.com/networkupstools/nut/compare/dfd514e...80bc452 still looking for volunteers to test the libusb-1.0 code on FreeBSD and other systems.
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>
Apparently Analagous Threads
- Have any FreeBSD users tried the new libusb-1.0 branch?
- Have any FreeBSD users tried the new libusb-1.0 branch?
- Have any FreeBSD users tried the new libusb-1.0 branch?
- Have any FreeBSD users tried the new libusb-1.0 branch?
- Cyberpower model numbers in the HCL