User Tools

Site Tools


linux:serial_ports

This is an old revision of the document!


Possible alternatives for virtual serial ports

  • Pseudo teletype – Linux C programming
  • socat – Command
  • fuse – Filesystem in userspace
  • pipes – Heave data between processes

Experiments

Get info:

$ dmesg | egrep --color 'serial|ttyS'

Some commands to manage, read and write to the serial port

# Print info
$ setserial -g /dev/ttyS0

# Using cu (call-up). Exit by typing ~.
$ cu -l /dev/ttyS0 -s 115200

# Using screen. Exit with c-a k
$ screen /dev/ttyS0 115200

Serial port basics

DTE Data terminal equipment (computer/MCU)
DCE Data circuit-terminating equipment (modem/device)
RTS Request to send
CTS Clear to send
DTR Data terminal ready
DSR Data set ready

Accessing a serial port

Pseudo teletype

linux/serial_ports.1601456380.txt.gz · Last modified: 2022/09/12 00:30 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki