libusb gets the Windows device instance path DevicePath

The interface provided by the libusb.h header file in the current version of libusb (1.0.26) seems to have no way to obtain the device instance path related to the Windows platform. It looks like: \?\usb#vid_04ca & amp;pid_7070#5 & amp;20d34a76 & amp;0 & amp;6#{a5dcbf10-6530-11d2-901f-00c04fb951ed} Only interfaces such as libusb_get_port_numbers are provided to obtain the topology. We […]

C# uses LibUsbDotNet to implement USB device detection

The work content after returning from the National Day basically revolves around various hardware, which undoubtedly makes the already long “Seven-day shift” even more boring. I even I unknowingly learned how to load paper of different sizes into the printer. After Huawei’s Mate 60 was released, voices of “Far ahead” came out one after another […]

Use libusb library to monitor usb device plugging and unplugging information in real time

Use the libusb library to monitor the plugging and unplugging information of usb devices in real time. The information includes USB plugging and unplugging status, USB interface number, device name iProduct, manufacturer name iManufacturer, device number idProduct, manufacturer number idVendor, interface number, USB type code bDeviceClass, and lsusb -v The obtained information is consistent, and […]

Use libusb for device communication in linux

Using libusb for communication based on linux This article draws on many other big guys’ documents. There are comments in the code, so let’s see for yourself. #include <stdio.h> #include <stdlib.h> #include <string.h> // this header file #include “libusb.h #define SendEndpointAddress 0x01 /*Send endpoint address*/ #define recEndpointAddress 0x11/*receive endpoint address*/ #define VID 0x0000 #define PID […]

imx6ull development board environment configuration – libusb, libudev, eudev cross compilation

Directory Zero. Foreword 1. libusb cross compilation 1.0 Preface 1.1 Cross Compilation Two, usbutils cross compilation 2.0 Preface 2.1 Cross Compilation 3. libudev cross compilation 3.0 Preface 3.1 Cross Compilation 3.2 Error handling – usbutils not found 3.3 Error handling – pci.ids not found (pci.ids not found) 3.3.0 Preface 3.3.1 Find pci.ids 3.3.2 Continue to […]

LibUsbDotNet2.2.29 version obtains the scanning data of the scanning box through the usb port, and the reading data is incomplete and incorrect

LibUsbDotNet obtains the scan code data of the scan code box through the usb port, but the read data is incomplete and incorrect. The following is the specific implementation code: Insert code snippet here public void Open(int vid, int pid) { UsbDeviceFinder usbFinder = new UsbDeviceFinder(vid, pid); usbDevice = UsbDevice. OpenUsbDevice(usbFinder); ErrorCode ec = ErrorCode. […]