=================================================================
             Moxa OnCell Unix Fixed TTY Program (oncellttyd)

                           README File

  Date: 2008/03/30
  Copyright (C) 2008, Moxa Inc. All rights reserved.
=================================================================
Content

1. Introduction
2. Supported Operating Mode
3. OS Supports
4. Installation and Configuration
5. Device Naming Rule
6. oncellttyd Parameter
7. Add Additional Server
8. Technical Support
------------------------------------------------------------------------
1. Introduction
	The purpose of Moxa OnCell Unix Fixed TTY program, oncellttyd, is to
	redirect Unix tty device to Moxa OnCell serial port.

2. Supported Operating Mode
	1  [RealCOM Mode]
	   [TCP Server Mode]
	
	You may always find and download the latest driver at
	http://www.moxa.com

3. OS Supports
	Moxa OnCell Unix Fixed TTY program supports the following OS:
	1. SCO UNIX, SCO OpenServer 5, SCO OpenServer 6
	2. UnixWare 7
	3. Solaris 10 x86/Sparc
	4. QNX4.25, QNX6
	5. FreeBSD 5.x, FreeBSD 6
	6. AIX 5.x 

4. Installation and Configuration
	Step 1  :  Login to UNIX and create a directory for Moxa Fixed TTY.
		   E.g., to create a directory named /usr/etc, execute the 
		   command:
		   # mkdir /usr/etc

	Step 2  :  Copy moxa_oncell_fixedtty.tar to the /usr/etc directory 
		   by executing the commands:
		   # cp moxa_oncell_fixedtty.tar /usr/etc
		   # cd /usr/etc 
	
	Step 3  :  Extract source files from tar-file by executing the 
		   command:
		   # tar xvf moxa_oncell_fixedtty.tar
                   # cd /usr/etc/oncellttyd

		   The following files will be extracted:
		   README.TXT	
		   oncellttyd.c  --> source code
		   oncellttyd.cf --> an empty configuration file
		   user_defined.cf --> an empty user-defined configuration file
		   Makefile	   --> makefile
		   VERSION.TXT --> Fixed TTY driver version
		   FAQ.TXT     --> FAQ

	Step 4  :  Compile and Link :
		   For QNX4:
		 	 # make qnx4
		   
		   For QNX6:
		 	 # make qnx6
		 	 
		   For SCO OpenServer 6
		   	 # make sco6
		    
		   For SCO UNIX, OpenServer 5:
		 	 # make sco
		 	 
		   For Solaris
		 	 # make sun
		     
		   For FreeBSD
			 # make freebsd
				
		   For UnixWare 7:
			 # make svr5
		   
		   For AIX
		     # make aix

	Step 5	:  Modify the configuration:
		   The configuration used by the oncellttyd program is defined
		   in the text file oncellttyd.cf, which is in the same 
		   directory that contains the program oncellttyd. You may use
		   vi, or any text editor to modify the file. E.g.,
      
			 ttyp11 	192.168.1.1	     950	
      
		   For more configuration information, look at the file 
		   oncellttyd.cf, which contains detailed descriptions of the 
		   various configuration parameters. (If you would like to 
		   use self-defined master/slave tty, look at the file 
		   user_defined.cf.)

		   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		   The "Device Name" depends on the OS. See the
		   "5. Device Naming Rule" section for more information.	
		   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

	Step 6	:  To start the oncellttyd daemon, you configured in 
		    oncellttyd.cf. If you would like to set the connection 
		    timeout, you can add a "-t min" parameter to specify 
		    the connection timeout value in minute. E.g.,
		    
		    # /usr/etc/oncellttyd/oncellttyd -t 1
		    
		    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		    Now, you are able to use tty which is configured 
		    in oncellttyd.cf if you complete Step 1 to Step 6.  
		    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

	Step 7	:  To start the oncellttyd daemon after system bootup,
		   you configured in oncellttyd.cf. E.g.,
		   
		   for SCO Openserver, Unixware, AIX and Solaris
		   add an entry into /etc/inittab
			 ts:234:respawn:/usr/etc/oncellttyd/oncellttyd -t 1
			 
		   For QNX4 add an entry into /etc/config/sysinit.1
		     /usr/etc/oncellttyd/oncellttyd -t 1
		     
		   For QNX6 add an entry into /etc/rc.d/rc.local
		     /usr/etc/oncellttyd/oncellttyd -t 1
		     
		   For FreeBSD add an entry into /etc/rc.local
		     /usr/etc/oncellttyd/oncellttyd -t 1

	This completes the process of adding an additional server.

5. Device Naming Rule
	For UnixWare, Solaris, SCO OpenServer 6 
		pts/[n]
	
	For HP-UX 
		pty/tty[a-ce-z][0-9a-f]
		or
		tty[p-r][0-9a-f]

	For QNX4, QNX6
		tty[p-s][0-9a-f]

	For FreeBSD
		tty[p-sP-S][0-9a-v]
		
	For AIX
		tty[p-zA-Z][0-9a-f]

	For all other UNIX operating systems, use:
		ttyp[n]

	The value of n should be equal or larger than 11 to prevent from
	conflicting with the device names of functional keys in some UNIX
	systems.
	
6. oncellttyd Parameter
	Usage : oncellttyd [-t reset-time] [-f file-name] [-x] [-u user_defined.cf]
		reset-time : reconnection successful time.
 		file-name  : Fixed TTY program configuration file. 
 	
 	t :	If you would like to set the connection timeout, you can add 
 		a "-t min" parameter to specify the connection timeout value 
 		in minute. E.g., 
		# oncellttyd -t 1
		
	f :	If you would like to every target machines have configuration 
		file themself, you can add a "-f file-name" to specify 
		configuration file. E.g. If one of configuration file is com.cf,
		you can type
		# oncellttyd -f com.cf

	x :	Disable log function.
	
	u :	If you would like to use self-defined tty name, you can add a
		"-u user_defined.cf" to use them. E.g.,
		# oncellttyd -u user_defined.cf

7. Add Additional Server
	Step 1	:  Modify the text file oncellttyd.cf to add an additional server.
		   User may use vi or any text editor to modify the file. For 
		   more configuration information, look at the file oncellttyd.cf, 
		   which contains detailed descriptions of the various 
		   configuration parameters.

	Step 2	:  Find the process id (PID) of program "oncellttyd".
		   # ps -ef | grep oncellttyd

	Step 3	:  Update configuration of oncellttyd program.
		   # kill -USR1 PID
		   (e.g., if "oncellttyd" PID = 404, "kill -USR1 404")

	This completes the process of adding an additional server.

8. Technical Support
   If you have any technical questions, please send your question by
   the following ways with detail description of the symptom.

    Email: support@moxa.com.tw
    Tel  : +886 2 89191230 ext.300


-End-
