gary-rowe / hid4java

A cross-platform Java Native Access (JNA) wrapper for the libusb/hidapi library. Works out of the box on Windows/Mac/Linux.
MIT License
223 stars 70 forks source link

HID write always fails with 64bit OS running under Raspberry PI 4 #126

Closed ghost closed 3 months ago

ghost commented 2 years ago

Describe the bug The HID device attaches and opens successfully. But the following code always fails and returns -1:

private static final byte[] message; static { message = new byte[] { 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, (byte) 0xff, (byte) 0x80, 0x00, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; } int bytesWritten = hidDevice.write( message, 16, 0);

To Reproduce Steps to reproduce the behavior:

  1. Fails under 32 & 64 bit Raspbian OS on Raspberry PI 4B.
  2. Runs OK under 32 bit Raspbian OS on Raspberry PI 3B

Expected behavior The number of bytes send successfully (17) should be returned.

gary-rowe commented 1 year ago

Can you try this code on your devices with the latest build from develop - it may have resolved the issue.

gary-rowe commented 3 months ago

Closing due to inactivity