# Enums/Constants/Status/Interfaces

#### Operation Status

<table data-header-hidden><thead><tr><th width="127.18182373046875" valign="top"></th><th width="182.72723388671875" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Value (Hex)</td><td valign="top">Result Code</td><td valign="top">Description</td></tr><tr><td valign="top">0x00</td><td valign="top">Success</td><td valign="top">The command completed successfully.</td></tr><tr><td valign="top">0x01</td><td valign="top">Failure</td><td valign="top">The command failed.</td></tr><tr><td valign="top">0x02</td><td valign="top">Bad Parameter</td><td valign="top">The command failed due to a bad parameter or command syntax error.</td></tr><tr><td valign="top">0x03</td><td valign="top">Redundant</td><td valign="top">The command is redundant.</td></tr><tr><td valign="top">0x04</td><td valign="top">Bad Cryptography</td><td valign="top">A bad cryptography operation occurred.</td></tr><tr><td valign="top">0x05</td><td valign="top">Delayed</td><td valign="top">The request is refused because the device is delaying requests as a defense against brute-force hacking.</td></tr><tr><td valign="top">0x06</td><td valign="top">No Keys</td><td valign="top">No keys are loaded.</td></tr><tr><td valign="top">0x07</td><td valign="top">Invalid Operation</td><td valign="top">Depends on the context of the command.</td></tr><tr><td valign="top">0x08</td><td valign="top">Response not available</td><td valign="top">The response is not available.</td></tr><tr><td valign="top">0x09</td><td valign="top">Not enough power</td><td valign="top">The battery is too low to operate reliably.</td></tr><tr><td valign="top">0x0A</td><td valign="top">Extended response first packet</td><td valign="top">The device is returning the first (and possibly only) packet of an Extended Response.</td></tr><tr><td valign="top">0x0B</td><td valign="top">Extended command pending</td><td valign="top">An extended command is pending and the device is waiting for more data.</td></tr><tr><td valign="top">0x0C</td><td valign="top">Extended command notification</td><td valign="top">Deprecated</td></tr><tr><td valign="top">0x0D</td><td valign="top">Not implemented</td><td valign="top">The command is not implemented.</td></tr><tr><td valign="top">0x0E</td><td valign="top">Unarmed tamper, device not ready</td><td valign="top">The tamper device is not ready to be armed.</td></tr><tr><td valign="top">0x0F</td><td valign="top">Unarmed tamper, bad signature</td><td valign="top">The tamper is not armed because of a bad signature.</td></tr></tbody></table>

#### Operation Status for Extended commands <a href="#id-6.2_operation_status_for_extended_comman" id="id-6.2_operation_status_for_extended_comman"></a>

**Result Code Description**

* 0x0000 = Success 0x0001 = Failure
* 0x0381 = Failure, DUKPT scheme is not loaded
* 0x0382 = Failure, DUKPT scheme is loaded but all of its keys have been used&#x20;
* 0x0383 = Failure, DUKPT scheme is not loaded (Security Level not 3 or 4)&#x20;
* 0x0384 = Invalid Total Transaction Time field
* 0x0385 = Invalid Card Type field 0x0386 = Invalid Options field
* 0x0387 = Invalid Amount Authorized field 0x0388 = Invalid Transaction Type field 0x0389 = Invalid Cash Back field
* 0x038A = Invalid Transaction Currency Code field 0x038B = Invalid Selection Status
* 0x038C = Invalid Selection Result
* 0x038D = Failure, no transaction currently in progress 0x038E = Invalid Reporting Option
* 0x038F = Failure, transaction already in progress 0x0390 = Device Has No Keys
* 0x0391 = Invalid Device Serial Number&#x20;
* 0x0392 = Invalid Type of MAC field&#x20;
* 0x0393 = Invalid Slot Number field&#x20;
* 0x0394 = Invalid Operation field&#x20;
* 0x0395 = Invalid Database Selector field&#x20;
* 0x0396 = Invalid System Date and Time&#x20;
* 0x0396 = Invalid Objects to Write field&#x20;
* 0x0396 = Invalid Tags to Read field
* 0x0396 = Invalid Date / Time data (Date / Time has not been set yet)&#x20;
* 0x0397 = Invalid MAC
* 0x0398 = No Slots Available 0x0399 = Object Write Protected&#x20;
* 0x039B = Invalid CAPK Checksum
* 0x039C = Invalid Configuration Identifier

#### MTBankingEvent <a href="#id-6.3_mtbankingevent" id="id-6.3_mtbankingevent"></a>

