[libhid-discuss] hid_force_open() error

Charles Lepple clepple at ghz.cc
Wed Sep 27 12:43:14 UTC 2006


On Sep 26, 2006, at 8:01 PM, Peter Stuge wrote:

> On Tue, Sep 26, 2006 at 03:01:51PM -0700, Mark S. Townsley wrote:
>> hid_force_open failed with return code 13
>>
>> I am new.  Can someone explain what this means?
>
> $ perror 13
> OS error code  13:  Permission denied
>
> I'm not sure that this is your problem, but it's worth looking into -
> how are your permissions set up?

Actually, this is coincidence - HID_RET_NOT_HID_DEVICE is also return  
code 13 (I know, it's hidden in an 'enum'... I thought we had an  
equivalent to usb_strerror(), but I guess not.)

Mark, can you try applying the following patch, and see if the error  
message gets any better?

You can also try bumping up USB_TIMEOUT in include/constants.h, but I  
believe it is set to 10 seconds now (which should be plenty of time,  
even for a low-speed device).

Index: src/hid_preparation.c
===================================================================
--- src/hid_preparation.c   (revision 300)
+++ src/hid_preparation.c   (working copy)
@@ -34,7 +34,7 @@
        USB_TIMEOUT);
    if (len < 0) {
-    WARNING("failed to get HID descriptor for USB device %s", hidif- 
 >id);
+    WARNING("failed to get HID descriptor for USB device %s:%s",  
hidif->id, usb_strerror());
      return HID_RET_NOT_HID_DEVICE;
    }


-- 
Charles Lepple
clepple at ghz.cc





More information about the libhid-discuss mailing list