> For the complete documentation index, see [llms.txt](https://support.binho.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.binho.io/user-guide/protocols-and-interfaces/bridge-1.1-api/bridge-1.1-api-uart-commands.md).

# Bridge 1.1 API - UART Commands

### Set Voltage

See [Bridge 1.1 API - I2C Commands](/user-guide/protocols-and-interfaces/bridge-1.1-api/bridge-1.1-api-i2c-commands.md#set-bus-voltage).

### UART Initialization

* **Command Request:**

  ```json
  {
    "transaction_id": "1",
    "command": "uart_init",
    "params": {
      "baudRate": "<600|1200|2400|4800|9600|14400|19200|38400|56000|57600|115200>",
      "hardwareHandShake": <Boolean>,
      "parity": "<0|1|2>",
      "dataSize": "<0|1>",
      "stopBit": "1"
    }
  }
  ```

  * **Field Descriptions**:
    * **`parity`**\
      Sets the UART parity mode:\
      `0` = No parity, `1` = Even parity, `2` = Odd parity.
      * **`dataSize`**\
        Defines the number of data bits per frame:\
        `0` = 7-bit, `1` = 8-bit.
      * **`stopBit`**\
        Selects the number of stop bits:\
        `0` = 1 stop bit, `1` = 2 stop bits.
* **Responses:**
  * Immediate Promise Response:

    ```json
    {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
        "command": "uart_init"
      }
    }
    ```
  * Final Response:

    ```json
    {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
        "is_response_to": "uart_init",
        "status": "success"
      }
    }
    ```

### UART Configuration

* **Command Request:**

  ```json
  {
    "transaction_id": "1",
    "command": "uart_config",
    "params": {
      "baudRate": "<600|1200|2400|4800|9600|14400|19200|38400|56000|57600|115200>",
      "hardwareHandShake": <Boolean>,
      "parity": "<0|1|2>",
      "dataSize": "<0|1>",
      "stopBit": "1"
    }
  }
  ```

  * **Field Descriptions**:
    * **`parity`**\
      Sets the UART parity mode:\
      `0` = No parity, `1` = Even parity, `2` = Odd parity.
      * **`dataSize`**\
        Defines the number of data bits per frame:\
        `0` = 7-bit, `1` = 8-bit.
      * **`stopBit`**\
        Selects the number of stop bits:\
        `0` = 1 stop bit, `1` = 2 stop bits.
* **Responses:**
  * Immediate Promise Response:

    ```json
    {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
        "command": "uart_config"
      }
    }
    ```
  * Final Response:

    ```json
    {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
        "is_response_to": "uart_config",
        "status": "success"
      }
    }
    ```

### UART Send

* **Command Request:**

  ```json
  {
    "transaction_id": "1",
    "command": "uart_send",
    "params": {
      "writeBuffer": "<Hex String (e.g. DEADBEEF)>"
    }
  }
  ```
* **Responses:**
  * Immediate Promise Response:

    ```json
    {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
        "command": "uart_send"
      }
    }
    ```
  * Final Response:

    ```json
    {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
        "is_response_to": "uart_send",
        "status": "success"
      }
    }
    ```

### UART Interruption Notification Message

```json
{
  "transaction_id": "0",
  "status": "success",
  "type": "notification",
  "is_promise": false,
  "data": {
    "type": "UART_MESSAGE_RECEIVED",
    "payload": <Array of 2-Byte Hex String (e.g. ["DE", "AD", "BE", "EF"])>,
    "payload_length": 4
  }
}
```


---

# 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://support.binho.io/user-guide/protocols-and-interfaces/bridge-1.1-api/bridge-1.1-api-uart-commands.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.
