# Draft - Commands

### Command 0x0000 - Get Property <a href="#toc156981699" id="toc156981699"></a>

This command lets the host retrieve a property (see section on properties) from the device using the 1-byte Property ID.

### Table - Get Property Command

<table data-header-hidden><thead><tr><th width="144.33331298828125"></th><th width="187"></th><th></th></tr></thead><tbody><tr><td>Command</td><td>Parameter Data Len</td><td>Parameter Data</td></tr><tr><td>0x0000</td><td>0x0001</td><td>Property ID (1-byte)</td></tr></tbody></table>

### Table - Get Property Response

| Return Code | Response Data Len | Response Data  |
| ----------- | ----------------- | -------------- |
| 0x0000      | varies            | Property Value |

Legacy (if needed) for simple & short properties.

### Table - Legacy Get Property

| Command | Parameter Data Len | Parameter Data       |
| ------- | ------------------ | -------------------- |
| 0x00    | 0x01               | Property ID (1-byte) |

### Table - Legacy Response Structure

| Return Code | Response Data Len | Response Data |
| ----------- | ----------------- | ------------- |
| 0x00        | varies            | 0 to 58 bytes |

### Command 0x0001 - Set Property (MAC Protected for Some Properties)

This command sets a property in the device.  For secure properties, this command should be the payload for the Send Secured Command.

### Table - Set Property Command

| Command | Parameter Data Len | Parameter Data                                            |
| ------- | ------------------ | --------------------------------------------------------- |
| 0x0001  | varies             | <p>Property ID (1 byte)</p><p>Property Value (varies)</p> |

### Table - Set Property Response

| Return Code | Response Data Len | Response Data                                   |
| ----------- | ----------------- | ----------------------------------------------- |
| 0x0001      | 0x0001            | <p>0=Property in effect</p><p>1=Needs reset</p> |

### Command 0x0002 - Reset Device

This command is used to reset the device.

### Table - Reset Device Command

| Command | Parameter Data Len | Parameter Data |
| ------- | ------------------ | -------------- |
| 0x0002  | 0x0000             | None           |

### Command 0x030D - Read Date and Time <a href="#toc183604133" id="toc183604133"></a>

The host uses this command to get the date / time from the device’s internal clock.  The value returned is set to Coordinated Universal Time (UTC).  The host is responsible for converting the response to local time.

### Table - Read RTC Command

| Command | Parameter Data Len | Parameter Data |
| ------- | ------------------ | -------------- |
| 0x030D  | 0x0000             | None           |

### Table - Read RTC Response

| Return Code | Response Data Len | Response Data |
| ----------- | ----------------- | ------------- |
| 0x0000      | 0x0007            | See Table     |

### Table - Read RTC Response Data

<table data-header-hidden><thead><tr><th width="100.33334350585938"></th><th width="152.3333740234375"></th><th></th></tr></thead><tbody><tr><td>Length</td><td>Field Name</td><td>Value</td></tr><tr><td>1</td><td>Month</td><td>Value from 0x01...0x0C (1-12)</td></tr><tr><td>1</td><td>Day</td><td>Value from 0x01...0x1F (1-31, depends on the month)</td></tr><tr><td>1</td><td>Hour</td><td>Value from 0x00...0x17 (0-23)</td></tr><tr><td>1</td><td>Minute</td><td>Value from 0x00...0x3B (0-59)</td></tr><tr><td>1</td><td>Second</td><td>Value from 0x00...0x3B (0-59)</td></tr><tr><td>1</td><td>Unused</td><td>0x00</td></tr><tr><td>1</td><td>Year</td><td>Value from 0x00 (2008) ...0xFF (2263)</td></tr></tbody></table>

### Command 0x0703 – Get Key Information <a href="#toc161816180" id="toc161816180"></a>

This command returns the information about the specified key to the host.

### Table - Get Key Info Command

| Command | Parameter Data Len | Parameter Data |
| ------- | ------------------ | -------------- |
| 0703    | 0x0002             | Key ID         |

### Table - Response Data for Get Key Information Command

