hid.write() on macOS 15.5 stops hardware from functioning #769

Open
opened 2026-01-28 20:45:54 -06:00 by pr0jectile · 0 comments
pr0jectile commented 2026-01-28 20:45:54 -06:00 (Migrated from github.com)

I'm trying to fork this repo https://github.com/ojacques/SynthesiaKontrol/ and have tried a very simple test on macOS 15.5:

import time
import hid
import mido

def init():
    global device # hid device
    device = hid.device() # open the device with the native instruments id and product id
    try:
        device.open(0x17cc, 0x2120) # native instruments id, product id for Komplete Kontrol S88 MK3
    except Exception as e: # if the device is not found, print the error and quit the program
        print("Error: " + str(e)) # print the error
        quit() # quit the program
    device.write([0xa0, 0x00, 0x00]) # Initializes the device for HID communication
    return True # return true if the device is connected

if __name__ == '__main__':
    connected = init() # run the init function

As soon as the write() function is executed, the hardware becomes unavailable.

Tried this as a solution https://github.com/signal11/hidapi/issues/400#issuecomment-404982250 but it didn't help.

Is this a bug with hidapi or a macOS problem? Feels like once HID takes over the device, it gains full access.

Basically I am working with the Native Instruments Komplete Kontrol S88 MK3 MIDI controller which has LED light strips above the piano keys that I want to control with the script, whilst MIDI messages still get sent back to the computer from the MIDI controller.

I'm trying to fork this repo [https://github.com/ojacques/SynthesiaKontrol/](https://github.com/ojacques/SynthesiaKontrol/) and have tried a very simple test on macOS 15.5: ```python import time import hid import mido def init(): global device # hid device device = hid.device() # open the device with the native instruments id and product id try: device.open(0x17cc, 0x2120) # native instruments id, product id for Komplete Kontrol S88 MK3 except Exception as e: # if the device is not found, print the error and quit the program print("Error: " + str(e)) # print the error quit() # quit the program device.write([0xa0, 0x00, 0x00]) # Initializes the device for HID communication return True # return true if the device is connected if __name__ == '__main__': connected = init() # run the init function ``` As soon as the write() function is executed, the hardware becomes unavailable. Tried this as a solution [https://github.com/signal11/hidapi/issues/400#issuecomment-404982250](https://github.com/signal11/hidapi/issues/400#issuecomment-404982250) but it didn't help. Is this a bug with hidapi or a macOS problem? Feels like once HID takes over the device, it gains full access. Basically I am working with the Native Instruments Komplete Kontrol S88 MK3 MIDI controller which has LED light strips above the piano keys that I want to control with the script, whilst MIDI messages still get sent back to the computer from the MIDI controller.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi#769
No description provided.