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
8
votes
2 answers

pyusb: cannot set configuration

I am trying to make a script (on linux) that can turn a light in my mouse on or off. This is the code I have so far: import usb.core import usb.util import sys interface = 0 dev = usb.core.find(idVendor=0x1532, idProduct=0x0017) def main(): …
Jim
  • 995
  • 2
  • 11
  • 28
8
votes
2 answers

Compiling against libusb-dev on Ubuntu

I am trying to compile the example libusb.c provided by libusb package (if you dl the source code.) It doesn't work to say the least. #include #include #include That causes it to fail, there is no…
J. Martin
  • 1,683
  • 2
  • 17
  • 33
8
votes
1 answer

`libusb_attach_kernel_driver` not working

I have a problem shutting down cleanly my Linux application that uses libusb (the kernel does not reclaim the interface): int rc; rc = libusb_reset_device(handle_); if (rc < 0) { cerr << "Error resetting the device: " <<…
major4x
  • 432
  • 3
  • 15
7
votes
5 answers

PyUSB: SCPI communication with OWON Oscilloscope

This is an updated and shortened question. Communicating with a USB-device should be easy via PyUSB. So, I'm trying to read from a USB-device (oscilloscope) using PyUSB under Win10. Apparently, the USB-driver (libusb-win32 v1.2.6.0) is installed…
theozh
  • 22,244
  • 5
  • 28
  • 72
7
votes
3 answers

Pyusb on Windows 7 cannot find any devices

So I installed Pyusb 1.0.0-alpha-1 Under Windows, I cannot get any handles to usb devices. >>> import usb.core >>> print usb.core.find() None I do have 1 usb device plugged in(idVendor=0x04d8, idProduct=0x0042), and I tried…
Ponkadoodle
  • 5,777
  • 5
  • 38
  • 62
7
votes
0 answers

Turn off specific USB port in windows with python

This is my first post, and I kind of have seen that the more specific the better, so I'll try to be super clear, and thanks in advance! What I want: I need to scan images from 2 or more scanners at the same time, these scanners are from the same…
7
votes
1 answer

libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=2 - What am I doing wrong with LibUSB?

Ok, I'm probably doing something dumb, but I can't get libusb to let me transfer data to my device for the life of me. Code: #include #include #include #include #include #include…
Fake Name
  • 5,556
  • 5
  • 44
  • 66
7
votes
1 answer

What are consequences of not calling libusb_exit()

I am writing a userspace program which interacts with the USB video playback controller. I am programming in C++ and the program is intended to run on Linux. While studying the libusb manual I came across the void libusb_exit ( struct libusb_context…
VL-80
  • 517
  • 13
  • 29
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
7
votes
1 answer

USB Programming with Objective-C

Can anyone tell me how to program USB devices with Objective-C as an iPhone application? I want to access USB device contents through iPhone
Paresh Thakor
  • 1,795
  • 2
  • 27
  • 47
7
votes
1 answer

libusb_claim_interface fails on Mac OS X Mountain Lion

I've searched for hours with no avail. I've seen it everywhere that libusb_detach_kernel_driver isn't supported on Mac OS X, but I haven't been able to find a patch or alternative for it. libusb_claim_interface returns this: libusb: 0.863377 error…
George Morgan
  • 669
  • 10
  • 23
7
votes
2 answers

libusb bulk transfer

I am trying to implement user space usb driver using libusb1.0.9. I have lpc2148 blueboard(ARM7) with me..This board is loaded with opensource USB stack/firmware by Mr. Bertrik Sikken. Now my user space driver is trying read write with board. I am…
swappy
  • 73
  • 1
  • 1
  • 4
7
votes
1 answer

USB permission obtained via android.hardware.usb does not apply to NDK

I was able to obtain a permission to communicate with a device via Android's USB Host API. private static final String ACTION_USB_PERMISSION = "com.android.example.USB_PERMISSION"; protected void execute(Context ctxt) { UsbManager manager =…
Martin Marinov
  • 1,167
  • 3
  • 15
  • 25
6
votes
2 answers

libusb interrupt transfer

I need to reverse engineer a driver for custom made HID USB device (some buttons and leds on an control panel). The driver is only available on Windows and we need a *nix implementation. The device apparently is a HID device although not of a…
Arne
  • 1,111
  • 2
  • 11
  • 22
6
votes
0 answers

Logitech keyboard on linux, could not set config as device or resource is busy

I have a Logitech G613 keyboard for linux. It works fine except that the G(1-6) keys are mapped to F(1-6) by default and there is no way to remap them without remapping the F keys. So, I went through a lot of resources on the internet and found…
Ashish
  • 620
  • 8
  • 25
1 2
3
57 58