The serial ports in Linux
Despite all the preceding serial ports' names, in a GNU/Linux system, all these devices are seen in the same manner (actually some differences still remain, but they are special cases), that is, they are all represented by the the devices named /dev/ttyXXX
, where the XXX
string may vary according to the specific serial port implementations. For instance, the historical (and standard) names of PCs' UARTserial ports are /dev/ttyS0
, /dev/ttyS1
, but (as seen in the previous chapters) the USB-to-serial adapters can be named as /dev/ttyUSB0
, /dev/ttyUSB1
or /dev/ttyACM0
, /dev/ttyACM1
.
As seen earlier, the tty
prefix comes from the very old abbreviation of teletypewriter and was originally associated only with the physical connection to a UNIX system. Now that the name also represents any serial port style device as serial ports, USB-to-serial converters, tty virtual devices, and so on.
The Linux tty driver core (that is implemented using a char driver) is responsible for...