[libhid-discuss] Re: HELP !! Gettting data from usb device using
libhid
Charles Lepple
clepple at ghz.cc
Thu Sep 14 13:30:52 UTC 2006
On Sep 14, 2006, at 7:17 AM, Himanshu Bafna wrote:
> Hi Charles
>
> Background
> -----------
> Documentation of libhid/libusb says that it can work on linux
> without usb
> kernel support.
Of course, you will need a kernel driver for your USB host
controller, but libhid does not require HID support in the kernel.
> Query
> -----
> -libhid looks to use usbfs to communicate with device so in effect
> doesnt it
> uses usb kernel driver ?
libhid does use the generic usbfs interface (via libusb). However, we
are not limited to the usbhid.ko HID API.
> - Also can what will be tradeoff between hid kernel module and libhid
> application particularly for my device Coin dispenser machine ?
It is hard to answer this without knowing the typical sequence of
operations needed to dispense coins.
> Also since current 2.4/2.6 hid kernel module doesnt support ioctl()
> approach
> well writing scratch hid driver for my machine would it be
> advisable ??
Kernel modules come with their own set of problems. You need to keep
updating them for every kernel API change, and it makes it more
difficult to integrate with many different distributions.
There is also the issue of licensing - the Linux kernel is licensed
under the GPL (v2), and while you can write non-GPL modules, it
"taints" the kernel, so core kernel developers will be less inclined
to help debug problems (since they would not have access to the
source code).
--
Charles Lepple
clepple at ghz.cc
More information about the libhid-discuss
mailing list