| IDTech Universal SDK 1.0.35.027 API reference for C++

Macros | Typedefs | Functions
libIDT_VP3300_BT.h File Reference

VP3300 BT API. More...

`#include "IDTDef.h"`

Go to the source code of this file.

## Macros
#define | IN
#define | OUT
#define | IN_OUT

## Typedefs
typedef void(* | pMessageHotplug) (int, int)
typedef void(* | pSendDataLog) (BYTE *, int)
typedef void(* | pReadDataLog) (BYTE *, int)
typedef void(* | pEMV_callBack) (int, int, BYTE *, int, IDTTransactionData *, EMV_Callback *, int)
typedef void(* | pMSR_callBack) (int, IDTMSRData)
typedef void(* | pMSR_callBackp) (int, IDTMSRData *)
typedef void(* | pPIN_callBack) (int, IDTPINData *)
typedef void(* | pCMR_callBack) (int, IDTCMRData *)
typedef void(* | pCSFS_callBack) (BYTE status)
typedef void(* | pRKI_callBack) (int, char *)
typedef void(* | ftpComm_callBack) (int, int, int)
typedef void(* | httpComm_callBack) (BYTE *, int)
typedef void(* | v4Comm_callBack) (BYTE, BYTE, BYTE *, int)

## Functions
void | registerHotplugCallBk (pMessageHotplug pMsgHotplug)
void | registerLogCallBk (pSendDataLog pFSend, pReadDataLog pFRead)
void | device_registerRKICallBk (pRKI_callBack pRKIf)
void | emv_registerCallBk (pEMV_callBack pEMVf)
void | msr_registerCallBk (pMSR_callBack pMSRf)
void | msr_registerCallBkp (pMSR_callBackp pMSRf)
void | ctls_registerCallBk (pMSR_callBack pCTLSf)
void | ctls_registerCallBkp (pMSR_callBackp pCTLSf)
void | pin_registerCallBk (pPIN_callBack pPINf)
void | device_registerCameraCallBk (pCMR_callBack pCMRf)
void | device_registerCardStatusFrontSwitchCallBk (pCSFS_callBack pCSFSf)
void | comm_registerHTTPCallback (httpComm_callBack cBack)
void | comm_registerV4Callback (v4Comm_callBack cBack)
char * | SDK_Version ()
int | setAbsoluteLibraryPath (const char *absoluteLibraryPath)
int | device_init ()
int | device_setCurrentDevice (int deviceType)
int | device_close ()
void | device_getIDGStatusCodeString (IN int returnCode, OUT char *despcrition)
int | device_isConnected ()
int | device_isAttached (int deviceType)
int | device_getFirmwareVersion (OUT char *firmwareVersion)
int | device_getFirmwareVersion_Len (OUT char *firmwareVersion, IN_OUT int *firmwareVersionLen)
int | device_pingDevice ()
int | device_controlUserInterface (IN BYTE *values)
int | device_getCurrentDeviceType ()
int | device_SendDataCommandNEO (IN int cmd, IN int subCmd, IN BYTE *data, IN int dataLen, OUT BYTE *response, IN_OUT int *respLen)
int | device_enablePassThrough (int enablePassThrough)
int | device_setBurstMode (IN BYTE mode)
int | device_setPollMode (IN BYTE mode)
int | device_setMerchantRecord (int index, int enabled, char *merchantID, char *merchantURL)
int | device_getMerchantRecord (IN int index, OUT BYTE *record)
int | device_getMerchantRecord_Len (IN int index, OUT BYTE *record, IN_OUT int *recordLen)
int | device_getTransactionResults (IDTMSRData *cardData)
int | device_startTransaction (IN double amount, IN double amtOther, IN int type, IN const int _timeout, IN BYTE *tags, IN int tagsLen)
void | device_setTransactionExponent (int exponent)
int | device_activateTransaction (IN const int _timeout, IN BYTE *tags, IN int tagsLen)
int | device_cancelTransaction ()
int | device_getRTCDateTime (IN BYTE *dateTime, IN_OUT int *dateTimeLen)
int | device_setRTCDateTime (IN BYTE *dateTime, IN int dateTimeLen)
int | device_startRKI (const char *caPath, int isProduction)
int | device_getSDKWaitTime ()
void | device_setSDKWaitTime (int waitTime)
int | device_getThreadStackSize ()
void | device_setThreadStackSize (int threadSize)
int | config_getSerialNumber (OUT char *sNumber)
int | config_getSerialNumber_Len (OUT char *sNumber, IN_OUT int *sNumberLen)
int | ctls_startTransaction (IN double amount, IN double amtOther, IN int type, IN const int _timeout, IN BYTE *tags, IN int tagsLen)
int | ctls_activateTransaction (IN const int _timeout, IN BYTE *tags, IN int tagsLen)
int | ctls_cancelTransaction ()
int | ctls_retrieveApplicationData (IN BYTE *AID, IN int AIDLen, OUT BYTE *tlv, IN_OUT int *tlvLen)
int | ctls_setApplicationData (IN BYTE *tlv, IN int tlvLen)
int | ctls_removeApplicationData (IN BYTE *AID, IN int AIDLen)
int | ctls_removeAllApplicationData ()
int | ctls_retrieveAIDList (OUT BYTE *AIDList, IN_OUT int *AIDListLen)
int | ctls_retrieveTerminalData (OUT BYTE *tlv, IN_OUT int *tlvLen)
int | ctls_setTerminalData (IN BYTE *tlv, IN int tlvLen)
int | ctls_retrieveCAPK (IN BYTE *capk, IN int capkLen, OUT BYTE *key, IN_OUT int *keyLen)
int | ctls_setCAPK (IN BYTE *capk, IN int capkLen)
int | ctls_removeCAPK (IN BYTE *capk, IN int capkLen)
int | ctls_removeAllCAPK ()
int | ctls_retrieveCAPKList (OUT BYTE *keys, IN_OUT int *keysLen)
int | ctls_setConfigurationGroup (IN BYTE *tlv, IN int tlvLen)
int | ctls_getConfigurationGroup (IN int group, OUT BYTE *tlv, OUT int *tlvLen)
int | ctls_getAllConfigurationGroups (OUT BYTE *tlv, IN_OUT int *tlvLen)
int | ctls_removeConfigurationGroup (int group)
void | emv_allowFallback (IN int allow)
void | emv_setAutoAuthenticateTransaction (IN int authenticate)
void | emv_setAutoCompleteTransaction (IN int complete)
int | emv_getAutoAuthenticateTransaction ()
int | emv_getAutoCompleteTransaction ()
void | emv_setTransactionParameters (IN double amount, IN double amtOther, IN int type, IN int timeout, IN BYTE *tags, IN int tagsLen)
int | emv_startTransaction (IN double amount, IN double amtOther, IN int exponent, IN int type, IN int timeout, IN BYTE *tags, IN int tagsLen, IN int forceOnline)
int | emv_activateTransaction (IN int timeout, IN BYTE *tags, IN int tagsLen, IN int forceOnline)
int | emv_authenticateTransaction (IN BYTE *updatedTLV, IN int updatedTLVLen)
int | emv_authenticateTransactionWithTimeout (IN int timeout, IN BYTE *updatedTLV, IN int updatedTLVLen)
int | emv_completeTransaction (IN int commError, IN BYTE *authCode, IN int authCodeLen, IN BYTE *iad, IN int iadLen, IN BYTE *tlvScripts, IN int tlvScriptsLen, IN BYTE *tlv, IN int tlvLen)
int | emv_cancelTransaction ()
int | emv_retrieveApplicationData (IN BYTE *AID, IN int AIDLen, OUT BYTE *tlv, IN_OUT int *tlvLen)
int | emv_setApplicationData (IN BYTE *name, IN int nameLen, IN BYTE *tlv, IN int tlvLen)
int | emv_setApplicationDataTLV (IN BYTE *tlv, IN int tlvLen)
int | emv_removeApplicationData (IN BYTE *AID, IN int AIDLen)
int | emv_removeAllApplicationData ()
int | emv_retrieveAIDList (OUT BYTE *AIDList, IN_OUT int *AIDListLen)
int | emv_retrieveTerminalData (OUT BYTE *tlv, IN_OUT int *tlvLen)
int | emv_setTerminalData (IN BYTE *tlv, IN int tlvLen)
int | emv_setTerminalMajorConfiguration (IN int configuration)
int | emv_retrieveCAPK (IN BYTE *capk, IN int capkLen, OUT BYTE *key, IN_OUT int *keyLen)
int | emv_setCAPK (IN BYTE *capk, IN int capkLen)
int | emv_removeCAPK (IN BYTE *capk, IN int capkLen)
int | emv_removeAllCAPK ()
int | emv_retrieveCAPKList (OUT BYTE *keys, IN_OUT int *keysLen)
int | emv_retrieveCRL (OUT BYTE *list, IN_OUT int *lssLen)
int | emv_setCRL (IN BYTE *list, IN int lsLen)
int | emv_removeCRL (IN BYTE *list, IN int lsLen)
int | emv_removeAllCRL ()
int | icc_getICCReaderStatus (OUT BYTE *status)
int | icc_powerOnICC (OUT BYTE *ATR, IN_OUT int *inLen)
int | icc_powerOffICC ()
int | icc_exchangeAPDU (IN BYTE *c_APDU, IN int cLen, OUT BYTE *reData, IN_OUT int *reLen)
int | msr_cancelMSRSwipe ()
int | msr_startMSRSwipe (IN int _timeout)
int | executeTransaction (WorldPayData *data, pWP_callBack wpCallback, int requestOnly)
int | cancelWorldPay ()
void | parseMSRData (IN BYTE *resData, IN int resLen, IN_OUT IDTMSRData *cardData)

