Intermec 6200 Reference Guide

Page of 410
SECTION 2
Supporting DOS Applications
2-26    PEN*KEY
R
 6200/6300 Hand-Held Computer Programmer’s Reference Guide
CMD 1:  Command Line Parameters
The buffer returned, for the command line parameters, has the following format:
struct cmdline {
unsigned char len;
// length of data returned
unsigned char devname[8];
// device driver name
unsigned char socket;
// PC Card socket device to load in
unsigned char IRQ;
// system irq associated with modem
unsigned int base;
// 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
Possibly the device in the slot is not a modem.
BAD_ATTRIBUTE
0x02
Possibly the device in the slot is not a modem.
BAD_BASE
0x03
The requested COM port is already assigned.
BAD_IRQ
0x06
The 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 a power event.
NOT_INITIALIZED
0xF1
Card ejected or inserted after driver was opened.
IOCTL_IN Sample Code
"
NOTE:
The following sample code is written for the modem device, if you are using this code for the
wireless WAN card, make the appropriate changes.
#include <stdio.h>
#define GET_DRIVER_PARMS
0x01
// return the command line parameters
#define GET_MFGID
0x02
// return manufacturer’s ID string
#define GET_PRODINFO
0x03
// return product vers 1 into string
typedef struct {
unsigned char far *ioctl_cmd;
// points to the ioctl cmd
unsigned char far *ioctl_buf;
// points to the argument buffer
unsigned ioctl_len;
// length of ioctl_buf
} IOARGS;
IOARGS ioargs;
UC buffer[64];
// this buffer is pointed to by ioargs.ioctl_cmd
2. DOS 
Applications