Unable to connect to USB devices in uwp

Victor Chen 106 Reputation points
2020-03-11T02:12:16.823+00:00

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:

Package.appxmanifest:

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

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:
4151-q1.png
4161-q2.png

Universal Windows Platform (UWP)
{count} votes