## Detailed Description

VP3300 BT API.

VP3300 BT Global API methods.

## Macro Definition Documentation

## ◆ IN

#define IN

INPUT parameter.

## ◆ IN_OUT

#define IN_OUT

INPUT / OUTPUT PARAMETER.

## ◆ OUT

#define OUT

OUTPUT parameter.

## Typedef Documentation

## ◆ ftpComm_callBack

typedef void(* ftpComm_callBack) (int, int, int)

Define the comm callback function to get FTP file transfer status
It should be passed as a parameter in a FTP request, Signature (int, int, int) = response code, current block, total blocks RESPONSE CODES: 100 = FILE DOWNLOAD STARTED 101 = FILE BLOCK XX OF XX RECEIVED 102 = FILE DOWNLOAD COMPLETED 103 = FILE DOWNLOAD TERMINATED PREMATURELY

## ◆ httpComm_callBack

typedef void(* httpComm_callBack) (BYTE *, int)

Define the comm callback function to get the async url data
It should be registered using the comm_registerHTTPCallback

## ◆ pCMR_callBack

typedef void(* pCMR_callBack) (int, IDTCMRData *)

Define the camera callback function to get the image data
It should be registered using the device_registerCameraCallBk,

## ◆ pCSFS_callBack

typedef void(* pCSFS_callBack) (BYTE status)

Define the card status and front switch callback function to get card and front switch status
It should be registered using the device_registerCardStatusFrontSwitchCallBk,

## ◆ pEMV_callBack

typedef void(* pEMV_callBack) (int, int, BYTE *, int, IDTTransactionData *, EMV_Callback *, int)

Define the EMV callback function to get the transaction message/data/result.
It should be registered using the emv_registerCallBk,

## ◆ pMessageHotplug

typedef void(* pMessageHotplug) (int, int)

Define the USB hot-plug callback function to monitor the info when plug in/out the reader.
It should be registered using the registerHotplugCallBk, The first integer parameter is device type, and the second integer parameter is either 0: Device Plugged Out or 1: Device Plugged In

## ◆ pMSR_callBack

typedef void(* pMSR_callBack) (int, IDTMSRData)

Define the MSR callback function to get the MSR card data
It should be registered using the msr_registerCallBk, this callback function is for backward compatibility

## ◆ pMSR_callBackp

typedef void(* pMSR_callBackp) (int, IDTMSRData *)

Define the MSR callback function to get pointer to the MSR card data
It should be registered using the msr_registerCallBk, this callback function is recommended instead of pMSR_callBack

## ◆ pPIN_callBack

typedef void(* pPIN_callBack) (int, IDTPINData *)

Define the PINPad callback function to get the input PIN Pad data
It should be registered using the pin_registerCallBk,

## ◆ pReadDataLog

typedef void(* pReadDataLog) (BYTE *, int)

Define the read response callback function to monitor the reading response from the reader.
It should be registered using the registerLogCallBk,

## ◆ pRKI_callBack

typedef void(* pRKI_callBack) (int, char *)

Define the RKI callback function to get the status of the RKI
It should be registered using the device_registerRKICallBk,

## ◆ pSendDataLog

typedef void(* pSendDataLog) (BYTE *, int)

Define the send command callback function to monitor the sending command into the reader.
It should be registered using the registerLogCallBk,

## ◆ v4Comm_callBack

typedef void(* v4Comm_callBack) (BYTE, BYTE, BYTE *, int)

Define the comm callback function to receive the V4 Protocol packets received by the device from an external source (IP/USB/RS-232) It should be registered using the comm_registerV4Callback, Data callback will contain command, sub-command, and data from V4 packet

## Function Documentation

## ◆ cancelWorldPay()

int cancelWorldPay | ( |  | ) |

Cancels WorldPay transaction.

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ comm_registerHTTPCallback()

void comm_registerHTTPCallback | ( | httpComm_callBack | cBack | ) |

Register Comm HTTP Async Callback

Parameters

  cBack | - HTTP Comm callback

## ◆ comm_registerV4Callback()

void comm_registerV4Callback | ( | v4Comm_callBack | cBack | ) |

Register External V4 Protocol commands Callback

Parameters

  cBack | - V4 Protocol Comm callback

## ◆ config_getSerialNumber()

int config_getSerialNumber | ( | OUT char * | sNumber | ) |

DEPRECATED : please use config_getSerialNumber_Len(OUT char* sNumber, IN_OUT int *sNumberLen)

Polls device for Serial Number

Parameters

  sNumber | Returns Serial Number; needs to have at least 64 bytes of memory

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString

## ◆ config_getSerialNumber_Len()

int config_getSerialNumber_Len | ( | OUT char * | sNumber,
|  | IN_OUT int * | sNumberLen
| ) |  |

Polls device for Serial Number

Parameters

  sNumber | Returns Serial Number
  sNumberLen | Length of Serial Number

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString

## ◆ ctls_activateTransaction()

int ctls_activateTransaction | ( | IN const int | _timeout,
|  | IN BYTE * | tags,
|  | IN int | tagsLen
| ) |  |

Start CTLS Transaction Request

Authorizes the CTLS transaction for an ICC card

The tags will be returned in the callback routine.

Parameters

  timeout | Timeout value in seconds.
  tags | The tags to be included in the request. Passed as TLV stream. Example, tag 9F0C with amount 0x000000000100 would be 0x9F0C06000000000100
  tagsLen | The length of tags data buffer.

>>>>>IMPORTANT: parameters for amount and amtOther MUST BE PASSED AS A DOUBLE VALUE WITH DECIMAL POINT. Example, do not pass 1, but instead pass 1.0 or 1.00. Otherwise, results will be unpredictable

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString() Note: if auto poll is on, it will returm the error IDG_P2_STATUS_CODE_COMMAND_NOT_ALLOWED

NOTE ON APPLEPAY VAS: To enable ApplePay VAS, first a merchant record must be defined in one of the six available index positions (1-6) using device_setMerchantRecord, then container tag FFEE06 must be sent as part of the additional tags parameter of ctls_startTransaction. Tag FFEE06 must contain tag 9F26 and 9F22, and can optionanally contain tags 9F2B and DFO1. Example FFEE06189F220201009F2604000000009F2B050100000000DF010101 9F22 = two bytes = ApplePay Terminal Applicaiton Version Number. Hard defined as 0100 for now. (required) 9F26 = four bytes = ApplePay Terminal Capabilities Information (required)

- Byte 1 = RFU
- Byte 2 = Terminal Type
- - Bit 8 = VAS Support (1=on, 0 = off)
- - Bit 7 = Touch ID Required (1=on, 0 = off)
- - Bit 6 = RFU
- - Bit 5 = RFU
- - Bit 1,2,3,4
- - - 0 = Payment Terminal
- - - 1 = Transit Terminal
- - - 2 = Access Terminal
- - - 3 = Wireless Handoff Terminal
- - - 4 = App Handoff Terminal
- - - 15 = Other Terminal
- Byte 3 = RFU
- Byte 4 = Terminal Mode
- - 0 = ApplePay VAS OR ApplePay
- - 1 = ApplePay VAS AND ApplePay
- - 2 = ApplePay VAS ONLY
- - 3 = ApplePay ONLY 9F2B = 5 bytes = ApplePay VAS Filter. Each byte filters for that specific merchant index (optional) DF01 = 1 byte = ApplePay VAS Protocol. (optional)
- - Bit 1 : 1 = URL VAS, 0 = Full VAS
- - Bit 2 : 1 = VAS Beeps, 0 = No VAS Beeps
- - Bit 3 : 1 = Silent Comm Error, 2 = EMEA Comm Error
- - Bit 4-8 : RFU

## ◆ ctls_cancelTransaction()

int ctls_cancelTransaction | ( |  | ) |

Cancel EMV Transaction

Cancels the currently executing EMV transaction.

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_getAllConfigurationGroups()

int ctls_getAllConfigurationGroups | ( | OUT BYTE * | tlv,
|  | IN_OUT int * | tlvLen
| ) |  |

Retrieve All Configuration Groups

Returns all the Configuration Groups installed on the terminal for CTLS

Parameters

  tlv | The TLV elements data
  tlvLen | the length of tlv data buffer.

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_getConfigurationGroup()

int ctls_getConfigurationGroup | ( | IN int | group,
|  | OUT BYTE * | tlv,
|  | OUT int * | tlvLen
| ) |  |

Get Configuration Group

Retrieves the Configuration for the specified Group.

Parameters

  group | Configuration Group
  tlv | return data
  tlvLen | the length of tlv data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_registerCallBk()

