Matt Staroscik
2006-Feb-05 10:38 UTC
[Nut-upsuser] Device not found--newhidups, FreeBSD 4.10, CyperPower 685AVR
I've been using nut with a serial device for a while, but today I tried hooking up this new CyberPower 685 unit via newhidups--since it seemed better supported over USB than serial, based on reading the list archives and cvs logs. Unfortunately, I can't connect to it. My system sees the device: uhid1: CPS UPS BF700, rev 1.10/0.01, addr 2, iclass 3/0 ... and I have chmodded all the USB stuff in /dev to 777, just to make things easier at first. Anyway, I grabbed the nut development source off CVS, compiled/installed (including the USB stuff), and tried to connect to the 685AVR. (I also installed libusb, of course.) # newhidups -DD -u root -x vendorid=0764 auto But, it's no dice: Network UPS Tools: New USB/HID UPS driver 0.28 (2.1.0) debug level is '2' No appropriate HID device found No matching USB/HID UPS found I have also tried specifying the USB device directly, ie /dev/uid1 but that doesn't help. I'm using a USB keyboard on this FreeBSD 4.1 system, which is also detected as a HID device, so I don't believe that my USB HID is borked in general--though I have never used libusb before so I can't be positive it is working properly, though it installed fine. How should I start troubleshooting this? Thanks in advance! - Matt -- Matt Staroscik | matt@wrongcrowd.com | http://wrongcrowd.com "No, Mr. Bond ... I expect you to die."
Charles Lepple
2006-Feb-06 18:46 UTC
[Nut-upsuser] Device not found--newhidups, FreeBSD 4.10, CyperPower 685AVR
On 2/5/06, Matt Staroscik <matt@wrongcrowd.com> wrote:> I've been using nut with a serial device for a while, but today I tried > hooking up this new CyberPower 685 unit via newhidups--since it seemed > better supported over USB than serial, based on reading the list > archives and cvs logs. Unfortunately, I can't connect to it. > > My system sees the device: > > uhid1: CPS UPS BF700, rev 1.10/0.01, addr 2, iclass 3/0The problem is that once the *BSD uhid driver claims a USB HID device, it is no longer available to libusb (which I believe uses ugen). Linux has an ioctl() to ask the kernel to relinquish control of a USB device; however, we haven't heard back from any *BSD users about ways to get around this. One hack would be to use a PS/2 keyboard and mouse, and disable the ugen driver completely, or to "blacklist" your UPS in the uhid module. -- - Charles Lepple
Thierry Thomas
2006-Feb-06 20:37 UTC
[Nut-upsuser] Device not found--newhidups, FreeBSD 4.10, CyperPower 685AVR
Le Lun 6 f?v 06 ? 19:46:47 +0100, Charles Lepple <clepple@gmail.com> ?crivait?:> One hack would be to use a PS/2 keyboard and mouse, and disable the > ugen driver completely, or to "blacklist" your UPS in the uhid module.This is already done in the latest FreeBSD versions, but Matt runs an unmaintained version (4.10). If you cannot upgrade your system, perhaps could you applied the patches manually? You can find them at <http://www.freebsd.org/cgi/query-pr.cgi?pr=80383>. Regards, -- Th. Thomas.