516 questions
3
votes
0
answers
625
views
How do I talk directly to a printer that's connected via USB on macOS, using xxPL commands?
I have a special label printer (GoDEX RT863i) connected to a Mac. It uses the CUPS system and is configured through a PPD file. Printing through the macOS print system generally works.
Now, I need to ...
2
votes
1
answer
428
views
ioreg list multiple dext
I have written a system extension using DriverKit and USBDriverKit that seems to work well (running with developer mode on, SIP off, ... still waiting for entitlements).
When I plug my USB device and ...
1
vote
0
answers
127
views
DriverKit - Access to hub for SuspendDevice() equivalent
I have written a DriverKit for a USB device and it seems to work well. It is a port from an existing KExt.
In the KExt I could call SuspendDevice(true) on IOUsbDevice and it would tell the hub to ...
5
votes
1
answer
873
views
How DriverKit driver notify application?
I know how to send data to DriverKit and get back some values, that is application calling IOConnectCallStructMethod() and driver fill the OSData in structureOutput from application.
In my Application ...
3
votes
0
answers
561
views
Getting CPU temperature in macOS Swift App
I am building an external cooling fan controller and I need to read the CPU temperature in my Swift app.
For this purpose, I applied the answer to this thread and I managed to read the temperatures in ...
1
vote
1
answer
395
views
How to develop driver to read disk by System Extension and DriverKit for macOS10.15+
I had developed a kernel extension(kext) by IOKit, but it will be deprecated in the future. So I want develope another driver use dext to replace kext using the DriverKit. But I don't find the ...
4
votes
1
answer
2k
views
How to allocate memory in a DriverKit system extension and map it to another process?
I have allocated memory in my application and passed its pointer and size to IOConnectCallStructMethod. Using IOMemoryDescriptor::CreateMapping I have then mapped this memory to the DriverKit system ...
4
votes
1
answer
1k
views
Develop a userspace read-only disk driver for macOS
I have a special disk image format (compressed and with extra information such as bad blocks) and would like to make that available as a block device (e.g. under /dev/rdisk) in macOS.
I am looking for ...
1
vote
2
answers
126
views
How to get the user-set "custom name" of IOUSBDeviceInterface
If I use the IOKit methods to list USB devices, I can get something like "AirPod Case", but I don't know how to get "Francisco's AirPods". I've looked around a the various keys you can ask for, but ...
5
votes
2
answers
4k
views
Should I use IOKit or DriverKIt (or HIDDriverKit) to write driver for USB or Bluetooth multi-touch device in macOS?
I am planning to write driver for USB or Bluetooth multi-touch device similar to Apple Magic Trackpad or Logitech trackpad for Mac.
The idea is that all macOS applications can use this multi-touch ...
3
votes
1
answer
1k
views
Performance issue after migrating from codeless KEXT to DEXT
I am working on migrating a codeless KEXT to DriverKit. It is used to disable the IOKit HID driver for USB devices that present themselves as HID compliant in firmware upgrade mode.
So far I have ...
3
votes
1
answer
2k
views
How should "NewUserClient" be implemented
I am trying to interact with a dext from an application. I am able to find the service using IOServiceOpen and I get a call to NewUserClient of my dext (I can see the type parameter passed being ...
0
votes
1
answer
104
views
how do we get terminate event in DEXT - Problem in Catalina DEXT driver
I am new to KEXT and DEXT for Mac OS.
Trying to port the KEXT driver to DEXT for development purpose.
my Question is:
When we unplug a USB device, in case of KEXT we recieve ...
0
votes
0
answers
322
views
C++ use of undeclared identifier IOKit Functions
I am getting an error building my c++ program on xcode. For each of the various fuctions of the IOKit I am getting "use of undeclared identifier". I really don't know why I am getting this error. ...
7
votes
1
answer
1k
views
Enabling Closed-Display Mode w/o Meeting Apple's Requirements
EDIT:
I have heavily edited this question after making some significant new discoveries and the question not having any answers yet.
Historically/AFAIK, keeping your Mac awake while in closed-...
4
votes
0
answers
339
views
How to extract S.M.A.R.T. data from a storage on OsX? (C++)
The need is to access S.M.A.R.T. data (Self-Monitoring, Analysis and Reporting Technology) for a storage diagnostic tool.
From Wikipedia:
S.M.A.R.T. (Self-Monitoring, Analysis and Reporting ...
2
votes
1
answer
1k
views
Multiconfiguration USB Device - Problems in Catalina
The drivers for the interfaces of USB device with 2nd configuration are getting KIOServiceTerminated . The same drivers for similar interfaces in configuration 1 are loading and working properly. I ...
3
votes
2
answers
468
views
USB peripherals arbitration on macOS
The DiskArbitration framework on macOS provides a simple way to intercept volumes mounts and authorise it or not using DARegisterDiskMountApprovalCallback.
I'm looking for something similar for all ...
2
votes
1
answer
678
views
Can you trace I/O activity for a process on MacOS?
Does MacOS have a utility/command for tracing I/O activity (e.g. via IOKit) for a process for debugging purposes?
There exists tools for network, syscall, etc. activity but I can't find any ...
3
votes
1
answer
698
views
Import IORegistryEntrySearchCFProperty from Macapi.IOKit in Delphi for OSX64
I used this import definition in OSX32 successfully:
uses
MacApi.ObjectiveC,
MacApi.Foundation,
Macapi.CoreFoundation,
Macapi.Mach,
Macapi.IOKit;
type
io_iterator_t = io_object_t;
...
1
vote
1
answer
194
views
How to use IOServiceOpenAsFileDescriptor?
I have a USB device attached. I decided to try to write some code where I open the USB device as a FileDescriptor like on Linux where I can use ioctl function on the fd to send commands.
I ended up ...
0
votes
1
answer
312
views
IOUSBInterfaceInterface Already Open
I am trying to intercept/interact with a Maschine Mikro 2 plugged into my Mac via USB. I have a IOUSBInterfaceInterface reference to the correct USB HID interface. However, whenever I try to call, ...
2
votes
1
answer
2k
views
How to read the type of a property in IORegistry from IOKit?
For example, in the following example from IOKit documentation, each entry for this device has different types, such as Data, Number, etc
How can I use IOKit to read the type of it? I know that we ...
1
vote
1
answer
559
views
What is the meaning of the keys in the GPU[@"PerformanceStatistics"]?
I get the GPU infos from IOKit in an iOS app on iPhone device, and I get the @"PerformanceStatistics" values of GPU info, I'm confused what's the key-values mean here:
{
CommandBufferRenderCount ...
2
votes
1
answer
362
views
How do I detect External GPU (eGPU) connection and disconnection on macOS?
I'd like to write a macOS app which detects when you disconnect an external GPU via the Disconnect "GPU Name" Menu Extra and then takes some action.
What API do I use to detect the presence of the GPU?...