void ctls_registerCallBk | ( | pMSR_callBack | pCTLSf | ) |

To register the ctls callback function to get the MSR card data. (Pass NULL to disable the callback.)

## ◆ ctls_registerCallBkp()

void ctls_registerCallBkp | ( | pMSR_callBackp | pCTLSf | ) |

To register the ctls callback function to get the MSR card data pointer. (Pass NULL to disable the callback.)

## ◆ ctls_removeAllApplicationData()

int ctls_removeAllApplicationData | ( |  | ) |

Remove All Application Data

Removes all the Application Data

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_removeAllCAPK()

int ctls_removeAllCAPK | ( |  | ) |

Remove All Certificate Authority Public Key

Removes all the CAPK

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_removeApplicationData()

int ctls_removeApplicationData | ( | IN BYTE * | AID,
|  | IN int | AIDLen
| ) |  |

Remove Application Data by AID Removes the Application Data for CTLS as specified by the AID name passed as a parameter

Parameters

  AID | Name of ApplicationID Must be between 5 and 16 bytes
  AIDLen | the length of AID data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_removeCAPK()

int ctls_removeCAPK | ( | IN BYTE * | capk,
|  | IN int | capkLen
| ) |  |

Remove Certificate Authority Public Key

Removes the CAPK as specified by the RID/Index

Parameters

  capk | 6 byte CAPK = 5 bytes RID + 1 byte INDEX
  capkLen | the length of capk data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_removeConfigurationGroup()

int ctls_removeConfigurationGroup | ( | int | group | ) |

Remove Configuration Group

Removes the Configuration as specified by the Group. Must not by group 0

Parameters

  group | Configuration Group

Return values

  RETURN_CODE | Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_retrieveAIDList()

int ctls_retrieveAIDList | ( | OUT BYTE * | AIDList,
|  | IN_OUT int * | AIDListLen
| ) |  |

Retrieve AID list

Returns all the AID names installed on the terminal for CTLS. .

Parameters

  AIDList | array of AID name byte arrays
  AIDListLen | the length of AIDList array buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_retrieveApplicationData()

int ctls_retrieveApplicationData | ( | IN BYTE * | AID,
|  | IN int | AIDLen,
|  | OUT BYTE * | tlv,
|  | IN_OUT int * | tlvLen
| ) |  |

Retrieve Application Data by AID

Retrieves the Application Data as specified by the AID name passed as a parameter.

Parameters

  AID | Name of ApplicationID. Must be between 5 and 16 bytes
  AIDLen | the length of AID data buffer.
  tlv | The TLV elements of the requested AID
  tlvLen | the length of tlv data buffer.

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_retrieveCAPK()

int ctls_retrieveCAPK | ( | IN BYTE * | capk,
|  | IN int | capkLen,
|  | OUT BYTE * | key,
|  | IN_OUT int * | keyLen
| ) |  |

Retrieve Certificate Authority Public Key

Retrieves the CAPK for CTLS as specified by the RID/Index passed as a parameter.

Parameters

  capk | 6 bytes CAPK = 5 bytes RID + 1 byte Index
  capkLen | the length of capk data buffer
  key | Response returned as a CAKey format: [5 bytes RID][1 byte Index][1 byte Hash Algorithm][1 byte Encryption Algorithm] [20 bytes HashValue][4 bytes Public Key Exponent][2 bytes Modulus Length][Variable bytes Modulus] Where: Hash Algorithm: The only algorithm supported is SHA-1.The value is set to 0x01 Encryption Algorithm: The encryption algorithm in which this key is used. Currently support only one type: RSA. The value is set to 0x01. HashValue: Which is calculated using SHA-1 over the following fields: RID & Index & Modulus & Exponent Public Key Exponent: Actually, the real length of the exponent is either one byte or 3 bytes. It can have two values: 3 (Format is 0x00 00 00 03), or 65537 (Format is 0x00 01 00 01) Modulus Length: LenL LenH Indicated the length of the next field. Modulus: This is the modulus field of the public key. Its length is specified in the field above.
  keyLen | the length of key data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_retrieveCAPKList()

int ctls_retrieveCAPKList | ( | OUT BYTE * | keys,
|  | IN_OUT int * | keysLen
| ) |  |

Retrieve the Certificate Authority Public Key list

Returns all the CAPK RID and Index installed on the terminal.

Parameters

  keys | [key1][key2]...[keyn], each key 6 bytes where key = 5 bytes RID + 1 byte index
  keysLen | the length of keys data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_retrieveTerminalData()

int ctls_retrieveTerminalData | ( | OUT BYTE * | tlv,
|  | IN_OUT int * | tlvLen
| ) |  |

Retrieve Terminal Data

Retrieves the Terminal Data for CTLS. This is configuration group 0 (Tag FFEE - > FFEE0100). The terminal data can also be retrieved by ctls_getConfigurationGroup(0).

Parameters

  tlv | Response returned as a TLV
  tlvLen | the length of tlv data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_setApplicationData()

int ctls_setApplicationData | ( | IN BYTE * | tlv,
|  | IN int | tlvLen
| ) |  |

Set Application Data by AID

Sets the Application Data for CTLS as specified by TLV data

Parameters

  tlv | Application data in TLV format The first tag of the TLV data must be the group number (FFE4). The second tag of the TLV data must be the AID (9F06)

Example valid TLV, for Group #2, AID a0000000035010: "ffe401029f0607a0000000051010ffe10101ffe50110ffe30114ffe20106"

Parameters

  tlvLen | the length of tlv data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_setCAPK()

int ctls_setCAPK | ( | IN BYTE * | capk,
|  | IN int | capkLen
| ) |  |

Set Certificate Authority Public Key

Sets the CAPK as specified by the CAKey structure

Parameters

  capk | CAKey format: [5 bytes RID][1 byte Index][1 byte Hash Algorithm][1 byte Encryption Algorithm][20 bytes HashValue][4 bytes Public Key Exponent][2 bytes Modulus Length][Variable bytes Modulus] Where: Hash Algorithm: The only algorithm supported is SHA-1.The value is set to 0x01 Encryption Algorithm: The encryption algorithm in which this key is used. Currently support only one type: RSA. The value is set to 0x01. HashValue: Which is calculated using SHA-1 over the following fields: RID & Index & Modulus & Exponent Public Key Exponent: Actually, the real length of the exponent is either one byte or 3 bytes. It can have two values: 3 (Format is 0x00 00 00 03), or 65537 (Format is 0x00 01 00 01) Modulus Length: LenL LenH Indicated the length of the next field. Modulus: This is the modulus field of the public key. Its length is specified in the field above.
  capkLen | the length of capk data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_setConfigurationGroup()

int ctls_setConfigurationGroup | ( | IN BYTE * | tlv,
|  | IN int | tlvLen
| ) |  |

Set Configuration Group

Sets the Configuration Group for CTLS as specified by the TLV data

Parameters

  tlv | Configuration Group Data in TLV format The first tag of the TLV data must be the group number (FFE4). A second tag must exist
  tlvLen | the length of tlv data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_setTerminalData()

int ctls_setTerminalData | ( | IN BYTE * | tlv,
|  | IN int | tlvLen
| ) |  |

Set Terminal Data

Sets the Terminal Data for CTLS as specified by the TLV. The first TLV must be Configuration Group Number (Tag FFE4). The terminal global data is group 0, so the first TLV would be FFE40100. Other groups can be defined using this method (1 or greater), and those can be retrieved with ctls_getConfigurationGroup(int group), and deleted with ctls_removeConfigurationGroup(int group). You cannot delete group 0.

Parameters

  tlv | TerminalData configuration file
  tlvLen | the length of tlv data buffer

Return values

  RETURN_CODE | Values can be parsed with device_getIDGStatusCodeString()

## ◆ ctls_startTransaction()

int ctls_startTransaction | ( | IN double | amount,
|  | IN double | amtOther,
|  | IN int | type,
|  | IN const int | _timeout,
|  | IN BYTE * | tags,
|  | IN int | tagsLen
| ) |  |

Start CTLS Transaction Request

Authorizes the CTLS transaction for an ICC card

The tags will be returned in the callback routine.

Parameters

  amount | Transaction amount value (tag value 9F02) - SEE IMPORTANT NOTE BELOW
  amtOther | Other amount value, if any (tag value 9F03) - SEE IMPORTANT NOTE BELOW
  type | Transaction type (tag value 9C).
  timeout | Timeout value in seconds.
  tags | Any other tags to be included in the request. Passed as TLV stream. Example, tag 9F0C with amount 0x000000000100 would be 0x9F0C06000000000100 If tags 9F02 (amount),9F03 (other amount), or 9C (transaction type) are included, they will take priority over these values supplied as individual parameters to this method.
  tagsLen | The length of tags data buffer.

>>>>>IMPORTANT: parameters for amount and amtOther MUST BE PASSED AS A DOUBLE VALUE WITH DECIMAL POINT. Example, do not pass 1, but instead pass 1.0 or 1.00. Otherwise, results will be unpredictable

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString() Note: if auto poll is on, it will returm the error IDG_P2_STATUS_CODE_COMMAND_NOT_ALLOWED

