Intellicon ISA Software Installation Guide for QNX 4

Introduction

This software installation guide is designed to help users successfully install the Intellicon ISA serial adapter under the QNX 4.XX platform. Before beginning the software installation, please be sure to read the product manual that came with the Intellicon adapter for hardware installation/configuration instructions. To make the instructions easy to follow, all commands that have to be issued on the command line are written in bold text. NOTE: You must be logged in as root to perform this installation.

Preamble: Getting Your System Ready

Before you begin the installation process, you will need to have two applications running so you will be able to read from the DOS diskette. To run these applications, enter the following two commands from the command line:

# Dofsys &
# Fsys.floppy &

These particular applications may be running by default (these are QNX applications), and therefore you may not have to issue the previous commands. Please see the QNX documentation for more details about Dofsys and Fsys.floppy.

Which Driver to Use?

There are four drivers supplied with the Intellicon QNX 4.XX driver diskette:

Dev.cti For QNX 4.22 or earlier
Dev32.cti For QNX 4.23 or later
Dev.cti.tp For QNX 4.22 or earlier
Dev32.cti.tp For QNX 4.23 or later

The first two drivers (Dev.cti and Dev32.cti) provide the standard interface between QNX 4.XX and the serial ports. The last two drivers (Dev.cti.tp and Dev32.cti.tp) provide the standard interface, as well as an extra set of devices which allow access to printers attached to terminals. Intellicon QNX 4.XX driver software is compatible with QNX’s device administrator Dev. Applications designed to use standard serial ports under Dev can use Intellicon adapters with little or no modifications.

Installing the Serial Driver

To begin the installation process, insert your driver diskette into the floppy drive. Now go to the root directory by issuing the following command:

# cd /

To install the driver, issue the command:

# install -u /dos/a/qnx4/qnx4

When you hit the enter button, the contents of the diskette will be read, with the utilities and readmes being extracted to the /usr/cti/bh directory. The wrapper will be placed in the /usr/bin directory. The install script will prompt you to answer a few questions; answer them as appropriate.

Editing the sysinit file

Add the following entry to your /etc/config/sysinit file:

[driver] [port],[irq] [options] &
Example: Dev32.cti 300,10 –N ser3 &

Where:

[driver] is the driver you are going to use. Please refer to Which Driver to Use?
[port] are the I/O port addresses (default: 300 – 303)

[irq] is the Interrupt Request Line (default: 3)
[options] are:

  • -a number: Base address (in hex) of Shared Memory (default: D0000).
  • -b number: Define initial baud rate (default: 9600).
  • -C number: Size of canonical input buffer (default: 256).
  • -d: Set DTR on initially.
  • -D: Set DTR off initially.
  • -e: Set options to “edit” mode.
  • -E: Set options to “raw” mode.
  • -f: Enable hardware flow control.
  • -F: Disable hardware flow control.
  • -h number: Define high-water mark for input flow control (default: 3/4 point of input buffer).
  • -I number: Size of raw input buffer (default: 2048).
  • -l number: Define low-water mark for input flow control (default: 1/4 point of input buffer).
  • -m: Disable modem carrier processing (HUP).
  • -M: Enable modem processing (HUP).
  • -n: Similar to the -N device prefix parameter, but allows a unique prefix specification for each Intellicon adapter in a system.
  • -N name: Prefix to register (default: “cti”).
  • -O number: Size of output buffer (default: 2048).
  • -p number: Set port number for subsequent options.
  • -q: Run board in polled mode (no hardware IRQ)
  • -r: Set RTS on initially.
  • -R: Set RTS off initially.
  • -t number: Number of kilobytes of Intellicon memory to test (default: 64)

Initialization

When either the Dev.cti, Dev32.cti, Dev.cti.tp, or Dev32.cti.tp administrator executes, it initializes the hardware then boots the processor on the adapter. This operation is not lengthy but usually takes a second. For QNX Version 4.XX it is advisable that you place a sleep 5 command in your sysinit file following the Dev.cti, Dev32.cti, Dev.cti.tp, or Dev32.cti.tp command. This will allow the administrator time to initialize. If you do not place a sleep command after these commands, stty commands executed from the sysinit file with the adopted serial ports will probably generate Invalid Device messages because the administrator has not completed its initialization.

Enhanced Features

When the firmware is executing on the Intellicon board, you may invoke additional data processing and line control features for each individual serial line. These features are usually queried and set by the ctty program. Syntax for the ctty statement is:

# ctty [options]* [>device] [<device]

