Opening HIDs on Windows 10

Issue opening HID

I’m struggling to open a HID on Windows 10. When I run:

HID.findAvailable;
HID.postAvailable;

I get a list of devices, including the one I’m interested in (a Nintendo Switch Pro Controller):

13: 	Usage name and page: 	GamePad, 	GenericDesktop
	Vendor name: 	Nintendo
	Product name: 	Wireless Gamepad
	Vendor and product ID: 	1406, 8201
	Path: 	\\?\hid#{00001124-0000-1000-8000-00805f9b34fb}_vid&0002057e_pid&2009#8&10b2b76a&1&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
	Serial Number: 	7048f77124f3
	Releasenumber and interfaceNumber: 	0, -1

But when I try to open it, using either of the following methods, I get an error message:

HID.openAt(13);
HID.open(1406, 8201);

// Post window output:
HID: path was not set specified yet, chosen the one with path: \\?\hid#{00001124-0000-1000-8000-00805f9b34fb}_vid&0002057e_pid&2009#8&10b2b76a&1&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
HIDAPI : Unable to open device \\?\hid#{00001124-0000-1000-8000-00805f9b34fb}_vid&0002057e_pid&2009#8&10b2b76a&1&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}: 1406, 8201
ERROR: HID: Could not open device

Things I’ve tried/considered

I saw that the help file Working with HID states: “NOTE: the backend for Windows has not been completed yet, so HID is not working yet on Windows.” However, I think this message might simply be out of date, as this GitHub issue opened in 2017 describes my exact issue, but has a resolution in 2019 stating that HID in Windows is actually working/implemented.

This post about a similar issue on OSX mentions needing to launch SuperCollider as root. I tried running it as admin on Windows, but it didn’t change anything. Similarly, there is a note in the aforementioned help file: “NOTE: if you have trouble opening a device, e.g. when you get the message ERROR: HID: Could not open device, please check the HID permissions.” But the HID permissions file only mentions Linux.

I tried the controller through both a wired and Bluetooth connection. I haven’t tried a different controller/HID.

1 Like

I have the same problem. I cannot open any HIDs
I tried different Versons of SC (3.13.0, 3.12.2, 3.10.4)
Basically the same code as OP.
Same error message.
Would love to play around with my wacom pad.
Any help is much appreciated.

1 Like

Same issue for me with Windows 10, SuperCollider 3.13.0, Logitech Gamepad F310.
Anyone working on this? If not, any suggestions for solving this issue?
Thanks

1 Like

I have the same issue on Windows 11, SuperCollider 3.13.0, PS5 Controller.

Currently there are only one/two developers who are using Windows as main-developer-machine, so it is a bit difficult to figure out what is going wrong here and fix it - especially since we can’t run automated tests on HID functionality.

It seems Windows support for HID was introduced around 2016 / version 3.8 => HID support for Windows and various additions towards HID in 3.8 by llloret · Pull Request #1 · supercollider/hidapi · GitHub
Maybe it is worth to use a build sc which uses the mingw compiler instead of the vs compiler - although we don’t officially support the mingw compiler anymore, this was the only way to build SC during this era IIRC and I see some mingw specific code in the above PR?

You can e.g. obtain a mingw build via https://github.com/supercollider/supercollider/actions/runs/15491446925/artifacts/3275977867 or search for mingw under artifacts here - but I think a mingw build has some further restrictions, e.g. I think the help system is not working?

Maybe this is a good start to start digging into development? :slight_smile: We are always searching for new developers, especially with windows machines :slight_smile:

hey, thanks i would really like to help (and would like to have this fixed, would like to use my ps5 controller via the Modality Toolkit) but i think my programming skills are not sufficient enough to figure out whats wrong with HID on windows and fix it.
Im currently trying my first steps into Ugen development to maybe helping out there in the future.

1 Like