public class MTBankingEvent

{

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">public static final int OnDeviceState</td><td valign="top">= 1400;</td></tr><tr><td valign="top">public static final int OnCardStatus</td><td valign="top">= 1401;</td></tr><tr><td valign="top">public static final int OnCardData</td><td valign="top">= 1402;</td></tr><tr><td valign="top">public static final int OnPINResponse</td><td valign="top">= 1403;</td></tr><tr><td valign="top">public static final int OnSignatureState</td><td valign="top">= 1404;</td></tr><tr><td valign="top">public static final int OnSignature</td><td valign="top">= 1405;</td></tr><tr><td valign="top">public static final int OnEncryptedDataState</td><td valign="top">= 1406;</td></tr><tr><td valign="top">public static final int OnEncryptedData</td><td valign="top">= 1407;</td></tr></tbody></table>

}

<table data-header-hidden><thead><tr><th width="211.27276611328125" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">OnDeviceState</td><td valign="top">The device sends the host this notification to report the condition/status of the device.</td></tr><tr><td valign="top">OnCardStatus</td><td valign="top">The device sends the host this notification to report the card status.</td></tr><tr><td valign="top">OnCardData</td><td valign="top">The device sends the host this notification to report the card data.</td></tr><tr><td valign="top">OnPINResponse</td><td valign="top">The device sends the host this notification to report the PIN data.</td></tr><tr><td valign="top">OnSignatureState</td><td valign="top">The device sends the host this notification to report that signature data is available.</td></tr><tr><td valign="top">OnSignature</td><td valign="top">The device sends the host this notification to report the signature data.</td></tr><tr><td valign="top">OnEncryptedDataState</td><td valign="top">The device sends the host this notification to report the status of encrypted data.</td></tr><tr><td valign="top">OnEncryptedData</td><td valign="top">The device sends the host this notification to report the encrypted data.</td></tr></tbody></table>

#### MTEMVEvent <a href="#id-6.4_mtemvevent" id="id-6.4_mtemvevent"></a>

```
public class MTEMVEvent 
{ 
    public static final int OnTransactionStatus = 200; 
    public static final int OnDisplayMessageRequest = 201; 
    public static final int OnUserSelectionRequest = 202; 
    public static final int OnARQCReceived = 203; 
    public static final int OnTransactionResult = 204; 
    public static final int OnEMVCommandResult = 205; 
    public static final int OnDeviceExtendedResponse   = 206; }
```

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">OnTransactionStatus</td><td valign="top">The device sends the host this notification to report progress during an EMV transaction.</td></tr><tr><td valign="top">OnDisplayMessageRequest</td><td valign="top">The device sends this notification to request that the host display a message for the cardholder. The host should display the message.</td></tr><tr><td valign="top"><p> </p><p>OnUserSelectionRequest</p></td><td valign="top">This device sends the host this notification to inform the host that a cardholder selection is needed before the device can continue processing the current transaction.</td></tr><tr><td valign="top"><p> </p><p>OnARQCReceived</p></td><td valign="top">The device sends the host this notification to send ARQC data for the host to process. After the host processes the ARQC data, it should send the command setAcquirerResponse() to inform the device it can proceed with the transaction.</td></tr><tr><td valign="top"><p> </p><p>OnTransactionResult</p></td><td valign="top">The device sends this notification to provide the host with final information from the transaction. It usually includes data and an indication of whether a signature is required.</td></tr><tr><td valign="top">OnEMVCommandResult</td><td valign="top">The device sends the host this notification to report the result of an EMV command.</td></tr><tr><td valign="top">OnDeviceExtendedResponse</td><td valign="top">The device sends the host this notification to report the response to an extended command.</td></tr></tbody></table>

#### MTError <a href="#id-6.5_mterror" id="id-6.5_mterror"></a>

```
public enum MTError 
{ 
    CardDataError, 
    ConnectionError 
}
```

<table data-header-hidden><thead><tr><th width="178.54547119140625" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">CardDataError</td><td valign="top">The device sends the host this notification to report and error in card data.</td></tr><tr><td valign="top">ConnectionError</td><td valign="top">This this notification reports an error when attempting to connect to the device.</td></tr></tbody></table>

#### MTSCRAEvent <a href="#id-6.6_mtscraevent" id="id-6.6_mtscraevent"></a>

```
public class MTSCRAEvent 
{ 
    public static final int OnDeviceConnectionStateChanged = 0; 
    public static final int OnCardDataStateChanged = 1; 
    public static final int OnDataReceived = 2; 
    public static final int OnDeviceResponse = 3; 
    public static final int OnDeviceNotPaired = 4; 
}
```

