Skip to content
Advertisement

CommPortIdentifier.getPortIdentifiers with zero ports on Linux

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 that I can’t load any ports while I am using this:

CommPortIdentifier.getPortIdentifiers(); // i am using rxtx 2.1.7

It always return zero ports. I would like to use port ttyS0 whichworks great with minicon so i am sure that port is not blocked and the machine is not broken.

Anyone has a reason for this ?

Advertisement

Answer

It was just becouse low priviligies. I had to add myself to a group which is supposed to work with ttyS0.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement