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

Update JNA to enable client to run on Raspberry Pi #200

Open
sdixon99 opened this issue Jan 11, 2014 · 3 comments
Open

Update JNA to enable client to run on Raspberry Pi #200

sdixon99 opened this issue Jan 11, 2014 · 3 comments

Comments

@sdixon99
Copy link

If you update the JNA code in plugins/org.rxtx-2.2.0-10.jar to the latest version from https://github.com/twall/jna (using the contents of their file dist/jna.jar), that will include the libjnidispatch.so for linux-arm architecture which will allow the OLS client to run on raspberry pi. I suspect this would also enable running on other ARM based SBCs like the beaglebone black but I don't have the hardware to check. No other changes seem necessary although it might be a good idea to experiment with the JVM memory setting in run.sh to see what the optimum memory allocation is for these small machines. Startup of the client is slow but other interactions are fast enough to be useable.

@c-wall
Copy link

c-wall commented Feb 11, 2015

I can confirm that this also worked on Odroid U3, quad cortex A9 running Lubuntu 14.04 with ols-0.9.7.2 with oracle java 7. OLS was giving errors every time I tried to connect to the Bus Pirate. Just remember the org.rxtx-2.2.0-10.jar is a zip file, copy it and unzip it some where else, then do the change suggested by sdixon99, re-zip it and change the name of the new zip file back to the original name and then replace the one in plugins/

Carl

@wjbillett
Copy link

Hello. I have been trying to get this to work on raspberry pi as well and I keep running into the same problem. The ols client starts up but whenever I interact with the com port (eg use the capture menu or terminal tool) it throws an exception:

java.lang.UnsatisfiedLinkError: JNA native support (/com/sun/jna/linux-arm/libjnidispatch.so) not found in resource path

I have preformed the above procedure and the arm files appear to be present in the correct directory structure inside the .jar file. I was wondering if you might point me in the right direction for fixing this. I don't know a lot about Linux. I am using the raspbian kernel loaded by the Noobs menu. Don't know if this might be the problem.

@wjbillett
Copy link

I am answering my own question in case it helps others who might try to do this. I fixed the above problem but after hours of trying I could not get this to run under Jre8 without throwing multiple exceptions. However I installed Maven 3 with apt-get (jdk8 is already installed if you used Noobs Raspian) and I followed Mr Janssen's instructions for cloning ols.git and rebuilding the project on the pi. I still had to update the JNA code in plugins directory as described in the first post. I unpacked the org.rxtx-2.2.0-10 and replaced with updated versions of the com/.../jna directory and the other files then repackaged (btw Raspian has unzip installed by default but not zip so you can get this with apt-get as well if not on your pi). Only way I could get it to work.

lavachemist added a commit to lavachemist/ols that referenced this issue Sep 2, 2022
This change replaces JNA version 3.5.1 with JNA version 5.12.1 so that OLS will run on Raspberry Pi and other ARM platforms.

Changes:
1) replaced rxtx/jna-3.5.1.jar with rxtx/jna-5.12.1.jar
2) updated rxtx/pom.xml

References:
jawi#200
https://github.com/java-native-access/jna/releases/tag/5.12.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants