For the complete documentation index, see llms.txt. This page is also available as Markdown.

IDeviceControl

Create an instance of the IDeviceControl using IDevice getDeviceControl. Then use the function calls described in this chapter.

Generally, these functions will run in one of two modes:

  • Asynchronous functions return data in the event handlers.

  • Synchronous functions return data in the return value. If the data is not available immediately, the call will block until a wait time has elapsed.

close

This function closes the connection to the device.

bool IDeviceControl->close();

Return Value: True if successful. Otherwise, returns false.

deviceReset

This function resets the device. This is equivalent to a power reset. After the reset, connection to the device will need to be re-established.

bool IDeviceControl->deviceReset();

Return Value: True if successful. Otherwise, returns false.

displayMessage

This function displays a predefined message on the device.

bool IDeviceControl->displayMessage( unsigned char messageID, unsigned char timeout);

messageID

Value representing the message.

Usage:

  • 0x00 - reserved, do not use.

  • 0x01 - “AMOUNT”

  • 0x02 - “AMOUNT OK?”

  • 0x03 - “APPROVED”

  • 0x04 - “CALL YOUR BANK”

  • 0x05 - “CANCEL OR ENTER”

  • 0x06 - “CARD ERROR”

  • 0x07 - “DECLINED”

  • 0x08 - “ENTER AMOUNT”

  • 0x09 - reserved, do not use. 0x0A - reserved, do not use.

  • 0x0B - “INSERT CARD”

  • 0x0C – “NOT ACCEPTED”

  • 0x0D - reserved, do not use. 0x0E - “PLEASE WAIT”

  • 0x0F - “PROCESSING ERROR”

  • 0x10 - “REMOVE CARD”

  • 0x11 - “USE CHIP READER”

  • 0x12 - “USE MAGSTRIPE”

  • 0x13 - “TRY AGAIN”

  • 0x14 - “WELCOME”

  • 0x15 - “PRESENT CARD”

  • 0x16 - “PROCESSING”

  • 0x17 - “CARD READ OK - REMOVE CARD”

  • 0x18 - “INSERT OR SWIPE CARD”

  • 0x19 - “PRESENT ONE CARD ONLY”

  • 0x1A - “APPROVED PLEASE SIGN”

  • 0x1B - “AUTHORIZING PLEASE WAIT”

  • 0x1C - “INSERT, SWIPE OR TRY ANOTHER CARD”

  • 0x1D - “PLEASE INSERT CARD”

  • 0x1E - Null prompt (empty screen) 0x1F - reserved, do not use.

  • 0x20 - “SEE PHONE”

  • 0x21 - “PRESENT CARD AGAIN”

  • 0x22 - “INSERT/SWIPE/TRY OTHER CARD”

  • 0x23 - “TAP or SWIPE CARD”

  • 0x24 - “TAP or INSERT CARD”

  • 0x25 - “TAP, INSERT or SWIPE CARD”

  • 0x26 - “TAP CARD”

  • 0x27 - “TIMEOUT”

  • 0x28 - “TRANSACTION TERMINATED”

  • 0x29 - “USE CHIP READER or MAGSTRIPE”

  • 0x2A - “SCAN BARCODE”

  • 0x2B - “BARCODE READ SUCCESSFULLY”

  • 0x2C - “CANCELED”

  • 0x2D - “SWIPE CARD or SCAN BARCODE”

  • 0x2E - “INSERT CARD or SCAN BARCODE”0x2F - “INSERT, SWIPE or SCAN BARCODE”

Parameter

Description

  • 0x30 - “TAP CARD or SCAN BARCODE”

  • 0x31 - “TAP, SWIPE or SCAN BARCODE”

  • 0x32 - “TAP, INSERT or SCAN BARCODE”

  • 0x33 - “TAP, INSERT, SWIPE or SCAN BARCODE”

  • 0x34 - “TRY ANOTHER INTERFACE”

  • 0x35 - “NFC TAG DETECTED”

  • 0x36 - “ERROR REMOVE CARD”

  • 0x37 - “MIFARE CLASSIC 1K DETECTED”

  • 0x38 - “MIFARE CLASSIC 4K DETECTED”

  • 0x39 - “MIFARE DESFIRE DETECTED”

timeout

Timeout in seconds for the device to display the message.

Usage:

0x00 - Infinite timeout. Device leaves the requested message on the display until the host initiates a change.

All other values - Timeout in seconds for the device to display the message.

Return Value: True if successful. Otherwise, returns false.

endSession

This function clears session data and returns the device to an idle state.

Return Value: True if successful. Otherwise, returns false.

getInput

This function sends a request for user input at the device. The response data will be returned in the event OnEvent().

Parameter

Description

data

Byte array or string data to send to the device.

Return Value: True if successful. Otherwise, returns false.

open

This function opens a connection to the device.

Return Value: True if successful. Otherwise, returns false.

playSound

This function instructs the device to play a tone.