NOTE ON APPLEPAY VAS: To enable ApplePay VAS, first a merchant record must be defined in one of the six available index positions (1-6) using device_setMerchantRecord, then container tag FFEE06 must be sent as part of the additional tags parameter of ctls_startTransaction. Tag FFEE06 must contain tag 9F26 and 9F22, and can optionanally contain tags 9F2B and DFO1. Example FFEE06189F220201009F2604000000009F2B050100000000DF010101 9F22 = two bytes = ApplePay Terminal Applicaiton Version Number. Hard defined as 0100 for now. (required) 9F26 = four bytes = ApplePay Terminal Capabilities Information (required)

- Byte 1 = RFU
- Byte 2 = Terminal Type
- - Bit 8 = VAS Support (1=on, 0 = off)
- - Bit 7 = Touch ID Required (1=on, 0 = off)
- - Bit 6 = RFU
- - Bit 5 = RFU
- - Bit 1,2,3,4
- - - 0 = Payment Terminal
- - - 1 = Transit Terminal
- - - 2 = Access Terminal
- - - 3 = Wireless Handoff Terminal
- - - 4 = App Handoff Terminal
- - - 15 = Other Terminal
- Byte 3 = RFU
- Byte 4 = Terminal Mode
- - 0 = ApplePay VAS OR ApplePay
- - 1 = ApplePay VAS AND ApplePay
- - 2 = ApplePay VAS ONLY
- - 3 = ApplePay ONLY 9F2B = 5 bytes = ApplePay VAS Filter. Each byte filters for that specific merchant index (optional) DF01 = 1 byte = ApplePay VAS Protocol. (optional)
- - Bit 1 : 1 = URL VAS, 0 = Full VAS
- - Bit 2 : 1 = VAS Beeps, 0 = No VAS Beeps
- - Bit 3 : 1 = Silent Comm Error, 2 = EMEA Comm Error
- - Bit 4-8 : RFU

## ◆ device_activateTransaction()

int device_activateTransaction | ( | IN const int | _timeout,
|  | IN BYTE * | tags,
|  | IN int | tagsLen
| ) |  |

Start Transaction Request

Authorizes the transaction for an MSR/CTLS/ICC card

The tags will be returned in the callback routine.

Parameters

  timeout | Timeout value in seconds.
  tags | The tags to be included in the request. Passed as a TLV. Example, tag 9F0C with amount 0x000000000100 would be 0x9F0C06000000000100 Be sure to include 9F02 (amount)and9C (transaction type).
  tagsLen | The length of tags data buffer.

>>>>>IMPORTANT: parameters for amount and amtOther MUST BE PASSED AS A DOUBLE VALUE WITH DECIMAL POINT. Example, do not pass 1, but instead pass 1.0 or 1.00. Otherwise, results will be unpredictable

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString() Note: if auto poll is on, it will returm the error IDG_P2_STATUS_CODE_COMMAND_NOT_ALLOWED

NOTE ON APPLEPAY VAS: To enable ApplePay VAS, first a merchant record must be defined in one of the six available index positions (1-6) using device_setMerchantRecord, then container tag FFEE06 must be sent as part of the additional tags parameter of device_startTransaction. Tag FFEE06 must contain tag 9F26 and 9F22, and can optionanally contain tags 9F2B and DFO1. Example FFEE06189F220201009F2604000000009F2B050100000000DF010101 9F22 = two bytes = ApplePay Terminal Applicaiton Version Number. Hard defined as 0100 for now. (required) 9F26 = four bytes = ApplePay Terminal Capabilities Information (required)

- Byte 1 = RFU
- Byte 2 = Terminal Type
- - Bit 8 = VAS Support (1=on, 0 = off)
- - Bit 7 = Touch ID Required (1=on, 0 = off)
- - Bit 6 = RFU
- - Bit 5 = RFU
- - Bit 1,2,3,4
- - - 0 = Payment Terminal
- - - 1 = Transit Terminal
- - - 2 = Access Terminal
- - - 3 = Wireless Handoff Terminal
- - - 4 = App Handoff Terminal
- - - 15 = Other Terminal
- Byte 3 = RFU
- Byte 4 = Terminal Mode
- - 0 = ApplePay VAS OR ApplePay
- - 1 = ApplePay VAS AND ApplePay
- - 2 = ApplePay VAS ONLY
- - 3 = ApplePay ONLY 9F2B = 5 bytes = ApplePay VAS Filter. Each byte filters for that specific merchant index (optional) DF01 = 1 byte = ApplePay VAS Protocol. (optional)
- - Bit 1 : 1 = URL VAS, 0 = Full VAS
- - Bit 2 : 1 = VAS Beeps, 0 = No VAS Beeps
- - Bit 3 : 1 = Silent Comm Error, 2 = EMEA Comm Error
- - Bit 4-8 : RFU

## ◆ device_cancelTransaction()

int device_cancelTransaction | ( |  | ) |

Disable Transaction Cancel Transaction request.

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ device_close()

int device_close | ( |  | ) |

Close the device

Returns
  RETURN_CODE: 0: success, 0x0A: failed

## ◆ device_controlUserInterface()

int device_controlUserInterface | ( | IN BYTE * | values | ) |

Control User Interface

Controls the User Interface: Display, Beep, LED

Parameters

  values | Four bytes to control the user interface Byte[0] = LCD Message Messages 00-07 are normally controlled by the reader. 00h: Idle Message (Welcome) 01h: Present card (Please Present Card) 02h: Time Out or Transaction cancel (No Card) 03h: Transaction between reader and card is in the middle (Processing...) 04h: Transaction Pass (Thank You) 05h: Transaction Fail (Fail) 06h: Amount (Amount $ 0.00 Tap Card) 07h: Balance or Offline Available funds (Balance $ 0.00) Messages 08-0B are controlled by the terminal 08h: Insert or Swipe card (Use Chip & PIN) 09h: Try Again(Tap Again) 0Ah: Tells the customer to present only one card (Present 1 card only) 0Bh: Tells the customer to wait for authentication/authorization (Wait) FFh: indicates the command is setting the LED/Buzzer only. Byte[1] = Beep Indicator 00h: No beep 01h: Single beep 02h: Double beep 03h: Three short beeps 04h: Four short beeps 05h: One long beep of 200 ms 06h: One long beep of 400 ms 07h: One long beep of 600 ms 08h: One long beep of 800 ms Byte[2] = LED Number 00h: LED 0 (Power LED) 01h: LED 1 02h: LED 2 03h: LED 3 FFh: All LEDs Byte[3] = LED Status 00h: LED Off 01h: LED On

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ device_enablePassThrough()

int device_enablePassThrough | ( | int | enablePassThrough | ) |

Enable Pass Through

Enables Pass Through Mode for direct communication with L1 interface (power on icc, send apdu, etc).

Parameters

  enablePassThrough | 1 = pass through ON, 0 = pass through OFF

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ device_getCurrentDeviceType()

int device_getCurrentDeviceType | ( |  | ) |

Get current active device type

Returns
  : return the device type defined as DEVICE_TYPE in the IDTDef.h

## ◆ device_getFirmwareVersion()

int device_getFirmwareVersion | ( | OUT char * | firmwareVersion | ) |

DEPRECATED : please use device_getFirmwareVersion_Len(OUT char* firmwareVersion, IN_OUT int *firmwareVersionLen)

Polls device for Firmware Version

Parameters

  firmwareVersion | Response returned of Firmware Version; needs to have at least 128 bytes of memory

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ device_getFirmwareVersion_Len()

int device_getFirmwareVersion_Len | ( | OUT char * | firmwareVersion,
|  | IN_OUT int * | firmwareVersionLen
| ) |  |

Polls device for Firmware Version

Parameters

  firmwareVersion | Response returned of Firmware Version
  firmwareVersionLen | Length of Firmware Version

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ device_getIDGStatusCodeString()

void device_getIDGStatusCodeString | ( | IN int | returnCode,
|  | OUT char * | despcrition
| ) |  |

Review the return code description.

Parameters

  returnCode | the response result.
  description |

Return values

  the | string for description of response result

