Understand the role of drivers in bridging the gap between software and hardware, ensuring smooth hardware functionality.

Drivers Documentation

Post

Replies

Boosts

Views

Activity

PrintCenter disappeared when printing with AirPrint on iOS18.1
Environment iPad:10th iOS:18.1 Printer:EPSON PX-S730 Problem In iOS18.1, When printing with AirPrint, PrintCenter is no longer displayed on AppSwitcher. In iOS17, PrintCenter was displayed on AppSwitcher. Question Is this a specification change? I would like to know if there is a way to check PrintCenter on AppSwitcher in the same way as iOS17. Ref No information after iOS18.1 update. https://support.apple.com/ja-jp/109349 There is no mention of AirPrint updates in the AppleDeveloper release notes. https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-18-release-notes https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-18_1-release-notes
0
0
59
1d
MacOS input buffer size over 1020 bytes
Hello Currently, we are developing an application that collects measurement data from devices via USB port but we have some problems regarding input buffer size that might reduce the reading speed. The data size is quite big (~1.5 million bytes). For every read action, the app will check the available size in the input buffer by command: ioctl(serialPort.hHandle, FIONREAD, readBuffSize) Then that size will be passed as the desired size for the read command. Between read actions, there will be a short sleep (1 - 3 ms). Please confirm some points below: Regardless of the size of the measure data, the available size will only be up to 1020 bytes, is it expected? Is the above size OS defined or driver defined? Could we increase it? As we checked, there were some missing bytes between the measure data and the actual read data. Is there any chance that the data in the input buffer be overwritten while the read thread is in sleep? Any recommended technique that can increase reading speed while still maintaining the integrity of the data? Tested OS: Sonoma 14.5
1
0
82
2d
Update 18.0 to 18.1 CarPlay
Since updating to 18.0 & 18.1 I’ve have issues with CarPlay connected via usb, phone calls specifically where people would say I sound distant and robotic distortion. Tried other vehicles same issue new usb same issue, tried all recommendations with no success some one who refused to update theirs worked well without any issues I’m currently facing. Any suggestions or there gonna be an update that addresses this issue ?
1
0
79
3d
InputStream and OutputStream from EASession is not ready for use if accessory was connected when app is not launched
Hi everyone. I have an iOS application for work with an MFi-certified device connected to the iPhone via USB-C. When I launch the app and attach the device, I can create an EASession and use the InputStream and OutputStream as usual. But if I attach the device before launching the app I can't use the InputStream and OutputStream, because the hasBytesAvailable and hasSpaceAvailable properties are always false. The NSStreamEventHasBytesAvailable and NSStreamEventHasSpaceAvailable events will never be triggered. After I re-attach the device, the streams open fine and I can interact with the device. What can be wrong with the case of attaching the device before the app launches?
1
0
133
1w
Looking for USBSerialDriver sample code
I would like to write a driver that supports our custom USB-C connected device, which provides a serial port interface. USBSerialDriverKit looks like the solution I need. Unfortunately, without a decent sample, I'm not sure how to accomplish this. The DriverKit documentation does a good job of telling me what APIs exist but it is very light on semantic information and details about how to use all of these API elements. A function call with five unexplained parameters just is that useful to me. Does anyone have or know of a resource that can help me figure out how to get started?
0
0
103
1w
DriverKit USB Transport to support multiple devices with different Vendor IDs
I have two different USB devices with different vendor IDs I would like to connect to. I submitted two separate requests for the com.apple.developer.driverkit.transport.usb entitlement for each vendor ID. However I am noticing the provisioning profile only has one of the vendor IDs. How do I submit a request for the USB Transport entitlement to support more than one vendor ID? I'm new to writing a DriverKit driver, so is this even possible?
3
0
164
2w
Peripheral Devices control on macOS
We are looking for a solution (API, Frameworks) that would allow us to block any type of external device, including storage devices, HIDs, network adapters, and Bluetooth devices according with dynamic rules that comes from management server . This feature is important for endpoint security solutions vendors, and it can be implemented on other platforms and older versions of macOS using the IOKit framework and kexts. I have found one solution that can control the usage only of "storage" devices with the EndpointSecurity framework in conjunction with the DiskArbitration framework. This involves monitoring the MOUNT and OPEN events for /dev/disk files, checking for devices as they appear, and ejecting them if they need to be blocked.. Also, I have found the ES_EVENT_TYPE_AUTH_IOKIT_OPEN event in EndpointSecurity.framework, but it doesn't seem to be useful, at least not for my purposes, because ES doesn't provide AUTH events for some system daemons, such as configd (it only provides NOTIFY events). Furthermore, there are other ways to communicate with devices and their drivers apart from IOKit. DriverKit.framework does not provide the necessary functionality either, as it requires specific entitlements that are only available to certain vendors and devices. Therefore, it cannot be used to create universal drivers for all devices, which should be blocked. Any advice would be greatly appreciated!
1
0
130
1w
How to enable PCIDriverKit Bus Leader? (and Memory Space enable?)
I am porting a working kernel extension IOKit driver to a DriverKit system extension. Our device is a PCI device accessed through Thunderbolt. The change from IOPCIFamily to PCIDriverKit has some differences in approach, though. Namely, in IOKit / IOPCIFamily, this was the correct way to become Bus Leader: mPCIDevice->setBusLeadEnable(true); // setBusMasterEnable(..) deprecated in OS 12.4 but now, PCIDriverKit's IOPCIDevice does not have that function. Instead I am doing the following: // Set Bus Leader and Memory Space enable uint16_t commandRegister = 0; ivars->mPCIDevice->ConfigurationRead16(kIOPCIConfigurationOffsetCommand, &commandRegister); commandRegister |= (kIOPCICommandBusLead | kIOPCICommandMemorySpace); ivars->mPCIDevice->ConfigurationWrite16(kIOPCIConfigurationOffsetCommand, commandRegister); But I am not convinced this is working (I am still experiencing unexpected errors when attempting to DMA from our device, using the same steps that work for the kernel extension). The only hint I can find in the online documentation is here, which reads: Note The endpoint driver is responsible for enabling the Memory Space Enable and Bus Master Enable settings each time it configures the PCI device. When a crash occurs, or when the system unloads your driver, the system disables these features. ...but that does not state directly how to enable bus leader status. What is the "PCIDriverKit approved" way to become bus leader? Is there a way to verify/confirm that a device is bus leader? (This would be helpful to prove that bus leadership is not the issue for DMA errors, as well as to confirm that bus leadership was granted). Thanks in advance!
1
0
212
Sep ’24
Proper way to use IOKit in iOS app?
Hello, forum, I'm trying to build connection between a non-MFi HID device (like keyboard) and iOS app with IOKit and Swift. Thanks to this post, I have manage to import the IOKit into objc header. IOKit on iOS/iPadOS 16.0+ #import <IOKit/IOKitLib.h> However, I have this compiler error when I try to imitate same methods in the SerialPortSaple project from following article, but the IOKit can not be imported to Swift at first place. Communicating with a Modem on a Serial Port The screen shot of the sample project: It looks like the complier unable to reach the io_object_t type somehow, is there any workaround or approach?
6
1
979
Jun ’24
How to open "Driver Extensions" on macOS 15 by using objective-C
Hello everybody, Since macOS 15, the systemextension allow in changed as switch style and put in the "Login items & Extensions". I know the URL navigating to here, which is: x-apple.systempreferences:com.apple.LoginItems-Settings.extension But the extension options we need to scroll deep down and we need to click the "!" to open it. I want to open the finally window for user can easily see it and enable it. Please tell me how. Appreciate!!
4
0
274
3w
AU Plugin Not Connecting to DriverKit Driver in Sandboxed Host
Hello, I'm developing a custom AU plugin that needs to connect to a DriverKit driver. Using the DriverKit sample (https://github.com/DanBurkhardt/DriverKitUserClientSample.git), I was able to get a standalone app to connect to the driver successfully. However, the AU plugin, running in a sandboxed host, isn't establishing the connection. I’ve already added the app sandbox entitlement, but it hasn’t helped. Any advice on what might be missing? TIA!
1
0
183
Oct ’24
IOServiceNameMatching can't find dext service
I'm using the following code to find the dext service. The driver is enabled in iOS settings prior to launching the app. io_service_t mService = IO_OBJECT_NULL; kern_return_t ret = kIOReturnSuccess; io_iterator_t iterator = IO_OBJECT_NULL; if (__builtin_available(iOS 15.0, *)) { ret = IOServiceGetMatchingServices(kIOMainPortDefault, IOServiceNameMatching("MyDriver"), &iterator); } else { // Fallback on earlier versions } if (ret != kIOReturnSuccess) { printf("Unable to find service"); } while ((mService = IOIteratorNext(iterator)) != IO_OBJECT_NULL) { //Only able to find service if launching the app first and then connecting the device .......... } I noticed the call IOServiceNameMatching doesn't return the same result for the following workflows: Launch the app first and then connect the device, IOServiceGetMatchingServices can find the service. Connect the device to USB-C port first, then launch the app, the same call can't find a matching service (iterator is null). I would need to disconnect and reconnect the device while the app is running in order to find the matching dext. Any suggestion on how to find the matching dext service for workflow #2? Thanks
6
0
453
Aug ’24
USBDriverKit driver not showing up in settings on iPadOS 18
In iPadOS 17.7 my driver shows up in settings just fine. After recompiling with Xcode 16 and installing my app (containing my driver) on iPadOS 18, the app shows up in settings but the driver-enable button is missing from Settings. When I plug-in my custom USB device, the app cannot detect it and I am left with no way to manually enable the driver, as I did in the previous version of iPadOS.
1
0
238
Sep ’24