Git Product home page Git Product logo

tty0tty's Introduction

tty0tty - linux null modem emulator v1.2

The tty0tty directory tree is divided in:

module - linux kernel module null-modem
pts - null-modem using ptys (without handshake lines)

Null modem pts (unix98):

When run connect two pseudo-ttys and show the connection names:

(/dev/pts/1) <=> (/dev/pts/2)

the connection is:

TX -> RX
RX <- TX

Module:

The module is tested in kernel 3.10.2 (debian)

When loaded, create 8 ttys interconnected:

/dev/tnt0 <=> /dev/tnt1
/dev/tnt2 <=> /dev/tnt3
/dev/tnt4 <=> /dev/tnt5
/dev/tnt6 <=> /dev/tnt7

the connection is:

TX -> RX
RX <- TX
RTS -> CTS
CTS <- RTS
DSR <- DTR
CD <- DTR
DTR -> DSR
DTR -> CD

Requirements:

For building the module kernel-headers or kernel source are necessary.

Installation:

Download the tty0tty package from one of these sources: Clone the repo https://github.com/freemed/tty0tty

git clone https://github.com/freemed/tty0tty

Build the kernel module from provided source

cd tty0tty-1.2/module
make

Install the new kernel module into the kernel modules directory

sudo make modules_install

NOTE: if module signing is enabled, in order for depmop to complete, you may need to create file certs/x509.genkey in the kernel modules include directory and generate file signing_key.pem using openssl, guides are available online.

Appropriate permissions are provided thanks to a udev rule located under:

/etc/udev/rules.d/50-tty0tty.rules

NOTE: you need to add yourself to the dialout group (and do a full relog), with:

sudo usermod -a -G dialout ${USER}

Load the module

sudo udevadm control --reload-rules
sudo depmod
sudo modprobe tty0tty

You should see new serial ports in /dev/ (ls /dev/tnt*) You can now access the serial ports as /dev/tnt0 (1,2,3,4 etc) Note that the consecutive ports are interconnected. For example, /dev/tnt0 and /dev/tnt1 are connected as if using a direct cable.

Persisting across boot:

edit the file /etc/modules (Debian) or /etc/modules.conf

nano /etc/modules

and add the following line:

tty0tty

Note that this method will not make the module persist over kernel updates so if you ever update your kernel, make sure you build tty0tty again repeat the process.

Debian package

In order to build the dkms Debian package

sudo apt-get update && sudo apt-get install -y dh-make dkms build-essential
debuild -uc -us

Contact

For e-mail suggestions : [email protected]

tty0tty's People

Contributors

jbuchbinder avatar stappersg avatar klogg avatar reallyniceguy avatar amateomi avatar erickellerek1 avatar jschwartzenberg avatar altf02 avatar tian2992 avatar fairfieldt avatar avasygn avatar carpie avatar navidsav avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.