Parameter

Description

data

Byte array or string data to send to the device.

Return Value: True if successful. Otherwise, returns false.

send

This function sends a command to the device. The response will be passed to the event OnEvent().

Parameter

Description

data

Byte array or string data to send to the device. Data must contain the full command as required by the device.

Return Value: True if successful. Otherwise, returns false.

sendExtendedCommand

This function sends an extended command to the device. The response will be passed to the event OnEvent().

Parameter

Description

data

Byte array or string data to send to the device. Data must contain the full command as required by the device.

Return Value: True if successful. Otherwise, returns false.

sendSync

This function sends a synchronous command to the device. The response from the device will be returned in IResult.

Parameter

Description

data

Byte array or string data to send to the device.

Return Value: IResult.

setDateTime

This function sets the date and time for the device.

Parameter

Description

data

Byte array or string data to send to the device.

Return Value: True if successful. Otherwise, returns false.

setLatch

This function is to lock or unlock the card latch. Applicable on devices equipped with a latch. The host can choose to lock the card during EMV transactions to limit the possibility of the cardholder prematurely removing the card. The lock can also be enabled while the card is out of the system to block cardholders from inserting a card.

Parameter

Description

enableLock

Usage:

  • false - unlock the latch in the device.

  • true - lock the latch in the device.

Return Value: True if successful. Otherwise, returns false.

showBarCode

This function sends a command to show a barcode on the device’s display.

Parameter

Description

data

BarCodeRequest object containing the barcode data to display.

timeout

Display Time. Usage:

  • 0x00 = Indefinite

  • 0x01 to 0xFF = 1 to 255 seconds

prompt

Text to display below the QR code. In Landscape orientation, the limit is approximately 30 characters. In Portrait orientation, the limit is approximately 22 characters.

BarCodeRequest

Parameter

Type

Description

Type

BarCodeType

Enum to specify the type of barcode

Format

BarCodeFormat

Enum to specify the barcode format

Data

vector<unsigned char>

Data to encode into a barcode

Parameter

Type

Description

BlockColor

vector<unsigned char>

Block color. Use RRGGBB format.

  • 0x000000 = Black

BackgroundColor

vector<unsigned char>

Background color. Use RRGGBB format.

  • 0xFFFFFF = White

ErrorCorrection

unsigned char

Error Correction

  • 0x00 = Low (default)

  • 0x01 = Medium

  • 0x02 = Quartile

  • 0x03 = High

See ISO/IEC 18004:2015

MaskPattern

unsigned char

Mask Pattern

  • 0x00 to 0x07 = Mask Pattern

  • 0xFF = Device Select Optimal Mask Pattern (default)

See ISO/IEC 18004:2015

MinVersion

unsigned char

Minimum Version. Must be less than or equal to Maximum Version.

  • 0x01 to 0x28 = Version 1 to Version 40 (0x01 is default)

See ISO/IEC 18004:2015

MaxVersion

unsigned char

Maximum Version. Must be greater than or equal to Minimum Version.

  • 0x01 to 0x28 = Version 1 to Version 40 (0x28 is default)

See ISO/IEC 18004:2015

Return Value: True if successful. Otherwise, returns false.

showImage - no upload

This function sends a command to immediately show an image on the device’s display. The image must already be loaded into a slot by sendImage().

Parameter

Description

imageID

Usage:

  • 0x01 – show the image at slot 1.

  • 0x02 – show the image at slot 2.

  • 0x03 – show the image at slot 3.

  • 0x04 – show the image at slot 4.

Return Value: True if successful. Otherwise, returns false.

showImage - with upload

This function sends a command to immediately upload and show an image on the device’s display.

Parameter

Description

data

ImageData object containing the image to display.

timeout

Display Time Usage:

  • 0x00 = Indefinite

  • 0x01 to 0xFF = 1 to 255 seconds

ImageData

Member

Type/ Format

Description

type

ImageType

Enum for image type. Usage:

IMAGE_TYPE_BITMAP = BMP file

data

vector<unsigned char>

Image encoded data.

backgroundColor

vector<unsigned char>

Background color in RRGGBB format.

  • 0x000000 = Black

  • 0xFFFFFF = White

Return Value: True if successful. Otherwise, returns false.

startBarCodeReader

This function sends a command to start the barcode reader.

Parameter

Description

timeout

Time to enable barcode reader. Usage:

  • 0x00 = Wait until a barcode is read or stopBarCodeReader() is called.

  • 0x01 to 0xFF = 1 to 255 seconds

encryptionMode

Encrypt payload Usage:

  • 0x00 = do not encrypt barcode data

  • 0x01 = encrypt barcode data.

Return Value: True if successful. Otherwise, returns false.

stopBarCodeReader

This function sends a command to stop the barcode reader. This is applicable only when the timeout value for startBarCodeReader() was set to 0x00.

Returns Value: True if successful. Otherwise, returns false.

Last updated