Serial Support on the Windows Subsystem for LinuxFrom the report of MSDN, you can use a serial port as following parameters.
In WSL, the lxcore driver maps COM ports to Linux devices by the COM port number so /dev/ttyS<N> is tied to COM<N>. More specifically, the mapping is on the minor number, so minor number 65 (/dev/ttyS1) is COM1, 66 (/dev/ttyS2) is COM2, and so forth. Since pty, tty, and ttyS share a terminal library code base, ttyS will behave similarly but also support the following termios settings which are simply mapped to Windows serial driver ioctls:
When I want to connect a router or switch for setting it, I can use a serial ports by cu command as /dev/ttysS1.
- Standard baud rates - B*
- Stop bits - CSTOPB
- Word length - CSIZE
- Parity checking - PARENB, PARODD, CMSPAR, INPCK
- Software flow control - IXON, IXOFF
- Hardware flow control - CRTSCTS, CLOCAL
- Control characters - VSTART, VSTOP, VEOF