Create an instance of the IDeviceControl, then use the function calls described in this chapter.
This function closes the connection to the device.
boolean 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.
boolean IDeviceControl.deviceReset();Return Value:
Returns true if successful. Otherwise, returns false.
This function sets a show message on the device’s display.
boolean IDeviceControl.displayMessage(byte messageID, byte timeout);Parameter
Description
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 input at 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 returned to the event OnEvent.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a command to the device. The response will be returned to the event OnEvent.
Return Value:
Returns true if successful. Otherwise, returns false.
This function sends a synchronous command to the device. The response from the device will not be returned to the event OnEvent. The response is returned as IResult which contains the StatusCode and IData.
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 sends a command to immediately show an image on the device’s display.
Return Value:
Returns true if successful. Otherwise, returns false.
messageID
Value for the message ID.
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”
Parameter
Description
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.
Parameter
Description
data
Byte array or string data to send to the device.
Parameter
Description
data
Byte array or string data to send to the device.
Parameter
Description
data
Byte array or string data to send to the device.
Parameter
Description
data
Byte array or string data to send to the device.
Parameter
Description
data
Byte array or string data to send to the device.
Parameter
Description
data
Byte array or string data to send to the device.
Parameter
Description
enableLock
Usage:
false – unlock the latch in the device.
true – lock the latch in the device.
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.
boolean IDeviceControl.endSession();boolean IDeviceControl.getInput(IData data);boolean IDeviceControl.open();boolean IDeviceControl.playSound(IData data);boolean IDeviceControl.send(IData data);boolean IDeviceControl.sendExtendedCommand(IData data);IResult IDeviceControl.sendSync(IData data);public interface IResult
{
StatusCode Status;
IData Data;
}
public class Result implements IResult
{
private StatusCode mStatus;
private IData mData = null;
public Result(StatusCode status)
{
mStatus = status;
mData = null;
}
public Result(StatusCode status, IData data)
{
mStatus = status;
mData = null;
if (data != null)
mData = data.Clone();
}
public StatusCode Status()
{
return mStatus;
}
public IData Data()
{
return mData;
}
}
//Example Usage:
IResult result = deviceControl.sendSync(data); Log(“result = ” + result.StatusCode()); Log(“result = ” + result.Data().StringValue());boolean IDeviceControl.setDateTime(IData data);boolean IDeviceControl.setLatch(boolean enableLock);boolean IDeviceControl.showImage(byte imageID);