Posts: 4
Joined: Sun Feb 03, 2013 11:53 am

RXTX - CommPortIdentifier

Sun Feb 03, 2013 12:10 pm


I want to create a serial connection between raspberry pi and arduino due.

My problem is that CommPortIdentifier.getPortIdentifier(portName) throws an expression:

My code:

Code: Select all

		CommPortIdentifier portIdentifier = CommPortIdentifier
This is the errorcode:

Code: Select all

        at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269)
        at main.connect(main.java:17)
        at main.main(main.java:129)
The function CommPortIdentifier.getPortIdentifiers(); does not list any ports.

The code is running fine on windows. Are there any permissions or releases due to /dev/ttyAMA0 to define?

The funny thing is that minicom and gtkterm work even without su i just cant get it work for java.


Posts: 8
Joined: Mon Feb 11, 2013 1:19 pm

Re: RXTX - CommPortIdentifier

Mon Feb 11, 2013 1:35 pm

Try this command:
sudo ln -s /dev/ttyAMA0 /dev/ttyS80
and use ttyS80, other option is pi4j for work directly with ttyAMA0
i tested sucessfully pi4j for communicate raspi and arduino.

Note: Sorry for my english :P

Return to “Java”

Who is online

Users browsing this forum: No registered users and 3 guests