- 0: "no error, beginning task";
- 1: "no response from reader";
- 2: "invalid response data";
- 01: " Incorrect Header Tag";
- 02: " Unknown Command";
- 03: " Unknown Sub-Command";
- 04: " CRC Error in Frame";
- 05: " Incorrect Parameter";
- 06: " Parameter Not Supported";
- 07: " Mal-formatted Data";
- 08: " Timeout";
- 0A: " Failed / NACK";
- 0B: " Command not Allowed";
- 0C: " Sub-Command not Allowed";
- 0D: " Buffer Overflow (Data Length too large for reader buffer)";
- 0E: " User Interface Event";
- 10: " Need clear firmware(apply in boot loader only)";
- 11: " Communication type not supported, VT-1, burst, etc. Need encrypted firmware (apply in boot loader only)";
- 12: " Secure interface is not functional or is in an intermediate state.";
- 13: " Data field is not mod 8";
- 14: " Pad 0x80 not found where expected";
- 15: " Specified key type is invalid";
- 16: " Could not retrieve key from the SAM (InitSecureComm)";
- 17: " Hash code problem";
- 18: " Could not store the key into the SAM (InstallKey)";
- 19: " Frame is too large";
- 1A: " Unit powered up in authentication state but POS must resend the InitSecureComm command";
- 1B: " The EEPROM may not be initialized because SecCommInterface does not make sense";
- 1C: " Problem encoding APDU Module-Specific Status Codes ";
- 20: " Unsupported Index (ILM) SAM Transceiver error - problem communicating with the SAM (Key Mgr)";
- 21: " Unexpected Sequence Counter in multiple frames for single bitmap (ILM)Length error in data returned from the SAM (Key Mgr) - 22: " Improper bit map (ILM)"; - 23: " Request Online Authorization"; - 24: " ViVOCard3 raw data read successful"; - 25: " Message index not available (ILM) ViVOcomm activate transaction card type (ViVOcomm)"; - 26: " Version Information Mismatch (ILM)"; - 27: " Not sending commands in correct index message index (ILM)"; - 28: " Time out or next expected message not received (ILM)"; - 29: " ILM languages not available for viewing (ILM)"; - 2A: " Other language not supported (ILM)"; - 41: " from 41 to 4F, Module-specific errors for Key Manager";
- 50: " Auto-Switch OK";
- 51: " Auto-Switch failed";
- 70: " Antenna Error 80h Use another card";
- 81: " Insert or swipe card";
- 90: " Data encryption Key does not exist";
- 91: " Data encryption Key KSN exhausted";

## ◆ device_getMerchantRecord()

int device_getMerchantRecord | ( | IN int | index,
|  | OUT BYTE * | record
| ) |  |

DEPRECATED : please use device_getMerchantRecord_Len(IN int index, OUT BYTE * record, IN_OUT int *recordLen)

Get Merchant Record

Gets the merchant record for the device.

Parameters

  index | Merchant Record index, valid values 1-6
  record; | needs to have at least 99 bytes of memory response data from reader. Merchant Record Index: 1 byte enabled: 1 byte Merchant ID: 32 bytes Length of Merchant URL: 1 byte Merchant URL: 64 bytes

Returns
  success or error code. Values can be parsed with device_getIDGStatusCodeString()

See also
  ErrorCode

## ◆ device_getMerchantRecord_Len()

int device_getMerchantRecord_Len | ( | IN int | index,
|  | OUT BYTE * | record,
|  | IN_OUT int * | recordLen
| ) |  |

Get Merchant Record

Gets the merchant record for the device.

Parameters

  index | Merchant Record index, valid values 1-6
  record | response data from reader. Merchant Record Index: 1 byte enabled: 1 byte Merchant ID: 32 bytes Length of Merchant URL: 1 byte Merchant URL: 64 bytes
  recordLen | Length of record

Returns
  success or error code. Values can be parsed with device_getIDGStatusCodeString()

See also
  ErrorCode

## ◆ device_getRTCDateTime()

int device_getRTCDateTime | ( | IN BYTE * | dateTime,
|  | IN_OUT int * | dateTimeLen
| ) |  |

get RTC date and time of the device

Parameters

  dateTime | <dateTime data>=""> is: 6 byte data for YYMMDDHHMMSS in hex. For example 0x171003102547 stands for 2017 Oct 3rd 10:25:47
  dateTimeLen | return 6 bytes if successful

Returns
  success or error code. Values can be parsed with device_getResponseCodeString

See also
  ErrorCode

## ◆ device_getSDKWaitTime()

int device_getSDKWaitTime | ( |  | ) |

Get SDK Wait Time

Get the SDK wait time for transactions

Returns
  SDK wait time in seconds

## ◆ device_getThreadStackSize()

int device_getThreadStackSize | ( |  | ) |

Get Thread Stack Size

Get the stack size setting for newly created threads

Returns
  Thread Stack Size

## ◆ device_getTransactionResults()

int device_getTransactionResults | ( | IDTMSRData * | cardData | ) |

Get Transaction Results Gets the transaction results when the reader is functioning in "Auto Poll" mode

Parameters

  cardData | The transaction results

Returns
  success or error code. Values can be parsed with device_getResponseCodeString

See also
  ErrorCode

## ◆ device_init()

int device_init | ( |  | ) |

Initial the device by USB
It will detect the device and trying connect.
The connect status can be checked by device_isConnected().
Note: after the function returns success, the function device_setCurrentDevice() has to be called to set the device type.

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ device_isAttached()

int device_isAttached | ( | int | deviceType | ) |

Check if the device is attached to the USB port The function device_init() must be called before this function.

Parameters

  deviceType,the | device type of the USB device

Returns
  1 if the device is attached, or 0 if the device is not attached

## ◆ device_isConnected()

int device_isConnected | ( |  | ) |

Check the device conntected status

Returns
  DEVICE_DISCONNECT=0, or DEVICE_CONNECTED = 1

## ◆ device_pingDevice()

int device_pingDevice | ( |  | ) |

Ping Device

Pings the reader. If connected, returns success. Otherwise, returns timeout.

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ device_registerCameraCallBk()

void device_registerCameraCallBk | ( | pCMR_callBack | pCMRf | ) |

To register the camera callback function to get the image data. (Pass NULL to disable the callback.)

## ◆ device_registerCardStatusFrontSwitchCallBk()

void device_registerCardStatusFrontSwitchCallBk | ( | pCSFS_callBack | pCSFSf | ) |

To register the card status and front switch callback function to get status. (Pass NULL to disable the callback.)

## ◆ device_registerRKICallBk()

void device_registerRKICallBk | ( | pRKI_callBack | pRKIf | ) |

To register the RKI callback function to get the RKI status. (Pass NULL to disable the callback.)

## ◆ device_SendDataCommandNEO()

int device_SendDataCommandNEO | ( | IN int | cmd,
|  | IN int | subCmd,
|  | IN BYTE * | data,
|  | IN int | dataLen,
|  | OUT BYTE * | response,
|  | IN_OUT int * | respLen
| ) |  |

Send a Command to device

Sends a command to the device .

Parameters

  cmd | buffer of command to execute.
  cmdLen,the | length of the buffer cmd.
  data | buffer of IDG command data.
  dataLen,the | length of the buffer data.
  response | Response data
  respLen,the | length of Response data

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString() Send a Command to NEO device

Sends a command to the NEO device .

Parameters

  cmd | command to execute.
  subCmd,sub | command to execute.
  data | buffer of NEO command data.
  dataLen,the | length of the buffer data.
  response | Response data
  respLen,the | length of Response data

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ device_setBurstMode()

int device_setBurstMode | ( | IN BYTE | mode | ) |

Send Burst Mode

Sets the burst mode for the device.

Parameters

  mode | 0 = OFF, 1 = Always On, 2 = Auto Exit

Returns
  success or error code. Values can be parsed with device_getIDGStatusCodeString

See also
  ErrorCode

## ◆ device_setCurrentDevice()

int device_setCurrentDevice | ( | int | deviceType | ) |

Sets the current device to talk to
The connect status can be checked by device_isConnected().

Parameters

  deviceType | Device to connect to enum DEVICE_TYPE { IDT_DEVICE_UNKNOWN=0, IDT_DEVICE_AUGUSTA_HID, IDT_DEVICE_AUGUSTA_KB, IDT_DEVICE_AUGUSTA_S_HID, IDT_DEVICE_AUGUSTA_S_KB, IDT_DEVICE_AUGUSTA_S_TTK_HID, IDT_DEVICE_SPECTRUM_PRO, IDT_DEVICE_MINISMART_II, IDT_DEVICE_L80, IDT_DEVICE_L100, IDT_DEVICE_UNIPAY, IDT_DEVICE_UNIPAY_I_V, IDT_DEVICE_VP3300_AJ, IDT_DEVICE_KIOSK_III, IDT_DEVICE_KIOSK_III_S, IDT_DEVICE_PIP_READER, IDT_DEVICE_VENDI, IDT_DEVICE_VP3300_USB, IDT_DEVICE_UNIPAY_I_V_TTK, IDT_DEVICE_VP3300_BT, IDT_DEVICE_VP8800, IDT_DEVICE_SREDKEY2_HID, IDT_DEVICE_SREDKEY2_KB, IDT_DEVICE_NEO2, IDT_DEVICE_MINISMART_II_COM = IDT_DEVICE_NEO2+5, IDT_DEVICE_SPECTRUM_PRO_COM, IDT_DEVICE_KIOSK_III_COM, IDT_DEVICE_KIOSK_III_S_COM, IDT_DEVICE_VP3300_COM, IDT_DEVICE_NEO2_COM, IDT_DEVICE_MAX_DEVICES = IDT_DEVICE_NEO2_COM+5 };

Returns
  RETURN_CODE: 1: success, 0: failed

## ◆ device_setMerchantRecord()

int device_setMerchantRecord | ( | int | index,
|  | int | enabled,
|  | char * | merchantID,
|  | char * | merchantURL
| ) |  |

Set Merchant Record Sets the merchant record for ApplePay VAS

Parameters

  index | Merchant Record index, valid values 1-6
  enabled | Merchant Enabled/Valid flag
  merchantID | Merchant unique identifer registered with Apple. Example com.idtechproducts.applePay
  merchantURL | Merchant URL, when applicable

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ device_setPollMode()

