0

I am trying to use a HID (DualShock 4) connected to my R-PI 3 running Windows 10 IoT in a C# universal app. I was using the Device Enumeration sample as a guideline and managed to display the IDs of all connected devices. I could see that the connected DualShock was correctly enumerated because it logged the \\?\HID#VID_054C&PID_05C4....

So naturally the next thing I wanted to do was opening the device for communication. Since it is an HID I was using the HidDevice class with var device = await HidDevice.FromIdAsync(args.Id, FileAccessMode.ReadWrite);. Sadly the returned device is always null, nothing on the screen is prompted or so.

Next I assumed there at least has to be some kind of USB interface accessible so I went for var device = await UsbDevice.FromIdAsync(args.Id);

But now I am getting A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F) or sometimes also The process cannot access the file because it is being used by another process.

How can I talk to my device? :(

Cromon
  • 821
  • 10
  • 24
  • Do you [specify device capabilities for HID](https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/how-to-specify-device-capabilities-for-hid) in `Package.appxmanifest` ? – Rita Han May 22 '17 at 08:52
  • Hm, no, I was not, I will eventually try it on my older r-pi, i switched the one above to raspbian again because i could not continue my work. – Cromon May 23 '17 at 20:43
  • I am also a bit shaky on the whole usage part of the HID. With libhid i just give the vendor and product ID both of which i am aware of, but whatever usage id/type i try in windows 10 IoT it tells me there is no device. I would gladly tell it those two values, but I just dont know them. Is there a way to figure it out? – Cromon May 23 '17 at 20:46
  • [Usage page](https://learn.microsoft.com/en-us/windows-hardware/drivers/hid/hid-usages#usage-page) describes what HID devices are allowed to do. About industry standard HID usage, see the Universal Serial Bus (USB) specification [HID Usage Tables](http://www.usb.org/developers/hidpage#HID_Usage). Beside there is vendor-defined. – Rita Han May 24 '17 at 03:24

0 Answers0