Questions tagged [usb4java]

usb4java is a Java library to access USB devices.

usb4java is a Java library to access USB devices. It is based on the native libusb 1.0 library and uses Java NIO buffers for data exchange between libusb and Java. usb4java also supports the javax-usb standard (JSR-80) through the usb4java-javax extension.

Supported platforms are Linux (x86 32/64 bit, ARM 32 bit), OS X (x86 32/64 bit) and Windows (x86 32/64 bit). But other platforms may work as well (as long as they have at least Java 6 and are supported by libusb) by compiling the JNI library manually.

Source: http://usb4java.org/

69 questions
2
votes
1 answer

usb4java USB error 4: Unable to open USB device: No such device (it may have been disconnected)

I have this code: package prospa8wusb; import javax.swing.JOptionPane; import org.usb4java.Device; import org.usb4java.DeviceDescriptor; import org.usb4java.DeviceHandle; import org.usb4java.DeviceList; import org.usb4java.LibUsb; import…
javac31
  • 91
  • 2
  • 11
2
votes
0 answers

LibUsb getting error timeout -7 on read transfer

I have been using the usb4java library and got to understand a lot of how a USB device communicates. I'm using the usb4java low level API (LibUsb 1.0) library in my web application to read a barcode scanner input in Raspberry Pi. The Raspberry Pi is…
Pippos
  • 76
  • 2
  • 7
2
votes
1 answer

usb4Java USB error 3: Unable to open USB device: Access denied (insufficient permissions)

I'm using Windows 10 and Java through Eclipse. I'm pretty new to programming and have been working on a project that requires reading in data from a USB Device. When I run the LibUsb.open(device, Handle) I receive the following error: USB error 3:…
user2012841
  • 33
  • 1
  • 5
2
votes
0 answers

Read string from USB HID RFID Reader with Java

I'm trying to read a String from a via USB connected RFID-Reader. The Reader is recognized correctly inside my appliaction. But I do not know how to read the transferred characters into a String. If I do not detach the device, the String is printed…
blaine
  • 155
  • 1
  • 10
2
votes
1 answer

Usb4java alternate setting

I have a device, with which I have to communicate with, through USB. It has 1 active configuration, that has 1 interface. The interface has more alternate settings (IDLE, PROF1, PROF2). By default IDLE is active. My question is, that how can I make…
robert
  • 21
  • 1
2
votes
0 answers

USB Error 2: Invalid Parameter on Windows 7, Not on Ubuntu

I'm working on a semi-cross platform USB Control Library in Java for a custom USB transceiver. Most of the work was done in Ubuntu, and for a short while the control library (and the form I built to test it) worked just fine (except that the form…
Will
  • 3,413
  • 7
  • 50
  • 107
2
votes
0 answers

Get name of USB device in linux using usb4java

I want to get the name of the USB disk with its path in Linux eg. "/media/Disk_data".Following is my method private static void dumpDevice(Device device) throws LibUsbException { final int address = LibUsb.getDeviceAddress(device); …
rns
  • 1,047
  • 10
  • 25
1
vote
2 answers

Get drive letters of USB 3.0 devices (Java under Windows)

My Java program needs to get a list of the drive letters of connected USB devices, but only those that support USB 3.0 (both the device and the USB port it is plugged into, so that it works with high speed). Currently I try to use WMI through a…
Ruik
  • 1,222
  • 1
  • 20
  • 36
1
vote
0 answers

USB error 9: Unable to submit control message: Pipe error

I'm trying to mimic a software that is sending usb commands to a device. But I'm getting an error when sending the control command towards the device. public static void main(String[] args) throws UsbException { UsbController usb = new…
user2352084
  • 125
  • 10
1
vote
0 answers

How to Set BaudRate in order to communicate with USB CDC Serial

In the above program im trying to write and read data to Atmel Sama5d3Xplained Board using Java(ie USB4JAVA package) Usb Programming. Someone Please help me to Set BaudRate...so that i can try to communicate with Sama5d3Xplained board in order to…
Ravikiran
  • 45
  • 11
1
vote
0 answers

usb4java: Unable to submit control message: Input/Output Error

I am trying to replicate the following URB_CONTROL packet which I captured with Wireshark: 0000 80 87 11 fe f2 8a ff ff 53 02 00 02 03 00 00 00 ........S....... 0010 05 30 25 5b 00 00 00 00 1c 84 02 00 8d ff ff ff .0%[............ 0020 08 00…
Henk Schurink
  • 419
  • 6
  • 17
1
vote
0 answers

Invalid parameters : Control transfer: Usb4java (Check Reader)

i'm developing a program with java and mainly with the api usb4java. I succeed in finding the port of the usb device . My purpose now is to write in the port (transfer data from host to the device) . I used the fonction bulk tansfer (LibUSB) but i…
sofia
  • 11
  • 1
1
vote
0 answers

Java (Raspberry PI and Windows) read DYMO Scale

I'm creating a JAVA application that needs to be able to run on windows and on a raspberry pi. The application needs to connect with a DYMO USB Scale. When I check with the device monitoring studio is see that I receive the data.Device Monitoring…
Dider Kerckhof
  • 51
  • 1
  • 2
  • 4
1
vote
1 answer

Is it possible to send Sms from android phone using adb protocol

I want to send SMS from android phone connecting to my computer using USB. I am suing usb4Java library. I have accessed the phone and send adb commands to phone according to the link usb4java-javax-examples. Here is the code and output. public…
Basit
  • 8,426
  • 46
  • 116
  • 196
1
vote
0 answers

Claiming USB device on OS X with usb4java fails

I've written a demo application with JavaFX GUI which has to read a serial and a some kind of hardware ID from an USB device. I'm using the javax.usb (usb4java) library org.usb4java
justus
  • 584
  • 1
  • 7
  • 19