#### MTConnectionState <a href="#id-6.7__mtconnectionstate" id="id-6.7__mtconnectionstate"></a>

```
public enum MTConnectionState 
{ 
    Disconnected, 
    Connected, 
    Error, 
    Connecting, 
    Disconnecting 
}
```

<table data-header-hidden><thead><tr><th width="164.90911865234375" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">Disconnected</td><td valign="top">Device is disconnected.</td></tr><tr><td valign="top">Connected</td><td valign="top">Device is connected and ready for transacting.</td></tr><tr><td valign="top">Error</td><td valign="top">There was an error either connecting or disconnecting the device.</td></tr><tr><td valign="top">Connecting</td><td valign="top">Device is in the process of connecting. The next state is to be Connected.</td></tr><tr><td valign="top">Disconnecting</td><td valign="top">Device is in the process of disconnecting. The next state is to be Disconnected.</td></tr></tbody></table>

#### MTConnectionType <a href="#id-6.8_mtconnectiontype" id="id-6.8_mtconnectiontype"></a>

```
public enum MTConnectionType 
{ 
    Unknown(0), 
    Audio(1), 
    BLE(2), 
    BLEEMV(3), 
    Bluetooth(4), 
    USB(5), 
    Serial(6), 
    Net(7), 
    Net_TLS12(8), 
    Net_TLS12_Trust_All(9), 
    BLEEMVT(10), 
    AIDL(11); 
}
```

#### IMTCardData <a href="#id-6.9_imtcarddata" id="id-6.9_imtcarddata"></a>

```
public interface IMTCardData 
{ 
    void setSOM(byte[] somBytes); 
    void setEOM(byte[] eomBytes); 
    void setFS(byte fsByte); 
    
    public byte[] getData(); 
    public String getMaskedTracks(); 
    public String getTrack1(); 
    public String getTrack2(); 
    public String getTrack3(); 
    public String getTrack1Masked(); 
    public String getTrack2Masked(); 
    public String getTrack3Masked(); 
    public String getMagnePrint(); 
    public String getMagnePrintStatus(); 
    public String getDeviceSerial(); 
    public String getSessionID(); 
    public String getKSN(); 
    public String getDeviceName(); 
    public void clearBuffers(); 
    public long getBatteryLevel(); 
    public long getSwipeCount(); 
    public String getCapMagnePrint(); 
    public String getCapMagnePrintEncryption(); 
    public String getCapMagneSafe20Encryption(); 
    public String getCapMagStripeEncryption(); 
    public String getCapMSR(); 
    public String getCapTracks(); 
    public long getCardDataCRC(); 
    public String getCardExpDate(); 
    public String getCardIIN(); 
    public String getCardLast4(); 
    public String getCardName(); 
    public String getCardPAN(); 
    public int getCardPANLength(); 
    public String getCardServiceCode(); 
    public String getCardStatus(); 
    public int getDataFieldCount(); 
    public String getHashCode(); 
    public String getDeviceConfig(String configType); 
    public String getEncryptionStatus(); 
    public String getFirmware(); 
    public String getMagTekDeviceSerial(); 
    public String getResponseType(); 
    public String getTagValue(String tag, 
    String data); public String getTLVVersion(); 
    public String getTrackDecodeStatus(); 
    public String getTLVPayload(); 
    
    public String getMessageID(); 
    public boolean isQwantumCard(); 
    public boolean isQwantumBuffer(); 
    public boolean isCustomerMessage(); 
    
    String getMSRDUKPTKeySerialNumber(); 
    String getMSRDUKPTKeyInfo(); 
    String getMPDUKPTKeySerialNumber(); 
    String getMPDUKPTKeyInfo(); 
    
    public String getTokenDUKPTKeySerialNumber(); 
    public String getTokenDUKPTKeyInfo(); 
    public String getQwantumStatus(); 
    public String getQwantumToken(); 
    public String getQwantumCardID(); 
    public String getEncryptedQwantumDataBuffer(); 
    public String getMACDUKPTKeyInfo(); 
    public String getMACMessageLength(); 
    public String getMAC(); 
    
    public String getCustomerMessageCode(); 
    public String getCustomerMessageText(); 
    
    public String getEncryptedSCDE(); 
    public String getSCDEDUKPTKeySerialNumber(); 
    public String getSCDEDUKPTKeyInfo(); }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.magtek.com/hardware/card-readers/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/programmers-manual-android/enums-constants-status-interfaces.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
