[libhid-discuss] libhid + swig -> c#
Rudolf Muehlbauer
rudolf.muehlbauer at gmail.com
Mon Apr 11 21:17:10 UTC 2011
Well, i decided to use HIDAPI. It works great! Also the .NET P/Invoke
bindings were ok to implement, there are still some problems, but I can
open devices, read data from my mouse, for example. Receiving strings is
still somewhat strange, only the first character is received. But this
is just a thing that needs some work, I hope.
Though I would require some more functionality. The API I port from uses
HidD_GetCaps, HidD_GetPreparsedData,
{Input,Output,Feature}ReportByteLength, ... and now I have to find some
way to emulate that.
thanks for the helpful input;
On Sun, 2011-04-10 at 20:39 +0800, Xiaofan Chen wrote:
> On Sun, Apr 10, 2011 at 8:33 PM, Rudolf Muehlbauer
> <rudolf.muehlbauer at gmail.com> wrote:
> > Thanks for the wonderful replies,
> >
> > I was already aware of the LibUsbDotNet und HIDAPI. My guess was that
> > libhid would not be worth the effort - since with such a library my
> > deployment would get more difficult. When I only use the LibUsbDotNet
> > and write my HID-related code myself, I would not need an additional
> > Library, libusb is available in most distributions I think.
> >
> > I will try to write the HID code in C# with LibUsbDotNet like in this
> > example: http://www.lvr.com/code/generic_hid.c
>
> That code was adapted from my original code. :-)
> "This firmware is adapted from code provided by Xiaofan."
>
> The main issue if you want to use libusb-1.0 with HID device
> is when you want to have cross-platform capability. There is
> no HID backend for Mac OS X and it is not easy now to
> detach the kernel driver. And the Windows HID backend
> is removed thanks to Peter Stuge's vehement objection to the
> idea.
>
> So you may want to look HIDAPI instead...
>
>
--
Rudolf Muehlbauer <rudolf.muehlbauer at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20110411/3400564a/attachment.pgp>
More information about the libhid-discuss
mailing list