Post not yet marked as solved
As I understand, for Network packet transmission, IOKit use the following methods: 1. IOOutputQueue calls the outputPacket() method of network driver to send packets to the device. 2. IOGateOutputQueue dequeue packets on network driver's workloop (send packets to the network driver). And now, how does it implement using the DriverKit/NetworkingDriverKit framework? I have seen Networking has 4 packet queues: IOUserNetworkingRxSubmissionQueue, IOUserNetworkingRxCompletionQueue, IOUserNetworkingTxSubmissionQueue, IOUserNetworkingTxCompletionQueue; How to use them with IODispatchQueue? or IODataQueueDispatchSource?
Post not yet marked as solved
I have closely looked at WWDC 2019 videos and DriverKit APIs. I don’t see any support for FireWire devices. Is that coming?
HI,
I have a simple IOUserHIDEventDriver derived class for a regular mouse which *only* logs messages for the incoming HID reports.
The driver successfully loads when the USB transmitter is plugged in and I can receive the HID reports. I can also see that dispatchRelativePointerEvent()(for testing I overrode this method) is being called in response to the HID reports.
But the cursor refuses to move! It's as if the dispatch function fails to push the HID reports back into the subsystem for further processing.
I do have SIP disabled (or else the driver won't be loaded). I tried running the app (which loads the driver) from /Applications, but that doesn't work either. My entitlements all look fine too.
What could be going on?
TIA
Post not yet marked as solved
Apple developer documentation - https://developer.apple.com/documentation/apple_silicon/implementing_drivers_system_extensions_and_kexts#3616855 says:
If your hardware communicates entirely using standards-based protocols, you can ship a driver that matches your hardware to one of the built-in system drivers. Is this possible to do if macOS itself has the driver implemented as a DEXT?
Particularly, I'm interested in providing support for an FTDI device with a custom product ID in my application. I've understood that macOS implements the FTDI driver as a DEXT (/System/Library/DriverExtensions/com.apple.DriverKit-AppleUSBFTDI.dext).
In Catalina, it's possible to work around this problem by instructing the users to install FTDI's custom KEXT driver, but that doesn't work anymore in Big Sur because the KEXT is blocked there.
Post not yet marked as solved
We have a set of storage devices communicating on the SCSI protocol and the NVMe protocol connected over USB3 and TB3. These devices support some custom management commands which we would like to issue from our management application. (Currently we use custom kexts to take control of the device and issue the management commands and then unload the kexts and release the device into the control of the OS storage stack. [Note that these management commands are not I/O related. All I/O takes place through the OS Storage stack].).
1- Given that kexts are deprecated in the future versions of Mac OS, Big Sur and upwards, what is the recommended solution strategy?
2- If dexts are developed and deployed how does one take control of the device exclusively for a period and then return it to the control of the OS storage stack once again using dexts?
3- Will the dext based architecture require any modifications in the future ARM based hardware platforms running Mac OS?
Post not yet marked as solved
Hello,
I have requested
com.apple.developer.driverkit.transport.usb successfully, but it cannot be used according to the steps provided by Apple. The console has an error log:“Unsatisfied entitlements: com.apple.developer.driverkit.transport.usb”, has anyone encountered the same problem , If you have solved it, please tell me the solution.
Thank you
Post not yet marked as solved
I have a CH340g connected to my M1 MacBook Air running the latest Big Sur 11.2.3.
It appeared only one time in /dev, and now will not re-appear. I've tried plugging it in to both ports, unplugging everything except for the CH340g, and also kextunload, kextload on AppleUSBSerial.kext. It does not appear in /dev
Has anyone had any luck with this device? Or perhaps some advice?
Post not yet marked as solved
Hi there!
There was a presentation of the SCSI support in DriverKit on 2020 WWDC: https://developer.apple.com/videos/play/wwdc2020/10210/
Currently, the Xcode 12.4 (latest) has nothing regarding SCSI in DriverKit folders.
Documentation says it is still in beta: https://developer.apple.com/documentation/scsicontrollerdriverkit
So I've downloaded xcode 12.5 beta, where the driverkit 20.4 beta resides (according to https://developer.apple.com/support/xcode/)
And what we have there? Just
Kernel.framework/Versions/A/Headers/DriverKit/IOReturn.h
65:#define sub_iokit_scsi err_sub(16)
And nothing more!
So, the question is: do we have any way to use SCSI devices now on BigSur? Could I develop something for it with DriverKit, or should I use kext-approach for now, and wait for SCSI DriverKit support to be released indeed?
Post not yet marked as solved
I'm working on custom solution that uses USB device/interface drivers.
For correct setup I need ability to communicate between my own Services, declared in IOKit Personalities of my DEXT.
At the moment I'm seeing the one way to do it via some shared state. But DriverKit by default launches each USB service in separate process when device is connected.
Documentation says that there is "IOUserServerOneProcess" key could be declared in Info.plist. But seems it does not work: all my USB services run in different processes.
Could anybody suggest a way how to interact between own DriverKit services or run them in context of the single process?
The basic question: How is a vendor of PCI devices supposed to make multiple DEXTs that control subsets of PCI device IDs?
If one has a PCI vendor ID of 0xCDEF and two devices with device IDs of 0x1234 and 0x5678 that need two separate drivers, how are the DEXTs constructed to match accordingly? If each driver specifies an explicit IOPCIPrimaryMatch of 0x1234CDEF and 0x5678CDEF, then it seems the vendor would have to request special entitlements for each driver (and maintain them through Apple if additional models are added). Ugh.
On the other hand, the dev portal now has some level of ability to build entitlements combinations during App ID creation via check boxes in the "Additional Capabilities" tab. Great, but selecting PCI Primary Match puts in a wildcard match of 0x0000CDEF&0x0000FFFF for the vendor ID. Thus the DEXT must be signed this way in order to load and will load against any of the vendor's devices. This would work if there was an IOService::Probe() method to filter out unwanted devices in each driver, but there isn't.
How is this supposed to work?
Post not yet marked as solved
Hi,
I would like to update that we have a kext that has IOStorageFamily in OSBundleLibraries. I would like to know whether we can create DriverKit that support this family and embed in SystemExtension for deployment?
and we have another kext that has combination of IOStorageFamily and IOUSBFamily in OSBundleLibraries. Please let me know whether such type of Kext can be converted into DriverKit.
I am new to DriverKit development. Please let us know if there is any sample that has these bundles in DriverKit so that I can check.
Please let us know if such are supported with DriverKit then what are the capabilities that we need to add in entitlement request so that it can get approved.
Thanks & Regards,
Mohmad Vasim
Post not yet marked as solved
On the macOS 10.14
I created a project(installer) that will install a .KEXT(driver) which was signed by the provider’s company.
My installer can install the KEXT to the correct location which is “Library/Extensions”. But it will not work, even after reboot.
Then I tried to use the command below, but the OS couldn't find the driver.
kextstat
Here is component plist for pkg
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>BundleIsVersionChecked</key>
<true/>
<key>BundleOverwriteAction</key>
<string>upgrade</string>
<key>RootRelativeBundlePath</key>
<string>ThirdPartyOfficial.kext</string>
</dict>
</array>
</plist>
Below is what I did.
Step1
pkgbuild --identifier "com.xxxx" --root "SrcPath" --install-location "/Applications/XXXX.app" --component-plist "plistPath" "outputPath"
Step2
productsign --sign "Developer ID Installer: XXXX" "PkgPath" "NewPkgPath"
Step3
xcrun altool --notarize-app --primary-bundle-id "BundleName" --username "XXXXX" --password "XXXX" --file "FilePath"
Both CodeSing and Notarize were successful.
I don’t know why it will not work. As well as it doesn’t show the “Allow” button in the Settings/Security and Privacy.
Does anyone know what I missed?
Post not yet marked as solved
Hi,
I have requested USB Transport and UserClient Access successfully, but the applications containing the entitlemet don't work.
driver.dext: User-mode usb driver
Driver.app: Application to install the user-mode driver
Error
Termination Reason: Namespace CODESIGNING, Code 0x01
・entitlement file of driver.dext
<key>com.apple.developer.driverkit</key>
<true/>
<key>com.apple.developer.driverkit.transport.usb</key>
<array>
<dict>
<key>idVendor</key>
<integer>****</integer>
</dict>
</array>
・entitlement file of Driver.app
<key>com.apple.developer.driverkit.userclient-access</key>
<array>
<string>****bundle id of driver.dext</string>
</array>
・driver.dext provisioning profile CMS command
<key>Entitlements</key>
<dict>
<key>com.apple.developer.driverkit.transport.usb</key>
<array>
</array>
<key>com.apple.developer.driverkit</key>
<true/>
<key>com.apple.application-identifier</key> <string>bundle id</string>
<key>keychain-access-groups</key>
<array>
<string>****</string>
</array>
<key>com.apple.developer.team-identifier</key>
<string>****</string>
</dict>
・Driver.app provisioning profile CMS command
<key>Entitlements</key>
<dict>
<key>com.apple.developer.system-extension.install</key>
<true/>
<key>com.apple.application-identifier</key> <string>bundle ID</string>
<key>keychain-access-groups</key>
<array>
<string>****.*</string>
</array>
<key>com.apple.developer.team-identifier</key>
<string>****</string>
</dict>
Would you let me know the solutions if you have?
Post not yet marked as solved
Apple presented how to Create audio drivers with DriverKit on the latest WWDC 2021.
Video presentation:
https://developer.apple.com/videos/play/wwdc2021/10190
Code sample:
https://developer.apple.com/documentation/audiodriverkit/creating_an_audio_device_driver
We need a similar approach for cameras. The audio driver mentioned above can be compiled using the new Xcode 13 beta. So this approach is in progress. We need to develop a custom driver for the camera. Is there a solution in DriverKit for cameras? Is it planned? Should we develop a driver from scratch using USBDriverKit?
Any suggestions are appreciated.
Post not yet marked as solved
External usb foot pedal driver should not generate mouse click NSEvents
In Monterey external usb foot pedal driver unexpectedly also acts as a mouse device and generates NSLeftMouseDown/NSRightMouseDown events.
If I click the middle button of external usb foot pedal and then NSRightMouseDown gets received then it has to be a system problem (or a driver problem)
How to solve this issue?
I read the example "Communicating Between a DriverKit Extension and a Client App".
https://developer.apple.com/documentation/driverkit/communicating_between_a_driverkit_extension_and_a_client_app
But I still don't know, can I communicate with DriverKit through SwiftUI APP?
Instead of using IOServiceOpen in CppUserClient, can I use IOServiceOpen in SwiftUI APP like this?
Or are there other options?
Post not yet marked as solved
We are the developer team of Nanjing Qinheng Microelectronics Co., Ltd. Recently, we have carried out device driver development and system adaptation for a variety of USB-to-serial chips.
At present, our project is stagnant in the release stage because the "Provisioning Profile" does not contain our vendor ID(0x1A86). The release process of this driver will affect millions of users worldwide. We hope that the "Provisioning Profile" can be completed more quickly. This is very important for our customer and the experience of Apple's Big Sur.
Post not yet marked as solved
Hello,
I rewriting a audio driver that was created in IOKit to a new one based on AudioDriverKit.
I would like to block possibility to connect multiple devices to the computer so that driver support just one device. In IOKit it was done by overriding IOAudioEngine::getLocalUniqueID() method and I cannot find anything similar in AudioDriverKit (IOUserAudioDevice). Do you know how to do it?
Best Regards
Post not yet marked as solved
I'm using USBDriverKit to write an audio driver for a High Speed USB device.
In an attempt to understand the difference between DriverKit Extension and Kernel Extension latencies, I'm dispatching individual isochronous microframes that for this device each account for a duration 125µs, or 6 samples at 48kHz.
I don't yet know what kind of latency I'm actually getting but I was surprised to see a high CPU usage of ~11% on a 512GB M1 mac mini running Big Sur 11.6.
That's 8000 IsochIO() calls and 8000 completion callbacks per second.
Instruments.app tells me that most of my time (60%) is being spent inside mach_msg, as part of a remote procedure call.
Multiple questions occur to me:
is this normal? should I expect lower CPU usage?
isn't mach_msg blocking? shouldn't CPU usage be low?
don't low latency audio folks avoid things like remote procedure calls?
is seeking low latency throughput with USBDriverKit futile?
does Monterey's AudioDriverKit enable lower latency, or is it a convenience API?
Post not yet marked as solved
I want know how to set IOTTYBaseName in USBSerialDriverKit.We try to use SetProperties method inherit from IOService, but the method return -301 error code.