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

libusb and poll / select

I'm using a linux OS and was wondering if there were any file descriptors I could poll/select which would trigger when data was waiting to be read from a usb device. I am also using the libusb library and have yet to find file descriptors which I…
Tez
  • 743
  • 6
  • 18
2
votes
0 answers

Reading values from a Power Meter via USB

Over the past two days, I am doing some reading on how to get data over USB from an external device which has no device driver installed. I have to read data from a WT500 Yokogawa Power Meter (basically I want to read just one of the parameter that…
Sayan
  • 2,662
  • 10
  • 41
  • 56
2
votes
1 answer

libusb-1.0 debug informations

I’m wondering if libusb_set_debug() works. I can’t get any output from it. I can turn on debug logging if I configure and build with --enable-debug-log. Should I get about the same output as enable-debug-log if I set libusb_set_debug() to 3? I don’t…
luca
  • 21
  • 1
  • 4
2
votes
1 answer

`pyusb` fails to find `libusb` when using `pyinstaller`

Problem My application works well when in python-only and on my machine. I am attempting to deploy to a machine which has lesser privileges. The basic script that I am attempting to run at the moment: import logging import…
slightlynybbled
  • 2,408
  • 2
  • 20
  • 38
2
votes
1 answer

What is passed as the user_data in libusb_fill_bulk_transfer?

I have a working code which seems to be correctly reading the data through the usb using libusb_fill_bulk_transfer(libusb_transfer* transfer, libusb_device_handle * dev_handle, unsigned char endpoint, unsigned char* buffer, int length,…
warrior_monk
  • 383
  • 2
  • 14
2
votes
1 answer

libusb_control_transfer very slow with Vmware Workstation

I use libusb using the libusb_control_transfer function to send information to a USB device.  My host is WINDOWS 10 and my guest is Ubuntu 20.04 within Vmware Workstation version 16.2.3. The problem is that communication using the…
vtable
  • 302
  • 2
  • 15
2
votes
1 answer

Emulating USBHID traffic with Libusb 1.0.25

I'm currently trying to emulate the traffic sent to/from a HID device using libusb. The traffic is sniffed using wireshark and USBPcap. I emulated the first packets by requesting the descriptors and setting configuration etc. But at this point…
Quasi-modo
  • 23
  • 3
2
votes
0 answers

Getting Libusb_Error_IO error while performing libusb_bulk_transfer DataIN ubuntu OS reading data from usb device

Thanks in advance. I am having 2 USB devices (master and slave). I am able to write data from master to slave but not able to read data from slave to master USB device I am getting   "LIBUSB_ERROR_IO" Error. The code has complete root access. The…
2
votes
2 answers

When using text() with python-escpos I get [Errno None] and key error = 1 (windows 10)

I am trying to print to a TM-T20II thermal printer so I can print receipts. Here is my code: from escpos import printer from escpos import * import escpos from escpos import config import usb.core import usb.util import usb.backend.libusb1 from…
maxxslatt
  • 43
  • 6
2
votes
1 answer

Is it possible to create multiple connection instances to same USB device using libusb?

I am considering how to create a multithreaded application to send non-sequential messages to a USB device using libusb. The two options are: create a single USB device connection and have multiple threads share that single connection? create…
bph
  • 10,728
  • 15
  • 60
  • 135
2
votes
2 answers

c++ libusb: how to send data to device?

Good day. I'm progrmming interface for "MGX Analog Signal Generator N5181B" with libusb. For a starting I have to init device, so next step is send data. For example I wanna change frequency that will displayed in generator. My code: #include…
Denny
  • 103
  • 8
2
votes
1 answer

Why does the read with lsusb fails?

I need to read the response from a control unit of a motor. After the write of a command beginning with ?, the motor unit should respond with some text. I.e. on ?MSG it should report its status. But when I try to read the status the unit sends…
Kostrahb
  • 709
  • 1
  • 9
  • 21
2
votes
0 answers

OSX/pyusb/libusb1: Cant read from device

I'm trying to perform bulk read and write operations on a USB-to-Ethernet device using pyusb with libus1 as backend. The code: dev = usb.core.find(idVendor=..., idProduct=...) if dev.is_kernel_driver_active(0) is True: …
blap
  • 76
  • 6
2
votes
1 answer

Status thermal printer with libusb on linux ARM

I known there is a lot of question about status printer ... i have a Citizen CT-S310 II, i have managed all the code for write character in USB without problem with libusb_bulk_transfer (Text, Bold, Center, CR, CUT_PAPER etc) : #define ENDPOINT_OUT …
2
votes
1 answer

libusb-1.0 libusb_get_device_list() failure

Also tested with -Wall and -std=c99 and c11 (not working of course) $ gcc -o usb -L/usr/local/lib -lusb-1.0 -I/usr/local/include usbtest.c Output: usbtest.c: In function ‘main’: usbtest.c:14:1: error: label ‘brd_ftdi’ used but not defined …