Questions tagged [iokit]

The I/O Kit is a framework for driver development in the xnu Kernel which drives Apple's Mac OSX and iOS operating systems.

The I/O Kit is a framework in the xnu Kernel which drives Apple's Mac OSX and iOS operating systems. It can be used to implement device drivers in kernel space, or in some cases, user space. It can also be used for communicating with drivers from application code.

An introduction to the I/O Kit may be found at http://developer.apple.com/library/mac/#documentation/DeviceDrivers/Conceptual/IOKitFundamentals/Introduction/Introduction.html

502 questions
11
votes
4 answers

Disable ambient-light sensor screen dimming programmatically on OS X

I've been digging around in the kernel code repo for days, but I just can't find this anywhere. I want to disable/enable/detect the state of the ambient-light sensor based screen dimming that many of the higher end Mac laptops have. This is the…
peterjb
  • 3,189
  • 2
  • 17
  • 12
10
votes
2 answers

Using IOHIDManager to Get Modifier Key Events

I'm trying to use IOHIDManager to get modifier key events because Cocoa flagsChanged events are lacking (difficult to differentiate between press/release, left/right if both are down, etc.) Here's the code where I create the manager and register the…
dostende
  • 253
  • 2
  • 8
10
votes
4 answers

How to detect SSD in Mac OS X?

Is there a reliable, quick, deterministic way (i.e. not a benchmark) to check whether the system drive Mac OS X is on is a Solid State Drive? Is there any other indicator how well disk handles parallel access? I'm trying to adjust number of threads…
Kornel
  • 97,764
  • 37
  • 219
  • 309
10
votes
2 answers

Send data to a PS3 DualShock3 controller from a Mac (IOHIDDeviceSetReport)

I've been playing around with the HID part of IOKit lately on my Mac with a PS3 controller. I've managed to look though the sample code and connect to my controller, receive a stream of data and parse it (Everything, including the accelerometer and…
Baza207
  • 2,123
  • 1
  • 22
  • 40
10
votes
2 answers

Programmatically "unplug and replug" a USB device to load new driver in OS X?

I'm working on an installer in OS X that installs an IOKit driver for a USB device, and I'm trying to get it to not require a restart at the end. The installer installs the driver correctly and rebuilds the kext cache, and after it runs, if I…
Bri Bri
  • 2,169
  • 3
  • 19
  • 44
10
votes
3 answers

Best way to communicate from KEXT to Daemon and block until result is returned from Daemon

In KEXT, I am listening for file close via vnode or file scope listener. For certain (very few) files, I need to send file path to my system daemon which does some processing (this has to happen in daemon) and returns the result back to KEXT. The…
RHK
  • 131
  • 1
  • 4
9
votes
4 answers

Gamepad code on OS X: Buh?

I thought I was a decent programmer until I tried writing gamepad code for OS X. Now I feel deeply useless. Does anyone know of any code that I can legally use in my (non-free) game? Is it really this hard to talk to a gamepad on OS X? What am I…
Mike F
9
votes
1 answer

How to memory-map a PCI BAR using PCIDriverKit?

How to memory-map a PCI Base Address Register (BAR) from a PCIDriverKit driver (DEXT) to a userspace application? Memory-mapping from a driver extension to an application can be accomplished by implementing the IOUserClient::CopyClientMemoryForType…
vially
  • 1,516
  • 16
  • 22
9
votes
4 answers

Acessing a serial to USB device with I/O kit

I have the following problem: I have a Wintec WBT-202 GPS device which has the ability to transmit the location data live as NMEA data over USB. Inside this USB it is just a USB to serial bridge which is run under Windows using the standard…
GorillaPatch
  • 5,007
  • 1
  • 39
  • 56
9
votes
0 answers

Mouse IOHIDDeviceRef not delivering any input reports in macOS 10.12

I'm trying to receive input reports for my mouse (wrapped in an IOHIDDeviceRef), but for the life of me I can't seem to get it working on macOS 10.12. The same code works fine in 10.11 and 10.10, and it works great for all other kinds of HID input…
JustSid
  • 25,168
  • 7
  • 79
  • 97
9
votes
4 answers

Get serial number of device on iOS 8

For an in-house application, we were using the following code UIDevice+serialNumber to get the device serial number. However, it seems that with iOS 8, the registry key "IOPlatformSerialNumber" is empty. Can the serial number be obtained any other…
quentinadam
  • 3,058
  • 2
  • 27
  • 42
8
votes
1 answer

Mac low-level keyboard device corresponding to Linux /dev/input?

What is the name of the low-level keyboard device in macOS (somewhere in Darwin / Mach / IOKit) that corresponds to /dev/input in Linux? (e.g. /dev/input/event0) Context: I'm asking because want to 'map' the Mac device to a Docker container running…
David J.
  • 31,569
  • 22
  • 122
  • 174
8
votes
2 answers

Cocoa: Detecting USB devices by Vendor ID

I'm writing a Foundation tool for Mac and trying to detect when Apple devices are connected and disconnected via USB. I found some help in this post along with the USBPrivateDataSample -- but it seems to only be working if I provide both a vendor ID…
skandocious
  • 814
  • 9
  • 21
7
votes
1 answer

Why do static functions eliminate undefined symbols in Xcode?

I am attempting to use I/O kit and have linked to I/O kit properly. When I use a function in I/O kit and don't call it within a static function, I get the following error Undefined symbols for architecture x86_64. Here is an example to suppress the…
David
  • 14,205
  • 20
  • 97
  • 144
7
votes
4 answers

High resolution and high framerate mouse coordinates on OSX? (Or other solution?)

I'd like to get mouse movements in high resolution and high framerate on OSX. "High framerate" = 60 fps or higher (preferably > 120) "High resolution" = Subpixel values Problem I've got an opengl view running at about the monitor refresh rate, so…
0scar
  • 3,200
  • 25
  • 28
1
2
3
33 34