Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should work on ARM with cibuddy Library? #48

Open
GoogleCodeExporter opened this issue Mar 28, 2015 · 7 comments
Open

Should work on ARM with cibuddy Library? #48

GoogleCodeExporter opened this issue Mar 28, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

Use javahidapi with cibuddy ARM library.

What is the expected output? What do you see instead?

Device should open, but "open" returns null.

What version of the product are you using? On what operating system?

javahidapi 1.1 on Raspbian Wheezy (Linex 3.2.27, armv6l)

Please provide any additional information below.

I'm trying to get the code working on a Raspberry Pi (ARM v6, soft floating 
point).

In the absence of an ARM binary as part of javahidapi I tried:

  https://github.com/cibuddy/cibuddy/tree/master/drivers/hid/src/main/resources/lib/linux/arm6

This looks hopeful as "listDevices" finds the device I'm interested in:

  HIDDeviceInfo [path=0001:0004:00, vendor_id=4062, product_id=51713, serial_number=null, release_number=770, manufacturer_string=null, product_string=null, usage_page=0, usage=0, interface_number=0]

However, when I "open" this device I get null.

Any inspirations, or plans to provide an ARM binary of your own?

Original issue reported on code.google.com by [email protected] on 1 Feb 2013 at 2:16

@GoogleCodeExporter
Copy link
Author

In case this helps anyone finding this post...

I turns out that the cibuddy library does work OK - but only as root. I was 
able to fix this for ordinary users by creating a rules file in 
"/etc/udev/rules.d" containing:

  SUBSYSTEM=="usb", GROUP="staff", MODE="0660"

which gives users in group "staff" read/write access to all USB devices.

So this is a non-issue, though it would still be useful if a Linux/ARM library 
were bundled with javahidapi.

Original comment by [email protected] on 8 Feb 2013 at 2:07

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

I compiled from source a version of libhidapi-jni.so on the default Raspbian 
build (w/ hardware floating point). I've attached it.

I also downloaded Oracle's JDK 8 for Arm and rebuilt the entire hidapi-1.1.jar 
library and have also attached that. I may have made mistakes in the build 
process (I am not an experienced linux coder), but it works for my 
applications. I've attached the library. I had to make minor modifications to 
build.xml to build with Java 8.

Original comment by [email protected] on 13 Feb 2013 at 9:21

  • Added labels: ****
  • Removed labels: ****

Attachments:

@GoogleCodeExporter
Copy link
Author

That's excellent thank you! I'll try these out.

Original comment by [email protected] on 13 Feb 2013 at 9:58

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Mostly for my own sake I wrote down everything I did to build the native 
library and the jar. Hope it helps, and since I did this partially from memory, 
please let me know if anything is wrong:
http://www.finchrobot.com/compiling-javahidapi-raspberry-pi

Original comment by [email protected] on 14 Feb 2013 at 7:04

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

I used the new JAR and library on a Raspberry Pi with the USB device in 
question (a weather station that appears as a Human Interface Device). I'm 
pleased to report that everything works fine. Many thanks for your efforts, 
which I'm sure that others will also appreciate.

Original comment by [email protected] on 15 Feb 2013 at 10:10

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Incidentally, for some reason (different version of Raspbian?) I found it was 
necessary on another Raspberry Pi to define the udev rule as:

  SUBSYSTEMS=="usb", GROUP="staff", MODE="0660"

Original comment by [email protected] on 15 Feb 2013 at 10:13

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

I am trying to use this on an udoo duo device, but i get

Exception in thread "main" java.lang.UnsatisfiedLinkError: init

shouldnt the arm library work on any arm based device?
I even compiled the lib by myself, same problem. Any glue about the deeper 
problem?

Original comment by [email protected] on 19 Feb 2014 at 3:43

  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant