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 in section
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.
boolean IDeviceControl.close();Return Value:
Returns 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.
boolean IDeviceControl.deviceReset();Return Value:
Returns true if successful. Otherwise, returns false.
displayMessage
This function displays a message on the device’s screen.
Parameter
messageID
Byte array or string data of the image file to send to the device.
timeout
Wait time in seconds.
Return Value:
Returns true if successful. Otherwise, returns false.
endSession
This function clears session data and returns the device to an idle state.
Return Value:
Returns true if successful. Otherwise, returns false.
getInput
This function sends a request for user input to the device. The response data will be returned in the event
OnEvent.
Parameter
data
Byte array or string data to send to the device.
Return Value:
Returns true if successful. Otherwise, returns false.
open
This function opens a connection to the device.
Return Value:
Returns true if successful. Otherwise, returns false.
playSound
This function instructs the device to play a tone.
Parameter
data
Byte array or string data to send to the device.
Return Value:
Returns 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
data
Byte array or string data to send to the device. Data must contain the full command as required by the device.
Return Value:
Returns 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
data
Byte array or string data to send to the device. Data must contain the full command as required by the device.
Return Value:
Returns true if successful. Otherwise, returns false.
sendNFCPassThroughCommand
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.
Parameter
data
APDU command data to be transmitted to the NFC target device.
Return Value:
Returns 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
data
Byte array or string data to send to the device.
Return Value:
Returns IResult.
setDateTime
This function sets the date and time for the device.
Parameter
data
Byte array or string data to send to the device.
Return Value:
Returns true if successful. Otherwise, returns false.
setLatch
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.
Parameter
enableLock
Usage:
false – unlock the latch in the device.
true – lock the latch in the device.
Return Value:
Returns true if successful. Otherwise, returns false.
setLEDStatus
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.
Parameter
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
Return Value:
Returns true if successful. Otherwise, returns false.
setNFCPassThroughMode
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.
Parameter
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.
Return Value:
Returns true if successful. Otherwise, returns false.
setNFCPollingMode
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.
Parameter
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
Return Value:
Returns true if successful. Otherwise, returns false.
showBarCode
This function sends a command to show a barcode on the device’s display.
Parameter
request
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:
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[]
Block color. Use RRGGBB format. 0x000000 = Black
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
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
Return Value:
Returns true if successful. Otherwise, returns false.
showImage
This function sends a command to immediately show an image on the device’s display.
Parameter
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:
Returns true if successful. Otherwise, returns false.
showImage
This function sends a command to immediately show an image on the device’s display.
Parameter
data
See ImageData below.
timeout
Display Time Usage: 0x00 = Indefinite 0x01 to 0xFF = 1 to 255 seconds
ImageData
type
ImageType
Enum for image type. Usage: BITMAP = BMP file
data
byte[]
Image encoded data.
backgroundColor
byte[3]
Background color in RRGGBB format. 0x000000 = Black 0xFFFFFF = White
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).
Return Value:
Returns true if successful. Otherwise, returns false.
showUIPage
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, 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.
Parameter
timeout
Time in seconds to enable barcode reader. 0x00 = Infinite until the host initiates a change. 0x01 to 0xFF = RFU
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.
stringID1[2] … stringID6[2]
Text string ID for buttons 1 to 6. 2-bytes in length. To disable a button, set to null.
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.
middleFButtonStringID[2]
String ID for the Middle functional button. 2-bytes in length. To disable this button, set to null.
rightFButtonStringID[2]
String ID for the Right functional button. 2-bytes in length. To disable this button, set to null.
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
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.
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.
Return Value:
Returns true if successful. Otherwise, returns false.
showUIPageWithAmountButtons
This function shows the Amount UI page.
Parameter
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.
buttonAmountList
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.
rightFButtonStringID[2]
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";
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 };
Return Value:
Returns true if successful. Otherwise, returns false.
showUIPageWithImage
This function shows the Image UI page.
Parameter
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.
imageData[]
Bitmap data. Image encoded in full BMP file format as defined by Microsoft (e.g, starting with “BM”).
Return Value:
Returns true if successful. Otherwise, returns false.
showUIPageWithTextButtons
This function shows the Text buttons UI page.
Parameter
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. 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.
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
Return Value:
Returns true if successful. Otherwise, returns false.
showUIPageWithTextLines
This function shows the Text lines UI page.
Parameter
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.
line 1 … line5
Text string for lines 1 to 5 in string format. Terminate with null char. To disable a line, set to null.
middleFButtonStringID[2]
String ID for the Middle functional buttons. 2-byte in length. To disable this button, set to null.
Return Value:
Returns true if successful. Otherwise, returns false.
startBarCodeReader
This function sends a command to start the barcode reader.
Parameter
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:
Returns true if successful. Otherwise, returns false.
startCardEmulation
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.
Parameter
timeout
Time in seconds. 0x00 = No timeout or until stopCardEmulation() is called 0x01 to 0xFF = 1 to 255 seconds
data
NFC data to emulate. Limit is <= 254 characters.
Return Value:
Returns true if successful. Otherwise, returns false.
startPersonalInfoEntry
This function sends a command to prompt a cardholder for customer information. Captured information is later returned in OnEvent() EventType.TouchscreenPersonalInfoEntry.
Parameter
captureType
Enum for the type of information to capture.
encrypt
Encrypt payload false = do not encrypt data true = encrypt data.
Return Value:
Returns 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.
Return Value:
Returns true if successful. Otherwise, returns false.
stopCardEmulation
This function sends a command to stop card emulation.
Return Value:
Returns true if successful. Otherwise, returns false.
stopPersonalInfoEntry
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.

