Rofov Ivan
Rofov Ivan

Reputation: 53

Creating virtual USB device in Mac OS X

I tried to add virtual usb device with driver in Mac OS programmatically. IOKit documentations says: Traditionally, drivers of virtual devices match on IOResources because virtual devices do not publish nubs of their own. Another example of such a driver is the HelloIOKit KEXT (described in “Creating a Device Driver with Xcode”) which matches on IOResources because it does not control any hardware.

But I don't found way to add virtual device in system. How can I do that?

Upvotes: 5

Views: 7135

Answers (1)

pmdj
pmdj

Reputation: 23428

What are you actually trying to do?

If you want to create a virtual USB device, you will also have to create a virtual USB controller (IOUSBController/IOUSBControllerV2/IOUSBControllerV3 subclass) to which the virtual USB device would be attached. The controller itself would match on IOResources and would have to emulate the functionality of a real USB controller. The virtual controller would pretend to detect the virtual USB device on its "bus", and offer the device/interface nubs up for real USB device drivers to match against. This is probably a lot of work - are you sure your virtual device must be a USB one?

Upvotes: 7

Related Questions