I am writing a DriverKit driver for the first that uses the USBSerialDriverKit. The driver its purpose is to expose the device as serial interface (/dev/cu.tetra-pei0 or something like this). My problem: I don't see any logs from that driver in the console and I tried like 40 different approaches and checked everything. The last message I see is that the driver get successfully added to the system it is in the list of active and enabled system driver extensions but when I plug the device in none of my logs appear and it doesn't show up in ioreg. So without my driver the target device looks like this:
+-o TETRA PEI interface@02120000 <class IOUSBHostDevice, id 0x10000297d, registered, matched, active, busy 0 (13 ms), retain 30>
| {
| "sessionID" = 268696051410
| "USBSpeed" = 3
| "UsbLinkSpeed" = 480000000
| "idProduct" = 36886
| "iManufacturer" = 1
| "bDeviceClass" = 0
| "IOPowerManagement" = {"PowerOverrideOn"=Yes,"DevicePowerState"=2,"CurrentPowerState"=2,"CapabilityFlags"=32768,"MaxPowerState"=2,"DriverPowerState"=0}
| "bcdDevice" = 9238
| "bMaxPacketSize0" = 64
| "iProduct" = 2
| "iSerialNumber" = 0
| "bNumConfigurations" = 1
| "UsbDeviceSignature" = <ad0c16901624000000ff0000>
| "USB Product Name" = "TETRA PEI interface"
| "locationID" = 34734080
| "bDeviceSubClass" = 0
| "bcdUSB" = 512
| "USB Address" = 6
| "kUSBCurrentConfiguration" = 1
| "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBHostFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
| "UsbPowerSinkAllocation" = 500
| "bDeviceProtocol" = 0
| "USBPortType" = 0
| "IOServiceDEXTEntitlements" = (("com.apple.developer.driverkit.transport.usb"))
| "USB Vendor Name" = "Motorola Solutions, Inc."
| "Device Speed" = 2
| "idVendor" = 3245
| "kUSBProductString" = "TETRA PEI interface"
| "kUSBAddress" = 6
| "kUSBVendorString" = "Motorola Solutions, Inc."
| }
|
+-o AppleUSBHostCompositeDevice <class AppleUSBHostCompositeDevice, id 0x100002982, !registered, !matched, active, busy 0, retain 5>
| {
| "IOProbeScore" = 50000
| "CFBundleIdentifier" = "com.apple.driver.usb.AppleUSBHostCompositeDevice"
| "IOProviderClass" = "IOUSBHostDevice"
| "IOClass" = "AppleUSBHostCompositeDevice"
| "IOPersonalityPublisher" = "com.apple.driver.usb.AppleUSBHostCompositeDevice"
| "bDeviceSubClass" = 0
| "CFBundleIdentifierKernel" = "com.apple.driver.usb.AppleUSBHostCompositeDevice"
| "IOMatchedAtBoot" = Yes
| "IOMatchCategory" = "IODefaultMatchCategory"
| "IOPrimaryDriverTerminateOptions" = Yes
| "bDeviceClass" = 0
| }
|
+-o lghub_agent <class AppleUSBHostDeviceUserClient, id 0x100002983, !registered, !matched, active, busy 0, retain 7>
| {
| "IOUserClientCreator" = "pid 1438, lghub_agent"
| "IOUserClientDefaultLocking" = Yes
| }
|
+-o IOUSBHostInterface@0 <class IOUSBHostInterface, id 0x100002986, registered, matched, active, busy 0 (5 ms), retain 9>
| | {
| | "USBPortType" = 0
| | "IOCFPlugInTypes" = {"2d9786c6-9ef3-11d4-ad51-000a27052861"="IOUSBHostFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
| | "USB Vendor Name" = "Motorola Solutions, Inc."
| | "bcdDevice" = 9238
| | "USBSpeed" = 3
| | "idProduct" = 36886
| | "IOServiceDEXTEntitlements" = (("com.apple.developer.driverkit.transport.usb"))
| | "bInterfaceSubClass" = 0
| | "bConfigurationValue" = 1
| | "locationID" = 34734080
| | "USB Product Name" = "TETRA PEI interface"
| | "bInterfaceProtocol" = 0
| | "iInterface" = 0
| | "bAlternateSetting" = 0
| | "idVendor" = 3245
| | "bInterfaceNumber" = 0
| | "bInterfaceClass" = 255
| | "bNumEndpoints" = 2
| | }
| |
| +-o lghub_agent <class AppleUSBHostInterfaceUserClient, id 0x100002988, !registered, !matched, active, busy 0, retain 6>
| {
| "UsbUserClientBufferStatistics" = {"IOMemoryDescriptor"=0,"IOBufferMemoryDescriptor"=0,"IOSubMemoryDescriptor"=0}
| "IOUserClientCreator" = "pid 1438, lghub_agent"
| "UsbUserClientBufferAllocations" = {"Bytes"=0,"Descriptors"=0}
| "IOUserClientDefaultLocking" = Yes
| }
|
+-o IOUSBHostInterface@1 <class IOUSBHostInterface, id 0x100002987, registered, matched, active, busy 0 (5 ms), retain 9>
| {
| "USBPortType" = 0
| "IOCFPlugInTypes" = {"2d9786c6-9ef3-11d4-ad51-000a27052861"="IOUSBHostFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
| "USB Vendor Name" = "Motorola Solutions, Inc."
| "bcdDevice" = 9238
| "USBSpeed" = 3
| "idProduct" = 36886
| "IOServiceDEXTEntitlements" = (("com.apple.developer.driverkit.transport.usb"))
| "bInterfaceSubClass" = 0
| "bConfigurationValue" = 1
| "locationID" = 34734080
| "USB Product Name" = "TETRA PEI interface"
| "bInterfaceProtocol" = 0
| "iInterface" = 0
| "bAlternateSetting" = 0
| "idVendor" = 3245
| "bInterfaceNumber" = 1
| "bInterfaceClass" = 255
| "bNumEndpoints" = 2
| }
|
+-o lghub_agent <class AppleUSBHostInterfaceUserClient, id 0x10000298a, !registered, !matched, active, busy 0, retain 6>
{
"UsbUserClientBufferStatistics" = {"IOMemoryDescriptor"=0,"IOBufferMemoryDescriptor"=0,"IOSubMemoryDescriptor"=0}
"IOUserClientCreator" = "pid 1438, lghub_agent"
"UsbUserClientBufferAllocations" = {"Bytes"=0,"Descriptors"=0}
"IOUserClientDefaultLocking" = Yes
}
more details in my comment.
Found the solution it seems to be missing CFBundle... keys even though Xcode auto generated parts of it and then it thought its a no code dext. Next problem it has an included embedded provisioning profile but the console shows its missing the entitlement that is included in the embedded provisioning profile...