int device_setPollMode | ( | IN BYTE | mode | ) |

Set Poll Mode

Sets the poll mode forthe device. Auto Poll keeps reader active, Poll On Demand only polls when requested by terminal

Parameters

  mode | 0 = Auto Poll, 1 = Poll On Demand

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ device_setRTCDateTime()

int device_setRTCDateTime | ( | IN BYTE * | dateTime,
|  | IN int | dateTimeLen
| ) |  |

set RTC date and time of the device

Parameters

  dateTime | <dateTime data>=""> is: 6 byte data for YYMMDDHHMMSS in hex. For example 0x171003102547 stands for 2017 Oct 3rd 10:25:47
  dateTimeLen | should be always 6 bytes

Returns
  success or error code. Values can be parsed with device_getResponseCodeString

See also
  ErrorCode

## ◆ device_setSDKWaitTime()

void device_setSDKWaitTime | ( | int | waitTime | ) |

Set SDK Wait Time

Set the SDK wait time for transactions

Parameters

  waitTime | The SDK wait time for transaction in seconds

## ◆ device_setThreadStackSize()

void device_setThreadStackSize | ( | int | threadSize | ) |

Set Thread Stack Size

Set the stack size setting for newly created threads

## ◆ device_setTransactionExponent()

void device_setTransactionExponent | ( | int | exponent | ) |

Sets the transaction exponent to be used with device_startTransaction. Default value is 2

Parameters

  exponent,The | exponent to use when calling device_startTransaction

## ◆ device_startRKI()

int device_startRKI | ( | const char * | caPath,
|  | int | isProduction
| ) |  |

Start remote key injection.

Parameters

  caPath | The path to ca-certificates.crt
  isProduction | 1: The reader is a production unit, 0: The reader is not a production unit

Returns
  success or error code.

See also
  ErrorCode

## ◆ device_startTransaction()

int device_startTransaction | ( | IN double | amount,
|  | IN double | amtOther,
|  | IN int | type,
|  | IN const int | _timeout,
|  | IN BYTE * | tags,
|  | IN int | tagsLen
| ) |  |

Start Transaction Request

Authorizes the transaction for an MSR/CTLS/ICC card

The tags will be returned in the callback routine.

Parameters

  amount | Transaction amount value (tag value 9F02) - SEE IMPORTANT NOTE BELOW
  amtOther | Other amount value, if any (tag value 9F03) - SEE IMPORTANT NOTE BELOW
  type | Transaction type (tag value 9C).
  timeout | Timeout value in seconds.
  tags | Any other tags to be included in the request. Passed as TLV. Example, tag 9F0C with amount 0x000000000100 would be 0x9F0C06000000000100 If tags 9F02 (amount),9F03 (other amount), or 9C (transaction type) are included, they will take priority over these values supplied as individual parameters to this method.
  tagsLen | The length of tags data buffer.

>>>>>IMPORTANT: parameters for amount and amtOther MUST BE PASSED AS A DOUBLE VALUE WITH DECIMAL POINT. Example, do not pass 1, but instead pass 1.0 or 1.00. Otherwise, results will be unpredictable

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString() Note: if auto poll is on, it will returm the error IDG_P2_STATUS_CODE_COMMAND_NOT_ALLOWED

NOTE ON APPLEPAY VAS: To enable ApplePay VAS, first a merchant record must be defined in one of the six available index positions (1-6) using device_setMerchantRecord, then container tag FFEE06 must be sent as part of the additional tags parameter of device_startTransaction. Tag FFEE06 must contain tag 9F26 and 9F22, and can optionanally contain tags 9F2B and DFO1. Example FFEE06189F220201009F2604000000009F2B050100000000DF010101 9F22 = two bytes = ApplePay Terminal Applicaiton Version Number. Hard defined as 0100 for now. (required) 9F26 = four bytes = ApplePay Terminal Capabilities Information (required)

- Byte 1 = RFU
- Byte 2 = Terminal Type
- - Bit 8 = VAS Support (1=on, 0 = off)
- - Bit 7 = Touch ID Required (1=on, 0 = off)
- - Bit 6 = RFU
- - Bit 5 = RFU
- - Bit 1,2,3,4
- - - 0 = Payment Terminal
- - - 1 = Transit Terminal
- - - 2 = Access Terminal
- - - 3 = Wireless Handoff Terminal
- - - 4 = App Handoff Terminal
- - - 15 = Other Terminal
- Byte 3 = RFU
- Byte 4 = Terminal Mode
- - 0 = ApplePay VAS OR ApplePay
- - 1 = ApplePay VAS AND ApplePay
- - 2 = ApplePay VAS ONLY
- - 3 = ApplePay ONLY 9F2B = 5 bytes = ApplePay VAS Filter. Each byte filters for that specific merchant index (optional) DF01 = 1 byte = ApplePay VAS Protocol. (optional)
- - Bit 1 : 1 = URL VAS, 0 = Full VAS
- - Bit 2 : 1 = VAS Beeps, 0 = No VAS Beeps
- - Bit 3 : 1 = Silent Comm Error, 2 = EMEA Comm Error
- - Bit 4-8 : RFU

## ◆ emv_activateTransaction()

int emv_activateTransaction | ( | IN int | timeout,
|  | IN BYTE * | tags,
|  | IN int | tagsLen,
|  | IN int | forceOnline
| ) |  |

Start EMV Transaction Request

Authorizes the EMV transaction for an ICC card

The tags will be returned in the callback routine.

Parameters

  timeout | Timeout value in seconds.
  tags | Tags to be included in the request. Passed as a TLV stream. Example, tag 9F0C with amount 0x000000000100 would be 0x9F0C06000000000100
  tagsLen | Length of tags
  forceOnline | TRUE = do not allow offline approval, FALSE = allow ICC to approve offline if terminal capable Note: To request tags to be included in default response, use tag DFEE1A, and specify tag list. Example four tags 9F02, 9F36, 95, 9F37 to be included in response = DFEE1A079F029F36959F37

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString >>>>>IMPORTANT: parameters for amount and amtOther MUST BE PASSED AS A DOUBLE VALUE WITH DECIMAL POINT. Example, do not pass 1, but instead pass 1.0 or 1.00. Otherwise, results will be unpredictable

## ◆ emv_allowFallback()

void emv_allowFallback | ( | IN int | allow | ) |

Allow fallback for EMV transactions. Default is TRUE

Parameters

  allow | TRUE = allow fallback, FALSE = don't allow fallback

## ◆ emv_authenticateTransaction()

int emv_authenticateTransaction | ( | IN BYTE * | updatedTLV,
|  | IN int | updatedTLVLen
| ) |  |

Authenticate EMV Transaction Request

Authenticates the EMV transaction for an ICC card. Execute this after receiving response with result code 0x10 to emv_startTransaction

The tags will be returned in the callback routine.

Parameters

  updatedTLV | TLV stream that can be used to update the following values: 9F02: Amount 9F03: Other amount 9C: Transaction type 5F57: Account type In addition tag DFEE1A can be sent to specify tag list to include in results. Example four tags 9F02, 9F36, 95, 9F37 to be included in response = DFEE1A079F029F36959F37
  updatedTLVLen |

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString

## ◆ emv_authenticateTransactionWithTimeout()

int emv_authenticateTransactionWithTimeout | ( | IN int | timeout,
|  | IN BYTE * | updatedTLV,
|  | IN int | updatedTLVLen
| ) |  |

Authenticate EMV Transaction Request with Timeout

Authenticates the EMV transaction for an ICC card. Execute this after receiving response with result code 0x10 to emv_startTransaction

The tags will be returned in the callback routine.

Parameters

  timeout | Timeout value in seconds.
  updatedTLV | TLV stream that can be used to update the following values: 9F02: Amount 9F03: Other amount 9C: Transaction type 5F57: Account type In addition tag DFEE1A can be sent to specify tag list to include in results. Example four tags 9F02, 9F36, 95, 9F37 to be included in response = DFEE1A079F029F36959F37
  updatedTLVLen |

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString

## ◆ emv_cancelTransaction()

int emv_cancelTransaction | ( |  | ) |

Cancel EMV Transaction

Cancels the currently executing EMV transaction.

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString()

## ◆ emv_completeTransaction()

int emv_completeTransaction | ( | IN int | commError,
|  | IN BYTE * | authCode,
|  | IN int | authCodeLen,
|  | IN BYTE * | iad,
|  | IN int | iadLen,
|  | IN BYTE * | tlvScripts,
|  | IN int | tlvScriptsLen,
|  | IN BYTE * | tlv,
|  | IN int | tlvLen
| ) |  |

Complete EMV Transaction Request

Completes the EMV transaction for an ICC card when online authorization request is received from emv_authenticateTransaction

The tags will be returned in the callback routine.

Parameters

  commError | Communication error with host. Set to TRUE(1) if host was unreachable, or FALSE(0) if host response received. If Communication error, authCode, iad, tlvScripts can be null.
  authCode | Authorization code from host. Two bytes. Example 0x3030. (Tag value 8A). Required
  authCodeLen | the length of authCode
  iad | Issuer Authentication Data, if any. Example 0x11223344556677883030 (tag value 91).
  iadLen | the length of iadLen
  tlvScripts | 71/72 scripts, if any
  tlvScriptsLen | the length of tlvScriptsLen
  tlv | Additional TLV data to return with transaction results (if any)
  tlvLen | the length of tlv

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString

