From: Steven P. <n9...@n9...> - 2003-12-13 01:55:50
|
On Dec 12, 2003, at 3:06 PM, Steven Palm wrote: > Either you *CAN* grab the interfaces separately from the device as a > whole, thus allowing the kernel driver to handle the serial_com > interfaces and leaving the vendor_specific interface for you, *OR* you > can NOT grab them separately in which case I don't know how you'd get > it to work. ;-) Okay, my head is starting to settle down a little bit... Thanks to someone at Apple, I am a little closer here. I was able to throw together some sample code and actually open the data interface on the phone... But, the question is, how to make this method compatible with libusb and bitpim.... Due to the way composite devices work on MacOS X, at least CDC devices in particular, you can NOT open the device, as there is no way to wrestle control away from the kernel extension that has it open. The current logic being used seems to want to walk the tree looking for a match with vendor and product code on a device, and then get it's second interface, but since you cannot open the device this whole approach falls apart. On MacOS X for this device, you *CAN* get to the interface in question, but you actually have to go directly for the interface by vendor, product, configuration and interface number. This shouldn't pose a massively huge problem, because you know the vendor/product/interface number already, and the code appeared to only be using the first configuration so this is fine as well. The question becomes, how to hack libusb so it will work or, if that falls through, write a separate access routine for the Mac, at least the 'open/init' bit. What do you think? -. ----. -.-- - -.-- Steve Palm - n9...@n9... -. ----. -.-- - -.-- |