Java RXTXcomm lib to connect to / dev / ttyACM0

I am using RXXTX java lib to connect to serial ports. I am using this library with no problem connecting to / dev / ttyUSB 0 (1,2,3, etc.).

But when I want to connect to / dev / ttyACM 0, its port is not found.

CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier("/dev/ttyACM0");


Exception thrown: at (

I have already listed all ports but had no success.


source to share

2 answers

Processing and USB ports / dev / ttyACM0, / dev / ttyACM1, ....

The processing doesn't like reading Linux USB devices like / dev / ttyACM 0 or / DEV / ttyACM 1.

The solution is easy, just bind devices like this ...

ln -s / dev / ttyACM [x] / dev / ttyS8 [x]

You can put any number after ttyS, although it is possible that ttyS0 and other low numbers, digits in the eighties are (almost) guaranteed to work.



This might help you:!topic/openhab/f-gVkwJg-hg

update your startup script to include "-> = / dev / ttyACM0" on the Java command line



All Articles