Commit 5789f5ad914622e25bd6058a48ecdc7532ba6780

Authored by Jeff Buchbinder
2 parents 1fb6b8bc 9bb7cc8e

Merge pull request #7 from tian2992/patch-1

Create README.md
Showing 1 changed file with 113 additions and 0 deletions
README.md 0 → 100644
  1 +
  2 +# tty0tty - linux null modem emulator v1.2
  3 +
  4 +
  5 +The tty0tty directory tree is divided in:
  6 +
  7 + **module** - linux kernel module null-modem
  8 + **pts** - null-modem using ptys (without handshake lines)
  9 +
  10 +
  11 +## Null modem pts (unix98):
  12 +
  13 + When run connect two pseudo-ttys and show the connection names:
  14 +
  15 + (/dev/pts/1) <=> (/dev/pts/2)
  16 +
  17 + the connection is:
  18 +
  19 + TX -> RX
  20 + RX <- TX
  21 +
  22 +
  23 +
  24 +## Module:
  25 +
  26 + The module is tested in kernel 3.10.2 (debian)
  27 +
  28 + When loaded, create 8 ttys interconnected:
  29 +
  30 + /dev/tnt0 <=> /dev/tnt1
  31 + /dev/tnt2 <=> /dev/tnt3
  32 + /dev/tnt4 <=> /dev/tnt5
  33 + /dev/tnt6 <=> /dev/tnt7
  34 +
  35 + the connection is:
  36 +
  37 + TX -> RX
  38 + RX <- TX
  39 + RTS -> CTS
  40 + CTS <- RTS
  41 + DSR <- DTR
  42 + CD <- DTR
  43 + DTR -> DSR
  44 + DTR -> CD
  45 +
  46 +
  47 +## Requirements:
  48 +
  49 + For building the module kernel-headers or kernel source are necessary.
  50 +
  51 +## Installation:
  52 +
  53 +Download the tty0tty package from one of these sources:
  54 +Clone the repo https://github.com/freemed/tty0tty
  55 +
  56 +```
  57 +git clone https://github.com/freemed/tty0tty
  58 +```
  59 +
  60 +Extract it
  61 +
  62 +```
  63 +tar xf tty0tty-1.2.tgz
  64 +```
  65 +
  66 +Build the kernel module from provided source
  67 +
  68 +```
  69 +cd tty0tty-1.2/module
  70 +make
  71 +```
  72 +
  73 +Copy the new kernel module into the kernel modules directory
  74 +
  75 +```
  76 +sudo cp tty0tty.ko /lib/modules/$(uname -r)/kernel/drivers/misc/
  77 +```
  78 +
  79 +Load the module
  80 +
  81 +```
  82 +sudo depmod
  83 +sudo modprobe tty0tty
  84 +```
  85 +
  86 +You should see new serial ports in ```/dev/``` (```ls /dev/tnt*```)
  87 +Give appropriate permissions to the new serial ports
  88 +
  89 +```
  90 +sudo chmod 666 /dev/tnt*
  91 +```
  92 +
  93 +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.
  94 +
  95 +Persisting across boot:
  96 +
  97 +edit the file /etc/modules (Debian) or /etc/modules.conf
  98 +
  99 +```
  100 +nano /etc/modules
  101 +```
  102 +and add the following line:
  103 +
  104 +```
  105 +tty0tty
  106 +```
  107 +
  108 +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.
  109 +
  110 +
  111 +## Contact
  112 +
  113 +For e-mail suggestions : lcgamboa@yahoo.com
... ...