![]() |
IDTech Universal SDK
1.0.35.038
API reference for C++
|
Augusta 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(* | pFW_callBack) (int, int, int, int, int) |
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 | emv_registerCallBk (pEMV_callBack pEMVf) |
void | msr_registerCallBk (pMSR_callBack pMSRf) |
void | msr_registerCallBkp (pMSR_callBackp pMSRf) |
void | pin_registerCallBk (pPIN_callBack pPINf) |
void | device_registerCameraCallBk (pCMR_callBack pCMRf) |
void | device_registerCardStatusFrontSwitchCallBk (pCSFS_callBack pCSFSf) |
void | device_registerFWCallBk (pFW_callBack pFWf) |
char * | SDK_Version () |
int | setAbsoluteLibraryPath (const char *absoluteLibraryPath) |
int | device_init () |
int | device_setCurrentDevice (int deviceType) |
int | device_close () |
void | device_getResponseCodeString (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_getCurrentDeviceType () |
int | device_SendDataCommand (IN BYTE *cmd, IN int cmdLen, IN BYTE *data, IN int dataLen, OUT BYTE *response, IN_OUT int *respLen) |
int | device_updateFirmware (IN BYTE *firmwareData, IN int firmwareDataLen, IN char *firmwareName, IN int encryptionType, IN BYTE *keyBlob, IN int keyBlobLen) |
int | device_rebootDevice () |
int | device_controlLED (byte indexLED, byte control, int intervalOn, int intervalOff) |
int | device_controlLED_ICC (int controlMode, int interval) |
int | device_controlLED_MSR (byte control, int intervalOn, int intervalOff) |
int | device_controlBeep (int index, int frequency, int duration) |
int | device_getDRS (BYTE *codeDRS, int *codeDRSLen) |
int | device_getKeyStatus (int *newFormat, BYTE *status, int *statusLen) |
int | device_getSDKWaitTime () |
void | device_setSDKWaitTime (int waitTime) |
int | device_getThreadStackSize () |
void | device_setThreadStackSize (int threadSize) |
int | config_getModelNumber (OUT char *sNumber) |
int | config_getModelNumber_Len (OUT char *sNumber, IN_OUT int *sNumberLen) |
int | config_getSerialNumber (OUT char *sNumber) |
int | config_getSerialNumber_Len (OUT char *sNumber, IN_OUT int *sNumberLen) |
int | config_setLEDController (IN int firmwareControlMSRLED, IN int firmwareControlICCLED) |
int | config_getLEDController (OUT int *firmwareControlMSRLED, OUT int *firmwareControlICCLED) |
int | config_setBeeperController (IN int firmwareControlBeeper) |
int | config_getBeeperController (OUT int *firmwareControlBeeper) |
int | config_setEncryptionControl (IN int msr, IN int icc) |
int | config_getEncryptionControl (OUT int *msr, OUT int *icc) |
int | icc_enable (IN int withNotification) |
int | icc_disable () |
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 | icc_exchangeEncryptedAPDU (IN BYTE *c_APDU, IN int cLen, OUT BYTE *reData, IN_OUT int *reLen) |
int | icc_getAPDU_KSN (OUT BYTE *KSN, IN_OUT int *inLen) |
int | icc_getFunctionStatus (OUT int *enabled, OUT int *withNotification) |
int | icc_getICCReaderStatus (OUT BYTE *status) |
int | icc_getKeyFormatForICCDUKPT (OUT BYTE *format) |
int | icc_getKeyTypeForICCDUKPT (OUT BYTE *type) |
int | emv_getEMVKernelVersion (OUT char *version) |
int | emv_getEMVKernelVersion_Len (OUT char *version, IN_OUT int *versionLen) |
int | emv_getEMVKernelCheckValue (OUT BYTE *checkValue, IN_OUT int *checkValueLen) |
int | emv_getEMVConfigurationCheckValue (OUT BYTE *checkValue, IN_OUT int *checkValueLen) |
void | emv_allowFallback (IN int allow) |
void | emv_setAutoAuthenticateTransaction (IN int authenticate) |
void | emv_setAutoCompleteTransaction (IN int complete) |
int | emv_getAutoAuthenticateTransaction () |
int | emv_getAutoCompleteTransaction () |
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) |
void | device_setTransactionExponent (int exponent) |
int | device_startTransaction (IN double amount, IN double amtOther, IN int type, IN const int _timeout, IN BYTE *tags, IN int tagsLen) |
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 | device_cancelTransaction () |
int | emv_retrieveTransactionResult (IN BYTE *tags, IN int tagsLen, IDTTransactionData *cardData) |
int | emv_callbackResponseLCD (IN int type, byte selection) |
int | emv_callbackResponseMSR (IN BYTE *MSR, IN_OUT int MSRLen) |
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_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_removeTerminalData () |
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_retrieveTerminalID (OUT char *terminalID) |
int | emv_retrieveTerminalID_Len (OUT char *terminalID, IN_OUT int *terminalIDLen) |
int | emv_setTerminalID (IN char *terminalID) |
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 | msr_getMSRData (OUT BYTE *reData, IN_OUT int *reLen) |
int | msr_cancelMSRSwipe () |
int | msr_startMSRSwipe (IN int _timeout) |
void | parseMSRData (IN BYTE *resData, IN int resLen, IN_OUT IDTMSRData *cardData) |
int | msr_getKeyFormatForICCDUKPT (OUT BYTE *format) |
int | msr_getKeyTypeForICCDUKPT (OUT BYTE *type) |
int | msr_setKeyFormatForICCDUKPT (IN BYTE format) |
int | msr_setKeyTypeForICCDUKPT (IN BYTE type) |
int | msr_captureMode (IN int isBufferMode, IN int withNotification) |
int | msr_setSetting (IN BYTE setting, IN BYTE *val, IN int valLen) |
int | msr_getSetting (IN byte setting, OUT BYTE *value, IN_OUT int *valueLen) |
int | msr_setSwipeForcedEncryptionOption (IN int track1, IN int track2, IN int track3, IN int track3card0) |
int | msr_getSwipeForcedEncryptionOption (OUT BYTE *option) |
int | msr_setSwipeMaskOption (IN int track1, IN int track2, IN int track3) |
int | msr_getSwipeMaskOption (OUT BYTE *option) |
int | msr_setExpirationMask (IN int mask) |
int | msr_getExpirationMask (OUT BYTE *value) |
int | msr_setClearPANID (IN BYTE val) |
int | msr_getClearPANID (OUT BYTE *value) |
int | msr_disable () |
int | pin_cancelPINEntry () |
Augusta API.
Augusta Global API methods.
#define IN |
INPUT parameter.
#define IN_OUT |
INPUT / OUTPUT PARAMETER.
#define OUT |
OUTPUT parameter.
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
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
typedef void(* pCMR_callBack) (int, IDTCMRData *) |
Define the camera callback function to get the image data
It should be registered using the device_registerCameraCallBk,
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,
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,
typedef void(* pFW_callBack) (int, int, int, int, int) |
Define the firmware update callback function to get the status of firmware update
It should be registered using the device_registerFWCallBk,
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
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
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
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,
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,
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,
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
int config_getBeeperController | ( | OUT int * | firmwareControlBeeper | ) |
Get the Beeper Controller Status Set the Beeper controlled Status by software or firmware
firmwareControlBeeper | 1 means firmware control the beeper, 0 means software control beeper. |
Get Encryption Control
Get Encryption Control to switch status between MSR and ICC/EMV function. Following Encryption status supported:
msr |
|
icc |
|
Get the LED Controller Status Get the MSR / ICC LED controlled status by software or firmware NOTE: The ICC LED always controlled by software.
firmwareControlMSRLED |
|
firmwareControlICCLED |
|
int config_getModelNumber | ( | OUT char * | sNumber | ) |
Polls device for Model Number
sNumber | Returns Model Number; needs to have at least 64 bytes of memory |
DEPRECATED : please use config_getModelNumber_Len(OUT char* sNumber, IN_OUT int *sNumberLen)
Polls device for Model Number
sNumber | Returns Model Number |
sNumber | length of Model Number |
int config_getSerialNumber | ( | OUT char * | sNumber | ) |
DEPRECATED : please use config_getSerialNumber_Len(OUT char* sNumber, IN_OUT int *sNumberLen)
Polls device for Serial Number
sNumber | Returns Serial Number; needs to have at least 64 bytes of memory |
Polls device for Serial Number
sNumber | Returns Serial Number |
sNumberLen | Length of Serial Number |
int config_setBeeperController | ( | IN int | firmwareControlBeeper | ) |
Set the Beeper Controller Set the Beeper controlled by software or firmware
firmwareControlBeeper | 1 means firmware control the beeper, 0 means software control beeper. |
Set Encryption Control
Set Encryption Control to switch status between MSR and ICC/EMV function. Following Encryption status supported:
msr |
|
icc |
|
Set the LED Controller Set the MSR / ICC LED controlled by software or firmware NOTE: The ICC LED always controlled by software.
firmwareControlMSRLED |
|
firmwareControlICCLED |
|
int device_cancelTransaction | ( | ) |
Cancel Transaction request.
int device_close | ( | ) |
Close the device
int device_controlBeep | ( | int | index, |
int | frequency, | ||
int | duration | ||
) |
Control Beep
Controls the Beeper
index | For Augusta, must be set to 1 (only one beeper) |
frequency | Frequency, range 1000-20000 (suggest minimum 3000) |
duration | Duration, in milliseconds (range 1 - 65525) |
int device_controlLED | ( | byte | indexLED, |
byte | control, | ||
int | intervalOn, | ||
int | intervalOff | ||
) |
Control MSR LED
Controls the LED for the MSR
indexLED | For Augusta, must be set to 1 (MSR LED) |
control | LED Status:
|
intervalOn | Blink interval ON, in ms (Range 200 - 2000) |
intervalOff | Blink interval OFF, in ms (Range 200 - 2000) |
int device_controlLED_ICC | ( | int | controlMode, |
int | interval | ||
) |
Control ICC LED
Controls the LED for the ICC card slot
controlMode | 0 = off, 1 = solid, 2 = blink |
interval | Blink interval, in ms (500 = 500 ms) |
int device_controlLED_MSR | ( | byte | control, |
int | intervalOn, | ||
int | intervalOff | ||
) |
Control the MSR LED
Controls the MSR / ICC LED This API not recommended to control ICC LED
control |
|
intervalOn | Blink interval on time last, in ms (500 = 500 ms, valid from 200 to 2000) |
intervalOff | Blink interval off time last, in ms (500 = 500 ms, valid from 200 to 2000) |
int device_getCurrentDeviceType | ( | ) |
Get current active device type
int device_getDRS | ( | BYTE * | codeDRS, |
int * | codeDRSLen | ||
) |
Get DRS Status
Gets the status of DRS(Destructive Reset).
codeDRS | the data format is [DRS SourceBlk Number] [SourceBlk1] ... [SourceBlkN] [DRS SourceBlk Number] is 2 bytes, format is NumL NumH. It is Number of [SourceBlkX] [SourceBlkX] is n bytes, Format is [SourceID] [SourceLen] [SourceData] [SourceID] is 1 byte [SourceLen] is 1 byte, it is length of [SourceData] |
[SourceID] [SourceLen] [SourceData] 00 1 01 - Application Error 01 1 01 - Application Error 02 1 0x01 - EMV L2 Configuration Check Value Error 0x02 - Future Key Check Value Error 10 1 01 - Battery Error 11 1 Bit 0 - Tamper Switch 1 (0-No, 1-Error) Bit 1 - Tamper Switch 2 (0-No, 1-Error) Bit 2 - Tamper Switch 3 (0-No, 1-Error) Bit 3 - Tamper Switch 4 (0-No, 1-Error) Bit 4 - Tamper Switch 5 (0-No, 1-Error) Bit 5 - Tamper Switch 6 (0-No, 1-Error)
12 1 01 - TemperatureHigh or Low 13 1 01 - Voltage High or Low 1F 4 Reg31~24bits, Reg23~16bits, Reg15~8bits, Reg7~0bits
codeDRSLen | the length of codeDRS |
int device_getFirmwareVersion | ( | OUT char * | firmwareVersion | ) |
Polls device for Firmware Version
firmwareVersion | Response returned of Firmware Version; needs to have at least 128 bytes of memory |
DEPRECATED : please use device_getFirmwareVersion_Len(OUT char* firmwareVersion, IN_OUT int *firmwareVersionLen)
Polls device for Firmware Version
firmwareVersion | Response returned of Firmware Version |
firmwareVersionLen | Length of Firmware Version |
int device_getKeyStatus | ( | int * | newFormat, |
BYTE * | status, | ||
int * | statusLen | ||
) |
Get Key Status
Gets the status of loaded keys
status | newFormat for Augusta and miniSmartII only 1: new format of key status 0: reserved format for support previous device |
status | For L80, L100, Augusta and miniSmartII: When the newFormat is 0, data format as follows. For Augusta and miniSmartII: byte 0: PIN DUKPT Key, Does not support, always 0 byte 1: PIN Master Key, Does not support, always 0 byte 2: PIN Session Key, Does not support, always 0 byte 3: Account/MSR DUKPT Key, 1 Exists, 0 None, 0xFF STOP byte 4: Account/ICC DUKPT Key, 1 Exists, 0 None, 0xFF STOP byte 5: Admin DUKPT Key, 1 Exists, 0 None, 0xFF STOP For L80 and L100: byte 0: PIN DUKPT Key byte 1: PIN Master Key byte 2: Standard PIN Session Key byte 3: Desjardins PIN Session Key byte 4: Account/MSR DUKPT Key, 1 Exists, 0 None, 0xFF STOP, Does not support, always 0 byte 5: Account/ICC DUKPT Key, 1 Exists, 0 None, 0xFF STOP, Does not support, always 0 byte 6: Admin DUKPT Key, 1 Exists, 0 None, 0xFF STOP byte 7: Data DUKPT Key, 1 Exists, 0 None, 0xFF STOP byte 8: MAC DUKPT Key, 1 Exists, 0 None, 0xFF STOP |
when the newFormat is 1, data format as follows. [Block Length] [KeyStatusBlock1] [KeyStatusBlock2]...[KeyStatusBlockN] Where: [Block Length] is 2 bytes, format is Len_L Len_H, is KeyStatusBlock Number [KeyStatusBlockX> is 4 bytes, format is [Key Index and Key Name] [key slot] [key status]: [Key Index and Key Name] is 1 byte. Please refer to following table 0x14 LCL-KEK to Encrypt Other Keys 0x02 Data encryption Key to Encrypt ICC/MSR 0x05 MAC DUKPT Key for Host-Device - MAC Verification 0x05 MTK DUKPT Key for TTK Self-Test 0x0C RKI-KEK for Remote Key Injection [key slot] is 2 bytes. Range is 0 - 9999 the MTK DUKPT Key slot is 16, the others are all 0 [key status] is 1 byte. 0 - Not Exist 1 - Exist 0xFF - (Stop. Only Valid for DUKPT Key) For NEO2 and SREDKey2: Each unit of three bytes represents one key's parameters (index and slot). Key Name Index (1 byte): 0x14 - LCL-KEK 0x01 - Pin encryption Key (NEO2 only) 0x02 - Data encryption Key 0x05 - MAC DUKPT Key 0x0A - PCI Pairing Key (NEO2 only) Key Slot (2 bytes): Indicate different slots of a certain Key Name Example: slot =5 (0x00 0x05), slot=300 (0x01 0x2C) For BTPay380, slot is always 0 For example, 0x14 0x00 0x00 0x02 0x00 0x00 0x0A 0x00 0x00 will represent [KeyNameIndex=0x14,KeySlot=0x0000], [KeyNameIndex=0x02,KeySlot=0x0000] and [KeyNameIndex=0x0A,KeySlot=0x0000]
statusLen | the length of status |
Review the return code description.
returnCode | the response result. |
description |
the | string for description of response result |
int device_getSDKWaitTime | ( | ) |
Get SDK Wait Time
Get the SDK wait time for transactions
int device_getThreadStackSize | ( | ) |
Get Thread Stack Size
Get the stack size setting for newly created threads
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.
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.
deviceType,the | device type of the USB device |
int device_isConnected | ( | ) |
Check the device conntected status
int device_rebootDevice | ( | ) |
Reboot Device Executes a command to restart the device.
void device_registerCameraCallBk | ( | pCMR_callBack | pCMRf | ) |
To register the camera callback function to get the image data. (Pass NULL to disable the callback.)
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.)
void device_registerFWCallBk | ( | pFW_callBack | pFWf | ) |
To register the firmware update callback function to get the status of firmware update. (Pass NULL to disable the callback.)
int device_SendDataCommand | ( | IN BYTE * | cmd, |
IN int | cmdLen, | ||
IN BYTE * | data, | ||
IN int | dataLen, | ||
OUT BYTE * | response, | ||
IN_OUT int * | respLen | ||
) |
Send a Command to device
Sends a command to the device .
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 |
int device_setCurrentDevice | ( | int | deviceType | ) |
Sets the current device to talk to
The connect status can be checked by device_isConnected().
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_PIP_READER_COM, IDT_DEVICE_VP3300_COM, IDT_DEVICE_NEO2_COM, IDT_DEVICE_MAX_DEVICES = IDT_DEVICE_NEO2_COM+5 }; |
void device_setSDKWaitTime | ( | int | waitTime | ) |
Set SDK Wait Time
Set the SDK wait time for transactions
waitTime | The SDK wait time for transaction in seconds. The Maximum is 2147483 seconds. |
void device_setThreadStackSize | ( | int | threadSize | ) |
Set Thread Stack Size
Set the stack size setting for newly created threads
void device_setTransactionExponent | ( | int | exponent | ) |
Sets the transaction exponent to be used with device_startTransaction. Default value is 2
exponent,The | exponent to use when calling 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
The tags will be returned in the callback routine.
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. Passed as TLV. Example, tag 9F02 with amount 0x000000000100 would be 0x9F0206000000000100 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
int device_updateFirmware | ( | IN BYTE * | firmwareData, |
IN int | firmwareDataLen, | ||
IN char * | firmwareName, | ||
IN int | encryptionType, | ||
IN BYTE * | keyBlob, | ||
IN int | keyBlobLen | ||
) |
Update Firmware Updates the firmware of Augusta.
firmwareData | Signed binary data of a firmware file provided by IDTech |
firmwareDataLen | Length of firmwareData |
firmwareName | Firmware name.
|
encryptionType | Encryption type
|
keyBlob | Encrypted firmware session key blob, TR-31 Rev B, wrapped by FW Key (Optional, none if firmware is plaintext) |
keyBlobLen | Length of keyBlob |
Firmware update status is returned in the callback with the following values: sender = AUGUSTA state = DeviceState.FirmwareUpdate data = File Progress. Two bytes, with byte[0] = current block, and byte[1] = total blocks. 0x0310 = block 3 of 16 transactionResultCode:
Start EMV Transaction Request
Authorizes the EMV transaction for an ICC card
The tags will be returned in the callback routine.
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 = DFEE1A079F029F369f9F37 |
void emv_allowFallback | ( | IN int | allow | ) |
Allow fallback for EMV transactions. Default is TRUE
allow | TRUE = allow fallback, FALSE = don't allow fallback |
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.
updatedTLV | TLV stream that can be used to update the following values:
|
updatedTLVLen |
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.
timeout | Timeout value in seconds. |
updatedTLV | TLV stream that can be used to update the following values:
|
updatedTLVLen |
int emv_callbackResponseLCD | ( | IN int | type, |
byte | selection | ||
) |
Callback Response LCD Display
Provides menu selection responses to the kernel after a callback was received with DeviceState.EMVCallback, and callbackType = EMV_CALLBACK_TYPE.EMV_CALLBACK_TYPE_LCD, and lcd_displayMode = EMV_LCD_DISPLAY_MODE_MENU, EMV_LCD_DISPLAY_MODE_PROMPT, or EMV_LCD_DISPLAY_MODE_LANGUAGE_SELECT
type | If Cancel key pressed during menu selection, then value is EMV_LCD_DISPLAY_MODE_CANCEL. Otherwise, value can be EMV_LCD_DISPLAY_MODE_MENU, EMV_LCD_DISPLAY_MODE_PROMPT, or EMV_LCD_DISPLAY_MODE_LANGUAGE_SELECT |
selection | If type = EMV_LCD_DISPLAY_MODE_MENU or EMV_LCD_DISPLAY_MODE_LANGUAGE_SELECT, provide the selection ID line number. Otherwise, if type = EMV_LCD_DISPLAY_MODE_PROMPT supply either 0x43 ('C') for Cancel, or 0x45 ('E') for Enter/accept |
Callback Response MSR Entry
Provides MSR information to kernel after a callback was received with DeviceState.EMVCallback, and callbackType = EMV_CALLBACK_MSR
MSR | Swiped track data |
MSRLen | the length of Swiped track data |
int emv_cancelTransaction | ( | ) |
Cancel EMV Transaction
Cancels the currently executing EMV transaction.
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.
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 |
int emv_getAutoAuthenticateTransaction | ( | ) |
Gets auto authenticate value for EMV transactions.
int emv_getAutoCompleteTransaction | ( | ) |
Gets auto complete value for EMV transactions.
Get EMV Kernel configuration check value info
checkValue | Response returned of Kernel configuration check value info |
checkValueLen | the length of checkValue |
Get EMV Kernel check value info
checkValue | Response returned of Kernel check value info |
checkValueLen | the length of checkValue |
int emv_getEMVKernelVersion | ( | OUT char * | version | ) |
DEPRECATED : please use emv_getEMVKernelVersion_Len(OUT char* version, IN_OUT int *versionLen)
Polls device for EMV Kernel Version
version | Response returned of Kernel Version; needs to have at least 128 bytes of memory. |
Polls device for EMV Kernel Version
version | Response returned of Kernel Version |
versionLen | Length of version |
void emv_registerCallBk | ( | pEMV_callBack | pEMVf | ) |
To register the emv callback function to get the EMV processing response. (Pass NULL to disable the callback.)
int emv_removeAllApplicationData | ( | ) |
Remove All Application Data
Removes all the Application Data
int emv_removeAllCAPK | ( | ) |
Remove All Certificate Authority Public Key
Removes all the CAPK
int emv_removeAllCRL | ( | ) |
Remove All Certificate Revocation List Entries
Removes all CRLEntry entries
Remove Application Data by AID
Removes the Application Data as specified by the AID name passed as a parameter
AID | Name of ApplicationID Must be between 5 and 16 bytes |
AIDLen | the length of AID data buffer |
Remove Certificate Authority Public Key
Removes the CAPK as specified by the RID/Index
capk | 6 byte CAPK = 5 bytes RID + 1 byte INDEX |
capkLen | the length of capk data buffer |
Retrieve the Certificate Revocation List
Returns the CRL entries on the terminal.
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 |
int emv_removeTerminalData | ( | ) |
Remove Terminal Data
Removes the Terminal Data
Retrieve AID list
Returns all the AID names installed on the terminal.
AIDList | array of AID name byte arrays |
AIDListLen | the length of AIDList array buffer |
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.
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. |
Retrieve Certificate Authority Public Key
Retrieves the CAPK as specified by the RID/Index passed as a parameter.
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:
|
keyLen | the length of key data buffer |
Retrieve the Certificate Authority Public Key list
Returns all the CAPK RID and Index installed on the terminal.
keys | [key1][key2]...[keyn], each key 6 bytes where key = 5 bytes RID + 1 byte index |
keysLen | the length of keys data buffer |
Retrieve the Certificate Revocation List
Returns the CRL entries on the terminal.
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 |
Retrieve Terminal Data
Retrieves the Terminal Data.
tlv | Response returned as a TLV |
tlvLen | the length of tlv data buffer |
int emv_retrieveTerminalID | ( | OUT char * | terminalID | ) |
DEPRECATED : please use emv_retrieveTerminalID_Len(OUT char* terminalID, IN_OUT int *terminalIDLen)
Gets the terminal ID as printable characters .
terminalID | Terminal ID string; needs to have at least 30 bytes of memory |
Gets the terminal ID as printable characters .
terminalID | Terminal ID string |
terminalIDLen | Length of terminalID |
Retrieve Transaction Results
Retrieves specified EMV tags from the currently executing transaction.
tags | Tags to be retrieved. Example 0x9F028A will retrieve tags 9F02 and 8A |
tagsLen | Length of tag list |
cardData | All requested tags returned as unencrypted, encrypted and masked TLV data in IDTTransactionData object |
Set Application Data by AID
Sets the Application Data as specified by the application name and TLV data
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 |
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
authenticate | TRUE = auto authenticate, FALSE = manually authenticate |
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
complete | TRUE = auto complete, FALSE = manually complete |
Set Certificate Authority Public Key
Sets the CAPK as specified by the CAKey structure
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:
|
capkLen | the length of capk data buffer |
Set Certificate Revocation List
Sets the CRL
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] |
lssLen | the length of list data buffer |
Set Terminal Data
Sets the Terminal Data as specified by the TerminalData structure passed as a parameter
tlv | TerminalData configuration file |
tlvLen | the length of tlv data buffer |
RETURN_CODE | Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:() |
int emv_setTerminalID | ( | IN char * | terminalID | ) |
Sets the terminal ID as printable characters .
terminalID | Terminal ID to set |
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.
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 |
int icc_disable | ( | ) |
ICC Function enable/disable Disable ICC function
int icc_enable | ( | IN int | withNotification | ) |
ICC Function enable/disable Enable ICC function with or without seated notification
withNotification |
|
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.
c_APDU | APDU data packet |
cLen | APDU data packet length |
reData | Unencrypted APDU response |
reLen | Unencrypted APDU response data length |
int icc_exchangeEncryptedAPDU | ( | IN BYTE * | c_APDU, |
IN int | cLen, | ||
OUT BYTE * | reData, | ||
IN_OUT int * | reLen | ||
) |
Exchange APDU with encrypted data For SRED Augusta Only
Sends an APDU packet to the ICC. If successful, response is the APDU data in response parameter.
c_APDU | KSN + encytpted APDU data packet, or no KSN (use last known KSN) + encrypted APDU data packet With KSN: [0A][KSN][Encrypted C-APDU] Without KSN: [00][Encrypted C-APDU] |
The format of Raw C-APDU Data Structure of [m-bytes Encrypted C-APDU] is below:
cLen | data packet length |
reData | response encrypted APDU response. Can be three options: |
[00] + [Plaintext R-APDU]
[01] + [00] + [n bytes Encrypted R-APDU without Status Bytes] + [2 bytes Status Bytes]
The KSN, when provided, will be 10 bytes. The KSN will only be provided when it has changed since the last provided KSN. Each card Power-On generates a new KSN. During a sequence of commands where the KSN is identical, the first response will have a KSN length set to [0x0A] followed by the KSN, while subsequent commands with the same KSN value will have a KSN length of [0x00] followed by the Encrypted R-APDU without Status Bytes.
reLen | encrypted APDU response data length |
Get APDU KSN
Retrieves the KSN used in ICC Encypted APDU usage
KSN | Returns the encrypted APDU packet KSN |
inLen | KSN data length |
Get ICC Function status Get ICC Function status about enable/disable and with or without seated notification
enabled |
|
withNotification | 1 means with notification when ICC seated status changed. 0 means without notification. |
int icc_getICCReaderStatus | ( | OUT BYTE * | status | ) |
Get Reader Status
Returns the reader status
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 |
int icc_getKeyFormatForICCDUKPT | ( | OUT BYTE * | format | ) |
Get Key Format For DUKPT
Specifies how data will be encrypted with Data Key or PIN key (if DUKPT key loaded). This applies to both MSR and ICC
format | Response returned from method:
|
int icc_getKeyTypeForICCDUKPT | ( | OUT BYTE * | type | ) |
Get Key Type for DUKPT
Specifies the key type used for ICC DUKPT encryption. This applies to both MSR and ICC.
type | Response returned from method:
|
int icc_powerOffICC | ( | ) |
Power Off ICC
Powers down the ICC
If Success, empty If Failure, ASCII encoded data of error string
Power On ICC
Power up the currently selected microprocessor card in the ICC reader
ATR,the | ATR data response when succeeded power on ICC, |
inLen,the | length of ATR data |
int msr_cancelMSRSwipe | ( | ) |
Disable MSR Swipe Cancels MSR swipe request.
Set MSR Capture Mode.
For Non-SRED Augusta Only
Switch between Auto mode and Buffer mode. Auto mode only available on KB interface
isBufferMode |
|
withNotification |
|
int msr_disable | ( | ) |
Disable MSR Disable MSR functions.
int msr_getClearPANID | ( | OUT BYTE * | value | ) |
Get Clear PAN ID.
Returns the number of digits that begin the PAN that will be in the clear
value | 4901 <Setting value>="">. setting Value: Number of digits in clear. Values are char '0' - '6' |
int msr_getExpirationMask | ( | OUT BYTE * | value | ) |
Get MSR expiration date mask.
value | 5001 <Setting value>="">. setting Value: '0' = masked, '1' = not-masked |
int msr_getKeyFormatForICCDUKPT | ( | OUT BYTE * | format | ) |
Get Key Format For DUKPT
Specifies how data will be encrypted with Data Key or PIN key (if DUKPT key loaded). This applies to both MSR and ICC
format | Response returned from method:
|
int msr_getKeyTypeForICCDUKPT | ( | OUT BYTE * | type | ) |
Get Key Type for DUKPT
Specifies the key type used for ICC DUKPT encryption. This applies to both MSR and ICC.
type | Response returned from method:
|
Get MSR Data Reads the MSR Data buffer
reData | Card data |
reLen | Card data length |
Get Single MSR Setting value
Returns the encryption used for swipe data
setting | the msr setting to retrieve. |
value | MSR Setting value. |
valueLen | the length of value. |
int msr_getSwipeForcedEncryptionOption | ( | OUT BYTE * | option | ) |
Get MSR Swipe Forced Encryption Option.
option | 8401 <Setting value>="">. Setting Value Byte using lower four bits as flags. 0 = Force Encryption Off, 1 = Force Encryption On bit0 = Track 1 bit1 = Track 2 bit2 = Track 3 bit4 = Track 3 Card Option 0 |
int msr_getSwipeMaskOption | ( | OUT BYTE * | option | ) |
Get MSR Swipe Mask Option.
Gets the swipe mask/clear data sending option
option | 8601 <Setting value>="">. Setting Value Byte using lower three bits as flags. 0 = Mask Option Off, 1 = Mask Option On bit0 = Track 1 bit1 = Track 2 bit2 = Track 3 Example: Response 0x03 = Track1/Track2 Masked Option ON, Track3 Masked Option Off |
void msr_registerCallBk | ( | pMSR_callBack | pMSRf | ) |
To register the msr callback function to get the MSR card data. (Pass NULL to disable the callback.)
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.)
int msr_setClearPANID | ( | IN BYTE | val | ) |
Set Clear PAN ID.
val | Set Clear PAN ID to value: Number of digits to show in clear. Range 0-6. |
int msr_setExpirationMask | ( | IN int | mask | ) |
Set Expiration Masking
Sets the flag to mask the expiration date
mask | TRUE = mask expiration |
int msr_setKeyFormatForICCDUKPT | ( | IN BYTE | format | ) |
Set Key Format for DUKPT
Sets how data will be encrypted, with either TDES or AES (if DUKPT key loaded) This applies to both MSR and ICC
format | encryption Encryption Type
|
int msr_setKeyTypeForICCDUKPT | ( | IN BYTE | type | ) |
Set Key Type for DUKPT Key
Sets which key the data will be encrypted with, with either Data Key or PIN key (if DUKPT key loaded) This applies to both MSR and ICC
type | Encryption Type
|
Set MSR settings.
setting | the msr setting to set. |
val | the value to set to the msr setting. |
valLen | the length of val. |
int msr_setSwipeForcedEncryptionOption | ( | IN int | track1, |
IN int | track2, | ||
IN int | track3, | ||
IN int | track3card0 | ||
) |
Set MSR Swipe Forced Encryption Option.
tarck1 | Set track1 encryption to true or false. |
tarck2 | Set track2 encryption to true or false. |
tarck3 | Set track3 encryption to true or false. |
tarck3card0 | Set track3 card0 encryption to true or false. |
Set MSR Swipe Mask Option.
Sets the swipe mask/clear data sending option
tarck1 | Set track1 mask to true or false. |
tarck2 | Set track2 mask to true or false. |
tarck3 | Set track3 mask to true or false. |
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:()
timeout | Swipe Timeout Value |
Parser the MSR data from the buffer into IDTMSTData structure
resData | MSR card data buffer |
resLen | the length of resData |
cardData | the parser result with IDTMSTData structure |
int pin_cancelPINEntry | ( | ) |
Cancel PIN Entry
Cancels PIN entry request
void pin_registerCallBk | ( | pPIN_callBack | pPINf | ) |
To register the pin callback function to get the PINPad data. (Pass NULL to disable the callback.)
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.
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.
char* SDK_Version | ( | ) |
To Get SDK version
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.
absoluteLibraryPath | The absolute path to ID TECH's libraries. |