> 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-ped/documentation/developers-manuals/dynaflex-ii-ped-programmers-manual/commands/user-interface/led-control.md).

# LED Control

## Command 0x1807 - LED Control

The host uses this command to control the 4 LEDs of the device when the device is not in non-User Control LED states. If the host sets an LED timer, the device reports completion via Notification 0x1805 - User Interface Operation Complete after the LED operation finishes.

Non-User Control LED state is when the device is in tamper, or currently running transaction with these commands:

* Command 0x1001 - Start Transaction
* Command 0x1840 - Card Emulation
* Command 0x2001 – Request PIN with Host Supplied Account Data
* Command 0x2002 – Request PIN with Card Supplied Account Data

When the device is in non-User Control LED states, it will return error if the host sends this command.

When the device is in the User Control LED state, and if there is any transaction that uses LEDs for the transaction status, the device will stop the User Control LEDs for that transaction to take over, and resume to the current system’s LED status after finishing that transaction.

The host is responsible for stopping the User Control LEDs so the device can get back to the system’s LEDs status if the device is in the User Control LEDs.

{% hint style="info" %}
Note:

* DynaFlex II PED and DynaFlexII LEDs color can be GREEN, RED, AMBER, or BLUE.
* DynaProx, DynaFlex II GO LEDs color is GREEN only.  Setting other colors is the same as GREEN.
  {% endhint %}

## Table - Request Data for Command 0x1807 – LED Control

<table data-header-hidden><thead><tr><th width="163.27276611328125"></th><th width="58"></th><th></th><th width="58"></th><th width="56.181884765625"></th><th width="83.818115234375"></th></tr></thead><tbody><tr><td>Tag</td><td>Len</td><td>Value / Description</td><td>Typ</td><td>Req</td><td>Default</td></tr><tr><td>Beginning of any wrappers, at minimum including Request Message</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1807 = ‎Command 0x1807 – LED Control</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>81</td><td>02</td><td><p>Byte 1 - User Control LED</p><ul><li>0x00 – Stop User Control LED.  This will stop User control LED and resume the current system’s LED status.</li><li>0x01 – Start User Control LED.</li></ul><p> Byte 2 – Duration in unit of second</p><ul><li>0x00 – Continuous</li><li>0x01 to 0xFF = 1 to 255 seconds</li></ul></td><td>B</td><td>R</td><td> </td></tr><tr><td>82</td><td>02</td><td><p>Byte 1 - LED number</p><ul><li>Bit 1 = LED 1</li><li>Bit 2 = LED 2</li><li>Bit 3 = LED 3</li><li>Bit 4 = LED 4</li></ul><p> </p><p>Where the LEDs are numbered 1, 2, 3, 4 counting from the left.</p><p>Example: 0x01 = LED 1, 0x03 = LED 1 and LED 2.</p><p> </p><p>Byte 2 - LED Status</p><ul><li>0x00 = OFF</li><li>0x01 = GREEN ON</li><li>0x02 = GREEN BLINK FAST (1/4 second on, 1/4 second off)</li><li>0x03 = GREEN BLINK SLOW (1/2 second on, 1/2 second off)</li><li>0x04 = GREEN FLASH (1/4 second on, 3/4 second off)</li><li>0x05 = GREEN FLASH QUICK (1/8 second on, 7/8 second off)</li></ul><p> </p><ul><li>0x11 = RED ON</li><li>0x12 = RED BLINK FAST (1/4 second on, 1/4 second off)</li><li>0x13 = RED BLINK SLOW (1/2 second on, 1/2 second off)</li><li>0x14 = RED FLASH (1/4 second on, 3/4 second off)</li><li>0x15 = RED FLASH QUICK (1/8 second on, 7/8 second off)</li></ul><p> </p><ul><li>0x21 = AMBER ON</li><li>0x22 = AMBER BLINK FAST (1/4 second on, 1/4 second off)</li><li>0x23 = AMBER BLINK SLOW (1/2 second on, 1/4 second off)</li><li>0x24 = AMBER FLASH (1/4 second on, 3/4 second off)</li><li>0x25 = AMBER FLASH QUICK (1/8 second on, 7/8 second off)</li><li>0x31 = BLUE ON</li><li>0x32 = BLUE BLINK FAST (1/4 second on, 1/4 second off)</li><li>0x33 = BLUE BLINK SLOW (1/2 second on, 1/4 second off)</li><li>0x34 = BLUE FLASH (1/4 second on, 3/4 second off)</li><li>0x35 = BLUE FLASH QUICK (1/8 second on, 7/8 second off)</li></ul><p> </p></td><td>B</td><td>R</td><td> </td></tr><tr><td>End of any wrappers, at minimum including Request Message</td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table - Response Data for Command 0x1807 – LED Control

<table data-header-hidden><thead><tr><th></th><th width="65.272705078125"></th><th></th><th width="60.54541015625"></th><th width="64.0909423828125"></th><th width="84.272705078125"></th></tr></thead><tbody><tr><td>Tag</td><td>Len</td><td>Value / Description</td><td>Typ</td><td>Req</td><td>Default</td></tr><tr><td>Beginning of any wrappers, at minimum including Response Message</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>No parameters.</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>End of any wrappers, at minimum including Response Message</td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table - Request Example

```
AA 00 81 04 82 8D 18 07 82 04 01 00 00 00
```

## Table - Response Example

```
AA 00 81 04 82 8D 18 07 82 04 01 00 00 00
```


---

# 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-ped/documentation/developers-manuals/dynaflex-ii-ped-programmers-manual/commands/user-interface/led-control.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.
