- Jul 23, 2006
- 3,934
- 0
- 76
I'm working on a simple serial application in Java using the RXTX library. For development, I would like to create a simple "device emulator" that will output serial messages that I can then read in with my client application. I've done this before easily on Windows with some special software to create two virtual serial ports and have them linked internally.
After some searching I've discovered the "socat" utility that can accomplish the same thing using:
This creates two devices in "/dev/pts/1" and "/dev/pts/2". The problem for me is that RXTX doesn't detect these devices at runtime. I read it might be helpful to rename these devices... however I'm not sure how to do that exactly.
After some searching I've discovered the "socat" utility that can accomplish the same thing using:
Code:
socat -d -d pty,raw,echo=0, pty,raw,echo=0
This creates two devices in "/dev/pts/1" and "/dev/pts/2". The problem for me is that RXTX doesn't detect these devices at runtime. I read it might be helpful to rename these devices... however I'm not sure how to do that exactly.