Description For motor driven card readers, the ID card unit checks whether a card has been inserted. If so, all specified tracks are read immediately. If reading the chip is requested, the chip will be contacted and reset and the ATR (Answer To Reset) data will be read. When this command completes the chip will be in contacted position. This command can also be used for an explicit reset of a previously contacted chip.
If no card has been inserted, and for all other categories of card readers, the ID card unit waits for the period of time specified in the WFSExecute call for a card to be either inserted or pulled through. The next step is trying to read all tracks specified.
Magnetic stripe track data is converted from its 5 or 7 bit character form to 8 bit ASCII form. The parity bit from each 5 or 7 bit magnetic stripe character is discarded. Start and end sentinel characters are not returned to the application. Field separator characters are returned to the application, and are also converted to 8 bit ASCII form.
In addition to that, a security check via a security module (i.e., MM, CIM86) can be requested.
Input Param LPWORD lpwReadData
;
lpwReadData
Specifies which data should be read as a combination of the following flags:
Value Meaning
WFS_IDC_TRACK1 Track 1 of the magnetic stripe will be read.
WFS_IDC_TRACK2 Track 2 of the magnetic stripe will be read.
WFS_IDC_TRACK3 Track 3 of the magnetic stripe will be read.
WFS_IDC_CHIP The chip will be read.
WFS_IDC_SECURITY A security check will be performed.
Output Param LPWFSIDCCARDDATA *lppCardData
;
Pointer to a null-terminated array of pointers to card data structures:
struct _wfs_idc_card_data
{
WORD wDataSource;
WORD wStatus;
ULONG ulDataLength;
LPBYTE lpbData;
} WFSIDCCARDDATA, * LPWFSIDCCARDDATA;
wDataSource
Specifies the source of the card data as one of the following flags:
Value Meaning
WFS_IDC_TRACK1 lpbData contains data read from track 1.
WFS_IDC_TRACK2 lpbData contains data read from track 2.
WFS_IDC_TRACK3 lpbData contains data read from track 3.
WFS_IDC_CHIP lpbData contains ATR data read from the chip.
WFS_IDC_SECURITY lpbData contains the value returned by the security module.
wStatus
Status of reading the card data. Possible values are:
Value Meaning
WFS_IDC_DATAOK The data is ok.
WFS_IDC_DATAMISSING The track/chip is blank.
WFS_IDC_DATAINVALID The data contained on the track/chip is invalid.
WFS_IDC_DATATOOLONG The data contained on the track/chip is too long.
WFS_IDC_DATATOOSHORT The data contained on the track/chip is too short.
WFS_IDC_DATASRCNOTSUPP The data source to read from is not supported by the service provider.
WFS_IDC_DATASRCMISSING The data source to read from is missing on the card.
ulDataLength
Specifies the length of the following field lpbData.
lpbData
Points to the data read from the track/chip or the value returned by the security module.
Error Codes The following additional error codes can be generated by this command:
Value Meaning
WFS_ERR_IDC_MEDIAJAM The card is jammed. Operator intervention is required.
WFS_ERR_IDC_SHUTTERFAIL The open of the shutter failed due to manipulation or hardware error. Operator intervention is required
WFS_ERR_IDC_NOMEDIA The card was removed before completion of the read action.
WFS_ERR_IDC_INVALIDMEDIA No track or chip found; card may have been inserted or pulled through the wrong way.
Events The following additional events can be generated by this command:
Value Meaning
WFS_EXEE_IDC_MEDIAINSERTED This event is generated when a card is detected in the device, giving early warning of card entry to an application, allowing it to remove a user prompt and/or do other processing while the card is being read.
WFS_SRVE_IDC_MEDIAREMOVED This event is generated when a card is removed before completion of a read operation.
WFS_EXEE_IDC_INVALIDMEDIA The user is attempting to insert the media in the wrong orientation. The card has not been accepted into the device. The device is still ready to accept a card inserted in the correct orientation.
Comments None.