> On 26 Feb 2015, at 08:17, Rick Mann <[email protected]> wrote:
>> 
>> Are you sure about that? Does the device only present itself as a CDC device 
>> or does it have a number of interfaces one of which actually really is a CDC 
>> device but also contain other custom endpoints? That’s fairly common as the 
>> CDC device piece is usually hooked up to send serial data to and from the 
>> board, but there are other interfaces on there as well to do other things. 
>> 
>> If so then the CDC driver will claim the CDC device endpoints only and 
>> present them as a normal serial device, but won’t claim any of the other 
>> endpoints which aren’t related to CDC, leaving other processes free to use 
>> them. This is usually what you want,  you want the CDC device to be a 
>> supported serial device and the custom endpoints to be available for their 
>> custom purposes. 
>> 
>> One common issue with this has nothing to do with the CDC drivers, but has 
>> to do with code which uses libusb, or libusb-derived code, to use the other 
>> endpoints, the non-CDC ones, on the same device. The libusb code tries to 
>> open the device and read it to find the other endpoints. That doesn’t work 
>> because the device itself has already been opened by the CDC driver, 
>> exclusively, so that code to re-open it fails. However you don’t need to 
>> open the actual device to find the endpoints on OSX, you can discover them 
>> with IOKit, and they are perfectly usable. 
>> 
>> Is that the case here? 
> 
> Might be, thanks for the note; I'll look into it.
> 

You can also disable the CDC drivers by the way - allowing anything else to 
grab the entire device. This is handy for occasional temporary use and was how 
OSX users used to have to deal with Segger JLink devices which had on-board CDC 
endpoints in addition to the custom JLink endpoint. You turned them off to 
access the JLink and program the board, you turned them back on again to use 
the serial device. Segger eventually fixed this by removing the old libusb code 
and replacing it with IOKit code, so they worth together. To re-enable just 
replace kextunload with kextload .. and this has to be run as root. 

/sbin/kextunload -q 
/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDCACMData.kext
 
/sbin/kextunload -q 
/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDCECMData.kext
 
/sbin/kextunload -q 
/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDCACMControl.kext
 
/sbin/kextunload -q 
/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDC.kext 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/usb/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to