Fazecast / jSerialComm

Platform-independent serial port access for Java
GNU Lesser General Public License v3.0
1.35k stars 287 forks source link

Cant see ports using socat #30

Closed rejurime closed 7 years ago

rejurime commented 8 years ago

I need to emulate two serial ports and bind them (one for write and the other to read), in Windows I use com0com and works fine but in Ubuntu I try to use Socat (https://help.ubuntu.com/community/VirtualSerialPort) and I cant see the two ports I create.

I use this command: sudo socat PTY,link=/dev/ttyACM1 PTY,link=/dev/ttyACM2

Do you have any idea why this happens? or any solution for Ubuntu?

The funny thing is that for example on the Arduino IDE i can see the two ports that i create using the SOCAT command.

Any type of help or guidance is really appreciate.

Thanks and best wishes.

hedgecrw commented 8 years ago

I'm not sure what this problem could be. I just tried using the exact socat command you provided, and jSerialComm was able to see the two ttyACM ports on both Ubuntu and CentOS. Would you mind checking to make sure that you are using the most recent version of the library (1.3.11)? If you are, try launching your Java application using sudo and see if they show up (if they do, it is a permissions issue).

rejurime commented 8 years ago

I was using 1.3.9 in Ubuntu 16.04 beta 2, I've changed it to the latest version 1.3.11 and tried again with and without sudo, but I still can see the ports on my application.

Any ideas?

haniibrahim commented 7 years ago

Works in my environment: Mint 17.3 (=Ubuntu 14.04.3).

rejurime commented 7 years ago

Works great in Antergos Linux 64-bit with socat version 1.7.3.1and jSerialComm 1.3.11.