[libhid-discuss] usb_control_msg
Jorgen Lundman
lundman at lundman.net
Tue Jun 26 23:55:25 UTC 2007
Charles Lepple wrote:
>
> Note that libhid can't claim it exclusively under OS X - it just
> pretends it can. It works in some cases, but it looks like something is
> actually using the native HID calls to read from your device (instead of
> what I have seen, where the device can't be exclusively claimed, but
> nothing is reading from it unless you fire up HID Explorer).
Yeah, I did not realise this initially, but appears to be the case. This
is no good for me and this device (nor my camera but that's not what I'm
working on). So I would need to branch off and do OS specific code. I
dislike writing code that only works on one platform, it was attractive
to keep using libusb, and use libhid as they are portable.
>
> You shouldn't have to reboot to use a codeless kext - the most that
> might be needed is unplugging and replugging the device.
>
> That said, I haven't been successful in creating a codeless kext that
> actually lets me claim the device.
You know, I actually gave that a stab this morning. Added my codeless
kext, and kextloaded it, claimed all was good, showed the Composite
device in kextstat. But unplugging and re-plugging in the device, and
HID manager steals it. (As seen by USB Prober). I can tinker with it in
HID explorer again. I suspect reboot is needed, but I really do not like
rebooting. Maybe I'll try over the weekend :)
>
> I followed some of the mail threads regarding the ninebutton device:
>
> http://osdir.com/ml/lib.libusb.devel.general/2005-02/msg00076.html
>
HID Explorer source looks relatively straight forward, but it is based
on the higher library HID Utilities:
http://developer.apple.com/samplecode/HID_Explorer/listing2.html
At a guess, I do not need to bother with queues, just peek and poke at
the various knobs.
You know, I came a across a libhid source in SVN which had lots more HID
magic, is that a future version coming?
Lund
--
Jorgen Lundman | <lundman at lundman.net>
Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell)
Japan | +81 (0)3 -3375-1767 (home)
More information about the libhid-discuss
mailing list