> 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/dynaprox/documents/programmers-manuals/programmers-manual-commands/commands/user-interface/read-barcode.md).

# Read Barcode

## Command 0x1804 - Read Barcode (BCR Only)

The host uses this command to direct the device to arm or disarm the barcode reader for reading a barcode outside the scope of a transaction. This is an immediate directive. To read barcodes within the scope of a transaction, use **Command 0x1001 - Start Transaction** and its barcode reader parameters instead.

The sequence of events is as follows:

{% stepper %}
{% step %}
The host ensures the device is not currently running another command, for example, that it is not running a transaction using **Command 0x1001 - Start Transaction**.
{% endstep %}

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

{% step %}
If the device has a display, it shows a prompt **SCAN BARCODE**.
{% endstep %}

{% step %}
The device enables the barcode reader.

#### If the Timeout parameter is set to Infinite:

* The device returns a command response message with Response Status, Operation Status Summary byte set to 0x00 (OK, Done) after which the host is free to send further commands.
* The host may end the barcode reading session by calling this command again with the **Enable** parameter set to **Disable**.

#### If the Timeout parameter is set to a value other than Infinite:

* The device returns a command response message with its Response Status, Operation Status Summary byte set to 0x01 (OK, Started / Running).
* While the host is waiting for the timeout to expire, it should not send any commands to the device, because the device is busy processing the current command.
* After the device reads a barcode or the timeout period expires, the device sends **Notification 0x1805 - User Interface Operation Complete** to report Barcode Reader / Read Barcode Result and additional supporting information.
  {% endstep %}
  {% endstepper %}

## Table - Request Data for Command 0x1804 - Read Barcode (BCR Only)

<table><thead><tr><th>Tag</th><th width="75.3333740234375">Len</th><th width="256.66668701171875">Value / Description</th><th width="74.33331298828125">Typ</th><th width="76">Req</th><th width="96.666748046875">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>1804 = <strong>Command 0x1804 - Read Barcode (BCR Only)</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>81</td><td>01</td><td>Enable<br>- 0x00 = Disable. The device disables the barcode reader. In this case, the device ignores all other parameters.<br>- 0x01 = Enable. The device enables the barcode reader.</td><td>B</td><td>R</td><td>0x00</td></tr><tr><td>82</td><td>01</td><td>Timeout<br>- 0x00 = Infinite. The device leaves the barcode reader enabled until it reads a barcode, or until the host sends this command again to disable the barcode reader.<br>- All other values = Timeout in seconds for the device to leave the barcode reader enabled without reading a barcode.</td><td>B</td><td>O</td><td>0x00</td></tr><tr><td>83</td><td>01</td><td>Encrypt Barcode Data<br>- 0x00 = Do Not Encrypt. The device does not encrypt the barcode data when it sends <strong>Notification 0x1805 - User Interface Operation Complete</strong>.<br>- 0x01 = Encrypt. The device encrypts the barcode data when it sends <strong>Notification 0x1805 - User Interface Operation Complete</strong>.</td><td>B</td><td>O</td><td>0x00</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 0x1804 - Read Barcode (BCR Only)

<table><thead><tr><th>Tag</th><th width="74.6666259765625">Len</th><th>Value / Description</th><th width="75">Typ</th><th width="75.33331298828125">Req</th><th width="98">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including <a href="https://magtek.gitbook.io/magtek-pilot-gitbooks/internal-documentation/index/3.0-messages-requests-responses-notifications-and-files/3.3-message-structure#table-12-response-message-format"><strong>Response Message</strong> </a></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1804 = <strong>Command 0x1804 - Read Barcode (BCR Only)</strong></td><td></td><td>No parameters.</td><td></td><td></td><td></td></tr><tr><td>End of any wrappers, at minimum including <a href="https://magtek.gitbook.io/magtek-pilot-gitbooks/internal-documentation/index/6.0-commands/6.3-command-group-0x18nn-user-interface/6.3.4-command-0x1804-read-barcode-bcr-only"><strong>Response Message</strong> </a></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table - Request Example

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

```
AA00 810401031804 840B 1804 810101 82010F 830101
```

{% endcode %}

## Table - Response Example

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

```
AA00 810482031804 820401000000
```

{% 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/dynaprox/documents/programmers-manuals/programmers-manual-commands/commands/user-interface/read-barcode.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.
