Questions tagged [libusb]

libusb is a library that gives user level applications uniform access to USB devices across many different operating systems.

libusb is a library that gives user level applications uniform access to USB devices across many different operating systems. It's is an open source project licensed under the GNU Lesser General Public License.

There are two versions of the libusb API: the current libusb-1.0 API, and its legacy predecessor libusb-0.1. Please use libusb-1.0 for all new development.

861 questions
12
votes
3 answers

libusb interface already claimed

I'm writing a device driver for a usb device using libusb. When I attempt to claim the device I get the error code LIBUSB_ERROR_BUSY (-6). According to the documentation that means that the device has already been claimed (link). How do I find out…
jairo
  • 175
  • 1
  • 2
  • 9
12
votes
3 answers

Error message 'Interface not claimed' from libusb

I'm trying to use libusb, but I am get the following error message: usbfs: process 24665 (myprogram) did not claim interface 0 before use I don't really understand why, because as far as I can tell, I'm doing it according to the description found…
Robert
  • 6,855
  • 4
  • 35
  • 43
11
votes
3 answers

How to send data to USB device in node.js using libusb

I have try to get data from device (USB thermometer), following this documentation, but I have not any result. For getting themperature data from device, I should send the data like that 'd\n'. This is my code: var usb = require('usb'), term =…
Alex Skakun
  • 323
  • 1
  • 4
  • 10
11
votes
1 answer

How to recover from a stall in chrome.usb?

I'm sending an out bulk transfer, and I stall it in the device (I write the code on both end of the cable) to abort the action. I'm sending a home-made control transfert SET_FEATURE ENDPOINT_HALT to the endpoint and when the abort is complete, I…
nraynaud
  • 4,924
  • 7
  • 39
  • 54
11
votes
5 answers

libusb_open returns 'LIBUSB_ERROR_NOT_SUPPORTED' on Windows 7

I have been developing USB drivers using LibUSB on Linux, but now I want to have one of my drivers compiled for Windows (this is the first time I am doing it). My environment I am working on Windows 7 using the MinGW compiler (also using Dev-cpp…
Prajosh Premdas
  • 970
  • 4
  • 17
  • 40
11
votes
2 answers

Using libusb on Android without rooting

I am trying to communicate with USB device from Android-based smartphone via OTG. I was able to communicate with my device using Android USB Host API. The problem of USB Host API solution is performance (single bulk transfer bounded by 16384 bytes).…
user2335095
  • 111
  • 1
  • 1
  • 4
11
votes
1 answer

Reading from Android USB Accessory throws ENODEV IOException

So I've implemented the Android USB Accessory API such that I can plug in my phone to my laptop running linux and it puts the phone into USB Accessory mode. Then I can access the accessory, open it, and begin reading an writing to it. My code…
JWman
  • 297
  • 1
  • 14
10
votes
1 answer

Software based Android accessory on Windows

I would like to turn my computer into an Android accessory using my application. So instead of a specialized hardware this will be just PC that will switch the phone into accessory mode, thus launching some Java app on the phone associated with the…
lacop
  • 2,024
  • 4
  • 22
  • 36
10
votes
3 answers

How can I know if a USB device is already in use?

I am writing a C++ Linux userspace driver for a USB device using the C library libusb. I have two copies of the same device (same vendor ID and product ID) and would like to know how to handle this case. Here are the possibilities I can think…
Magix
  • 4,989
  • 7
  • 26
  • 50
10
votes
3 answers

Why does PyUSB / libusb require root (sudo) permissions on Linux?

I have been toying around with PyUSB lately, and found that it works beautifully on Linux (Ubuntu has libusb 0.1 and 1.0, as well as OpenUSB)... but only if I run the program with root privileges (with sudo, of course). Can anyone tell me why it…
ewall
  • 27,179
  • 15
  • 70
  • 84
10
votes
8 answers

Input from 20+ microphones

I've been asked (if it's possible) to write a program monitoring the input of at least 20 microphones, on a single computer. Currently I'm prototyping in python (2.6), on a Ubuntu system using Alsa. My attempts so far have created quite a few…
Paul O'Reilly
  • 103
  • 1
  • 6
10
votes
3 answers

linux / libusb get usb device path

I use libusb to enumerate over a few usb-devices. Now i like to get the "device-path". I think it's not called usb device-path, because i was not successful with google. If i connect a usb-device with linux, i get a message in dmesg, here are a few…
Kevin Meier
  • 2,339
  • 3
  • 25
  • 52
9
votes
1 answer

Accessing Linux /dev/USB as standard files to communicate with USB device

I'm researching ways to communicate with a USB device in Linux and would prefer to not write a Linux Kernel driver. I understand that libusb exists and is a user-land library that would work, but our embedded device doesn't support usbfs ( and would…
Chimera
  • 5,884
  • 7
  • 49
  • 81
9
votes
1 answer

hidapi vs libusb for Linux

Writing some C code for USB mouse. More specifically writing configuration and information to mouse like poll, sensitivity, button actions, colors (light), tactile alters, OLED etc. Started out with this old article where libhid is recommended over…
user3342816
  • 974
  • 10
  • 24
9
votes
3 answers

PyUSB 1.0: NotImplementedError: Operation not supported or unimplemented on this platform

I just began to use pyusb, and basically I'm playing with the sample code here. I'm using Windows7 64 bit, and downloaded the zip version from https://walac.github.io/pyusb/. Backend is libusb-1.0.19 that is downloaded the windows binary from…
Bomin
  • 1,619
  • 5
  • 24
  • 39
1
2
3
57 58