Skip to content

Check supported device before RequestPermission #3

@YZahringer

Description

@YZahringer

When a new device is connected, RequestPermission is called without checking if the device is in AvailableDeviceInfo.

Call before RequestPermission or adapt DeviceManager.GetDevice method:

var id = new UsbSerialDeviceID(device.VendorId, device.ProductId);
var info = DeviceManager.FindDeviceInfo(id);
if (info == null)
{
    if (!DeviceManager.AllowAnonymousCdcAcmDevices || device.DeviceClass != UsbClass.Comm)
        return;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions