I have installed the RXTX Java library rxtx-2.1-7-bins-r2 in Ubuntu 14.04 32 bit machine with JDK8. I would like to communicate with Arduino Micro connected to the serial port. But I am not able to see the serial port until I create a soft link.
I have download the RXTX binaries at this link then installed JDK 8 using a WebUpd8 PPA I have installed the binary using the code
sudo cp RXTXcomm.jar /usr/lib/jvm/java-8-oracle/jre/lib/ext/
sudo cp Linux/i686-unknown-linux-gnu/librxtx* /usr/lib/jvm/java-8-oracle/jre/lib/i386/Add the user in group lock or uucp using the code
sudo usermod -aG uucp userSet the read/write the serial port permission
sudo usermod -a -G dialout marcoI connect the Arduino Micro and I have found it
/dev/ttyACM0But I am not able to find serial port connected to Arduino Micro. It seems that Java software insists that the serial device must be of the form /dev/USBn So I have created a soft link to see the serial port using the code
sudo ln -s /dev/ttyACM0 /dev/ttyUSB0It works I am now able to find the serial port connected to Arduino. Unfortunately, I have to create a soft link everytime I start the machine. It doesn't seems to me a good solution to the problem. Any suggestion to solve this issue ?
1 Answer
Linux udev assigns consistent port names when hotplugged into system. There should not be any need to create soft link, in-fact it is the job of udev.
When connecting arduino check "dmesg" command's output. It will tell you exactly what your system is doing.
Further consider using scm library for serial port communication