I would like to use some USB devices which don’t have Mac OS X drivers available yet.
Examples for these devices are:
-USB relay module
-USB compass (tilt) sensor
I plan to use xCode and Objective-C to write the driver… though I never use it.
Do you know some good tutorials or resources about Mac OS X USB driver programming ?
What do you think I should take care of ?
I’ve been using it with some projects in Mac, Windows and Linux environments. Using it, you can do the basic USB transfers like bulk and interrupt transfers in user space. Of course you should know details for transfer, what pipe(s) it uses and how the data is presented (i.e. what is the “protocol”).If you don’t, reverse engineering the protocol is time consuming and would need USB protocol sniffer program.
Good link to start your journey in the world of USB:
If your device is a HID (Human Interface Device) type (like Apple Remote, mouse, keyboard, joystics etc.) it is possible to access the device directly without libusb. Good references can be found in Apple Developers site (search “HIDTestTool” and “HID Manager”)
In both cases it is possible to compile your own dynamic library (.dll in Win and .dynlib in Mac) and have C# access to it from Unity (Pro required).