<table data-header-hidden><thead><tr><th width="121.66668701171875"></th><th width="177"></th><th></th></tr></thead><tbody><tr><td>Offset</td><td>Field Name</td><td>Description</td></tr><tr><td>0</td><td><p>Key Slot Status</p><p>(1 byte)</p></td><td><p>0 = Empty</p><p>1 = Loaded (Purpose not assigned)        </p><p>2 = Loaded &#x26; active</p><p>3 = Exhausted (End of DUKPT key sequence)</p><p>4 = Expired (RFU, cert status?)</p><p>0xFF = Not supported in this device</p></td></tr><tr><td>1</td><td><p>Slot Type</p><p>(1 byte)</p></td><td>First byte of Slot ID (Slot ID = Key ID)</td></tr><tr><td>2</td><td><p>TK ID</p><p>(2 byte)</p></td><td>The Key ID used to transport this key (a parent key ID)</td></tr></tbody></table>

{% hint style="info" %}

#### The following fields are required if Key Slot is not empty.

{% endhint %}

<table data-header-hidden><thead><tr><th width="121.66668701171875"></th><th width="177"></th><th></th></tr></thead><tbody><tr><td>Offset</td><td>Field Name</td><td>Description</td></tr><tr><td>4</td><td><p>Key Environment</p><p>(1 byte)</p></td><td>‘T’ for test or ‘P’ for production</td></tr><tr><td>5</td><td><p>X9.143 Attributes</p><p>(4 bytes)</p></td><td>‘Key Usage || Algorithm || Mode of Use’ from X9.143 Key Block Header.</td></tr><tr><td>9</td><td><p>Key Algorithm</p><p>(1 byte)</p></td><td><p>1 = DES             4 = AES128</p><p>2 = 2TDES        5 = AES192</p><p>3 = 3TDES        6 = AES256</p></td></tr><tr><td>10</td><td><p>KCV</p><p>(5 or 3 bytes)</p></td><td>5 bytes for AES-CMAC or 3 bytes for TDES-CBCMAC including the KCV algorithm info as defined in X9.143 ‘KP’/’KC’ format (A.5.8 of X9.143 spec)</td></tr><tr><td>15 or 13</td><td><p>Length of KSI</p><p>(1 bytes)</p></td><td>Length of Key Set Identifier</td></tr><tr><td>16 or 14</td><td><p>Key Set Identifier</p><p>(n bytes)</p></td><td>Encoded in Hex-ASCII refer to Table 11 in X9.143 specification.</td></tr><tr><td><p>(16 + n) or</p><p>(14 + n)</p></td><td><p>Key Restriction</p><p>(2 bytes)</p></td><td>16-bit Key Restriction Bitmask (for TK and DKPT keys)</td></tr><tr><td><p>(16 + n + 3) or</p><p>(14 + n + 3)</p></td><td><p>Key Configuration</p><p>(2 bytes)</p></td><td><p>16-bit Key Configuration Bitmask</p><p>Currently supports Data Type Configuration only.</p></td></tr><tr><td><p>(16 + n + 4) or</p><p>(14 + n + 4)</p></td><td><p>Timestamp</p><p>(24 bytes)</p></td><td>Time and date in UTC time format that indicates when the key block was formed.</td></tr></tbody></table>

### Command 0x07E0 – Set Button Mode (MAC Protected) <a href="#ref183603836" id="ref183603836"></a>

This command is used to activate or deactivate the button. The command is rejected if the device is not in Qwantum mode. The button always defaults to disabled after reset or when switching modes.

### Table - Set Button Mode

<table data-header-hidden><thead><tr><th width="106.27276611328125"></th><th width="125.45452880859375"></th><th></th></tr></thead><tbody><tr><td>Command</td><td>Parameter Data Len</td><td>Parameter Data</td></tr><tr><td>0x07E0</td><td>0x0001</td><td><p>0x00 – Disable button</p><p>The push-button functionality is disabled.</p><p></p><p>0x01 – Enable button</p><p>The push-button functionality is enabled, allowing the operator to output buffer data by pressing the button. The functionality remains active until a command is issued to disable it or the device is power cycled.</p><p></p><p>0x02 – Enable button for single press</p><p>The push-button functionality is enabled, allowing the operator to output buffer data by pressing the button once. The functionality will be disabled automatically afterward or upon power cycling.</p><p></p><p>0x03 – Enable Button Persistently</p><p>The push-button functionality is enabled, allowing the operator to output buffer data by pressing the button. The push-button activation persists even after a power cycle. The functionality remains active until a command is issued to disable it.</p></td></tr></tbody></table>


---

# 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/draft-documents/5-6-26-draft-of-programmers-manual-commands/draft-commands.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.
