Skip to content

2022: Clone tty device to few pseudo ttys without worrying about blocking cloned device

Notifications You must be signed in to change notification settings

lnarolski/TtyCloner

Repository files navigation

TtyCloner

Clone tty device to few pseudo ttys without worrying about blocking cloned device.

Table of contents

General info

You should run this application with root permissions or give permissions to needed devices/directories. Console arguments:

debian@debian10:~/TtyCloner/build$ ./TtyCloner
Clone tty device to few pseudo ttys without worrying about blocking cloned device
Usage:
  TtyCloner [OPTION...]

  -b, --baudrate arg   Set baudrate (default: 9600)
  -n, --number arg     Number of new pty interfaces
  -i, --interface arg  Tty interface to clone
  -f, --file           Create file /tmp/TtyCloner.txt with list of created
                       pty interfaces
  -h, --help           Show this help

Example diagram

Example diagram

Build

Commands to build on clean Debian 10 VM:

sudo apt update
sudo apt install git cmake g++ -y
git clone https://github.com/lnarolski/TtyCloner
cd TtyCloner
mkdir build
cd build
cmake ..
make

After compilation use TtyCloner binary file. You can also open and compile this project in Microsoft Visual Studio from TtyCloner.sln file.

Example of use

YouTube video

TODO

  • Add list of created pty interfaces to shm
  • Add interrupts

About

2022: Clone tty device to few pseudo ttys without worrying about blocking cloned device

Topics

Resources

Stars

Watchers

Forks