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
6
votes
3 answers

Unable to claim USB interface with C + libusb on Mac OS X

I've got a compound USB + CDC device I built using a PIC32 microcontroller, and I'm trying to connect to the device and send some data to the CDC data interface endpoint from my Mac. I know the circuit works 100%, as the device registers as both a…
josef.van.niekerk
  • 11,941
  • 20
  • 97
  • 157
5
votes
2 answers

libusb device descriptor: bcdUSB possible values

I'm developing a C app using libusb-1.0. I want to get some config parameters related to usb devices. My question is related to bcdUSB parameter. My code is like following: libusb_device *dev; struct libusb_device_descriptor desc; .... ret =…
Kallel Omar
  • 1,208
  • 2
  • 17
  • 51
5
votes
4 answers

docker --device works with absolute device path, fails with symlink

I have a USB GPIO device with some 3rd party drivers that I want to interface with in a container. Compiles, works fine on host. Also compiles, works fine in the container if I pass --device=/dev/bus/usb/001/$NUM where $NUM is the autogenerated path…
DeusXMachina
  • 1,239
  • 1
  • 18
  • 26
5
votes
1 answer

gcc - undefined reference to `libusb_init'

I'm trying to compile a piece of code which uses libusb: #include #include #include int main(void) { libusb_context *context = NULL; int rc = 0; rc = libusb_init(&context); assert(rc ==…
Henk Schurink
  • 419
  • 6
  • 17
5
votes
3 answers

Package libusb was not found in the pkg-config search path

I have installed pkg-config and libusb through brew Now if I do pkg-config --cflags --libs libusb I get below message Package libusb was not found in the pkg-config search path. Perhaps you should add the directory containing `libusb.pc' to…
nad
  • 2,640
  • 11
  • 55
  • 96
4
votes
2 answers

fatal error: libusb/libusb.h: No such file or directory librtlsdr install for GNU radio

Trying to install rtl-sdr (through git clone git://git.osmocom.org/rtl-sdr.git) thanks to the instructions here but can't go further than make in the first sequence of instructions: cd rtl-sdr/ mkdir build cd build cmake ../ make At my first try I…
Blupon
  • 959
  • 1
  • 12
  • 16
4
votes
0 answers

Writting a libusb based program to communicate with Ardino Uno

I wrote the following program to communicate with with an Arduino UNO. This test program let the user send one byte at a time from PC to the Arduino board. If the broad received byte sequence 65,71,67,68 UNO broad will blink the built-in LED and…
4
votes
1 answer

How can I transfer data to HID if it has not OUT Endpoint

I am trying to implement data exchange with some HID device. I managed to implement reading from this device using libusb_interrupt_transfer function, but I do not know how to implement sending a buffer to the HID, because device has not OUT…
Nina
  • 65
  • 1
  • 6
4
votes
1 answer

LibUSB C++ Format of USB transfer differs

I've been using stack overflow for a long time now, and most of the problems a solution is already available. It is the first time that I actually couldn't figure it out with the web. I hope someone has the answer to the following…
DiabetiMark
  • 113
  • 7
4
votes
3 answers

How do I receive HID reports using libusb-1.0?

I have a USB HID scale that I need to fetch the weighing reports from. I am able to do this on Linux by reading 7 bytes at a time from /dev/hidraw#, but I would like to get the same information using libusb-1.0. Even when I do get some non-null…
erjiang
  • 44,417
  • 10
  • 64
  • 100
4
votes
2 answers

Sending a message to a USB device using usb4java - Input/Output Error

I am trying to send a message to my USB device (Silicon Labs USB-UART Bridge) using this code: public void sendMessage(UsbInterface iface, String message, int i){ UsbPipe pipe = null; try { iface.claim(new…
pilgrimm
  • 43
  • 1
  • 5
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
1 answer

libusb callback_in function as a member of a class in C++

I have a problem defining and using the callback function in libusb_fill_bulk_transfer when called as a member of a class in C++. Here is the definition in the class: namespace usb_connector { class USBConnector { public: …
tik
  • 53
  • 7
4
votes
1 answer

HID USB access vs libusb

I need to access a USB device from C++ under Linux and am totally new to USB interfacing. The device I'm accessing does not come with any driver - but shows up as an HID device. The device is similar to a machine controller (simple shorts commands…
TSG
  • 4,242
  • 9
  • 61
  • 121
4
votes
1 answer

Hotplug event does not work libubs 1.0

I'm trying to implement device attach/detach events in my libusb-1.0 code from this example. Here is how I'm using it: void registerCallBack() { int rc; libusb_init(NULL); rc = libusb_hotplug_register_callback(NULL,…
Mitya XMitya
  • 1,129
  • 9
  • 17
1
2
3
14 15