Questions tagged [libusb-1.0]

There are two versions of the libusb API: the current libusb-1.0 API, and its legacy predecessor libusb-0.1. libusb-1.0 is an almost-rewrite of the previous stable branch, libusb-0.1. It is a lightweight library that can be efficiently integrated into applications of any kind, with several new features.

There are two versions of the libusb API: the current libusb-1.0 API, and its legacy predecessor libusb-0.1. libusb-1.0 is an almost-rewrite of the previous stable branch, libusb-0.1. It is a lightweight library that can be efficiently integrated into applications of any kind, with several new features.

libusb-1.0 development is being lead by Peter Stuge.

Links

211 questions
4
votes
1 answer

libusb_bulk_transfer timeout while write

I have a USB printer device. I want to send file data to the USB printer from Linux. I am using libUsb for my code. I am getting timeout (libusb return value -7) always while sending. But I can able to send data in Windows for the same printer. What…
4
votes
2 answers

libusb_open returns LIBUSB_ERROR_ACCESS?

I am using libusb in my android app using jni. I am able to find the device using libusb. but not able to open it. TestExP.c #include #include #include #include #include #define MY_VENDOR_ID …
Pankaj
  • 81
  • 2
  • 9
4
votes
2 answers

Modify libusb to accept file descriptor

I modified libusb1.0 open function as follows: static int op_open2(struct libusb_device_handle *handle, int fd) { struct linux_device_handle_priv *hpriv = _device_handle_priv(handle); hpriv->fd = fd; return…
Martin Marinov
  • 1,167
  • 3
  • 15
  • 25
3
votes
0 answers

How do I properly free device list using libusb?

I'm trying to write a code to read and write from usb device type Cypress FX3 using Visual Studio 2019 project type is Console App, in c++ language. I call libusb_get_device_list one time during the program, and once I open the desired device I'm…
user14092875
  • 145
  • 1
  • 1
  • 12
3
votes
1 answer

How to use libusb with libevent?

I'm writing an event-driven application using libevent, and I need to do a USB transfer using libusb-1.0. I wanted to use libusb_get_pollfds to get a list of files descriptors (in fds) and add them to libevent like this: const struct libusb_pollfd…
Pawel Zubrycki
  • 2,703
  • 17
  • 26
3
votes
1 answer

Cannot open USB device with libusb-1.0 in cygwin

I'm trying to interface with a USB peripheral using libusb-1.0 in cygwin. libusb_get_device_list(...) works fine, I get a list of USB devices. It finds the device with the correct VendorID and ProductID in the device list, but when libusb_open(...)…
Aaron
  • 385
  • 4
  • 13
3
votes
0 answers

PyUSB no backend available even with dll in path, explicitly loaded

I'm receiving a no backend error in pyusb despite the fact that I have LibUSB 1 installed, in the path, and loaded fine earlier in the code. My code is import usb.core import usb.util import usb.backend.libusb1 import sys class USBConnection: def…
bever
  • 33
  • 4
3
votes
1 answer

Libusb hangs when using C++11 async

I'm new to libusb, so I don't really understand it very well. I'm trying to do some USB communication. I'm using the hotplug feature which works quite well. So I thought when I detect a device arrived event, I would do all communication with USB on…
pdiddy
  • 6,217
  • 10
  • 50
  • 111
3
votes
0 answers

How to intercept messages between usb device and host controller?

I have to write a usb over ethernet application. Using vhci - (http://sourceforge.net/projects/usb-vhci/?source=typ_redirect) I am able to create a virtual usb device. Now I need to intercept communication between actual device and server and…
FeatureBug
  • 51
  • 2
3
votes
1 answer

Read data from usb device in libusb with java(usb4java)

I'm reading data from usb device in java with libusb api. I'm able to write data to the device but I can not read data from device. I can read first data group (size : 1 byte) but when I want to read second data group (size : 2 byte) I'm getting…
bzkrtmurat
  • 189
  • 1
  • 3
  • 15
3
votes
1 answer

Getting raw data using libusb

I'm doing reverse engineering about a ultrasound probe on the Linux side. I want to capture raw data from an ultrasound probe. I'm programming with C and using the libusb API. There are two BULK IN endpoints in the device (2 and 6). The device is…
bzkrtmurat
  • 189
  • 1
  • 3
  • 15
3
votes
2 answers

Linking libusb in Mac OS X

I have this very simple piece of code that I'm trying to compile. I'm fairly new to GCC from the command line, so please forgive me. I've tried a quite few different things with GCC, but I'm still unable to get it to compile. I do have libusb…
user342706
3
votes
0 answers

Linking native hidapi and libusb-1.0 library in eclipse on Ubuntu

I am new to Ubuntu and searched on-line for two days, tried a lot of solutions but do not have any luck yet. If anyone can help with this, I will appreciate. I wrote a program in Java with eclipse on Windows. My program makes use of Java hidapi…
3
votes
2 answers

How to read swd output via USB?

I am trying to write an application similar to stmicro STM-STUDIO, which reads variables from an embedded application running on a device (STM32Fx Discovery) via USB. How do I go about reading the output (variables) coming from the board, preferably…
TonyP
  • 5,655
  • 13
  • 60
  • 94
3
votes
1 answer

On Windows, libusb can't see some ports

We're using libusb v1.0.9.0 in C++ code (with a Java front end). We're testing it on multiple versions of Windows and multiple machines for various USB 2.0/3.0 controllers, and we've found a couple of very bad problems. On Windows 7, it can't see…
1 2
3
14 15