Intermec 6100 Reference Guide

Page of 328
SECTION 2
Supporting DOS Applications
2-12    PEN*KEY
R
 6100 Computer Programmer’s Reference Guide
DOS IrDA Printing: PRDRV.SYS, IRDAPDRV.EXE
Overview
IrDA printing support under DOS consists of the device driver, PRDRV.SYS, plus
IRDAPDRV.EXE, the actual driver handler, link management wrapper, and proĆ
tocol stack.  Together these two software components form the IrDA printer soluĆ
tion, providing a standard DOS character driver to support IrDA printers.
The IrDA printer driver supports the following DOS device driver entry points,
compatible with the standard input and output libraries provided by DOS comĆ
pilers, handling the request as indicated by the summarized processes details:
open
attempts discovery of an IrDA device, and if discovery is successful, establishes an IrLMP conĆ
nection for a printer with the device discovered.
"
NOTE:
Only one open connection is allowed at this time.
read
returns any data sent by the system.  A return count of zero implies that no data is available.
write
the written character is stored in a local coalescence buffer (with the IrLMP protocol header inĆ
serted) until the frame size is reached, at which time the frame is transmitted to the printer.  If
the -n switch is used, each user write byte count is sent with the IrLMP protocol header inĆ
serted without any attempt at local coalescence.
ioctl
this processing is specific to Intermec Technologies Corporation and is intended to support printĆ
ing applications.  A printing program may  hook the DOS INT 24 critical error interrupt and
then call the driver's ioctl directly using the information provided by INT 24.  The driver reĆ
sponds by setting an extended error code in the application's memory, using a pointer that was
passed to it through the ioctl interface.  The following ioctl call switch is currently implemented.
IOCMD_STATUS :                          //  0x03
   requestHeader.headerStatus = detailedErrorCode;
   break;
IOCMD_ID :                             //  0x80
   requestHeader.headerStatus = 0x0a;
   break;
default :
   requestHeader.headerStatus = detailedErrorCode;
   break;
where detailedErrorCode is one of the following:
  0
PREADY
device driver is open –– a printer connection is established.
 50
IRLAP_DISCONNECT_ERROR
close failure –– a disconnect event state change failure occurred during the disconnect
procedure processing.
 51
DISCOVERY_FAILURE
open failure –– no devices responded during the discovery procedure.
 52
LINK_MANAGEMENT_CONNECT_FAILURE
open failure –– a buffer flushing operation failed during the establishment of the link
management session with a discovered device.
 53
TX_BUFFER_DESC_GET_FAILURE
write failure –– could not get a transmit buffer descriptor to send the data to the
printer.
2. DOS 
Applications