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 in section IEventSubscriber Delegate.
Synchronous functions return data in the return value. If the data is not available immediately, the call will block until the wait time has elapsed.
This function closes the connection to the device.
bool IDeviceControl.close();Return Value:
Returns true if successful. Otherwise, returns false.
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:
Returns true if successful. Otherwise, returns false.
This function displays a predefined message on the device.
Return Value:
Returns true if successful. Otherwise, returns false.
This function clears session data and returns the device to an idle state.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a request for user interaction input to the device. The response data will be returned in the event OnEvent().
Return Value:
Returns true if successful. Otherwise, returns false.
This function opens a connection to the device.
Return Value:
Returns true if successful. Otherwise, returns false.
This function instructs the device to play a tone.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a command to the device. The response will be passed to the event OnEvent().
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends an extended command to the device. The response will be passed to the event OnEvent().
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a raw APDU command from the host application to the NFC target while the device is operating in NFC Pass-Through mode. For NFC Type A or Type B using ISO 14443-4 Protocol.
Used for applications that require direct APDU-level communication, such as mDL, secure element transactions, or custom NFC protocols.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a synchronous command to the device. The response from the device will be returned in IResult.
Return Value:
Returns IResult.
This function sets the date and time for the device.
Return Value:
Returns true if successful. Otherwise, returns false.
This function send a command to lock or unlock the card 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.
Return Value:
Returns true if successful. Otherwise, returns false.
This function controls the status of the device’s LED indicators (Light Emitting Diode) to provide visual feedback NFC operation states. Applicable after entering NFC Pass-Through mode. The status is reset after exiting NFC Pass-Through mode.
Return Value:
Returns true if successful. Otherwise, returns false.
This function commands the device to enter NFC Pass-Through Mode. This enables the host application to directly exchange APDU commands and responses with an NFC card or mobile device.
Return Value:
Returns true if successful. Otherwise, returns false.
This function configures the NFC reader polling behavior used to detect nearby NFC targets such as cards, mobile devices, or mDL wallets. Applicable after entering the Pass-Through mode.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a command to show a barcode on the device’s display.
BarCodeRequest
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a command to immediately show an image on the device’s display. The image must already be loaded into a slot.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a command to immediately upload and show an image on the device’s display.
ImageData
Return Value:
Returns true if successful. Otherwise, returns false.
This function displays custom User Interface (UI) pages on devices that support a screen. It holds parameters for all UI page options of Text Lines, Text Buttons, Amount Buttons, Functional Buttons, and Image. Only one UI page option may be in effect at one time based on the option parameter. See the other subset functions for invoking a specific UI page.
When the UI page is active, the device waits for further action. The device notifies the host when a Button is pressed. Text Buttons and Functional Buttons report as the button number. Amount Buttons report the $ amount in BCD format. A press on a Text line does not produce a report.
Return Value:
Returns true if successful. Otherwise, returns false.
This function shows the Amount UI page.
Return Value:
Returns true if successful. Otherwise, returns false.
This function shows the Image UI page.
Return Value:
Returns true if successful. Otherwise, returns false.
This function shows the Text buttons UI page.
Return Value:
Returns true if successful. Otherwise, returns false.
This function shows the Text lines UI page.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a command to start the barcode reader.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a command to start card emulation.
Compliance: Conforms to ISO/IEC 14443 Type-A and NFC Forum Type 4 standards.
Passive Operation mode: The NFC reader must generate the field to activate the simulated card.
Read-Only: The emulated card is read-only and does not support writing.
Supported Data Type: Supports the URI (URL) data type.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a command to prompt a cardholder for customer information. The information captured is later returned in OnEvent() EventType.TouchscreenPersonalInfoEntry.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a command to stop the barcode reader. This is applicable only when the timeout value for startBarCodeReader() was set to 0x00.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a command to stop card emulation.
Return Value:
Returns true if successful. Otherwise, returns false.
This function stops the Personal Info Entry process. If called during info entry, the process will be canceled immediately.
Return Value:
Returns true if successful. Otherwise, returns false.
BackgroundColor
byte[]
Background color. Use RRGGBB format.
0xFFFFFF = White
ErrorCorrection
byte
Error Correction 0x00 = Low (default) 0x01 = Medium 0x02 = Quartile 0x03 = High
See ISO/IEC 18004:2015
Color of Middle functional button.
0 = red, 1 = green, 2 = yellow
rightFButtonColor
Color of Right functional button.
0 = red, 1 = green, 2 = yellow
String ID for the Right functional button. 2-bytes in length. To disable this button, set to 0.
leftFButtonColor
Color of Left functional button.
0 = red, 1 = green, 2 = yellow
middleFButtonColor
Color of Middle functional button.
0 = red, 1 = green, 2 = yellow
rightFButtonColor
Color of Right functional button.
0 = red, 1 = green, 2 = yellow
amount1 … amount6
Value $ Amount in BCD string format for buttons 1 to 6. 8-characters in length. To disable a button, set to NULL.
Range:
· Min value displayed is $0.00
· Max value displayed is $999,999.99
· Decimal needed to display cents
· Comma not needed
Example:
// $0.01
string sAmount1 = "0.01";
// $100,000.23
string sAmount1 = "100000.23";
Bitmap data.
Image encoded in full BMP file format as defined by Microsoft (e.g, starting with “BM”).
Color of Left functional button.
0 = red, 1 = green, 2 = yellow
middleFButtonColor
Color of Middle functional button.
0 = red, 1 = green, 2 = yellow
rightFButtonColor
Color of Right functional button.
0 = red, 1 = green, 2 = yellow
bool IDeviceControl.displayMessage(byte messageID, byte timeout);Parameter
Description
messageID
Value representing the message.
Examples:
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”
Parameter
Description
timeout
Timeout in seconds for the device to display the message.
0x00 = Infinite timeout. Device leaves the requested message on the display until the host initiates a change.
0x01 to 0xFF = Timeout in seconds for the device to display the message.
bool IDeviceControl.endSession();bool IDeviceControl.getInput();bool IDeviceControl.open();bool IDeviceControl.playSound(IData data);Parameter
Description
data
Byte array or string data to send to the device.
bool IDeviceControl.send(IData data);Parameter
Description
data
Byte array or string data to send to the device. Data must contain the full command as required by the device.
bool IDeviceControl.sendExtendedCommand(IData data);Parameter
Description
data
Byte array or string data to send to the device. Data must contain the full command as required by the device.
bool IDeviceControl.sendNFCPassThroughCommand(IData data);Parameter
Description
data
APDU command data to be transmitted to the NFC target device.
IResult IDeviceControl.sendSync(IData data);Parameter
Description
data
Byte array or string data to send to the device.
bool IDeviceControl.setDateTime(IData data);Parameter
Description
data
Byte array or string data to send to the device.
bool IDeviceControl.setLatch(bool enableLock);Parameter
Description
enableLock
false = unlock the latch in the device.
true = lock the latch in the device.
bool IDeviceControl.setLEDStatus( byte led,
byte status);Parameter
Description
led
LED number:
0x00 = LED 1 (Power LED)
0x01 = LED 2
0x02 = LED 3
0x03 = LED 4
0xFF = All 4 LEDs
Where the LEDs are numbered 1, 2, 3, 4 counting from the left.
status
LED Status:
0x00 = OFF
0x01 = GREEN ON
0x02 = RED ON
bool IDeviceControl.setNFCPassThroughMode(
byte timeout,
byte mode);Parameter
Description
timeout
Duration to stay in Pass-Through mode.
0x00 = Indefinite
0x01 to 0xFF = 1 to 255 seconds
mode
Pass-Through mode.
0x00 = Stop Pass-Through Mode. Applicable only when already started. When stopped, the RF Antenna is turned off.
0x01 = Start Pass-Through Mode. This mode can only be used when the device is in Idle state.
bool IDeviceControl.setNFCPollingMode(
byte timeout,
byte mode);Parameter
Description
timeout
Duration to stay in Pass-Through mode.
0x00 = Indefinite
0x01 to 0xFF = 1 to 255 seconds
mode
Polling Mode.
0x00 = Stop Polling Mode. Applicable only when already started.
0x01 = Start Polling Mode
bool IDeviceControl.showBarCode(
BarCodeRequest request
byte timeout
IData prompt);Parameter
Description
request
BarCodeRequest object containing the barcode data to display.
timeout
Display Time.
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.
Parameter
Type
Description
Type
BarCodeType
Enum to specify the type of barcode
Format
BarCodeFormat
Enum to specify the barcode format
Data
byte[]
Data to encode into a barcode
BlockColor
byte[]
Parameter
Type
Description
MaskPattern
byte
Mask Pattern
0x00 to 0x07 = Mask Pattern
0xFF = Device Select Optimal Mask Pattern (default) See ISO/IEC 18004:2015
MinVersion
byte
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
byte
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
bool IDeviceControl.showImage(byte imageID);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.
bool IDeviceControl.showImage(
ImageData data
byte timeout);Parameter
Description
data
ImageData object containing the image to display.
timeout
Display Time
0x00 = Indefinite
0x01 to 0xFF = 1 to 255 seconds
Member
Type/ Format
Description
type
ImageType
Enum for image type. Usage:
BITMAP = BMP file
data
byte[]
Image encoded data.
Images must be BMP format, 160KB or smaller with no compression, maximum 320px by 240px, with color depth 16 color, 256 color, 16-bit color, or 24-bit color. Images smaller than the maximum size are centered on the display. Note images at full screen size must be 16-bit color or lower to meet the size requirement.
For details see D998200383 DynaFlex Family Programmer’s Manual (COMMANDS)
backgroundColor
byte[3]
Background color in RRGGBB format.
0x000000 = Black
0xFFFFFF = White
bool showUIPage(
byte timeout,
byte option,
byte[] titleStringID = null,
string line1 = "",
string line2 = "",
string line3 = "",
string line4 = "",
string line5 = "",
byte[] stringID1 = null,
byte[] stringID2 = null,
byte[] stringID3 = null,
byte[] stringID4 = null,
byte[] stringID5 = null,
byte[] stringID6 = null,
byte[] amount1 = null,
byte[] amount2 = null,
byte[] amount3 = null,
byte[] amount4 = null,
byte[] amount5 = null,
byte[] amount6 = null,
byte[] leftFButtonStringID = null,
byte[] middleFButtonStringID = null,
byte[] rightFButtonStringID = null,
byte leftFButtonColor = 0,
byte middleFButtonColor = 0,
byte rightFButtonColor = 0,
byte[] xPosition = null,
byte[] yPosition = null,
byte[] imageData = null);Parameter
Description
timeout
Time in seconds to enable barcode reader. 0x00 = Infinite until the host initiates a change. 0x01 to 0xFF = RFU
Parameter
Description
option
UI page option.
0x00 = Up to 5 lines of text + 1 functional button Middle.
0x01 = Title + up to 6 text buttons + up to 3 functional buttons.
0x02 = Title + up to 6 $Amount buttons + up to 3 functional buttons.
0x03 = Title + custom image + 1 functional button Right.
titleStringID[]
String ID for the title. See list of display user interface strings. This list may vary according to the device configuration.
line1 … line5
Text string for the line. Terminate with null char. To disable a line, set to empty (Default).
stringID1[2] … stringID6[2]
Text string ID for buttons 1 to 6. 2-bytes in length. To disable a button, set to null (Default).
Parameter
Description
amount1[4] … amount6[4]
Value $ Amount in BCD (Binary Coded Decimal) array format for buttons 1 to 6. 4-bytes in length. To disable a button, set to null.
Byte index:
· [0-2] = dollar value
· [3] = cents value
BCD positioning:
87 65 43 . 21
0x00 0x00 0x00 0x00
· 8 – hundred thousand
· 7 – ten thousand
· 6 – thousand
· 5 – hundred
· 4 – ten
· 3 – one
· 2 – 1/tenth
· 1 – 1/hundredth
Range:
· Min value displayed is $0.00
· Max value displayed is $999,999.99
Example:
// $0.01
amount1 = new Byte[] { 0x00, 0x00, 0x00, 0x01
};
//$100,000.23
amount1 = new Byte[] { 0x10, 0x00, 0x00, 0x23
};
leftFButtonStringID[2]
String ID for the Left functional button. 2-bytes in length. To disable this button, set to null (Default).
middleFButtonStringID[2]
String ID for the Middle functional button. 2-bytes in length. To disable this button, set to null (Default).
rightFButtonStringID[2]
String ID for the Right functional button. 2-bytes in length. To disable this button, set to null (Default).
leftFButtonColor
Color of Left functional button.
0 = red, 1 = green, 2 = yellow
Parameter
Description
xPosition[2]
X Position for image. 2-bytes in length.
To display the image in the center of the loading image area, set to null (Default).
yPosition[2]
Y Position for image. 2-bytes in length.
To display the image in the center of the loading image area, set to null (Default).
imageData[]
Bitmap data.
Image encoded in full BMP file format as defined by Microsoft (e.g, starting with “BM”). If no image provided, set to null (Default).
bool showUIPageWithAmountButtons( byte timeout,
byte[] titleStringID, string[] amountList,
byte[] leftFButtonStringID,
byte[] middleFButtonStringID,
byte[] rightFButtonStringID,
byte leftFButtonColor,
byte middleFButtonColor,
byte rightFButtonColor);
bool showUIPageWithAmountButtons(
byte timeout,
byte[] titleStringID,
string amount1,
string amount2,
string amount3,
string amount4,
string amount5,
string amount6,
byte[] leftFButtonStringID,
byte[] middleFButtonStringID,
byte[] rightFButtonStringID,
byte leftFButtonColor,
byte middleFButtonColor,
byte rightFButtonColor);
bool showUIPageWithAmountButtons(
byte timeout,
byte[] titleStringID,
byte[] amount1,
byte[] amount2,
byte[] amount3,
byte[] amount4,
byte[] amount5,
byte[] amount6,
byte[] leftFButtonStringID,
byte[] middleFButtonStringID,
byte[] rightFButtonStringID,
byte leftFButtonColor,
byte middleFButtonColor,
byte rightFButtonColor);Parameter
Description
timeout
Time in seconds to enable barcode reader. 0x00 = Infinite until the host initiates a change. 0x01 to 0xFF = RFU
titleStringID[2]
String ID for the title. 2-bytes in length. See list of display user interface strings. This list may vary according to the device configuration.
amountList
List of $ Amount in BCD string format to display for each button.
leftFButtonStringID[2]
String ID for the Left functional button. 2-bytes in length. To disable this button, set to 0.
middleFButtonStringID[2]
String ID for the Middle functional button. 2-bytes in length. To disable this button, set to 0.
Parameter
Description
amount1[4] … amount6[4]
Value $ Amount in BCD (Binary Coded Decimal) array format for buttons 1 to 6. 4-bytes in length. To disable a button, set to NULL.
Byte index:
· [0-2] = dollar value
· [3] = cents value
BCD positioning:
87 65 43 . 21
0x00 0x00 0x00 0x00
· 8 – hundred thousand
· 7 – ten thousand
· 6 – thousand
· 5 – hundred
· 4 – ten
· 3 – one
· 2 – 1/tenth
· 1 – 1/hundredth
Range:
· Min value displayed is $0.00
· Max value displayed is $999,999.99
Example:
// $0.01
amount1 = new Byte[] { 0x00, 0x00, 0x00, 0x01 };
//$100,000.23
amount1 = new Byte[] { 0x10, 0x00, 0x00, 0x23 };
bool showUIPageWithImage( byte timeout,
byte[] titleStringID,
byte[] rightFButtonStringID,
byte[] xPosition,
byte[] yPosition,
byte[] imageData);Parameter
Description
timeout
Time in seconds to enable barcode reader. 0x00 = Infinite until the host initiates a change. 0x01 to 0xFF = RFU
titleStringID[2]
String ID for the title. 2-bytes in length. See list of display user interface strings. This list may vary according to the device configuration.
rightFButtonStringID[2]
String ID for the Right functional button. 2-bytes in length. To disable this button, set to 0.
xPosition[2]
X Position for image. 2-bytes in length.
To display the image in the center of the loading image area, set to null.
yPosition[2]
Y Position for image. 2-bytes in length.
To display the image in the center of the loading image area, set to null.
bool showUIPageWithTextButtons(
byte timeout,
byte[] titleStringID,
byte[] stringID1,
byte[] stringID2,
byte[] stringID3,
byte[] stringID4,
byte[] stringID5,
byte[] stringID6,
byte[] leftFButtonStringID,
byte[] middleFButtonStringID,
byte[] rightFButtonStringID,
byte leftFButtonColor,
byte middleFButtonColor,
byte rightFButtonColor);Parameter
Description
timeout
Time in seconds to enable barcode reader. 0x00 = Infinite until the host initiates a change. 0x01 to 0xFF = RFU
Parameter
Description
titleStringID[2]
String ID for the title. See list of display user interface strings. This list may vary according to the device configuration.
stringID1[2] to stringID6[2]
Text string ID for buttons 1 to 6. 2-bytes in length. To disable a button, set to null.
leftFButtonStringID[2]
String ID for the Left functional button. To disable this button, set to null.
middleFButtonStringID[2]
String ID for the Middle functional button. To disable this button, set to null.
rightFButtonStringID[2]
String ID for the Right functional button. To disable this button, set to null.
bool showUIPageWithTextLines(
byte timeout,
string[] lines,
byte[] middleFButtonStringID);
bool showUIPageWithTextLines(
byte timeout,
string line1,
string line2,
string line3,
string line4,
string line5,
byte[] middleFButtonStringID);Parameter
Description
timeout
Time in seconds to enable barcode reader. 0x00 = Infinite until the host initiates a change. 0x01 to 0xFF = RFU
lines[]
List of Text strings for lines 1 to 5 in array format. Terminate with NULL char. To disable a line, set to null.
Parameter
Description
line 1 … line5
Text string for lines 1 to 5 in string format. Terminate with NULL char. To disable a line, set to empty.
middleFButtonStringID[2]
String ID for the Middle functional buttons. 2-byte in length. To disable this button, set to null.
bool IDeviceControl.startBarCodeReader(
byte timeout,
byte encryptionMode);Parameter
Description
timeout
Time in seconds to enable barcode reader.
0x00 = Wait until a barcode is read or stopBarCodeReader() is called.
0x01 to 0xFF = 1 to 255 seconds
encryptionMode
Encrypt payload
0x00 = do not encrypt barcode data
0x01 = encrypt barcode data.
bool IDeviceControl.startCardEmulation(
byte timeout,
string data);Parameter
Description
timeout
Time in seconds.
0x00 = No timeout or until stopNFCCardEmulation() is called 0x01 to 0xFF = 1 to 255 seconds
data
NFC data to emulate. Limit is <= 254 characters.
bool IDeviceControl.startPersonalInfoEntry(
CaptureType captureType,
bool encrypt);Parameter
Description
captureType
Enum for the type of information to capture.
encrypt
Encrypt payload
false = do not encrypt data
true = encrypt data.
bool IDeviceControl.stopBarCodeReader();bool IDeviceControl.stopCardEmulation();bool IDeviceControl.stopPersonalInfoEntry();Block color. Use RRGGBB format.
0x000000 = Black
middleFButtonColor
rightFButtonStringID[2]
imageData[]
leftFButtonColor



