The text of a manual · part 11 of 17
6110 Hand-Held Computer Technical Reference: Section 4: DOS Device Drivers, pages 103 to 112
Pages 103 to 112 of 160, from 6110 Hand-Held Computer Technical Reference
The original document is the PDF (1.9 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec 6110
Page 103
DOS Device Drivers
SECTION 4
Trivial File Transfer Client/Server TFTP.EXE is the trivial file transfer client/server for FTP. TFTP is generally used at boot time following a BOOTP request to retrieve a start-up file. The response from the BOOTP server generally contains the server IP address and the name of the file to retrieve. TFTP uses the following line command format: TFTP server TFTP {get|overwrite|put} <local file> <host> <foreign file> [image] serve get overwrite put local file host foreign file image
Starts the TFTP server. Retrieves a file from another machine; a get operation fails if a local file already exists. Retrieves a file from another machine, overwriting the local file if it exists. Transfers a local file to another machine. Names the file on the local machine. IP address of the host machine. Names the file on the host machine. Transfers the file in binary mode.
IrDA Printing IrDA printing support under DOS consists of the device driver, NORIRDA.SYS, the actual driver handler, link management wrapper, and protocol stack. Together these two software components form the IrDA printer solution, 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 compilers, 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 connection 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. close The coalescence buffer is sent to the printer and, after having verified that ll data is sent to the printer, the IrLMP and IrLAP disconnects are performed (if there is a coalescence buffer being used, refer to the –n switch for details). write The written character is stored in a local coalescence buffer (with the IrLMP protocol header inserted) 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 inserted without any attempt at local coalescence. ioctl This processing is specific to Intermec and is intended to support printing 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 responds by setting an extended error code in the application’s memory, using a pointer that was passed to it through the ioctl interface. 6110 Hand-Held Computer Technical Reference
4-11
Page 104
DOS Device Drivers
SECTION 4
If an error returns after making an ioctl call, the following list of error codes and descriptions apply:
4-12
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.
54
BUFFER_GET_FAILURE Write failure. Could not get a transmit buffer descriptor to send the data to the printer.
55
BAD_CONNECTION_HANDLE Open, write, or close failure. A defective connection handle was encountered during the flushing of the driver ’s coalescence buffer.
56
UNKNOWN_TRANSMIT_FAILURE Open, write, or close failure. The link access protocol failed for “unknown” reasons during an attempt to flush the driver ’s coalescence buffer.
57
WRITE_WITH_PRINTER_NOT_READY Write failure. A write was attempted to the driver while the driver is in an error state.
58
I_QUEUE_FULL Open, write, or close failure. The driver could not get a queue for the transmission of an information frame.
59
CONNECT_FAILURE Open failure. After a successful discover of an IrDA device, a connection could not be established.
60
DRIVER_CLOSED Write, read, ioctl, close failure. An attempt was made to access the driver while the driver was in a closed state.
61
NO_RECURSION Write, read, ioctl, close failure. An attempt was made to recursively access the driver.
62
BAD_LINK_CONTROL_FRAME_SIZE Open failure, link management failure. The system did not receive the correct frame size for a connect confirmation by IrMLP after the IrLAP link session was established with the remote device.
63
LINK_MANAGEMENT_CONTROL_FRAME_EXPECTED Open failure, link management failure. The system did not receive an IrLMP control frame from the remote device after the IrLAP link session was established.
6110 Hand-Held Computer Technical Reference
Page 105
DOS Device Drivers
SECTION 4
64
NOT_LINK_MANAGEMENT_CONNECT_CONFIRM Open failure, link management failure. The system did not receive an IrLMP connect confirm frame from the remote device after the IrLMP link session was established.
65
RECEIVE_FRAME_FAILURE Open failure, link management failure. The system did not receive the IrLMP connect confirm frame from the remote device that had a successful IrLAP link established.
66
READ_FAILURE_PRINTER_NOT_READY Read failure. An attempt was made to read from the character stream with the connection not in the ready state.
67
READ_FAILURE_PRINTER_IN_NDM Read failure. An attempt was made to read from the character stream with the connection in the normal disconnect mode.
68
READ_FAILURE_BAD_CONNECTION_HANDLE Read failure. An attempt was made to read from the core, and the connection handle used is no longer valid.
69
READ_FAILURE_UNKNOWN_STATUS Read failure. An attempt was made to read from the core that resulted in the core posting an unknown error.
70
WRITE_REQUEST_EXCEEDS_COALESCING_BUFFER Write failure. The user’s write buffer is too large to fit in the local coalescing buffer and is being rejected. Present the data to the driver with a buffer size of less than 128 bytes at this time. Make sure the NORIRDA.SYS file is on the system. If your system was delivered with an application requiring this file, it should already be in flash. If not, it can most likely be found in the toolkit. The following entry is required in the CONFIG.SYS file: device=d:\pathname\norirda.sys where d:\pathname is the specific path to the directory with the printer drivers. There are no required entries in the AUTOEXEC.BAT file for NORIRDA.SYS. NORIRDA.SYS has optional parameters. NORIRDA.SYS
–? " NOTE:
Provides information about version, revision level, a command line example, a list of the available switches, and brief descriptions of each.
Use only the switches shown here. This driver is a multi-platform program, providing features for all of the 6000 Series platforms. None of the other switches are intended for the 6110 Computer and could cause a malfunction, if used on this platform.
–c " NOTE:
[ –? –c –d:n –n:drivername –r:n ]
Indicates the driver should use a local coalescing buffer, rather than present the data to the connected device as it is delivered to the driver.
Using the –c switch creates a situation where the application is no longer assured of the data being delivered to the connected device when the write returns, as is the case when this switch is omitted.
–d:n
Specifies the disconnect time (in seconds) requested during negotiation, where (n) is one of: 3, 8, 12, 16, 20, 25, 30, or 40. This switch is accumulative and can add any or all of the above disconnect times to the default, which is 3. The two negotiating systems select the largest common value. 6110 Hand-Held Computer Technical Reference
4-13
Page 106
DOS Device Drivers
SECTION 4
–l
Specifies that the driver should link on open. This switch causes the driver to behave more like NORIRDA.SYS version 1.0, in that whenever an open is performed the driver initiates an XID, then links to whatever is discovered. –n:driverName Specifies the new name to which this character device driver should respond. This string must be supplied. The default name for this driver is IRDADRVR. –r:n Specifies the number of seconds of discovery retries to be performed at the first DOS write command by the driver. The default is five seconds.
LAN Communications MININET.EXE provides communications over Local Area Networks (LANs). The default baud rate is 500 KB, but automatically adjusts to the baud rate of the host. If this switch is not used, the default baud rate is used, otherwise the speed can be set to any of the following values: 5000 500 KB (default) 460.8 KB " 4608 115.2 KB (secondary default) " 1152 To load MININET, add a command line to the AUTOEXEC.BAT file, according to the following syntax: "
MININET.EXE
[–s#] [–c#] [–t#]
All parameters are optional, as designated by the brackets [ ]. You replace ‘#’ with a value that is appropriate for each parameter, according to the purpose as described below: –c# " NOTE:
Supplying the –c# switch prohibits an application from selecting a COM port via the NCB CALL used to establish a session. In this way it is possible to force which COM port to use.
–s# " NOTE:
Sets the default COM port to be used.
Sets the speed of communication.
The only baud rates currently supported by Intermec/Norand Host code for LAN communications are: 500 KB and 115.2 KB. The 460.8 KB baud rate is reserved for future use.
–t#
Sets the secondary baud rate to automatically toggle between the primary and secondary baud rates, depending on the speed of the host. A value of zero indicates that only the default baud rate is used (set with –s switch). Any of the baud rate values listed above are valid for this switch.
If neither –s# or –t# are set, MININET.EXE autoselects a baud rate from the three valid speeds. If only –s# is set, MININET toggles the baud rate selection between the requested speed and 115.2 KB. If both –s# and –t# are set to valid speeds, MININET toggles the baud rate selection between those two values. If –t# is set to zero, MININET sets the baud rate to the value set by –s# or to the default value of 500 KB. 4-14
6110 Hand-Held Computer Technical Reference
Page 107
DOS Device Drivers
SECTION 4
Magnetic Stripe Reader The H2MAGSCN.EXE 6110 Magnetic Stripe Reader (MSR) allows magnetic stripe cards to be read in either direction. When the card is read, the hardware is powered up, then shortly after the read power is removed. Thus very efficient power management is accomplished. The card data is read from the first three tracks and passed to a UART device. The driver interfaces with the UART to control the process of retrieving data. The 6110 MSR driver controls the hardware to provide the data to the application. The driver can return the data through the keyboard buffer, keyboard entry, or through the API specified in the SCANBIOS API Interface document. The hardware may reside at COM port address 0x03E8 with IRQ 6 or 0x0218 with IRQ 11. Command line options: –A Alternate COM port, allows the driver to work with hardware at 0x03E8 (default address is 0x0218). –E Permits the scanner to always be enabled to scan or read magnetic stripe cards. When this option reinitializes the driver, the read mode is set to wedge mode again. This is the default mode. –SCANBIOS An alternate method of operation (in place of –E). This permits the enabling and disabling of the scanner under software control. Once the driver is loaded, it can be reinvoked with other command line options to change its behavior. –Sn Specifies the Output Field Separator (default API only) for the always enabled mode of operation. The parameter represents the field separator where n equals “1” for a carriage return (default), “2” for both a carriage return and a line feed, or “3” for a tab character. –RAW Driver sends data from the card “as is” without parsing. EXAMPLE:
H2MAGSCN –E –S3
NPCP Printer NPCP printing support under DOS consists of the DOS device driver PC4800.SYS, that allows DOS and PL/N applications written for the 6110 Computer to print to NORAND 4800 and 6800 Series Printers, using NPCP. PC4800.SYS is installed as a device driver in the CONFIG.SYS file, such as: device=pc4800.sys [device name [port number [/Ilpt]]] device name Name to use for this instance of the device driver. This name opens the device. It can be anything except PRN, and can be up to eight characters long. The default name is NP4800. port number COM port used for output by the driver. Valid values: 1=COM1, 2=COM2, etc. Default: COM1 /I Redirects LPT output to the BIOS INT 17h API, and is required to support PL/N applications. lpt LPT port to be redirected. Valid values: 1=LPT1, 2=LPT2, etc. By default only output directed to the specified device name is captured. 6110 Hand-Held Computer Technical Reference
4-15
Page 108
DOS Device Drivers
" NOTE: EXAMPLE 1:
SECTION 4
The order of the command line parameters is important (for example, you must specify a device name if a port number is specified). Redirect LPT2 to COM1: Do not redirect any LPT2 output at the INT 17h (BIOS) interface. device=pc4800.sys LPT2 1 install=4000api.exe ...
EXAMPLE 2:
{ refer to 4000API.EXE for switches }
Redirect all LPT1 output to COM. device=pc4800.sys LPT1 2 /I1 install=4000api.exe ... { refer to 4000API.EXE for switches }
If PC4800.SYS is not in the root directory, be sure to include the path. " NOTE:
The /i switch is only intended for support of PL/N applications. Do NOT use the switch for non-PL/N applications. The interface provided is not 100 percent PC-compatible.
For additional information describing how PC4800.SYS can be loaded, refer to the 4000API documentation on page 5-4. Normally, 4000API.EXE is loaded in CONFIG.SYS using: install=4000API ... {refer to 4000API.EXE for switches}
However, if it needs to be loaded high, you must load it in AUTOEXEC.BAT. Intermec Technologies Corporation supplies PL/N and C standard printer routines that handle critical errors and the printing of text to INTERMEC printers. The following is for those who might want to create their own print routines. Open PC4800.SYS before using it, such as in C programming language, fopen(). Use the correct open call for the language being used that allows writing to the device. Also, the open call used should return an error if the device does not exist. Some open calls will create a file if the device driver is not present. To write to the device, use any appropriate output function that can be directed to the device (for example, in C programming language, you can use fprintf()). You should install a critical error handler that process errors from the printer. The printer driver returns only “device not ready” errors to DOS for the sake of compatibility with the standard PRINT program supplied with DOS. You can retrieve the extended error by bypassing DOS and calling the driver directly from the error handler. Ioctl calls (DOS Function AH = 44h, AL = 02h) are supported by the device driver (refer to a DOS reference manual for details). Calls require the printer device handle number in register BX, a data item with the following structure pointed to by DS:DX, and the number of bytes to be read in register CX. struct ioargs { far *unsigned char ioctl_cmd; far *unsigned char ioctl_buf; };
The ioctl_command field may point these commands for execution by the driver: ONLINE = 2 STATUS = 3 GET DEVICE FEATURES = 4 SELFTEST = 5 RESET = 6 GET CURRENT CONFIGURATION =7 XTENDED ERROR = 255
Data is returned to the buffer pointed to by the ioctl_buf, for the number of bytes specified in register CX when the ioctl call is made. The first byte of the returned data represents any error encountered during the call. If the call was successful, this byte is set to zero. If the call was unsuccessful, this byte represents the extended error. The format of the rest of the data is described in the documentation for the printer being communicated with. 4-16
6110 Hand-Held Computer Technical Reference
Page 109
DOS Device Drivers
SECTION 4
Open and close the printer driver for each report transaction with the printer to take advantage of the NPCP line-loss detection features. Applications should status (ioctl 3) the printer after the last line of a report or a series of reports are sent to the printer to ensure that all lines were printed successfully. The printer driver is multi-tasking. If the application needs to take full advantage of this feature, it must enable time slicing through the appropriate call to INT 15h (refer to the 4000API documentation). If time-slicing is not activated, the last line buffered by the driver is not sent to the printer until the device is closed or an ioctl status call to the printer is made. Perform an ioctl status call before all closes to make sure the driver print buffer is sent to the printer successfully, since DOS closes to character devices do not perform output flushes as part of the close operation. The driver flushes the buffer upon a close, but no error is returned if the flush is unsuccessful.
PC Card Services NORMOD.SYS is a PC Card services client that handles the identification and initialization of serial device PC Cards (such as modems and radios). NORMOD is installed in the CONFIG.SYS file, as follows: DEVICE=NORMOD.SYS [–A] [–Bd] [–Cx] [–Dx x x] [–Ix] [–Nname] [–R] [–S] [–V]
–A –Bd
EXAMPLE:
–B610 would set the cut off at 610 millivolts (0.61 volts).
–Cx EXAMPLE:
Suspends requests that are allowed, even if an open session is present. Normally, NORMOD rejects suspend requests whenever an application has an open connection. Defines a battery cutoff level, where “d” is the value in millivolts. If a voltage reading for your main battery is below this level, then open requests fails. This protects against loss of data when power fails because of low batteries.
Overrides the default COM port. It defaults to the first available comm port; probably COM4 since COM3 is usually taken.
–C4 would designate COM4.
–D x x x Defines the timeout used for a particular manufacture’s code, rather than always using the timeout value. If a modem card has an unreliable ready line, this switch could be used to define a timeout value instead of examining the ready line. The first two hexadecimal numbers must match both the code and the information values returned by a GetConfigInfo call before the third value will be used as the timeout value. The timeout value needs to be specified in tics (1/18th of a second). EXAMPLE:
/D 16b 21 20 sets the timeout to 20h tics, about 1.8 seconds. The 16b 21 identifies the Ericsson PIA radio.
–Ix EXAMPLE:
Changes the interrupt request level that will be used. The x parameter should be supplied in hexadecimal. The default value for x is IRQ 5.
–I7 would use IRQ 7 instead of IRQ 5.
6110 Hand-Held Computer Technical Reference
4-17
Page 110
DOS Device Drivers
SECTION 4
–Nname Changes the device name that will be installed. The default value for name is MODEM. EXAMPLE:
–Ncom4 would set the device name to COM4 instead of MODEM. The device name can be any valid eight character filename. Note however, that you should use a name that does not correspond to any files or directories that may exist or may need to exist. Because once you have defined a name as a device name, you will not be able to access any files or directories with the same root name.
–R –S –V
Using this switch, a card can be left powered on with ring-indicate enabled during suspend. Thus, a ring-indicate wakes up the terminal. Causes UART registers to be saved when a suspend occurs, and it restores them upon resume. Turns on the 12-volt VPP whenever a modem session is open.
Application Interfaces and Device Behavior This driver allows applications to power the modem on by application request. This is supported by the following methods. DOS OPEN command " INT 14h, function 0 (SERIAL BIOS INITIALIZE COMMAND) " INT 14h, function FF01h (4000API PORT POWER ON COMMAND) " APM function 5307h (SET DEVICE POWER STATE) to the correct serial port and power state The modem can be turned off by application request. This is supported by the following methods: "
DOS close command " INT 14h, function FF00h (4000API PORT POWER OFF COMMAND) " APM function 5307h (SET DEVICE POWER STATE) to the correct serial port and power state. Once the driver is opened, power is maintained to the PC Card as long as the card is in the slot and battery-low or power-fail events are not detected. On detection of battery-low or power-fail events, power is removed from the card and the application is to recover from modem failure by detecting protocol errors. "
" NOTE:
To recover properly, applications must always power-down (CLOSE) the modem before modem power-up (OPEN).
It is not possible to SUSPEND the system, while the modem driver is opened. The modem driver rejects the request to preserve the communications session.
Supported DOS Driver IOCTL Functions IOCTL Function Buffer Length Description
4-18
1
12
Return the command line parameters.
2
16
Return the manufacturer ID string.
3
64
Return the product version 1 information string.
4
2
Return the current extended device error.
6110 Hand-Held Computer Technical Reference
Page 111
DOS Device Drivers
SECTION 4
CMD 1: Command Line Parameters
The buffer returned, for the command line parameters, has the following format: struct cmdline { unsigned char len; unsigned char devname[8]; unsigned char socket; unsigned char IRQ; unsigned int base; }
// length of data returned // device driver name // PC Card socket device to load in // system IRQ associated with modem // base i/o address of modems UART
CMD 2: Manufacturer ID String Manufacturer IDs are assigned by the PCMCIA standards committee. Each modem manufacturer is required to provide their ID in the card CIS for examination by software. Consult the PCMCIA specification for the format of the TUPLE string returned by this call.
CMD 3: Product Version 1 Information String
Each PC Card manufacturer is required to provide a Version 1 Information TUPLE in the card CIS for examination by software. Consult the PCMCIA specification for the format of the TUPLE string returned by this call.
CMD 4: Return Extended Error
Status of the modem driver or an extended error can be retrieved via this call. Status Variable
Value Meaning
SUCCESS
0x00
BAD_ADAPTER
0x01
Device in the slot is possibly not a modem.
BAD_ATTRIBUTE
0x02
Device in the slot is possibly not a modem.
BAD_BASE
0x03
Requested COM port is already assigned.
BAD_IRQ
0x06
Requested IRQ is already assigned.
BAD_SOCKET
0x0B
Requested socket is already owned by another device.
BAD_TYPE
0x0D
Possibly the device in the slot is not a modem.
NO_CARD
0x14
No card is present in the socket.
IN_USE
0x1E
Requested configuration is already in use.
NO_MORE_ITEMS
0x1F
Requested configuration did not match configurations.
POWER_ERR
0xF0
Modem power was removed because of power event.
NOT_INITIALIZED 0xF1
Card was rejected or inserted after driver was opened.
Device Driver Errors The following errors are returned to DOS applications: " " " "
0x0100 0x8102 0x8103 0x810c
Command OK Device not ready. Indicates card not in slot Unknown DOS command General failure; all other errors and power too low to run modem
6110 Hand-Held Computer Technical Reference
4-19
Page 112
DOS Device Drivers
SECTION 4
Interrupt 14h Interrupt 14h interfaces, supported by NORMOD.SYS, manage modem power and return error codes dealing with the modem power-on sequence. The supported INT 14h functions are intercepted when DX+1 represents the COM port specified on the modem driver line. The list of INT 14h functions supported by the NORMOD device driver is as follows: AH=00h " Initialize Communications Port AH=04h " Extended Initialize AH=FEh " Get Extended Error AH=FFh " Port Power Off/On " NOTE:
Interrupt 14h interfaces are reserved solely for internal use and application use of these methods may affect application portability. Therefore, applications should not use them.
Interrupt 15h APM interfaces manage modem power. The NORMOD device driver supports the Set Power State (AX=5307) and the Get Power State (AX=530C).
Pen Calibration CALIB.EXE is the DOS Pen Calibration utility. It performs calibration of the pen interface for your hand-held computer. Calibration is simply the alignment of the cursor, placing it in the same location where a stylus (or pen or finger) is placed on the touch screen. The 6110 Computer comes with default settings that are normally acceptable for most applications. However, some applications, such as signature capturing, may require a calibration adjustment to compensate for variations in touch panel alignment and user preferences. Configuration settings are stored in flash. If flash contains invalid information, the program displays the calibration screen, regardless of the existence of the calibrate command-line option. CALIB.EXE is a DOS application program and can be invoked from the AUTOEXEC.BAT file or from the DOS command line. The appropriate mouse driver must be installed. The driver contains extensions to the standard Mouse API which provides digitizer information, screen resolution, and raw coordinate points, which is required for this implementation of CALIB.EXE. " NOTE:
Load the pen driver before running the calibration utility. See page 4-3 for BGI Drivers. 61MOUSE.COM (pen driver) CALIB.EXE (calibration utility) N6110.BGI (BGI driver)
CALIB.EXE begins calibration by placing one of four targets at a fixed location on the screen and waits for a pen to be pressed at the center of the target three times. It is important during this process to apply moderate pressure while pressing the target. Lightly tapping or placing too much pressure generates incorrect results. The unit beeps after each successful pen press. Therefore, if a beep is not heard when the pen is down, lift and press again. Also, do not allow fingers or any other object to touch the screen. When three good data points are acquired for a target, the next target is displayed. 4-20
6110 Hand-Held Computer Technical Reference