Displaying 5 results from an estimated 5 matches for "dev_h".
Did you mean:
dev_t
2007 Nov 20
2
Mustek Powermust 600VA
Hi,
I'm having a hard time configuring a Mustek Powermust 600VA ups to
work via USB with nut. I read somewhere that nut works OK via the
rs232 cable, but unfortunately I don't have a COM port in my computer.
The kernel detects the ups as an Xbox pad :) and loads the xpad
module. I tried running /lib/nut/megatec with different /dev/ttySx but
it displays megatec protocol UPS was not
2007 May 13
0
No subject
...101,11 +103,33 @@
goto errout;
}
+#if LIBUSB_HAS_DETACH_KRNL_DRV
+ /* this method requires at least libusb 0.1.8:
+ * it force device claiming by unbinding
+ * attached driver... From libhid */
+ retry = 3;
+ while (usb_set_configuration(dev_h, 1) != 0 && retry-- > 0) {
+// while ((dev_claimed = usb_claim_interface(dev_h, 0)) != 0 &&
retry-- > 0) {
+
+ upsdebugx(2, "failed to claim USB device, trying %d
more time(s)...", retry);
+
+ upsdebugx(2, "detaching kernel driv...
2007 May 13
0
No subject
...-101,11 +103,33 @@
goto errout;
}
+#if LIBUSB_HAS_DETACH_KRNL_DRV
+ /* this method requires at least libusb 0.1.8:
+ * it force device claiming by unbinding
+ * attached driver... From libhid */
+ retry = 3;
+ while (usb_set_configuration(dev_h, 1) != 0 && retry-- > 0) {
+// while ((dev_claimed = usb_claim_interface(dev_h, 0)) != 0 &&
retry-- > 0) {
+
+ upsdebugx(2, "failed to claim USB device, trying %d
more time(s)...", retry);
+
+ upsdebugx(2, "detaching kernel dr...
2007 May 13
0
No subject
...-101,11 +103,33 @@
goto errout;
}
+#if LIBUSB_HAS_DETACH_KRNL_DRV
+ /* this method requires at least libusb 0.1.8:
+ * it force device claiming by unbinding
+ * attached driver... From libhid */
+ retry = 3;
+ while (usb_set_configuration(dev_h, 1) != 0 && retry-- > 0) {
+// while ((dev_claimed = usb_claim_interface(dev_h, 0)) != 0 &&
retry-- > 0) {
+
+ upsdebugx(2, "failed to claim USB device, trying %d
more time(s)...", retry);
+
+ upsdebugx(2, "detaching kernel dr...
2009 Jul 10
1
PowerWare USB debug messages
...(Ignore the commented-out goto.)
Since these messages are at the LOG_ERR level, should we add
usb_strerror() to all of the calls in nut_usb.c?
diff --git a/drivers/nut_usb.c b/drivers/nut_usb.c
index 494a1fa..4ca2691 100644
--- a/drivers/nut_usb.c
+++ b/drivers/nut_usb.c
@@ -165,8 +165,8 @@ usb_dev_handle *nutusb_open(const char *port)
if (usb_clear_halt(dev_h, 0x81) < 0)
{
- upslogx(LOG_ERR, "Can't reset POWERWARE USB endpoint");
- goto errout;
+ upslogx(LOG_ERR, "Can't reset POWERWARE USB endpoint: %s",
usb_strerror()...