You are not logged in.

#1 2016-04-22 21:32:18

Canberk Sönmez
Member
Registered: 2015-11-14
Posts: 4

Making java-rxtx work

How can I make java-rxtx library work? I tried almost everything on the Internet to work with rxtx library, but still my Java application cannot find any serial ports.
Here is the list of the things I did:
- I installed java-rxtx from repositories
- I added rxtx to my project
- I added my user to tty lock and uucp groups
- I made chmod 777 on /var/lock
- I added "System.setProperty("gnu.io.rxtx.SerialPorts", "/dev/ttyACM0");" to make it find my serial port
- I tried to execute my java program as root
The java programs I tried are in  http://rxtx.qbang.org/wiki/index.php/Examples.
So, what can I do else?

Offline

#2 2016-04-23 00:00:02

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: Making java-rxtx work

Have you tried reviewing some of the sample code? I think the simplewrite.java program listend in the "hello world" section was particularly helpful when I last used the RxTx library but I do not see it available for download anymore. It looks like the link is broken. It's also a bit finicky at times with what type of serial port you have. Do you have a USB serial port that you can try as well?


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#3 2016-04-23 07:54:27

Canberk Sönmez
Member
Registered: 2015-11-14
Posts: 4

Re: Making java-rxtx work

Yes, I have tried some sample code. And I also have a USB serial port which I can try. It works nice with jSSC. The problem occurs with rxtx.

Offline

Board footer

Powered by FluxBB