## ◆ emv_getAutoAuthenticateTransaction()

int emv_getAutoAuthenticateTransaction | ( |  | ) |

Gets auto authenticate value for EMV transactions.

Returns
  RETURN_CODE: TRUE = auto authenticate, FALSE = manually authenticate

## ◆ emv_getAutoCompleteTransaction()

int emv_getAutoCompleteTransaction | ( |  | ) |

Gets auto complete value for EMV transactions.

Returns
  RETURN_CODE: TRUE = auto complete, FALSE = manually complete

## ◆ emv_registerCallBk()

void emv_registerCallBk | ( | pEMV_callBack | pEMVf | ) |

To register the emv callback function to get the EMV processing response. (Pass NULL to disable the callback.)

## ◆ emv_removeAllApplicationData()

int emv_removeAllApplicationData | ( |  | ) |

Remove All Application Data

Removes all the Application Data

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_removeAllCAPK()

int emv_removeAllCAPK | ( |  | ) |

Remove All Certificate Authority Public Key

Removes all the CAPK

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_removeAllCRL()

int emv_removeAllCRL | ( |  | ) |

Remove All Certificate Revocation List Entries

Removes all CRLEntry entries

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString()

## ◆ emv_removeApplicationData()

int emv_removeApplicationData | ( | IN BYTE * | AID,
|  | IN int | AIDLen
| ) |  |

Remove Application Data by AID Removes the Application Data for CTLS as specified by the AID name passed as a parameter

Parameters

  AID | Name of ApplicationID Must be between 5 and 16 bytes
  AIDLen | the length of AID data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_removeCAPK()

int emv_removeCAPK | ( | IN BYTE * | capk,
|  | IN int | capkLen
| ) |  |

Remove Certificate Authority Public Key

Removes the CAPK as specified by the RID/Index

Parameters

  capk | 6 byte CAPK = 5 bytes RID + 1 byte INDEX
  capkLen | the length of capk data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_removeCRL()

int emv_removeCRL | ( | IN BYTE * | list,
|  | IN int | lsLen
| ) |  |

Retrieve the Certificate Revocation List

Returns the CRL entries on the terminal.

Parameters

  list | [CRL1][CRL2]...[CRLn], each CRL 9 bytes where CRL = 5 bytes RID + 1 byte index + 3 bytes serial number
  lssLen | the length of list data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString()

## ◆ emv_retrieveAIDList()

int emv_retrieveAIDList | ( | OUT BYTE * | AIDList,
|  | IN_OUT int * | AIDListLen
| ) |  |

Retrieve AID list

Returns all the AID names installed on the terminal for CTLS. .

Parameters

  AIDList | array of AID name byte arrays
  AIDListLen | the length of AIDList array buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_retrieveApplicationData()

int emv_retrieveApplicationData | ( | IN BYTE * | AID,
|  | IN int | AIDLen,
|  | OUT BYTE * | tlv,
|  | IN_OUT int * | tlvLen
| ) |  |

Retrieve Application Data by AID

Retrieves the Application Data as specified by the AID name passed as a parameter.

Parameters

  AID | Name of ApplicationID. Must be between 5 and 16 bytes
  AIDLen | the length of AID data buffer.
  tlv | The TLV elements of the requested AID
  tlvLen | the length of tlv data buffer.

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_retrieveCAPK()

int emv_retrieveCAPK | ( | IN BYTE * | capk,
|  | IN int | capkLen,
|  | OUT BYTE * | key,
|  | IN_OUT int * | keyLen
| ) |  |

Retrieve Certificate Authority Public Key

Retrieves the CAPK for CTLS as specified by the RID/Index passed as a parameter.

Parameters

  capk | 6 bytes CAPK = 5 bytes RID + 1 byte Index
  capkLen | the length of capk data buffer
  key | Response returned as a CAKey format: [5 bytes RID][1 byte Index][1 byte Hash Algorithm][1 byte Encryption Algorithm] [20 bytes HashValue][4 bytes Public Key Exponent][2 bytes Modulus Length][Variable bytes Modulus] Where: Hash Algorithm: The only algorithm supported is SHA-1.The value is set to 0x01 Encryption Algorithm: The encryption algorithm in which this key is used. Currently support only one type: RSA. The value is set to 0x01. HashValue: Which is calculated using SHA-1 over the following fields: RID & Index & Modulus & Exponent Public Key Exponent: Actually, the real length of the exponent is either one byte or 3 bytes. It can have two values: 3 (Format is 0x00 00 00 03), or 65537 (Format is 0x00 01 00 01) Modulus Length: LenL LenH Indicated the length of the next field. Modulus: This is the modulus field of the public key. Its length is specified in the field above.
  keyLen | the length of key data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_retrieveCAPKList()

int emv_retrieveCAPKList | ( | OUT BYTE * | keys,
|  | IN_OUT int * | keysLen
| ) |  |

Retrieve the Certificate Authority Public Key list

Returns all the CAPK RID and Index installed on the terminal.

Parameters

  keys | [key1][key2]...[keyn], each key 6 bytes where key = 5 bytes RID + 1 byte index
  keysLen | the length of keys data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_retrieveCRL()

int emv_retrieveCRL | ( | OUT BYTE * | list,
|  | IN_OUT int * | lssLen
| ) |  |

Retrieve the Certificate Revocation List

Returns the CRL entries on the terminal.

Parameters

  list | [CRL1][CRL2]...[CRLn], each CRL 9 bytes where CRL = 5 bytes RID + 1 byte index + 3 bytes serial number
  lssLen | the length of list data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString()

## ◆ emv_retrieveTerminalData()

int emv_retrieveTerminalData | ( | OUT BYTE * | tlv,
|  | IN_OUT int * | tlvLen
| ) |  |

Retrieve Terminal Data

Retrieves the Terminal Data for CTLS. This is configuration group 0 (Tag FFEE - > FFEE0100). The terminal data can also be retrieved by ctls_getConfigurationGroup(0).

Parameters

  tlv | Response returned as a TLV
  tlvLen | the length of tlv data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_setApplicationData()

int emv_setApplicationData | ( | IN BYTE * | name,
|  | IN int | nameLen,
|  | IN BYTE * | tlv,
|  | IN int | tlvLen
| ) |  |

Set Application Data by AID

Sets the Application Data as specified by the application name and TLV data

Parameters

  name | Application name, 10-32 ASCII hex characters representing 5-16 bytes Example "a0000000031010"
  nameLen | the length of name data buffer of Application name,
  tlv | Application data in TLV format
  tlvLen | the length of tlv data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString()

## ◆ emv_setApplicationDataTLV()

int emv_setApplicationDataTLV | ( | IN BYTE * | tlv,
|  | IN int | tlvLen
| ) |  |

Set Application Data by TLV

Sets the Application Data as specified by the TLV data

Parameters

  tlv | Application data in TLV format The first tag of the TLV data must be the group number (DFEE2D). The second tag of the TLV data must be the AID (9F06) Example valid TLV, for Group #2, AID a0000000035010: "dfee2d01029f0607a0000000051010ffe10101ffe50110ffe30114ffe20106"
  tlvLen | the length of tlv data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString()

## ◆ emv_setAutoAuthenticateTransaction()

void emv_setAutoAuthenticateTransaction | ( | IN int | authenticate | ) |

Enables authenticate for EMV transactions. If a emv_startTranaction results in code 0x0010 (start transaction success), then emv_authenticateTransaction can automatically execute if parameter is set to TRUE

Parameters

  authenticate | TRUE = auto authenticate, FALSE = manually authenticate

## ◆ emv_setAutoCompleteTransaction()

void emv_setAutoCompleteTransaction | ( | IN int | complete | ) |

Enables complete for EMV transactions. If a emv_authenticateTranaction results in code 0x0004 (go online), then emv_completeTransaction can automatically execute if parameter is set to TRUE

Parameters

  complete | TRUE = auto complete, FALSE = manually complete

## ◆ emv_setCAPK()

int emv_setCAPK | ( | IN BYTE * | capk,
|  | IN int | capkLen
| ) |  |

Set Certificate Authority Public Key

Sets the CAPK as specified by the CAKey structure

Parameters

  capk | CAKey format: [5 bytes RID][1 byte Index][1 byte Hash Algorithm][1 byte Encryption Algorithm][20 bytes HashValue][4 bytes Public Key Exponent][2 bytes Modulus Length][Variable bytes Modulus] Where: Hash Algorithm: The only algorithm supported is SHA-1.The value is set to 0x01 Encryption Algorithm: The encryption algorithm in which this key is used. Currently support only one type: RSA. The value is set to 0x01. HashValue: Which is calculated using SHA-1 over the following fields: RID & Index & Modulus & Exponent Public Key Exponent: Actually, the real length of the exponent is either one byte or 3 bytes. It can have two values: 3 (Format is 0x00 00 00 03), or 65537 (Format is 0x00 01 00 01) Modulus Length: LenL LenH Indicated the length of the next field. Modulus: This is the modulus field of the public key. Its length is specified in the field above.
  capkLen | the length of capk data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_setCRL()

