I've got a composite USB device i need to use under MAC OSX. Under Linux i can change the product id using the usb_modeswitch tool with the following command
usb_modeswitch -v 0x072f -p 0x100d -V 0x072f -P 0x90cc -m 0x2 -M01b0000000000000000000000000000000000000000000000000000000000000 -r 1 -Q
I tried to build the same tool with success using libusb under OSX 10.9.5 but when i run the application i obtain the problem reported here Unable to claim USB interface with C + libusb on Mac OS X. The proposed solution doesn't work for me because i'm not able to find a /dev/ entry for my device.
So i'm trying the code reported here Working With USB Device Interfaces using something like
IOUSBDevRequest request;
request.bmRequestType = USBmakebmRequestType(kUSBOut, kUSBVendor, kUSBDevice);
request.bRequest = 0x02;
request.wValue = deviceAddress;
request.wIndex = 0;
request.wLength = length;
request.pData = writeBuffer;
return (*dev)->DeviceRequest(dev, &request);
but in any case i obtain this error 0xe000404f (seems kIOUSBPipeStalled). Here is the code, i'm not sure of it, i neet to replicate the usb_modeswitch command.
Any help would be appreciated.