i am trying to connect serial port on ubuntu. However, It doesn\'t work for me. I succesfully run the same project on Windows just with different drivers. The problem is tha
It was just becouse low priviligies. I had to add myself to a group which is supposed to work with ttyS0.
I used this command
sudo chmod 666 /dev/ttyUSB0
I had the same problem and it worked the moment after I used this command. Like Smolda said, it is a permission problem.
if nothing helps, you should consider to add this line to your java code:
System.setProperty("gnu.io.rxtx.SerialPorts", "/dev/yourtty");
did it for me. (Only if you work with the RXTX library)