int emv_setCRL | ( | IN BYTE * | list,
|  | IN int | lsLen
| ) |  |

Set Certificate Revocation List

Sets the CRL

Parameters

  list | CRL Entries containing the RID, Index, and serial numbers to set [CRL1][CRL2]...[CRLn] where each [CRL] is 9 bytes: [5 bytes RID][1 byte CAPK Index][3 bytes serial number]
  lsLen | the length of list data buffer

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString()

## ◆ emv_setTerminalData()

int emv_setTerminalData | ( | IN BYTE * | tlv,
|  | IN int | tlvLen
| ) |  |

Set Terminal Data

Sets the Terminal Data for CTLS as specified by the TLV. The first TLV must be Configuration Group Number (Tag FFE4). The terminal global data is group 0, so the first TLV would be FFE40100. Other groups can be defined using this method (1 or greater), and those can be retrieved with emv_getConfigurationGroup(int group), and deleted with emv_removeConfigurationGroup(int group). You cannot delete group 0.

Parameters

  tlv | TerminalData configuration file
  tlvLen | the length of tlv data buffer

Return values

  RETURN_CODE | Values can be parsed with device_getIDGStatusCodeString()

## ◆ emv_setTerminalMajorConfiguration()

int emv_setTerminalMajorConfiguration | ( | IN int | configuration | ) |

Sets the terminal major configuration in ICS .

Parameters

  configuration | A configuration value, range 1-23 1 = 1C 2 = 2C 3 = 3C 4 = 4C 5 = 5C ... 23 = 23C

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString()

## ◆ emv_setTransactionParameters()

void emv_setTransactionParameters | ( | IN double | amount,
|  | IN double | amtOther,
|  | IN int | type,
|  | IN int | timeout,
|  | IN BYTE * | tags,
|  | IN int | tagsLen
| ) |  |

Set EMV Transaction Parameters

Set the parameters to be used on EMV transactions for an ICC card when Auto Poll is on

The tags will be returned in the callback routine.

Parameters

  amount | Transaction amount value (tag value 9F02)
  amtOther | Other amount value, if any (tag value 9F03)
  type | Transaction type (tag value 9C).
  timeout | Timeout value in seconds.
  tags | Any other tags to be included in the request (Maximum Length = 500 bytes). Passed as a string. Example, tag 9F0C with amount 0x000000000100 would be "9F0C06000000000100" If tags 9F02 (amount),9F03 (other amount), or 9C (transaction type) are included, they will take priority over these values supplied as individual parameters to this method. Note: To request tags to be included in default response, use tag DFEE1A, and specify tag list. Example four tags 9F02, 9F36, 95, 9F37 to be included in response = DFEE1A079F029F36959F37
  tagsLen | the length of tags

## ◆ emv_startTransaction()

int emv_startTransaction | ( | IN double | amount,
|  | IN double | amtOther,
|  | IN int | exponent,
|  | IN int | type,
|  | IN int | timeout,
|  | IN BYTE * | tags,
|  | IN int | tagsLen,
|  | IN int | forceOnline
| ) |  |

Start EMV Transaction Request

Authorizes the EMV transaction for an ICC card

The tags will be returned in the callback routine.

Parameters

  amount | Transaction amount value (tag value 9F02) - SEE IMPORTANT NOTE BELOW
  amtOther | Other amount value, if any (tag value 9F03) - SEE IMPORTANT NOTE BELOW
  exponent | Number of characters after decimal point
  type | Transaction type (tag value 9C).
  timeout | Timeout value in seconds.
  tags | Any other tags to be included in the request. Passed as a TLV stream. Example, tag 9F0C with amount 0x000000000100 would be 0x9F0C06000000000100 If tags 9F02 (amount),9F03 (other amount), or 9C (transaction type) are included, they will take priority over these values supplied as individual parameters to this method.
  tagsLen | Length of tags
  forceOnline | TRUE = do not allow offline approval, FALSE = allow ICC to approve offline if terminal capable Note: To request tags to be included in default response, use tag DFEE1A, and specify tag list. Example four tags 9F02, 9F36, 95, 9F37 to be included in response = DFEE1A079F029F36959F37

Returns
  RETURN_CODE: Values can be parsed with device_getResponseCodeString >>>>>IMPORTANT: parameters for amount and amtOther MUST BE PASSED AS A DOUBLE VALUE WITH DECIMAL POINT. Example, do not pass 1, but instead pass 1.0 or 1.00. Otherwise, results will be unpredictable

## ◆ executeTransaction()

int executeTransaction | ( | WorldPayData * | data,
|  | pWP_callBack | wpCallback,
|  | int | requestOnly
| ) |  |

executeTransaction Requests 3 sets of public keys: encrypting Keys, signing/validating keys, signing/validating 3rd party apps

Parameters

  data | WorldPay data object
  wpCallback | WorldPay callback
  requestOnly | 0 = send transaction and return response, 1 = send transaction and return both request and response, 2 = do not send transaction, instead return request

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ icc_exchangeAPDU()

int icc_exchangeAPDU | ( | IN BYTE * | c_APDU,
|  | IN int | cLen,
|  | OUT BYTE * | reData,
|  | IN_OUT int * | reLen
| ) |  |

Exchange APDU with plain text For Non-SRED Augusta Only

Sends an APDU packet to the ICC. If successful, response is the APDU data in response parameter.

Parameters

  c_APDU | APDU data packet
  cLen | APDU data packet length
  reData | Unencrypted APDU response
  reLen | Unencrypted APDU response data length

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString

## ◆ icc_getICCReaderStatus()

int icc_getICCReaderStatus | ( | OUT BYTE * | status | ) |

Get Reader Status

Returns the reader status

Parameters

  status | Pointer that will return with the ICCReaderStatus results. bit 0: 0 = ICC Power Not Ready, 1 = ICC Powered bit 1: 0 = Card not seated, 1 = card seated

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString

## ◆ icc_powerOffICC()

int icc_powerOffICC | ( |  | ) |

Power Off ICC

Powers down the ICC

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

If Success, empty If Failure, ASCII encoded data of error string

## ◆ icc_powerOnICC()

int icc_powerOnICC | ( | OUT BYTE * | ATR,
|  | IN_OUT int * | inLen
| ) |  |

Power On ICC

Power up the currently selected microprocessor card in the ICC reader

Parameters

  ATR,the | ATR data response when succeeded power on ICC,
  inLen,the | length of ATR data

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ msr_cancelMSRSwipe()

int msr_cancelMSRSwipe | ( |  | ) |

Disable MSR Swipe Cancels MSR swipe request.

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()

## ◆ msr_registerCallBk()

void msr_registerCallBk | ( | pMSR_callBack | pMSRf | ) |

To register the msr callback function to get the MSR card data. (Pass NULL to disable the callback.)

## ◆ msr_registerCallBkp()

void msr_registerCallBkp | ( | pMSR_callBackp | pMSRf | ) |

To register the msr callback function to get the MSR card data pointer. (Pass NULL to disable the callback.)

## ◆ msr_startMSRSwipe()

int msr_startMSRSwipe | ( | IN int | _timeout | ) |

Start MSR Swipe Enables MSR, waiting for swipe to occur. Allows track selection. Returns IDTMSRData instance to deviceDelegate::swipeMSRData:()

Parameters

  timeout | Swipe Timeout Value

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString() Note: if auto poll mode is on, it will return command not allowed error

## ◆ parseMSRData()

void parseMSRData | ( | IN BYTE * | resData,
|  | IN int | resLen,
|  | IN_OUT IDTMSRData * | cardData
| ) |  |

Parser the MSR data from the buffer into IDTMSTData structure

Parameters

  resData | MSR card data buffer
  resLen | the length of resData
  cardData | the parser result with IDTMSTData structure

## ◆ pin_registerCallBk()

void pin_registerCallBk | ( | pPIN_callBack | pPINf | ) |

To register the pin callback function to get the PINPad data. (Pass NULL to disable the callback.)

## ◆ registerHotplugCallBk()

void registerHotplugCallBk | ( | pMessageHotplug | pMsgHotplug | ) |

To register the USB HID hot-plug callback function which implemented in the application to monitor the hotplug message from the SDK.

## ◆ registerLogCallBk()

void registerLogCallBk | ( | pSendDataLog | pFSend,
|  | pReadDataLog | pFRead
| ) |  |

To register the log callback function which implemented in the application to monitor sending/reading data between application and reader.

## ◆ SDK_Version()

char* SDK_Version | ( |  | ) |

To Get SDK version

Returns
  return the SDK version string

## ◆ setAbsoluteLibraryPath()

int setAbsoluteLibraryPath | ( | const char * | absoluteLibraryPath | ) |

Set the path to use when searching for ID TECH's libraries. If this is not set, the libraries will be searched for with the system's default procedures.

Parameters

  absoluteLibraryPath | The absolute path to ID TECH's libraries.

Returns
  RETURN_CODE: Values can be parsed with device_getIDGStatusCodeString()