How do I get Java to use the serial port in Linux?
Posted
by Phillip Gibb
on Stack Overflow
See other posts from Stack Overflow
or by Phillip Gibb
Published on 2009-03-12T13:10:18Z
Indexed on
2010/03/20
19:21 UTC
Read the original article
Hit count: 458
We make use of a java application that manages a pinpad via the serial port. This works perfectly on windows with the Sun Comm.jar, the supplied dll and the properties file.
Now we are attempting to use this solution on Linux (actually it does run on various other flavours of linux out in the field) - with Ubuntu server mode.
After much attempts - blood, sweat and almost tears we have this scenario:
Java version 1.4.2_17 Linux - Ubuntu Comm libs - Comm3 supplied by sun with the default driver specified
An external comm test shows the comm ports: /dev/ttyS0 and /dev/ttyS1 But the java application says unable to open port /dev/ttyS1
(using the RXRT files produces invalid port errors)
Has anyone been able to use java 1.4.2 on linux for serial port communication and found a solution that I could apply in my scenario?
greatly appreciated
Phill
© Stack Overflow or respective owner