DFlex ISA Multiport Serial I/O SCO Unix Installation

Title: DFlex ISA Multiport Serial I/O SCO Unix Installation
Keywords: DFlex Install Sco Unix Openserver
Date: Nov 29/96
KDB Number: kdb-124
Revision: 0.00
Author: Support
Distribution: External


The following procedure details how to install the DFlex serial adapter under SCO Unix 3.2 or Open Server 5.0. The DFlex is fully compatible with the Sco
Unix Async serial driver. The DFlex is an ideal for most uses under Sco Unix because....

-of it's flexibility allows any combination of up to four different line interfaces including RS-232, RS-422/485, RS-423 and Current Loop.
-of it's compatibility with the existing Sco Unix serial driver.
-the DFlex features an interrupt status port, which provides for greater efficiency.
-the DFlex can be purchased with 16450, 16550 or 16650 UARTS, in either two, four or eight port boards.

There are five distinct steps to installing the DFlex, the steps are... 
 
-STEP 1 Set up and install the hardware (the DFlex board). 
-STEP 2 Edit the space.c file to accommodate the DFlex. 
-STEP 3 Edit the SER file to ensure the device minor numbers are lined up and correct. 
-STEP 4 Run the "mkdev" command with the "serial" option (mkdev serial) to install. the 
        DFlex parameters into the OS, and to rebuild the kernel.
-STEP 5 Reboot the machine. 
 
 
STEP 1 
****** 
Hardware setup, many installation combinations are possible with the DFlex, any combination 
you choose will impact the next four steps. Here is a recommended hardware configuration. 
See DFlex manual ver 1.09  pages 2-3 to 2-5  
 
Starting I/O address - 280h. 
Interrupt 10. 
Status port ON. 
All Interrupts on A channel. 
 
For this configuration the Dip switch settings on SW1 will be.. 
off, off, on, off, on, off, on, on. 
 
The IRQ A jumper block should have the A Row jumpered on the 10 column. The IRQ B jumper 
should be left on only one B pin so it is not connected to the middle row. You might want 
to use the DOS porttest.exe and portfind.exe programs to verify your settings and ensure 
you have no conflicts.

 
STEP 2 
****** 
-Change directory to the /etc/conf/pack.d/sio directory and backup the file "space.c", 
i.e. cp space.c space.c.bak.
 
-Now open the file space.c for editing, i.e. vi space.c. In the space.c file you will 
find many listings for different serial cards. You will need to add an entry for the DFlex. 
The DFlex is largely compatible with the entries for the STARGATE serial cards, so scan 
down the list until you find the entries for the STARGATE cards. 
 
-You will see some entries in the space.c file which will look similar to the following: 
 
{1,STARGATE,8,4,8,(sd)0x280,0x280+STAR_POLL,8,MCRBIT3}, /*AT-Stargate */ 
 
Description of entries... 
 
1/  The first digit designates the COM you would like to set the DFlex card as. The maximum 
number of available COM assignments under SCO UNIX is 4.
 
Please note that COM is referring to a serial board and not a specific port. There is no 
relation between the DOS COM1, COM2 etc and the Sco Unix COM.
 
0 = COM1, 1 = COM2, 2 = COM3, 3 = COM4 
 
2/ STARGATE is the style of the serial board. This tell the serial driver what to expect 
from the DFlex hardware.
 
3/  The next set of digits (8,4,16) designate the number of ports (1,2,4,8) on the card, 
interrupt used (3,4,5,10,etc), and minor number (0,8,16,etc) to start at.
 
3a/ The number of ports can be 2,4 or 8 depending on which DFlex is being installed 
(i.e., DFlex-2, DFlex-4 or DFlex-8).
 
3b/ The interrupt used can be any available interrupt on the system. For example IRQ 5,7,10,11,12 
and 15 are typically available. See below for more information on interrupts. 
  
