On Aug 20, 2014, at 11:07 AM, Shen Chuan <s...@minutekey.com> wrote:

> Hello, 
> 
> Just installed libhid in the opensuse platform and running a c program to 
> communicate with the card reader
> 
> i | libhidapi-devel   | Development libraries and header files for hidapi     
>               | package
> i | libhidapi-hidraw0 | Simple library for communicating with USB and 
> Bluetooth HID devices | package
> i | libhidapi-libusb0 | Simple library for communicating with USB and 
> Bluetooth HID devices | package
> 
> But when I run it, it always give me 13 error code. Not sure what it means, 
> is there somewhere I can debug it?

You could try running it under strace to see the return values from the system 
calls. If the 13 is coming from a system call, strace will show the symbolic 
error name.

> hid_force_open failed with return code 13

There are at least three separate HID APIs for Linux:

1) http://libhid.alioth.debian.org/ (defunct; uses this list)
2) the Linux kernel HID API, sometimes called hidraw
3) http://www.signal11.us/oss/hidapi/ (also https://github.com/signal11/hidapi) 
which corresponds to those packages

I am not too familiar with #2 and #3. If it is #3, you should be able to look 
up that error code in their Doxygen output: 
http://www.signal11.us/oss/hidapi/hidapi/doxygen/html/group__API.html

If it is #2, error 13 is EACCESS, so you might want to check permissions on 
/dev/bus/usb. HIDAPI might also be passing that error code through to you from 
the kernel HID API.


-- 
Charles Lepple
clepple@gmail



_______________________________________________
libhid-discuss mailing list
libhid-discuss@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/libhid-discuss
http://libhid.alioth.debian.org/

Reply via email to