Skip to content

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

@pr0jectile

Description

@pr0jectile

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 signal11/hidapi#400 (comment) 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionInformation is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions