Victor-Chen avatar image
0 Votes"
Victor-Chen asked ·

Unable to connect to USB devices in uwp

I tried to connect USB devices in uwp according to the instructions in MSDN, and also tried to download the sample provided by MSDN to connect devices, but I still couldn't connect to usb devices.

What is the possible cause of this problem? Any directions or suggestions?

Here is part of my code:


     <DeviceCapability Name="usb">
       <Device Id="vidpid:1532 0a14">
         <Function Type="name:vendorSpecific"/>
         <!--The following statement also tries-->
         <!--<Function Type="classId:ff * *"/>-->

C# code:

 string aqs = UsbDevice.GetDeviceSelector(0x1532, 0x0A14);
 var finder =  DeviceInformation.FindAllAsync(aqs).GetResults();
 //finder.Count always equals 0

About the registry for this device:

q1.png (62.7 KiB)
q2.png (34.9 KiB)
· 4
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Votes 0 · ·

Additional, This is actually an Xbox gamepad, and I can see the device on the device manager. The device path is: \\?Usb#vid 1532&pid 0a14#0000c96c27402af7#{guid}. but what makes me confused is that the driver is dc1-controller.sys, not Winusb.sys, and the inf is dc1-controller.inf.
And I can get the device ID using DeviceInformation.FindAllAsync(string.Empty), but using UsbDevice.FromIdAsync(item.Id) always returns null, I don't know why.

0 Votes 0 · ·

Hi, I have replied you on stackoverflow, please check it.

1 Vote 1 · ·

anon@userSanon@useroanon@userranon@userranon@useryanon@user,anon@user anon@userianon@user anon@userfanon@useroanon@userranon@userganon@useroanon@usertanon@user anon@usertanon@useroanon@user anon@usercanon@userhanon@usereanon@usercanon@userkanon@user anon@userianon@usertanon@user,anon@user anon@userIanon@user&anon@user#anon@user3anon@user9anon@user;anon@userlanon@userlanon@user anon@userranon@usereanon@userpanon@userlanon@useryanon@user anon@useryanon@useroanon@useruanon@user anon@usertanon@userhanon@usereanon@userranon@usereanon@user

0 Votes 0 · ·

0 Answers