Thank you very much for the fast reply David. I never could get the
codeless kext to work after lots of fiddling and Googling (probably
another dumb error on my part). When it's working properly, should it
appear in kextstat's list after I've booted up with the matching
device connected? I tried manually loading it, and then it appeared
in kextstat's output, but that didn't seem to make the HID driver
relinquish the interface. So I stuck it in /System/Library/
Extensions, then touched that folder, and rebooted, and the HID
driver was still taking it over--and the kext never appeared when I
ran kextstat.
So after all this, it never occurred to me that perhaps what I'm
dealing with -is- an HID class interface (since it's being reported
as one), and as such, maybe I need to be using the HID APIs. I
started reading up on the HID spec and the OS X HID APIs, and it
doesn't seem too much more complicated than the USB stuff.
More on this HID stuff: the HID spec says that every HID interface
must have an IN endpoint. Interface 0 has one, but interface 1 (what
I need to deal with) has an OUT endpoint, but no IN endpoint. My
guess is it's poorly implementing the HID spec. Furthermore, the
report descriptor is weird:
As far as I know, logical and usage maximum should be greater than or
equal to logical and usage minimum, wouldn't you think? So I'm
starting to get a little skeptical as to whether it's really HID,
even though it's reporting itself as one. I didn't design this KVM
switch; I just want to write a program that communicates with it to
teach myself how to work with this stuff, and for my own convenience.
So I've pretty much branched off into two problems. What is a good
idea? Stick with with the regular old USB APIs and try to figure out
why it won't let me open up the endpoint I need to work with and/or
figure out why the codeless kext doesn't appear to be doing its job,
or go with the HID APIs, working around what appears to be a
nonstandard HID interface? I'm honestly not even sure if OS X is
going to let me work with interface 1 using the HID APIs - basic test
code I made while experimenting with HID would only find interface 0,
and HID Explorer confirms that only interface 0 seems to be
available. Sorry if I'm sounding really confused and/or
inexperienced, but I'd greatly appreciate it if anyone could give me
some pointers on this.
Thank you very much!
Doug
On Dec 14, 2005, at 5:50 PM, David Ferguson wrote:
I'm pretty sure the AppleHIDDriver is/was handling interface 1. I
suggest looking at the examples of a codeless-kext and how that can
prevent the AppleHIDDriver from matching. In general your approach
sounds fine, I'm sure it's some small detail that's tripped you up.
David Ferguson
USB Software Team
5:31 PM -0800 12/14/05, Doug Brown wrote:
The gist of what I'm doing is as follows:
- Create a matching dictionary that will directly match the
interface (I don't really care about the whole device -- and yes,
my code differs with Apple's here, but both ways get the same result)
- Call IOServiceGetMatchingDictionary()
- Create the plugin and the device interface
- Open the interface
- GetNumEndpoints()
- I even send a request for a descriptor over the default control
pipe using ControlRequest(), and it works fine and I get the data
I'm expecting.
- Up to this point, nothing has errored out.
But as soon as I call anything such as GetPipeStatus() or WritePipe
() or GetPipeProperties(), these functions fail and return
kIOUSBUnknownPipeErr
_______________________________________________
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