Quick Start Guide


The following instructions assume that you are using a computer running Linux x86 and a TCP/IP-based device server that both meet system requirements.

The example in these instructions creates two new tty devices to access serial devices on two serial servers.

  • The first server (at 10.0.0.240) only supports raw TCP access.
  • The second server (at 10.0.0.250) supports the Telnet with RFC 2217 extensions and requires a user login.

TTYredirector software is available from selected manufacturers of serial servers.  It is not available on this web site.

1. Unpack and install

  1. If the TTYredirector software is in a .zip file, unzip it to obtain the .bin file.
  2. Run the distribution file:

    $ sh setup_sena_ttyredirector-v4.0.3.bin

  3. Change to the directory that was created:

    $ cd ttyredirector_sena-4.0.3

  4. su to root.
  5. Install using the RPM kit with a permanent license key for SENA device servers or the shell kit without any license key :
  6. # rpm -i ttyredirector_sena-4.0.3-1.i386.rpm
    or
    # sh ttyredirector_sena-4.0.3-install.bin

  7. If you are running Debian or another Linux distribution that does not have the /etc/rc.d/init.d directory, you must use the following commands (as root) to start and stop the TTYredirector daemon:
  8. # /usr/local/sbin/ttyredirectord --start
    and
    # /usr/local/sbin/ttyredirectord --stop

2. Enter a license key

  1. If you installed with the RPM kit, skip this step. You have already had a permament license key for SENA device servers.
  2. If you wish to use TTYredirector in trial mode for 24 hours, skip this step. You will be able to create one tty device.
  3. Enter the license key with the trconfig command:

    $ trconfig -licensekey xxxx-xxxx-xxxx-xxxx-xxxx

3. Add the new tty devices

  1. Use the trconfig command to create two new tty devices:

    $ trconfig -addtty mytty0,mytty1

  2. Default settings are in effect for these new tty devices. They can not be used until they are configured.

4. Configure the first tty device

  1. For mytty0 use the IP address and the TCP port number it should use to access its networked device:

    $ trconfig -tty mytty0 -server 10.0.0.240 -port 4001

  2. Because this device server accepts only raw TCP connections and does not require user login, we can leave all remaining default settings in effect.

5. Configure the second tty device

  1. For mytty1 use the IP address and TCP port number for the second device server:

    $ trconfig -tty mytty1 -server 10.0.0.250 -port 6004

  2. The second server supports Telnet protocol and requires a login with username ted and password tedpwd, so we configure mytty1 with additional settings:

    $ trconfig -tty mytty1 -protocol telnet
    $ trconfig -tty mytty1 -auth username
    $ trconfig -tty mytty1 -username ted -password tedpwd

    Note: You can use multiple options and abbreviated option names, so the these three commands could be combined as:

    $ trconfig -y mytty1 -o telnet -a username -u ted -w tedpwd

  3. The second server supports RFC 2217 Telnet extensions, so for mytty1 we will specify additional baud rate and flow control settings for the server to initialize that device each time we use it:

    $ trconfig -tty mytty1 -speed 38400 -inflow rts -outflow cts

6. Check the configuration of the new tty devices

  1. Use a trquery command to see their settings:

    $ trquery -tty ALL
    tty:    mytty0
    server: 10.0.0.240
    port:   4001
    ...
    tty:    mytty1
    server: 10.0.0.250
    port:   6004
    ...

  2. Use an ls command to see the new devices in /dev directory, which are automatically linked to Unix98 pty devices:

    $ ls -l /dev/mytty*
    lrwxrwxrwx 1 root root 11 Jun 8 12:05 /dev/mytty0->/dev/pts/33
    lrwxrwxrwx 1 root root 11 Jun 8 12:05 /dev/mytty1->/dev/pts/34

7. Begin using the new tty devices

  1. Your applications can now open, read and write the devices /dev/mytty0 and /dev/mytty1 to use the devices on the two serial servers.
  2. To see the activity on these tty devices, use the trtrace command:

    $ trtrace

  3. To send the trace data to a file:

$ trtrace -f tracefile.txt