8

I'm trying to read a Wii Remote using the HID class, in a UWP app (C# .net), similar to this.

However, I can't seem to do much, as I can't get a Write-capable HID handle, which is required to do a HID SendOutputReport (needed for the device configuration).

I've tried several permissions combinations, I can read just fine with the current permissions in the manifest, but I've yet to be able to write.

I've also tried messing with selectors, to see if there was another possible handle available that could be written, but alas, nothing.

Any insight would be very appreciated.

Public discussion. Similar issue

The current permissions I'm using look like this.

<Capabilities>
    <DeviceCapability Name="bluetooth" />    
    <DeviceCapability Name="humaninterfacedevice">
      <!-- Any generic gaming device  -->   
      <Device Id="any">
        <Function Type="usage:0004 *"/>
        <Function Type="usage:0005 *"/>
      </Device>
      <!--Wii Remote Device-->
      <Device Id="vidpid:057E 0306 bluetooth">
        <Function Type="usage:0005 *" />
        <Function Type="usage:0001 0005" />
        <Function Type="usage:0002 *" />
        <Function Type="usage:0003 *" />
        <Function Type="usage:0004 *" />
        <Function Type="usage:0006 *" />
        <!--<Function Type="usage:0007 *" />-->
        <Function Type="usage:0008 *" />
        <Function Type="usage:0009 *" />
        <Function Type="usage:000A *" />
        <Function Type="usage:000B *" />
        <Function Type="usage:000E *" />
        <Function Type="usage:000f *" />
        <Function Type="usage:0010 *" />
        <Function Type="usage:0011 *" />
        <Function Type="usage:0012 *" />
        <Function Type="usage:0013 *" />
        <Function Type="usage:0014 *" />
        <Function Type="usage:0015 *" />
        <Function Type="usage:0016 *" />
        <Function Type="usage:0017 *" />
        <Function Type="usage:0018 *" />
        <Function Type="usage:0019 *" />
        <Function Type="usage:001A *" />
        <Function Type="usage:001B *" />
        <Function Type="usage:001C *" />
        <Function Type="usage:001D *" />
        <Function Type="usage:001E *" />
        <Function Type="usage:001F *" />
        <Function Type="usage:0021 *" />
      </Device>
    </DeviceCapability>
  </Capabilities>

EDIT: Added similar issue.

4

1 回答 1

2

我目前正在为开关控制器解决同样的问题。至少对于开关控制器,它使用 UsagePage 0x01

查看粘贴在此处的一些#defines 。这个数字转化为HID_USAGE_PAGE_GENERIC

查看MS 文档,它说它限制对某些页面的访问,其中包括所需的:/

因此,如果 wiimote 使用与 joycon 相同的页面,它看起来很糟糕。


我仍然希望你找到一个解决方案,我也可以使用一个。

于 2018-01-22T21:00:12.337 回答