Where [options] are:

  • eof=value end-of-file character
  • eol=value end-of-line character
  • eol2= value alternate end-of-line character
  • erase= value delete previous character
  • intr= value generate SIGINT character
  • kill= value delete entire line character
  • min= number minimum characters required to satisfy raw input
  • quit= value generate SIGQUIT character
  • susp= value generate SIGSTP character
  • time= number timeout value for raw input
  • start= value resume output
  • stop= value stop output
  • login= value generate login character
  • +/-pcterm turn on or off PCTerm key scan code processing (see PCTerm section below)
  • +/-rts turn on or off the Auto RTS feature (see the Auto RTS section below).
  • +/-polarity turn on or off +/-polarity option. With this you can program the “polarity” of the RTS signal in the Auto RTS feature. The default is +polarity (see the Auto RTS section below).
  • +/-sync turns on or off synchronous modes (if the Intellicon adapter supports it)
  • +/-usrmde turns on or off user mode support or custom protocols
  • +/-rxd turns on or off the receiver discard. This option is for use with RS-485 two wire half duplex communications The default is receiver on (see the Auto RTS section below).

PCTerm

Many terminals support a mode of emulation known as PCTerm. In this mode, the terminal transmits an unique code (key scan) for the pressing and release of each key. When +pcterm has been set on a port, the Intellicon board will translate these key scan codes into QNX key codes. This allows PCTerm terminals to operate like QNX terminals. NOTE: If you want to use the PCTerm option, you must insert the Intellicon QNX4.XX device driver diskette into the floppy drive and from the command line issue the following command:

# install -u /dos/a/qnx4/qnx4pct

To translate output to a PCTerm terminal, a termcap entry has been included in the file pctrmcap. To inform QNX 4.XX of the Intellicon adapter’s PCTerm capabilities, please do the following:

Append the file pctrmcap to the QNX file /etc/termcap with the following command:

# cat pctrmcap >> /etc/termcap

Append the file pcterm to the QNX file /usr/lib/terminfo/terminfo.src with the following command:

# cat pcterm >> /usr/lib/terminfo/terminfo.src

In order to update the terminfo database, you must then recompile terminfo.src by issuing the following command:

# tic terminfo.src

Please note that termdef will not function properly until terminfo.src is recompiled using tic. Sometimes it is not possible to recompile the terminfo.src file. An alternative is to create the directory /usr/lib/terminfo/p and then run tic pcterm. The program tic will compile the file pcterm and place it in the /usr/lib/terminfo/p directory.

You use the Connect Tech program ctty to tell the Intellicon adapter to set the +/-pcterm option on the appropriate ports. You then use the QNX program tinit to tell QNX which ports are running in PCTerm mode.

Example:
To turn on PCTerm processing for a port, use the following statement:

ctty +pcterm </dev/cti1

To turn off PCTerm processing for a port, use the following statement:

ctty -pcterm </dev/cti1

To inform QNX which ports are running in PCTerm mode, use the following statement:

tinit -c termdef -T /dev/cti1 &

When the program termdef receives data from the port, it will prompt the user for the terminal type. You simply enter pcterm and the appropriate terminal definition will load from /usr/lib/terminfo/p

Technical Tip:

Occasionally data errors on the line will cause a make or break code to be lost or garbled. When this happens the pcterm firmware may think a key is depressed when it is not. To clear this situation you can use the following script file:

  • ctty -pcterm </dev/$1
  • stty baud=9600 </dev/$1
  • ctty +pcterm </dev/$1
  • stty baud=19200 </dev/$1

Note:
Please substitute the correct baud rate you are using for baud=19200

Auto RTS

The Auto RTS feature allows you to assert the RTS signal when there is data to be transmitted. After the last stop bit of the last byte has been transmitted, RTS will be dropped allowing other devices access to the switched line. This feature is very useful when doing half duplex or multi-drop RS-422/485 communications.

Configuration

The Intellicon QNX 4.XX transparent print feature uses two drivers that work together. The first driver Dev.cti.tp or Dev32.cti.tp runs like the standard Dev.cti or Dev32.cti driver but with some changes to allow the driver to communicate with a buffer space reserved for transparent print operations on the Intellicon adapter.

The drivers Dev.cti.tp or Dev32.cti.tp create new device names called /dev/tp1 through to the number of Intellicon ports on your system(unless -N is used to override the name). The command syntax for this statement is:

Dev.cti.tp [options] & (for QNX 4.22 or earlier)
or
Dev32.cti.tp [options] & (for QNX 4.23 or later)

Where [options] are:

-N name
Prefix to register (default: “tp”).
-O number
Size of output buffer (default: 1024).
-p number
Set port number for subsequent options.
-f filename
Set file name to use to lookup external terminal defs from.[default /etc/config/tp.defs] -b cps_rate
Effective cps rate to send data to transparent print printer at(used to pace data so that terminal is not bogged down) [default of 100 cps] terminal
Type of terminal being used, defines the ton/toff sequence

Since Dev.cti.tp and Dev32.cti.tp manage the data sent to the transparent print device, it must know the approximate character per second(CPS) rate of the printer and the terminal type(i.e: Wyse50 etc.) The character per second (cps) rate defaults to 100. This is a reasonable setting but some printers may be faster or slower than that. By setting the cps rate correctly, the user can use the terminal while printing with very little degradation in response. Different terminal types use different control sequences to turn on or off re-direction of data to an attached printer. If you do not use a terminal supported within the Dev.cti.tp or Dev32.cti.tp driver, create a new entry in the /etc/tp.defs file (this file contains comments on the command syntax necessary).

