> 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/api-and-command-reference/dynafamily-programmers-manual/commands/0xennn-security/0xef06-change-device-lock-state.md).

# 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 [<mark style="color:red;">**Property 1.2.5.2.1.1 - Device Lock State**</mark>](https://developer.magtek.com/api-and-command-reference/dynafamily-programmers-manual/properties/1.2.nnnn-device-settings/1.2.5.nnn-security-settings-a#id-1.2.5.2.1.1-device-lock-state). The value of the device lock state will revert to the value of [<mark style="color:red;">**Property 1.2.5.2.1.2 - Device Lock State After Reset**</mark>](https://developer.magtek.com/api-and-command-reference/dynafamily-programmers-manual/properties/1.2.nnnn-device-settings/1.2.5.nnn-security-settings-a#id-1.2.5.2.1.2-device-lock-state-after-reset) after a reset or a power cycle. See [<mark style="color:red;">**Device Lock Feature**</mark>](https://developer.magtek.com/guides/guides/security-and-key-management/pci-requirements#device-lock-feature) for more information.

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

<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>Change Device Lock State - Command 0xEF06</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 <a href="https://developer.magtek.com/api-and-command-reference/dynafamily-programmers-manual/commands/0xennn-security/0xe001-get-challenge"><mark style="color:red;"><strong>Command 0xE001 - Get Challenge</strong></mark></a></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>

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

<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>Change Device Lock State -</strong> <strong>Command 0xEF06</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>

#### Request Example&#x20;

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

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

{% endcode %}

#### 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.magtek.com/api-and-command-reference/dynafamily-programmers-manual/commands/0xennn-security/0xef06-change-device-lock-state.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
