Under OS/2 2.x and OS/2 Warp
operating system, the PCCOM device driver provides total 96 ports and
baud rate up to 115200. PCCOM also supports device driver for high
speed card, and the baud rate can be up to 1M. The device driver works
for 8250, 16450, 16550 (FIFO), 16850(FIFO) etc.
G.1 Installation
The installation procedures are shown in the following.
1.
|
Add command into CONFIG.SYS file then reboot. |
DEVICE=C:\PCCOM4PC.SYS[/Cxx] [/Syy] [/4]
xx Assign the first port name (1 to 92)
yy The switch used to set PCI card number
4 High speed card used only
If "/C" is not use, the first port is COM3.
If you only install one card, you can ignore /S parameters.
If you install more than one card, you must set different card number. (Please refer chapter 5)
Switch: Set card number
2.
|
To set up communication parameters, please use
the MODE.COM command from OS/2, or use PCCOM.EXE command. We highly
recommend to use PCCOM.EXE command, because MODE.COM can be used only
for COM1 to COM9 and for maximum baud rate to 57600. |
The PCCOM.EXE can be used to set COM1 to COM96. The syntax of PCCOM.EXE is the same as MODE.COM.
ĦEFor example :
1.
|
Set one PCI 4 port card from COM3 to COM6. |
DEVICE=C:\PCCOM4PC.SYS
2.
|
Set two cards. One card is PCI 4 port card, which
is set from COM12 to COM15, and its card number is 0. One card is PCI 8
port card, which is set from COM20 to COM27, and its card number is 1. |
DEVICE=C:\PCCOM4PC.SYS /C12/S0
DEVICE=C:\PCCOM8PC.SYS /C20/S1
3.
|
Set up communication parameters. |
C:\PCCOM COMx:38400,N,8,1,TO=OFF,XON=OFF,
IDSR=ON, ODSR=ON, OCTS=ON, RTS=OFF,DTR=OFF
C:\PCCOM COMx:115200,N,1
G.2 Utilities
COMTEST.EXE is a general testing program for COM port. It will create
the threads associated with each communication port that will be test.
The testing function includes OPEN / CLOSE / READ / WRITE /
Non-Destructive Read / Non-Destructive WRITE / Get Status / Device
IOCTL. Due to lack of OS/2 API, Non-Destructive I/O is not support for
OS/2 even this device driver has implemented this feature.
In the COMTEST program, you can use up-right arrow to choice the option, and use enter/escape to start/stop the program.
The ComSent / ComRecv are a pair of communication programs for testing
the performance of communication port. You have to connect the test
ports with a null modem before you test communication port. You can use
PCCOM.EXE to change the parameters of communication port. Then use this
program to test heavy (transmission) duty on communication port.
G.3 API Communication Functions
In the following, there are API communication functions, for more
detail information, please refer to Control Program Programming Ref. of
OS/2, and programming Guide Vol. I-III of OS/2.
DosClose - Close a Handle to a File, Pipe, or Devices
#define INCL_DOSFILEMGR APIRET DosClose(HFILE FileHandle);
DosDevConfig - Get Information about Attached Devices
#define INCL_DOSPROCESS APIRET DosDevConfig(PVOID pDeviceInfo, ULONG ulDeviceType);
DosDevIOCtl - Perform Control Function on a Device Specified by an Opened Device Handle
#define INCL_DOSPROCESS APIRET
DosDevIOCtl(HFILE DevHandle, ULONG ulCategory, ULONG ulFunction, PVOID
pParmList, ULONG ulParmLengthMax, PULONG pParmLengthInOut, PVOID
pDataArea, ULONG ulDataLengthMax, PULONG pDataLengthInOut);
DosOpen - Open a File
#define INCL_DOSFILEMGR APIRET DosOpen(PSZ
pszFileName, PHFILE ppFileHandle, PULONG pActionTaken, ULONG
ulFileSize, ULONG ulFileAttribute,ULONG ulOpenFlag, ULONG
ulOpenMode, PEAOP2 ppEABuf);
DosRead - Read from a File, Pipe, or Device to a Buffer
#define INCL_DOSFILEMGR APIRET
DosRead(HFILE FileHandle, PVOID pBufferAre, ULONG ulBufferLength,
PULONG pByteRead);
DosWrite - Write to a File from a Buffer
#define INCL_DOSFILEMGR APIRET
DosWrite(HFILE FileHandle, PVOID pBufferArea, ULONG ulBufferLength,
PULONG pByteWritte);