![]() |
IDTech Universal SDK
1.0.35.036
API reference for C++
|
SpectrumPro 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(* | 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) |
char * | SDK_Version () |
int | setAbsoluteLibraryPath (const char *absoluteLibraryPath) |
int | device_init () |
int | rs232_device_init (int deviceType, int port_number, int brate) |
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_rebootDevice () |
int | device_updateFirmware (IN BYTE *firmwareData, IN int firmwareDataLen, IN char *firmwareName, IN int encryptionType, IN BYTE *keyBlob, IN int keyBlobLen) |
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 | device_pollCardReader (OUT BYTE *status) |
int | device_pollCardReader_Len (OUT BYTE *status, IN_OUT int *statusLen) |
int | device_getSpectrumProKSN (IN int type, OUT BYTE *KSN) |
int | device_getSpectrumProKSN_Len (IN int type, OUT BYTE *KSN, IN_OUT int *KSNLen) |
int | device_getSDKWaitTime () |
void | device_setSDKWaitTime (int waitTime) |
int | device_getThreadStackSize () |
void | device_setThreadStackSize (int threadSize) |
int | icc_powerOnICC (OUT BYTE *ATR, IN_OUT int *inLen) |
int | icc_powerOffICC () |
int | icc_getICCReaderStatus (OUT BYTE *status) |
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) |
void | emv_setAutoAuthenticateTransaction (IN int authenticate) |
void | emv_setAutoCompleteTransaction (IN int complete) |
int | emv_getAutoAuthenticateTransaction () |
int | emv_getAutoCompleteTransaction () |
int | emv_getEMVConfigurationCheckValue (OUT BYTE *checkValue, IN_OUT int *checkValueLen) |
void | emv_allowFallback (IN int allow) |
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_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_clearMSRData () |
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 | pin_getPIN (IN int mode, IN int PANSource, IN char *iccPAN, IN int IN iccPANLen, int startTimeout, IN int entryTimeout, IN char *language, IN int languageLen) |
int | pin_cancelPINEntry () |
void | parsePINBlockData (IN BYTE *resData, IN int resLen, IN_OUT IDTPINData *cardData) |
void | parsePINData (IN BYTE *resData, IN int resLen, IN_OUT IDTPINData *cardData) |
SpectrumPro API.
Spectrum Pro 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(* 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_getModelNumber | ( | OUT char * | sNumber | ) |
DEPRECATED : please use config_getModelNumber_Len(OUT char* sNumber, IN_OUT int *sNumberLen)
Polls device for Model Number
sNumber | Returns Model Number; needs to have at least 64 bytes of memory |
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 device_close | ( | ) |
Close the device
int device_getCurrentDeviceType | ( | ) |
Get current active device type
int device_getFirmwareVersion | ( | OUT char * | firmwareVersion | ) |
DEPRECATED : please use device_getFirmwareVersion_Len(OUT char* firmwareVersion, IN_OUT int *firmwareVersionLen)
Polls device for Firmware Version
firmwareVersion | Response returned of Firmware Version; needs to have at least 128 bytes of memory |
Polls device for Firmware Version
firmwareVersion | Response returned of Firmware Version |
firmwareVersionLen | Length of Firmware Version |
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
DEPRECATED : please use device_getSpectrumProKSN_Len(IN int type, OUT BYTE * KSN, IN_OUT int *KSNLen)
Get DUKPT KSN
Returns the KSN for the provided key index
type | Key type:
|
KSN | Key Serial Number; needs to have at least 10 bytes of memory |
Get DUKPT KSN
Returns the KSN for the provided key index
type | Key type:
|
KSN | Key Serial Number |
KSNLen | Length of KSN |
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_pollCardReader | ( | OUT BYTE * | status | ) |
DEPRECATED : please use device_pollCardReader_Len(OUT BYTE * status, IN_OUT int *statusLen)
Poll Card Reader
Provides information about the state of the Card Reader
status | Six bytes indicating card reader information Byte 0:
|
Byte 1:
Byte 2:
Byte 3:
Byte 4:
Byte 5:
Poll Card Reader
Provides information about the state of the Card Reader
status | Six bytes indicating card reader information Byte 0:
|
Byte 1:
Byte 2:
Byte 3:
Byte 4:
Byte 5:
statusLen | Length of 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.)
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
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 the Spectrum Pro K21 HUB or Maxq1050.
firmwareData | Signed binary data of a firmware file provided by IDTech |
firmwareDataLen | Length of firmwareData |
firmwareName | Firmware name. Must be one of the following two strings (with appropriate version information)
|
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 = SPECTRUM_PRO 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 |
lsLen | 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] |
lsLen | 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_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_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.
int msr_clearMSRData | ( | ) |
Clear MSR Data Clears the MSR Data buffer
Get MSR Data Reads the MSR Data buffer
reData | Card data |
reLen | Card data length |
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_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 |
Parse the PIN block data from the buffer into IDTPINData structure
resData | PIN card data buffer |
resLen | the length of resData |
cardData | the parser result with IDTPINData structure |
Parse the PIN data from the buffer into IDTPINData structure
resData | PIN card data buffer |
resLen | the length of resData |
cardData | the parser result with IDTPINData structure |
int pin_cancelPINEntry | ( | ) |
Cancel PIN Entry
Cancels PIN entry request
int pin_getPIN | ( | IN int | mode, |
IN int | PANSource, | ||
IN char * | iccPAN, | ||
IN int IN | iccPANLen, | ||
int | startTimeout, | ||
IN int | entryTimeout, | ||
IN char * | language, | ||
IN int | languageLen | ||
) |
Get Encrypted PIN
Requests PIN Entry
mode |
|
PANSource |
|
iccPAN | PAN captured from ICC. When PAN captured from MSR, this parameter will be ignored |
iccPANLen | the length of iccPAN |
startTimeout | The amount of time allowed to start PIN entry before timeout |
entryTimeout | The amount of time to enter the PIN after first digit selected before timeout |
language | Valid values "EN" for English, "ES" for Spanish, "ZH" for Chinese, "FR" for French |
languageLen | the length of language |
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.
int rs232_device_init | ( | int | deviceType, |
int | port_number, | ||
int | brate | ||
) |
Initial the device by RS232
It will try to connect to the device with provided deviceType, port_number, and brate.
deviceType | Device to connect to |
port_number | Port number of the device |
| 0 | ttyS0 | COM1 | | 1 | ttyS1 | COM2 | | 2 | ttyS2 | COM3 | | 3 | ttyS3 | COM4 | | 4 | ttyS4 | COM5 | | 5 | ttyS5 | COM6 | | 6 | ttyS6 | COM7 | | 7 | ttyS7 | COM8 | | 8 | ttyS8 | COM9 | | 9 | ttyS9 | COM10 | | 10 | ttyS10 | COM11 | | 11 | ttyS11 | COM12 | | 12 | ttyS12 | COM13 | | 13 | ttyS13 | COM14 | | 14 | ttyS14 | COM15 | | 15 | ttyS15 | COM16 | | 16 | ttyUSB0 | n.a. | | 17 | ttyUSB1 | n.a. | | 18 | ttyUSB2 | n.a. | | 19 | ttyUSB3 | n.a. | | 20 | ttyUSB4 | n.a. | | 21 | ttyUSB5 | n.a. | | 22 | ttyAMA0 | n.a. | | 23 | ttyAMA1 | n.a. | | 24 | ttyACM0 | n.a. | | 25 | ttyACM1 | n.a. | | 26 | rfcomm0 | n.a. | | 27 | rfcomm1 | n.a. | | 28 | ircomm0 | n.a. | | 29 | ircomm1 | n.a. | | 30 | cuau0 | n.a. | | 31 | cuau1 | n.a. | | 32 | cuau2 | n.a. | | 33 | cuau3 | n.a. | | 34 | cuaU0 | n.a. | | 35 | cuaU1 | n.a. | | 36 | cuaU2 | n.a. | | 37 | cuaU3 | n.a. |
brate | Bitrate of the device |
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. |