SECTION 2
Supporting DOS Applications
PEN*KEY
R
6200/6300 Hand-Held Computer Programmer’s Reference Guide 2-25
The modem driver monitors the system voltage and refuses to enable the modem
during powerĆon operations if battery voltage is too low. The battery level, below
which the modem cannot operate correctly, is 7.0 volts for the 6300 Computer
and 6.0 volts for the 6200 Computer. If the modem fails to respond while an
application is improperly functioning, the application should check this voltage
level to determine if that is the cause of the problem.
Power is also be removed from the modem on any ejection of the card. Card
power is not applied on insertion of the card. Applications are expected to
recover from modem ejection and installation via protocol errors.
"
NOTE:
To recover properly, applications must always power-down (CLOSE) the modem before mo-
dem power-up (OPEN).
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 detection of protocol errors.
It is not be possible to SUSPEND the system, while the modem driver is opened.
The modem driver suspends the request to preserve the communications session.
"
NOTE:
The driver owns the slot and only a modem device can exist in the socket.
Supported DOS Driver IOCTL_IN Functions
The driver supports DOS init, open, close, and IOCTL functions. Open and close
are standard language functions. IOCTL_IN calls (reqpk.cmd = 3) exist to get
the driver command line parameters, the modem manufacturer's ID, and the
Version 1 product information string. The following is the structure of the DOS
request packet to the driver for IOCTL_IN (in C" format):
typedef struct
{
unsigned char reqlen;
// length of request structure
unsigned char unit;
// sub unit code for block devices only
unsigned char cmd;
// driver command
unsigned status;
// error returned by driver
long rsrv1;
// area reserved by DOS
long rsrv2;
// area reserved by DOS
unsigned char media;
// area reserved by DOS
IOCTLPARMS far* ioctl; // ioctl buffer
unsigned len;
// length of ioctl buffer
} reqpk;
The structure of an IOCTLPARMS buffer is defined as follows in C"
typedef struct {
unsigned char far *cmd;// pointer to a command value
unsigned char far *buf;// pointer to a buffer to place data in
} IOCTLPARMS;
The cmd" values are defined as follows for the modem driver. For each
command, the buffer buf" must have the minimum size specified. This length
must be inserted into the
reqpk.len
field.
Cmd Value Buffer Length Description
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
2. DOS
Applications