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
47
votes
7 answers

Simple way to query connected USB devices info in Python?

How can we query connected USB devices info in Python? I want to get UID Device Name (ex: SonyEricsson W660), path to device (ex: /dev/ttyACM0) And also what would be the best Parameter out of above info to be used as identifying the device whenever…
DivinesLight
  • 2,398
  • 2
  • 24
  • 30
47
votes
0 answers

libusb: error [op_open] getcap failed in C++ on Linux

I am running into trouble calling libusb_open in C++ on Linux (running on Raspberry Pi but virtualized to x86 using Exagear). I can find a device using libusb_get_device_list but it appears translating a device to a device handler using libusb_open…
Edmund Gentle
  • 736
  • 1
  • 6
  • 16
46
votes
12 answers

More than one file was found with OS independent path 'lib/x86/libusb.so'

I am using libusb in my android application. When I am trying to build libusb native library then I get below error message, *.so files generated. Error:Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'. More than one…
N Sharma
  • 33,489
  • 95
  • 256
  • 444
43
votes
12 answers

Pyusb on windows - no backend available

I'm trying to have my Python application interface with an NFC device via USB. The best option seems to be PyUSB, but I can't get it to connect to the libusb backend. I keep getting ValueError: No backend available I've looked at the stack trace,…
user634340
  • 431
  • 1
  • 4
  • 3
42
votes
4 answers

How to set up libusb on Mac OS X?

I'd like to try to make a user-space device driver using libusb on Mac, but I'm confused where to start. In the SDK installer (which I got from http://www.ellert.se/twain-sane) it said something about examples which I couldn't find anywhere on my…
Dae
  • 2,345
  • 2
  • 22
  • 34
40
votes
7 answers

How to install libusb in Ubuntu

I have a C program that have #include part in the header. I have download libusb-1.0.0 to my computer. If I simply copy libusb-1.0.0 folder to the folder where my C program is, it will not work. Therefore, I think I have to somehow install…
John
  • 3,888
  • 11
  • 46
  • 84
24
votes
3 answers

How to most properly use libusb to talk to connected USB devices?

How do I most properly use libusb to talk to connected USB devices? Specifically, how do I transfer data to the USB devices, receive information from the devices, find out the name of the connected device, if they have storage, etc. More…
user473973
  • 711
  • 2
  • 13
  • 23
20
votes
1 answer

How to set alternate setting for the USB device using libusb

I am trying to set alternate setting for the USB HUB device which has 5 interfaces. Following are the configurations for each interface. 1. Ifs= 5 Cfg#= 1 Atr=c0 MxPwr= 2mA A: FirstIf#= 0 IfCount= 1 Cls=08(stor.) Sub=06 Prot=50 A: …
kiran Biradar
  • 12,700
  • 3
  • 19
  • 44
18
votes
3 answers

How to use libusb and libusb_get_device_descriptor()?

I'm learning to use libusb v1.0.0 for the first time on Ubuntu 12.10. Here is some small test code I'm using to try and understand how to use this API: #include ... libusb_device **list; libusb_get_device_list(ctx, &list); //…
Stéphane
  • 19,459
  • 24
  • 95
  • 136
17
votes
2 answers

Android ADK with PC as USB Host with libusb, bulk transfer error

I'm trying to make my PC the USB Host for Android 2.3.4 devices in order to be able to develop APIs without needing actual "accessories". To do this, I need to establish the PC as the USB Host and the "device" (in my case a Nexus One running…
Colin M.
  • 455
  • 1
  • 5
  • 18
16
votes
3 answers

Determine USB device file Path

How can i get USB device file path correctly in Linux. I used command: find / -iname "usb" and got the result as below: /dev/bus/usb /sys/bus/usb /sys/bus/usb/drivers/usb /sys/kernel/debug/usb Under /dev/bus/usb i see: 001 002 003 004 005 …
Tiktac
  • 966
  • 1
  • 12
  • 32
15
votes
4 answers

How to give /dev/bus/usb permissions for libusb android applications?

i am developing an Application that uses libusb via jni. this application is currently targeted only to rooted, usb-host Android 3+ machines. the scenario is as follows: loads which wraps…
Nulldef
  • 151
  • 1
  • 1
  • 3
15
votes
2 answers

LibUsb claim interface access denied Java

I want to be able to read data from an USB pedometer. I'm trying this in Java and I'm using the LibUsb and Usb4Java libraries. I can't seem to claim the usb pipe or anything like that. The code I'm using: final Context context = new Context(); …
bram
  • 181
  • 1
  • 7
13
votes
2 answers

know a usb device's endpoint

Is there a bash command, a program or a libusb function (although I did not find one) which indicates me what are the OUT or IN endpoints of a usb device ? For example, bNumEndpoints of libusb_interface_descriptor (from libusb1.0 library) shows me…
Vulpo
  • 873
  • 1
  • 9
  • 25
12
votes
4 answers

Libusb undefined reference to

I'm trying to set up libusb API on my OS. I downloaded libusb api on libusb.org. I followed the standard installation procedure: cd into directory ./configure make make check //without errors make install Then I launched Eclipse C/C++ and copied…
Reshi
  • 799
  • 4
  • 15
  • 32
1
2 3
57 58