> For the complete documentation index, see [llms.txt](https://developer.magtek.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.magtek.com/hardware/~/revisions/aurjDoOhAcnQLHeoR1ks/card-readers/mms-dyna-devices/emv-common-kernel/dynaflex-ii-go/documents/developers-manuals/programmers-manual-commands/commands/file-operations/get-file-info-from-device.md).

# Get File Info from Device

## Command 0xD825 - Get File Info from Device

The host uses this command to request the file information of a file stored on the device. File types include standard files (images and certificates), MagTek custom files (configuration, firmware), and in some cases even large data blob output (such as signature capture data). In many cases, the file information retrieved by this command have been sent by a host previously using Command 0xD811 - Start Send File to Device (Secured) or Command 0xD812 - Start Send File to Device (Unsecured). In other cases, such as retrieving file information of signature capture data, the data may originate with the device and the host uses this command to retrieve the information. Such information is not persistent, in the sense that the device does not retain it through power cycles.

The sequence of events is as follows:

{% stepper %}
{% step %}

### Compose and send request

The host composes a command request in the format below, and sends it to the device.
{% endstep %}

{% step %}

### Device responds

The device sends a response in the format below. The response contains the file information.
{% endstep %}

{% step %}

### File not found

If the file cannot be found, then a response of failure will be sent to the host.
{% endstep %}
{% endstepper %}

## Table - Request Data for Command 0xD825 - Get File Info from Device

<table><thead><tr><th>Tag</th><th width="74.33331298828125">Len</th><th>Value / Description</th><th width="74.66668701171875">Typ</th><th width="73.99993896484375">Req</th><th width="98">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including <strong>Request Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>D825 = <strong>Command 0xD825 - Get File Info from Device</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>81</td><td>04</td><td>File ID from Table 206</td><td>B</td><td>R</td><td></td></tr><tr><td>End of any wrappers, at minimum including <strong>Request Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table - Response Data for Command 0xD825 - Get File Info from Device

<table><thead><tr><th>Tag</th><th width="74.6666259765625">Len</th><th>Value / Description</th><th width="75">Typ</th><th width="76">Req</th><th width="97.333251953125">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including <strong>Response Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>D825 = <strong>Command 0xD825 - Get File Info from Device</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>81</td><td>04</td><td>File ID from Table 206</td><td>B</td><td>R</td><td></td></tr><tr><td>A2</td><td>var</td><td>File transfer properties</td><td>T</td><td>R</td><td></td></tr><tr><td>/81</td><td>var</td><td>Length of File — This is the length of the file.</td><td>B</td><td>R</td><td></td></tr><tr><td>/82</td><td>01</td><td><p>Hash Checksum Type</p><ul><li>0x04 = SHA-256</li></ul></td><td>B</td><td>R</td><td></td></tr><tr><td>/83</td><td>20</td><td>Hash Checksum — Anticipated checksum calculated against the file, according to the standard specified in <strong>Hash Checksum Type</strong>.</td><td>B</td><td>R</td><td></td></tr><tr><td>A3</td><td>var</td><td>File Description — The values the host populated for convenience when it sent the file to help identify the file. Not all values are required.</td><td>T</td><td>R</td><td></td></tr><tr><td>/81</td><td>var</td><td>File Name — Maximum length 32 bytes. Reserved for future use.</td><td>B</td><td>O</td><td>Null</td></tr><tr><td>/82</td><td>var</td><td>File Label — Maximum length 16 bytes. Reserved for future use.</td><td>B</td><td>O</td><td>Null</td></tr><tr><td>/83</td><td>var</td><td>File Version — Maximum length 7 bytes. Reserved for future use.</td><td>B</td><td>O</td><td>Null</td></tr><tr><td>/84</td><td>var</td><td>File Date — Maximum length 20 bytes. Reserved for future use.</td><td>B</td><td>O</td><td>Null</td></tr><tr><td>End of any wrappers, at minimum including <strong>Response Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

If the request started successfully, the Request Status in the message wrapper is **OK, Started / Running, All good / requested operation was successful**.

## Table - Request Example

{% code title="Example (hex)" %}

```
AA 00 81 04 01 08 D8 21 84 08 D8 25 81 04 00 00 00 01
```

{% endcode %}

## Table - Response Example

{% code title="Example (hex)" %}

```
AA 00 81 04 82 08 D8 25 82 04 00 00 00 00 84 54 D8 25 81 04 00 00 00 01 A2 2B 81 04 00 00 00 
40 82 01 04 83 20 FD EA B9 AC F3 71 03 62 BD 26 58 CD C9 A2 9E 8F 9C 75 7F CF 98 11 60 3A 8C 
44 7C D1 D9 15 11 08 A3 1D 81 0B 54 45 53 54 5F 31 4B 2E 62 69 6E 82 05 4C 61 62 65 6C 83 07 
31 2E 30 2E 30 2E 31
```

{% endcode %}

{% hint style="info" %}
Note: For additional support, please contact MagTek Support.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developer.magtek.com/hardware/~/revisions/aurjDoOhAcnQLHeoR1ks/card-readers/mms-dyna-devices/emv-common-kernel/dynaflex-ii-go/documents/developers-manuals/programmers-manual-commands/commands/file-operations/get-file-info-from-device.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
