HidDevice.FromIdAsync returns null with readwrite

╄→尐↘猪︶ㄣ 提交于 2019-12-04 14:26:49

Your code looks good except that the selector you are grabbing may be too selective. You might want to look at the text it is spitting out and remove anything that is unnecessarily narrow like the usage page or usage id.

I'd like to bet that there is a problem with your device specification in the manifest. Have a look at this article http://www.idevstream.com/?p=322. It will help you identify the usage page and usage id of your device. Once you've got that, I'll bet it will connect. Here's an example of one that I was stuck on until I read the article: https://github.com/MelbourneDeveloper/Ledger.Net/blob/master/src/Ledger.Net.UWPUnitTest/Package.appxmanifest

Also, have a look at this code in Hid.Net for connection: https://github.com/MelbourneDeveloper/Hid.Net/blob/80714078fc8772dd04b60648b0fe6974205a3d8f/Hid.Net.UWP/UWPHidDevice.cs#L95

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!