Main /
VirtualSerialPortNodevirtual-serialport
Other Node virtual serial port
MacWe want a virtual serial port so that we can test the serial port on the Mac by sending and receiving data. See http://stackoverflow.com/questions/52187/virtual-serial-port-for-linux Fortunately, mac port has socat! Terminal 1: sudo port install socat socat -d -d pty,raw,echo=0 pty,raw,echo=0 You will get something like: 2017/02/24 11:12:25 socat[8421] N PTY is /dev/ttys006 2017/02/24 11:12:25 socat[8421] N PTY is /dev/ttys007 2017/02/24 11:12:25 socat[8421] N starting data transfer loop with FDs [5,5] and [7,7] Note the two port names. In Terminal 2: cat < /dev/ttys006 In Terminal 3: echo "Test" > /dev/ttys007 Terminal 2 should show the "Test" output. |