NeuronRobotics / nrjavaserial

A Java Serial Port system. This is a fork of the RXTX project that uses in jar loading of the native code.
Other
345 stars 143 forks source link

NRJavaSerial Not working on rPi2. #91

Closed carryonrewardless closed 7 years ago

carryonrewardless commented 7 years ago

My concern is similar to this one: https://github.com/NeuronRobotics/nrjavaserial/issues/88 with a change from 3.9 to 3.12 in Openhab2 causing an error: /dev/ttyAMA0 does not exist for the Razberry zwave card that sits on the Raspberry Pi 2 gpio pins. Prior to the change the device was detected quite successfully using this Java option: -Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0 Potential permissions issues have been thoroughly exhausted but I believe this issue may be specific to Debian Wheezy on the Raspberry Pi version 2. I am not a developer but hope I have provided enough information.

madhephaestus commented 7 years ago

if you do ls -al /dev/ttyAMA0 && groups what do you get?

Does putty work? Any other serial communication tool?

jvalkeal commented 7 years ago

@carryonrewardless I had similar issues with my RPi3 and when I poked around a little deeper actual error was.

java.lang.UnsatisfiedLinkError: /tmp/libNRJavaSerial_HF_pi_0/libNRJavaSerial_HF.so: liblockdev.so.1: cannot open shared object file: No such file or directory

Got it working by installing dependant library.

sudo apt-get install liblockdev1

Worth to check if this is a case in your system as well.

jvalkeal commented 7 years ago

@madhephaestus is liblockdev really needed for arm or is it just a mistake that it's linked to library?

carryonrewardless commented 7 years ago

Thanks for the comments. The liblockdev1 library does fix the problem on the RPi3 but not the RPi2 on Wheezy. The answer came from cvanorman : "The current build of nrjavaserial requires glibc >= 2.15. Debian Wheezy has glibc 2.13 and so it will crash on that platform". As a result I moved on to Jessie and my problem ended.

madhephaestus commented 7 years ago

Soundls like this is all fixed now?