Null-modem emulator tty0uart
Ref:
- http://jake.dothome.co.kr/tty/
- https://bootlin.com/doc/legacy/serial-drivers/
- https://www.oreilly.com/library/view/linux-device-drivers/0596005903/ch18.html
- https://github.com/martinezjavier/ldd3/blob/master/tty/tiny_tty.c
가상으로 하드웨어 UART 장치를 만들려면 아래 조건이 만족되어야 합니다.
- /sys/class/tty/xxx의 링크가 /sys/devices/virtual/tty/xxx면 안 됨
- /sys/class/tty/xxx/device 링크가 존재해야 함
- linux/serial_core.h (uart_driver <-> tty_driver)
- normal serial ports == N_TTY
- platform_device와 platform_driver의 name이 같아야 연결 됨
Git
Git: https://github.com/hhk7734/tty0uart
Flow control
- DCD: Data Carrier Detect
- RXD: Receive Data
- TXD: Transmit Data
- DTR: Data Terminal Ready
- DSR: Data Set Ready
- RTS: Request To Send
- CTS: Clear To Send
- CD: Carrier Detect
- RI: Ring Indicator
TXD -> RXD
RTS -> CTS
DTR -> DSR