You can program the “polarity” of the RTS signal in the Auto RTS feature with the +/-polarity option. With +polarity set you will assert the RTS line during the transmission of data. With -polarity set you will assert the RTS line when no data is transmitted. The default is +polarity. You can also turn on or off the “receiver discard” of the RTS signal in the Auto RTS feature with the

+/- rxd option. This option disables the receiver whenever the transmitter is active. This prevents character echo when using half duplex RS-485 communications.

Packet Trigger Mode
Packet Trigger Mode allows you to define a proxy that will be triggered each time a specific end of packet character is seen in the input data stream. You define the end of packet character by the c_cc[VLEFT] member of the termios structure for the channel. Using this feature may substantially reduce the burden on the host computer.

Super Raw Mode
This mode allows your application to minimize the overhead of QNX 4.XX tti function calls. Since Dev.cti and Dev32.cti call these functions for every character received , this overhead is significant in high performance applications. Super Raw Mode removes this overhead for applications

that do not need input processing(or raw data streams). It does this by placing incoming characters directly into the user’s allocated buffer.

Transparent Print
The Intellicon QNX 4.XX device driver supports a special feature called transparent print. This feature sends printer data to a terminal via the serial link and then re-directs the data to the printer attached to the auxiliary port on the same terminal. This process occurs “transparently” to the user.

Utilities

CHMON
CHMON (CHannel MONitor) is a software utility that monitors all Intellicon serial ports. It obtains information about ports from the driver every second and only updates this information when the state of a port changes since the last scan. You can also run CHMON from a remote computer. For more information on the use of CHMON, please refer to the readme file CHMON.DOC on the Intellicon QNX 4.XX driver.

cti_tcdrain
We provide the function cti_tcdrain() because the tcdrain() function supplied by QSSL does not work with Intellicon 4.XX device drivers.
The reason that tcdrain() does not work is that it expects the UART device to have a transmit FIFO of one byte. Therefore when the buffer between Dev and Dev.cti/Dev32.cti is empty, tcdrain() assumes the transmission of all bytes of data.

However, it is possible that the Intellicon adapter can have several kilobytes of data in its buffers and tcdrain() will indicate that all data has transmitted. To avoid this situation cti_tcdrain() will operate like tcdrain() except that it will not return until all the data in the buffers has transmitted.

You use cti_tcdrain() in conjunction with tcdrain(), thus ensuring that the operating system’s buffers and the Intellicon buffers are empty.

Ctiflush
We provide the function ctiflush() because the tcflush() function supplied by QSSL does not work with Intellicon QNX 4.XX device drivers.The reason that tcflush() does not work is that it expects the UART device to have a transmit or receive FIFO of one byte. Therefore when the buffer between Dev and Dev.cti or Dev32.cti is empty, tcflush() assumes that all input/output buffers are clear.

However, it is possible that the Intellicon can have several kilobytes of data in its buffers and tcflush() will indicate that all buffers are clear. To avoid this situation ctiflush() will operate like tcflush() except that it will not return until all the data in the buffers has cleared.

ctiflush() is a replacement for tcflush(). When you use ctiflush() it calls the function tcflush() as well , thus ensuring that the operating system’s buffers and the Intellicon buffers are empty.

For more information on the use of ctiflush, please refer to the README file on the Intellicon QNX 4.XX driver diskette.

Error Messages

Dev.cti: WARNING: No interrupt received from card n on IRQ nn
During startup of the driver an interrupt was not sensed from board number n on the specified Interrupt line nn. Check your Interrupt settings for conflicts with other boards and make sure you have set the IRQ correctly.

Dev.cti: No response from card n
The Intellicon is not responding to commands in a timely fashion on board n. This can be due to serial lines being incorrectly connected or intermittent memory conflicts.

Dev.cti: Cannot verify code into Intellicon
The firmware being written to the card is not being read back properly. Since a memory test is run before this it is likely a hardware failure of some sort.

Dev.cti: No devices available
All devices slots are in use under QNX 4.XX. Try changing your sysinit so that the Dev line has a “-n 40” or bigger on it.

Dev.cti: System unable to add new devices
The device names that were specified to be used by Dev.cti already exist. This is usually caused by some abnormal termination of our Dev.cti driver, where the /dev names did not get cleaned up.

Intellicon Memory Test failed at mmmmm(hex) on board using IO Port nnn(hex)
Check for Memory Conflicts
Contents of this address are:
|—— HEX ——-|— ASCII —-|

The startup memory test failed at address mmmmm on the board that uses io port nnn. Ensure your memory segment and IO port has been set properly both on the board and on the command line (if set wrong this test will usually fail near the start of the segment). If the board is set correctly this error usually means there is some sort of memory conflict. Check the settings on other adapter boards such as Networks etc…
The HEX – ASCII output may give you a clue what it is in conflict with.

Go to Top