Questions tagged [libusbdotnet]

LibUsbDotNet - A .NET C# USB library for WinUSB, LibUsb-Win32, and libusb-1.0. Using the common device classes, applications work with all operating systems and drivers without modification.

LibUsbDotNet - A development tool written for .NET software developers who desire a fast and easy way to create a complete custom USB driver solution for unix-like and windows platforms.

Features:

  • Full support for WinUSB. All WinUSB interfaces are treated as separate devices. IE each interface can be used by a different application.

  • Extended kernel level support for libusb-win32.

  • Supports unix-like operating systems using mono .NET and Libusb-1.0.

  • Common device classes allow for a single code base to support multiple drivers and platforms.

  • Includes a USB InfWizard utility (windows only) for generating USB installation packages, removing devices, and installing drivers.

  • Device discovery using any or all of the following criteria:

    • VendorID
    • ProductID
    • Revision Code
    • Serial Number
    • Device Interface GUID
    • Source package includes many small example applications
    • '

    Project Links:

51 questions
11
votes
1 answer

Cross-platform USB communication using ASP.NET Core

Overview I've ported a web application to .NET Core and I'm finding that it's able to communicate with a microcontroller over USB when running on Windows but not when running on Linux. I'm trying to work out: Why this is the case (is it a bug in…
Tagc
  • 8,736
  • 7
  • 61
  • 114
7
votes
2 answers

LibUsbDotNet No devices found when calling UsbDevice.AllDevices

I am executing the example code of LibUsbDotNet which will return me the information of all connected usb devices. You can find this code below. using System; using LibUsbDotNet; using LibUsbDotNet.Info; using LibUsbDotNet.Main; using…
Milan
  • 556
  • 6
  • 14
5
votes
1 answer

How to get signals from a scanner connected over usb

I have a KODAK i2600 scanner connected to a network over SX Virtual Link, which on every pc in this network emulates a usb connection to the scanner. I can find the emulated usbs pid and vid easily like this: or this: I tried to detect the signals…
Nikola.Lukovic
  • 1,256
  • 1
  • 16
  • 33
5
votes
2 answers

LibUSBDotNet: Strange errors after working with USB device for awhile

I'm using the LibUSBDotNet library in a WPF application that communicates with a simple USB device. I'm only sending 3 bytes to the device as a command, there's no response to be expected from it and my code works like a charm: MyUsbFinder = new…
mmvsbg
  • 3,570
  • 17
  • 52
  • 73
4
votes
0 answers

How get the serial port name of an Arduino

I'm trying to figure out which serial port belongs to an Arduino. Since the SerialPort class does not reveal any information about the underlying hardware, I'm trying to use LibUsbDotNet instead. Using the following code to get a list of all…
TimothyP
  • 21,178
  • 26
  • 94
  • 142
4
votes
2 answers

LibUsbDotNet: Error on exiting WPF application - Safe handle has been closed

Working with USB device in WPF application, I can successfully connect and send commands to the device. The device only receives commands, no replies so all I need is an EndpointWriter to communicate with it. MyUsbFinder = new UsbDeviceFinder(vid,…
mmvsbg
  • 3,570
  • 17
  • 52
  • 73
3
votes
1 answer

USB device keeps connecting and disconnecting after I stop my libusbdotnet application

I am sending a command to a QR Code reader every 30 milliseconds and I take the response, and display its size on a label. Everything seems to be working fine until I press the stop button, after which I start hearing the windows usb…
Hassnain Ali
  • 222
  • 3
  • 12
2
votes
2 answers

Writing a small utility tool that listens on USB ports, need advice

I have a piece of hardware that works in cycles. It comes with a proprietary software tool that lets user control it from PC via USB. User defines how long each cycle is. At the beginning of each cycle the software tool rapidly issues a series of…
user75619
  • 31
  • 1
  • 5
2
votes
0 answers

LibUsbDotNet sends only the first byte on write

I am using LibUsbDotNet for reading and writing to usb in C#, but when write to the USB it only sends the first byte, so special configuration is required on UsbEndpointWriter or UsbDevice? Even if I test the SerialPort class for sending data, I…
rahim
  • 106
  • 1
  • 11
2
votes
0 answers

Exception occures when testing LibUsbDotNet

I am not used to asking the community to solve my problems, but I am a newbie in C#/.NET and I am currently stuck. I want to make a XAML application using LibUsbDotNet to communicate with an program on an Android powered phone using the Android…
Ace Nanter
  • 21
  • 2
2
votes
1 answer

LibUsbDotNet, no libusb-1.0.dll

I'm attempting to port some C source (Linux) using libusb to C# (Windows). I successfully installed LibUsbDotNet on Windows 7. Then I proceeded to add using MonoLibUsb, since it looks like the easiest path for porting. However, when running…
Magnus
  • 4,644
  • 1
  • 33
  • 49
2
votes
4 answers

LibUsbDotNet USBEndpointReader DataReceived event is not firing when I expect it to

I have a USB device from which I need to read data via LibUsbDotNet. If I use the following code after I've successfully opened the device... protected UsbEndpointReader _libUsbReader = null; protected UsbEndpointWriter _libUsbWriter =…
Richard Baxter
  • 1,317
  • 1
  • 15
  • 24
2
votes
1 answer

Capture USB mouse raw data using libusb

I want to capture raw data from a USB mouse using libusb library by C#. I can read data with the UsbEndpointReader class, but there is a problem. When I try to read data it seems that Windows tries to read too, and I can't read all data and the OS…
Saeed Hamed
  • 732
  • 2
  • 10
  • 28
2
votes
1 answer

Can I use a USB pen drive with libusbdotnet

I have just started on libusbdotnet. I have downloaded the sample code from http://libusbdotnet.sourceforge.net/V2/Index.html. I am using a JetFlash 4GB Flash drive (a libusb-win32 filter driver was added for this drive). The ShowInfo code works…
Shuaib
  • 779
  • 2
  • 13
  • 47
1
vote
1 answer

dotnet on Linux with libusbdotnet dependency

Aloha! A little background... I am not a .Net programmer. I have done some gcc compiling of some C source code in the past, but not by trade. I do much of my hobbyist work Linux. I have a USB device that I need to access in Linux, but the source…
RF101
  • 23
  • 6
1
2 3 4