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
7
votes
1 answer

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-display mode and not meeting Apple's requirements, has…
7
votes
1 answer

macOS. How to get CPU temperature programmatically

I need to get CPU temperature using Swift, but I can't find any information except for this. I think that I should use IOKit.framework but again there's no much information about it.
Serhii K.
  • 639
  • 1
  • 8
  • 17
7
votes
2 answers

How to tap/hook keyboard events in OSX and record which keyboard fires each event

I've now discovered how to hook/tap keyboard events on OS X at a low level: How to tap (hook) F7 through F12 and Power/Eject on a MacBook keyboard Printing out the code from that answer: // compile and run from the commandline with: // clang …
P i
  • 29,020
  • 36
  • 159
  • 267
7
votes
2 answers

Getting the BSD name of a USB device using IOKit to write to the device?

I am trying to determine the BSD name of virtual serial port using IOKit under MacOS. I have a USB CDC device that looks like a virtual serial port, and I want to get the BSD device path so that I can just do a fopen("/dev/tty.usbmodem123"). I have…
b degnan
  • 672
  • 1
  • 14
  • 31
7
votes
1 answer

Gamepad and joystick support on Mac OS X in user space

I have been searching through how to do gamepad and joystick support on Mac for some days and all resources that I found seems to suggest a pre-installed driver along with using Apple's HID API, which works. The drawback about this approach is that…
vgrimmer
  • 165
  • 2
  • 12
7
votes
2 answers

IOKit device adding/removal notifications - only fire once?

I have been trying to get notified when a specific USB device is added or removed. I have read 'Accessing Hardware From Applications' document and have a bare-bones demo application, mainly based on the code provided in that document. It works the…
Diggory
  • 635
  • 9
  • 20
7
votes
1 answer

MAC address from interface on OS X (C)

This might be a stupid question and I apologize if it's already been addressed here, but I've searched quite a bit without much luck. I'm trying to get my interface's hardware address in C and I'm using OS X (x86-64). I know how to get it with…
Pavlov's Kitten
  • 101
  • 1
  • 2
6
votes
2 answers

How to create a display for OS X?

I need to write what I think is a display driver for OS X. It's like those "Use your iPad as a second monitor!" apps, but I need to write the OS X software that will register another display with OS X, and give me the pixel data so I can use it for…
6
votes
3 answers

IOCreatePlugInInterfaceForService returns mysterious error

I am trying to use some old IOKit functionality in a new Swift 4.0 Mac app (not iOS). I have created a bridging header to use an existing Objective C third party framework, DDHidLib, and I am current working in Xcode 9. The code that attempts to…
user3746571
  • 163
  • 1
  • 6
6
votes
1 answer

Using IOKit to communicate with USB device

I'm trying to make an application that communicates with a USB device about the same way I use the screen command on Terminal. To make my question easier to understand, This is what I normally do in Terminal : command : ls /dev/tty.usb* returns :…
kmn
  • 2,615
  • 4
  • 18
  • 28
6
votes
0 answers

OSX change Product ID to USB composite device

I've got a composite USB device i need to use under MAC OSX. Under Linux i can change the product id using the usb_modeswitch tool with the following command usb_modeswitch -v 0x072f -p 0x100d -V 0x072f -P 0x90cc -m 0x2…
Indio
  • 337
  • 1
  • 3
  • 12
6
votes
6 answers

IOKit not permitted in Sandbox?

I'm new to using IOKit and have noticed what I think is the sandbox making it fail. Here is the test I'm trying (in Pascal) which runs fine outside the sandbox but when I enable it IOServiceOpen returns the error kIOReturnNotPermitted every…
GenericPtr
  • 677
  • 1
  • 8
  • 18
6
votes
0 answers

Help writing a DVB driver for OS X

I'm looking at options to access DVB data on OS X. Initially I want to support the EyeTV DTT USB device, but in the long-run I'd like to support a number of popular devices. The problem I have is that there is no standard way of controlling such…
jkp
  • 78,960
  • 28
  • 103
  • 104
6
votes
2 answers

Difference between various kIOPMAssertionType's

What is the difference between kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionTypePreventSystemSleep and kIOPMAssertionTypePreventUserIdleSystemSleep? I am trying to create an IOPMAssertion that will prevent the mac from going to sleep autommatically…
Alex
  • 5,009
  • 3
  • 39
  • 73
6
votes
1 answer

How to set speaker configuration programatically using Core Audio API on Mac OS X?

I have a 7.1 channel audio output device and a custom kext to drive that. My custom application needs to send 7.1 rear channel audio data to the device but the device receives only 2 channel audio data. I checked "Configure Speaker" option in "Audio…
Raunak
  • 3,314
  • 1
  • 22
  • 28
1 2
3
33 34