Archive

Posts Tagged ‘port’

How to create two wired virtual serial ports on Linux?

February 19th, 2010 fvicente No comments

To create two bridged virtual serial ports use the following command:

socat -d -d pty,raw,echo=0 pty,raw,echo=0

The output will show you which are the virtual ports (or pseudo terminals) created, e.g.:

2010/02/19 16:16:33 socat[9662] N PTY is /dev/pts/3
2010/02/19 16:16:33 socat[9662] N PTY is /dev/pts/4
2010/02/19 16:16:33 socat[9662] N starting data transfer loop with FDs [3,3] and [5,5]

Note: if you are using Ubuntu and you do not have this command, try:

sudo apt-get install socat

Image source

Code optimization for RXTX parallel port implementation

May 26th, 2008 fvicente No comments

DB-25 Connector

RXTX is a native lib providing serial and parallel communication for the Java Development Toolkit (JDK). All deliverables are under the gnu LGPL license. The native part is developed in C.

If you are using the parallel port functions of this project for version rxtx-2.1-7r2 or older, you may be interested in this code optimization, it is a small change but it may improve the resource usage in certain cases.

Read more…