I've been wrestling with sending data to a USB HID device. I was
originally using HID Utilities, but spent today re-writing everything
to use pure IOKit calls. I've confirmed that my callback and
transaction code works by capturing keyboard button presses and
turning the Caps Lock key on.
When communicating with my USB device (a Motorola MX240a), I can't
get any response out of the thing. It has two 8-bit outputs (which I
will refer to as L and R). The sequence I have to send to the device
is 0xAD, 0xEF, 0x8D, and 5 nulls. This should elicit a response from
the device, but it remains silent.
Specifically, I'm not sure when to commit my transaction. Can I
change the value of an element multiple times in one transaction, or
is the last one the only change that is kept? Should I do
L: AD R: EF *commit*
L: 8D R: 00 *commit*
L: 00 R: 00 *commit*
L: 00 R: 00 *commit*
Or
L: AD R: EF
L: 8D R: 00
L: 00 R: 00
L: 00 R: 00 *commit*
Or is it more likely that I should stream all of the data through one
output and ignore the other? I've tried pretty much every combination
I can think of.
There is some Linux code online that uses libusb to communicate with
the device (see write_packet function), but I can't figure out how to
translate it into IOKit calls.
Sorry for the rambling, but I haven't had any luck for a few days
now... If anyone has any suggestions, I'd be extremely grateful to
hear them.
Regards,
Ryan Govostes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden