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
- If the TTYredirector software is in a .zip file, unzip it to obtain the .bin file.
- Run the distribution file:
$ sh setup_sena_ttyredirector-v4.0.3.bin
- Change to the directory that was created:
$ cd ttyredirector_sena-4.0.3
- su to root.
- Install using the RPM kit with a permanent license key for SENA device servers or the shell kit without any license key :
- 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:
# rpm -i ttyredirector_sena-4.0.3-1.i386.rpm
or
# sh ttyredirector_sena-4.0.3-install.bin
# /usr/local/sbin/ttyredirectord --start
and
# /usr/local/sbin/ttyredirectord --stop
2. Enter a license key
- If you installed with the RPM kit, skip this step. You have already had a permament license key for SENA device servers.
- If you wish to use TTYredirector in trial mode for 24 hours, skip this step. You will be able to create one tty device.
- Enter the license key with the trconfig command:
$ trconfig -licensekey xxxx-xxxx-xxxx-xxxx-xxxx
3. Add the new tty devices
- Use the trconfig command to create two new tty devices:
$ trconfig -addtty mytty0,mytty1
- 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
- For mytty0 use the IP address and the TCP port number it should use to access its networked device:
- 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
- For mytty1 use the IP address and TCP port number for the second device server:
- 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 tedpwdNote: 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
- 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
- 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
... - 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
- Your applications can now open, read and write the devices /dev/mytty0 and /dev/mytty1 to use the devices on the two serial servers.
- To see the activity on these tty devices, use the trtrace command:
$ trtrace
- To send the trace data to a file:
$ trtrace -f tracefile.txt