I'm trying to read test results from a USB Serial Port device, the code below picks up that it's connected to the usb, so i do get a deviceInterface object. BUT now when i use UsbDevice.FromUsAsync it's always null.
var selector = "System.Devices.InterfaceClassGuid:=\"" + "{GUID}";
var interfaces = await DeviceInformation.FindAllAsync(selector, null);
OutputText.Text = interfaces.Count + " device interface(s) found\n\n";
foreach (DeviceInformation deviceInterface in interfaces)
{
if (deviceInterface.Name == "CardioChek Link")
{
UsbDevice device = await UsbDevice.FromIdAsync(deviceInterface.Id);
if (device != null)
System.Diagnostics.Debug.WriteLine("FOUND!!!!!!!");
}
}
in the app manifest my configs looks like this:
<m2:DeviceCapability Name="serialcommunication">
<m2:Device Id="vidpid:0403 6001">
<m2:Function Type="name:serialPort"/>
</m2:Device>
</m2:DeviceCapability>
the device id = \\?\FTDIBUS#VID_0403+PID_6001+A60336ECA#0000#{4d36e978-e325-11ce-bfc1-08002be10318}
i'm at the point of having to convert the entire app to a Desktop app because of this...