Why can't I open or load USB device with GUID or VID / PID

620 views Asked by At

I would like to read the contents of an RFID card via a USB reader.

I installed the Nuget package: LibUsbDotNet

I get the guid, pid, vid via the Windows Device Manager :-

L'appareil USB\VID_1667&PID_0005\PGM-T1048 a été configuré.

GUID de classe : {36fc9e60-c465-11cf-8056-444553540000}

I'm trying:


    UsbDeviceFinder MyUsbFinderTest = new UsbDeviceFinder(new Guid("36fc9e60-c465-11cf-8056-444553540000"));
    
    //or
    
    UsbDeviceFinder MyUsbFinderTest = new UsbDeviceFinder(1667, 5);
    
    //or
    
    int vid = Int32.Parse("1667", System.Globalization.NumberStyles.HexNumber);
    int pid = Int32.Parse("0005", System.Globalization.NumberStyles.HexNumber);
    
    UsbDeviceFinder MyUsbFinderTest = new UsbDeviceFinder(vid, pid);
    
    UsbDevice MyUsbDevice = UsbDevice.OpenUsbDevice(MyUsbFinderTest);

But MyUsbFinderTest always returns null.

Can you help me?

0

There are 0 answers