Ok i am working on a uController project (pointer device), i am trying to write a user space driver IOkit.framework
.
using the idProduct and idVendor i can get the IOUSBInterfaceInterface300
obj
the problem is when i try
kr = (*intf)->USBInterfaceOpen(intf);
it fails with kIOReturnExclusiveAccess
, most likely because the HID
manager has opened the device already with exclusive access.
Here it says that a codeless kext can prevent the HID manager from taking over the device
Reading and writing to USB (HID) interrupt endpoints on Mac
I created a kext with the idVendor
and idProduct
and used kextload to load it.
i get back "loaded successfully" from kextload
but somehow i still cant open the interface? am i doing something wrong?
I created the kext by creating a file name Info.plist (the content identical to that post with the idProduct and idVendor adjusted) and put it in a folder named MyUSBDeviceTest.kext
then change the owner to root:wheel
then copy the kext to /System/Library/Extensions
then
sudo kextload -vt /System/Library/Extensions/MyUSBDeviceTest.kext
i've tried restarting and reconnecting the device but i just cant take the interface from the HID
system