mamech
Posts: 6
Joined: Sun Sep 03, 2017 12:02 pm

RXTX library with RPI3

Sun Sep 03, 2017 12:10 pm

Hello

I have developed before a Java application that uses RXTX library on Raspberry Pi 2 B+ , and I used a file librxtxSerial.so that enabled the application to deal with the USB port for serial communication with USB2Serial converter.

my question now, I am developing another application for Raspberry Pi 3, and I know that architecture of it is different, so my question is : will the same application work with same librxtxSerial.so that worked with Raspberry Pi 2 B+??
and if I must change librxtxSerial.so to another file that suits Raspberry Pi 3, from where can I download it?

thanks for help

User avatar
topguy
Posts: 3593
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: RXTX library with RPI3

Sun Sep 03, 2017 7:56 pm

Any smart implementation of RXTX library for Linux should use the standard Linux methods to talk to serialports and ttys so then it shouldnt matter which hardware you have. USb2serial devices get named /dev/ttyUSB0 and works the same on most linux'es.

mamech
Posts: 6
Joined: Sun Sep 03, 2017 12:02 pm

Re: RXTX library with RPI3

Mon Sep 04, 2017 5:10 pm

topguy wrote:
Sun Sep 03, 2017 7:56 pm
Any smart implementation of RXTX library for Linux should use the standard Linux methods to talk to serialports and ttys so then it shouldnt matter which hardware you have. USb2serial devices get named /dev/ttyUSB0 and works the same on most linux'es.
Actually what happened in my case when I made java application on Raspberry Pi 2. I had to import RXTX library in my code, and I thought that this will be enough, but I got an error because the librxtxSerial.so was not found while running the application. My application could not communicate with serial until I got the correct librxtxSerial.so that suits Raspberry Pi 2.
I may conclude from your words, that the librxtxSerial.so that worked with RPI2 should work also for RPI3?

please look at this post:
https://blogs.oracle.com/jtc/serial-por ... e-embedded

in the final part they have written:
"The RXTXcomm.jar file can be downloaded here. To spare you the effort, a few pre-built versions of librxtxSerial-2.1-7.so are provided at this location:

librxtxSerial-2.1-7.so for ARMv5 based Plug Computers
librxtxSerial-2.1-7.so for ARMv6l armel based systems (e.g. original Raspberry Pi Debian distro)
librxtxSerial-2.1.7.so for ARMv6l armhf (hard float) systems (e.g. Raspberry Pi Raspbian distro)
librxtxSerial-2.1-7.so for ARMv7l architecture - Many thanks to Daniel Ryan"

so does not this mean, that there is librxtxSerial.so for different versions of ARM? and consequently, as RPI2 core is different from RPI3 core,then there must be librxtxSerial.so that works for RPI3??

I just want to know, which one of above mentioned librxtxSerial.so should I use with RPI3 for correct java RXTX library usage?

User avatar
topguy
Posts: 3593
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: RXTX library with RPI3

Mon Sep 04, 2017 11:57 pm

librxtxSerial-2.1.7.so for ARMv6l armhf (hard float) systems (e.g. Raspberry Pi Raspbian distro)
I believe this one should work for BOTH RPi2 and RPi3.

Code: Select all

librxtxSerial-2.1-7.so for ARMv7l architecture - Many thanks to Daniel Ryan"
I believe this one may ONLY works for RPI3.

I think you are fairly safe with the first one.

nadgetastic
Posts: 9
Joined: Mon May 25, 2015 9:17 pm

Re: RXTX library with RPI3

Fri Sep 15, 2017 5:51 pm

I realise this won't be welcome news to you but why are you using RxTx?
It isn't supported by anyone anymore and has all kinds of installation issues.
Take a look at http://fazecast.github.io/jSerialComm/ - it has almost identical features and methods but comes packaged with the binaries for Raspbian/Linux so you don't have to worry about making sure the .so files are stashed in the right places etc.

I use it on both the https://github.com/steveohara/j2mod and https://github.com/steveohara/enocean4j libraries for our SMARTset Pi application

Steve

Return to “Java”

Who is online

Users browsing this forum: No registered users and 2 guests