> 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/card-readers/mms-dyna-devices/dynaflex-ii-go/documents/developers-manuals/programmers-manual-commands/commands/security/change-device-lock-state.md).

# Change Device Lock State

## Command 0xEF06 – Change Device Lock State

The host can use this command to change the device’s lock state. To get the device’s lock state or to set it using MagTek security see **Property 1.2.5.2.1.1 Device Lock State**. The value of the device lock state will revert to the value of **Property 1.2.5.2.1.2 Device Lock State After Reset** after a reset or a power cycle. See **Device Lock Feature** for more information.

## Table - Request Data for Command 0xEF06 – Change Device Lock State

<table><thead><tr><th>Tag</th><th width="75">Len</th><th>Value / Description</th><th width="73.33331298828125">Typ</th><th width="74.6666259765625">Req</th><th width="96.6666259765625">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>EF06 = <strong>Command 0xEF06 – Change Device Lock State</strong></td><td>-</td><td></td><td></td><td></td><td></td></tr><tr><td>81</td><td>01</td><td>Device Lock State<br>- 0x00 = Unlocked<br>- 0x01 = Locked</td><td>B</td><td>M</td><td></td></tr><tr><td>82</td><td>01</td><td>Passcode Format<br>- 0x00 = Clear<br>- 0x01 = Fixed SHA-256<br>- 0x02 = Variable SHA-256</td><td>B</td><td>M</td><td></td></tr><tr><td>83</td><td>04-63</td><td><p>Passcode — The value of the passcode depends on the value of the passcode format parameter. </p><ul><li>If the passcode format is set to Clear (0x00), then the value of the passcode is the passcode in the clear and can have a length of 4–63 bytes.</li><li>If the passcode format is set to Fixed SHA-256 (0x01), then the value of the passcode is the 32-byte SHA-256 hash value of the passcode</li><li>If the passcode format is set to Variable SHA-256 (0x02), then the value of the passcode is the 32-byte SHA-256 hash value of: an 8-byte random challenge token followed by the 4–63 byte passcode. The challenge token must have been retrieved from the device within the last 5 minutes using Command 0xE001 - Get Challenge</li></ul></td><td>B</td><td>M</td><td></td></tr><tr><td>-</td><td>-</td><td>End of any wrappers, at minimum including <strong>Request Message</strong></td><td></td><td></td><td></td></tr></tbody></table>

## Table - Response Data for Command 0xEF06 – Change Device Lock State

<table><thead><tr><th width="253.33331298828125">Tag</th><th width="74">Len</th><th width="213.66668701171875">Value / Description</th><th width="73.33331298828125">Typ</th><th width="74">Req</th><th width="96.6666259765625">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>EF06 = <strong>Command 0xEF06 – Change Device Lock State</strong></td><td>-</td><td></td><td></td><td></td><td></td></tr><tr><td>-</td><td>-</td><td>No parameters.</td><td></td><td></td><td></td></tr><tr><td>-</td><td>-</td><td>End of any wrappers, at minimum including <strong>Response Message</strong></td><td></td><td></td><td></td></tr></tbody></table>

## Table - Request Example

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

```
AA00 81 04 0155EF06 84 0E EF06 810100 820100 8304 34333231
```

{% endcode %}

## Table - Response Example

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

```
AA00 81048255EF06 820400000000 8402EF06
```

{% endcode %}


---

# 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/card-readers/mms-dyna-devices/dynaflex-ii-go/documents/developers-manuals/programmers-manual-commands/commands/security/change-device-lock-state.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.