3c/ There are different minor numbers associated with each COM port. (Note this varies 
according to the values in your /usr/lib/mkdev/perms/SER file.
  
COM1 - 0 as starting minor number, COM2 - 8 as starting minor number  
COM3 - 16 as starting minor number, COM4 - 24 as starting minor number 
 
4/ The next two hex numbers is the port address where the first DFlex UART will be addressed 
at. These must match the hardware settings on the DFlex. In the above sample line, the starting 
port address is set at 0x280h. 
 
4b/ The next field indicate where the DFlex Interrupt status port is located. The DFlex status 
port is always located 40h from the address of the first DFlex UART.
 
4c/ The next option indicates that a 16450/550/650 UART bit must be enabled to allow the UART 
interrupts onto the ISA bus.
 
 
Example of space.c entry: 
 
DFlex-8 as COM3, I/O Range 240h and IRQ 10, Starting minor will be 16. The standard COM1 (3f8,4) 
and COM2 (2f8,4) are already installed in the system.
 
Duplicate the above line from space.c and modify it to the settings described above. 
 
Example of a modified line matching the example settings: 
 
{2,STARGATE ,8,10,16, (sd)0x240,0x240+STAR_POLL, 8,MCRBIT3}, /*AT-DFlex8*/ 
 
This line should be placed among other "COM3" entries. When complete save and exit the 
space.c file.
 
  
STEP 3 
****** 
Now we must modify the SER file and ensure the alignment of the minor numbers. So cd to the 
/usr/lib/mkdev/perms directory and backup the file SER,
 
i.e. cp SER SER.bak. 
 
Now open the file SER for editing. Find the section for the COM3 devices /dev/tty3a(b,c..), 
those lines should begin with SER3. This is the first area to modify. You will need to 
un-comment some of the lines (lines beginning with #) and align the minor numbers to be in 
sequence with minor  numbers from SER1 and SER2. When complete the SER3 section should 
look like... 
 
#  
SER3 c666 bin/bin 1 ./dev/tty3a 5/16  
SER3 c666 bin/bin 1 ./dev/tty3b 5/17  
SER3 c666 bin/bin 1 ./dev/tty3c 5/18  
SER3 c666 bin/bin 1 ./dev/tty3d 5/19  
SER3 c666 bin/bin 1 ./dev/tty3e 5/20  
SER3 c666 bin/bin 1 ./dev/tty3f 5/21  
SER3 c666 bin/bin 1 ./dev/tty3g 5/22  
SER3 c666 bin/bin 1 ./dev/tty3h 5/23  
#  
 
Further down in the file are the Modem device names. This section must be modified in a 
similar fashion to the above. When completed this section should look like... 
 
#  
SER3 c666 bin/bin 1 ./dev/tty3A 5/144  
SER3 c666 bin/bin 1 ./dev/tty3B 5/145  
SER3 c666 bin/bin 1 ./dev/tty3C 5/146  
SER3 c666 bin/bin 1 ./dev/tty3D 5/147  
SER3 c666 bin/bin 1 ./dev/tty3E 5/148  
SER3 c666 bin/bin 1 ./dev/tty3F 5/149  
SER3 c666 bin/bin 1 ./dev/tty3G 5/150  
SER3 c666 bin/bin 1 ./dev/tty3H 5/151  
#  
 
If you were installing your DFlex as COM1 or COM2 then the default minor numbers are usually 
sufficient and don't require changing.
 
When complete save and exit the SER file. 
 
 
STEP 4 
****** 
Run mkdev serial to create special device files to interface to the serial driver. When 
running mkdev serial, select the appropriate number of ports being installed (i.e. 2,4 
or 8 port DFlex board). 
 
mkdev serial will prompt you with some options,  
- i to install a new board. 
- 1 standard tty driver. 
- # A number corresponding to the number of ports you want to install. 
- # Enter 3 for COM3, or for whatever COM you are installing. 
- ? Option(s) for various boards will be displayed, select the DFlex board corresponding to 
the changes you made in the space.c file.
- Enter the default baud rate, i.e. 9600. 
- Enter m for 9600,n,8,1. 
 
You will now be prompted with a number of yes or no questions regarding rebuilding of the 
kernel. Answer yes to all of these to the new kernel built with the new settings for the 
DFlex. This will take about 2 minutes to complete. 
 
 
STEP 5 
****** 
Rebooting the machine. If your hardware is already installed, you can do sync;sync;reboot. 
If you hardware still needs to be installed you can do a sync;sync;shutdown or a sync;sync;haltsys 
(much faster than a shutdown!). 
 
When the OS starts up, you should see mention of the additional DFlex ports in the list of 
installed/found devices displayed at bootup. If you miss this message, the messages are logged 
in the file /usr/adm/messages. 
 
Example "tail -50 /usr/adm/mess*", this will print out the last 50 messages. 
 
 
Tips, Tricks and troubleshooting 
******************************** 
 
Here are some steps to take if the serial ports are not functional after you have rebooted. 
 
a/ You should check that the above steps are followed closely. 
 
b/ Check for conflicting devices in your system. It is possible that the DFlex is conflicting 
with another card in your system, such as a Video card, IDE, SCSI, Network, etc. The conflict 
can be either an Interrupt or I/O port conflict. You might want to try using the "porttest.exe" 
and "portfind.exe" from a DOS disk to flush out hardware conflicts. 
 
c/ If you are using a machine with a Plug and Play BIOS, or a PCI bus, you might have to ensure 
the CMOS setup is configured for Non-plug and Play devices like the DFlex. 
 
d/ If you need to remove/un-install the DFlex, you should use the mkdev serial utility and follow 
the options for (r) remove a board. If you decide that the DFlex adapter is not working due to a 
conflict, you should remove the board with mkdev serial, reboot and then run mkdev serial to 
install the DFlex at some alternate settings. 
 
Interrupts: Available interrupts in most PC's are 3,4,5,7,10,11,12 and 15. 
 
3 - Com2 
4 - Com1 
5 - Lpt2 Usually available. 
7 - Lpt1 
10 - usually available. 
11 - usually available. 
12 - usually available. 
15 - Secondary EIDE (Hard disk controller) Sometimes Available. 
 
 
I/O address Ranges: 
 
Range 0: 200h-238h: 200h game port, 238h bus mouse. 
Range 1: 240h-278h: 278h LPT2. 
Range 2: 280h-2b8h: Usually available. 
Range 3: 2c0h-2f8h: 2e8h com3 and VGA 8514 compatible, 2f8h com2. 
Range 4: 300h-340h: Available. 
Range 5: 2b0h-2e8h: 2e8h com3 and VGA 8514 compatible, 2f8h com2. 
Range 6: 290h-2c8h: Usually available. 
Range 7: 190h-1c8h: Available. 
 
Com1 and Com2 serial ports on most motherboards can be disabled in the CMOS setup to make 
the resources available.