> 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/0x18nn-user-interface/0x1804-read-barcode-bcr-only.md).

# 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 [<mark style="color:red;">**0x1001 - Start Transaction**</mark>](https://developer.magtek.com/api-and-command-reference/dynafamily-programmers-manual/commands/0x10nn-transactions/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 [<mark style="color:red;">**0x1001 - Start Transaction**</mark>](https://developer.magtek.com/api-and-command-reference/dynafamily-programmers-manual/commands/0x10nn-transactions/0x1001-start-transaction)<mark style="color:red;">.</mark>
{% 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 [<mark style="color:red;">**0x1805 - User Interface Operation Complete**</mark>](https://developer.magtek.com/api-and-command-reference/dynafamily-programmers-manual/notifications/0x18nn-from-user-interface/0x1805-user-interface-operation-complete) to report Barcode Reader / Read Barcode Result and additional supporting information.
  {% endstep %}
  {% endstepper %}

## 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 -</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 <a href="https://developer.magtek.com/api-and-command-reference/dynafamily-programmers-manual/notifications/0x18nn-from-user-interface/0x1805-user-interface-operation-complete"><mark style="color:red;"><strong>0x1805 - User Interface Operation Complete</strong>.</mark></a> <br>- 0x01 = Encrypt. The device encrypts the barcode data when it sends <a href="https://developer.magtek.com/api-and-command-reference/dynafamily-programmers-manual/notifications/0x18nn-from-user-interface/0x1805-user-interface-operation-complete"><mark style="color:red;"><strong>0x1805 - User Interface Operation Complete.</strong></mark></a></td><td>B</td><td>O</td><td>0x00</td></tr><tr><td>84</td><td>01</td><td>Value / Description: Enable batch programming of parameters in the embedded barcode scanner module. With this enabled, scan a barcode consisting of a valid batch programming command for the <strong>Newland NLS-N1</strong> <strong>scan engine</strong> to program the module. Documentation for NLS-N1 commands can be found at <a href="http://www.newland-ic.com/"><mark style="color:red;"><strong>www.newland-ic.com</strong></mark></a><mark style="color:red;"><strong>.</strong></mark></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>

## 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 <strong>Response Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1804 = <strong>Read Barcode (BCR Only) - Command 0x1804</strong></td><td></td><td>No parameters.</td><td></td><td></td><td></td></tr><tr><td>84</td><td>01</td><td>Enable batch programming of parameters in the embedded barcode scanner module. With this enabled, scan a barcode consisting of a valid batch programming command for the <strong>Newland NLS-N1</strong> <strong>scan engine</strong> to program the module. Documentation for NLS-N1 commands can be found at <a href="http://www.newland-ic.com/"><mark style="color:red;"><strong>www.newland-ic.com</strong></mark></a><mark style="color:red;"><strong>.</strong></mark></td><td>B</td><td>O</td><td>0x00</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>

#### Request Example

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

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

{% endcode %}

#### 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 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/0x18nn-user-interface/0x1804-read-barcode-bcr-only.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.
