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
0
votes
1 answer

Encountering offset for logical block address in libusb using xusb.c example code?

I'm using the example file xusb.c in the libusb library to talk to a flash drive and have modified the command descriptor block of the read(10) in the test_mass_storage function by setting bytes 2-5 to set the logical block address parameter.…
Kyle Cooley
  • 115
  • 2
  • 7
0
votes
1 answer

How to setup libusb for a conda Python environment in Mac

So I'm trying to use pyusb in a conda environment but it fails with error below: >>> import usb.core >>> usb.core.find() Traceback (most recent call last): File "", line 1, in File…
Milad
  • 4,901
  • 5
  • 32
  • 43
0
votes
1 answer

LIBUSB Asynchronous Bulk Transfer Timeout On Linux Ubuntu

I am using libusb on Ubuntu and am attempting to send 4 bytes of data via an asynchronous bulk transfer. I am able to successfully perform the following steps:1. Allocate the transfer via libusb_alloc_transfer. Fill the bulk transfer via…
HighExodus
  • 104
  • 2
  • 11
0
votes
1 answer

Communicate to Android Tablet via USB in AM335x

I am developing an embedded device on TIs AM3352. It has a USB OTG port and I want to connect an android tablet to it and communicate to it via a C application. I have cross-compiled libusb-1.0 for usb communication. First I tried to detect any…
0
votes
1 answer

How is interaction with CDC device with no interface endpoints working?

I'm working on uploading to Digispark board. It uses micronucleus bootloader and i can see uploader code. I've modified it a bit to see interfaces and endpoints count: nucleus->device = usb_open(dev); // added by me - start int…
4ntoine
  • 19,816
  • 21
  • 96
  • 220
0
votes
1 answer

Maximum length of libusb bulk transfer

Is there a maximum length of bulk transfers when using libusb in Linux? For example can you pass any positive value as the length parameter of the function libusb_fill_bulk_transfer?
User55412
  • 882
  • 2
  • 10
  • 27
0
votes
0 answers

Programmatically detect USB over IP connected device

Is there a way to detect whether a device is physically connected to a computer, versus an USB over IP connection? At first glance, libusb offers no way to tell them apart. I am still digging into its code though.
0
votes
1 answer

Correct format for writing data to Datalogic PM9500 Scanner in c++ libusb

I'm currently working with the **PM9500 scanner (4-key model)**from Datalogic and trying to send a message to the screen after a certain event triggers. I've been looking all over for a correct way to format the messages, but everything I have tried…
0
votes
1 answer

Error getting number of devices using Libusb-win32-1.2.6.0

I am trying to run a simple code written with libusb-win32 on VS2010 to get information about the USB devices connected. I cannot get it run sucessfully. #include #include #include "lusb0_usb.h" int verbose = 1; int…
anna.sarp
  • 187
  • 2
  • 14
0
votes
0 answers

How to solve error when trying to compile usb camera driver for linux (libusb linker)

I'm trying to compile an usb camera driver for debian, but when I run make command I'm getting some errors. Below you can see the output: cd ./pco_classes && make make[1]: Entering directory '/home/gm/PCO/pco_camera/pco_usb/pco_classes' g++ -O2…
Gabriel Schubert
  • 165
  • 4
  • 12
0
votes
0 answers

How to use libusb to transfer bytes from android host to another machine which runs on windows

I am developing android application where I need to transfer bytes from android device (host) to another device which runs on windows via USB. I came across libusb library which only works on host mode, so I am developing an android application for…
N Sharma
  • 33,489
  • 95
  • 256
  • 444
0
votes
2 answers

Android N libusb_init returns -1 failed to initialize libusb

I am using libusb library in my android application. I build this library and added *.so files for all architecture. I am calling libusb_init to initialize it but it returns -1 always. I am not sure if this permission issue or what. failed to…
N Sharma
  • 33,489
  • 95
  • 256
  • 444
0
votes
0 answers

How to find the implementation of a specific 'ioctl' call?

Where can I find the file which includes the implementation of the following ioctl call: ioctl(dpriv->fd, IOCTL_USBFS_SUBMITURB, urb); #define IOCTL_USBFS_SUBMITURB _IOR('U', 10, struct usbfs_urb) file descriptor is for a usb device.
0
votes
2 answers

pyusb won't install

I'm trying to setup some python scripts for controlling low-level USB functions. In order to do this, I've found that two libraries need to be installed: libusb and pyusb. I first installed libusb and was successful, but now I'm having problems…
hao_maike
  • 2,929
  • 5
  • 26
  • 31
0
votes
1 answer

How to identify the data bytes used for CRC(checksum) in an USB ISO-Transfer?

I'm using libusb to get data in real time from an USB audio device. My Max Packet Size is of 196 bytes. I know that 4 of that bytes are added for the checksum. I want to identify the bytes used to the checksum so I can store only the usefull data of…
DrCachetes
  • 954
  • 1
  • 9
  • 30