# BLE UART Terminal

**File:** `BLE_UART_Terminal.html`

A serial monitor that connects over Bluetooth Low Energy (Web Bluetooth API) to a device offering the Nordic UART Service (NUS) — for example an ESP32- or nRF-based word clock.

This is a single, self-contained HTML file: no installation required, just open it in Chrome or Edge.

## Requirements

- Google Chrome or Microsoft Edge (desktop or Android) — Web Bluetooth is not supported by Firefox or Safari.
- Bluetooth enabled on the computer/phone.
- The device must advertise the Nordic UART Service (UUID `6e400001-...`).

## Usage

1. Open `BLE_UART_Terminal.html` in Chrome or Edge.
2. Click **CONNECT**.
3. Select the device in the browser's Bluetooth picker.
4. Once connected: type a command into the input field and press **Enter** or **SEND**.
5. Received data appears with a `◀` marker (RX); sent data with a `▶` marker (TX).

## Options

- **TIMESTAMP** — shows a timestamp for each line.
- **AUTOSCROLL** — automatically scrolls to the latest line.
- **Line ending** (CR+LF / LF / CR / NONE) — which character is appended to each outgoing message.
- **Display** (ASCII / HEX / BOTH) — how received data is shown.

## Quick-send presets

| Button | Command | Meaning |
|---|---|---|
| INFO | `I` | Show device information |
| TIME? | `K` | Request the current time |
| DISPL | `O` | Toggle display |
| RESET | `R` | Reset settings |
| RESTART | `@` | Restart the device |

## Known limitations

- Only works in browsers with Web Bluetooth support.
- Windows sometimes fails on the first GATT connection attempt; the terminal automatically retries up to 3 times.

## Author

EdSoft — [github.com/ednieuw/HTML-BLEserial](https://github.com/ednieuw/HTML-BLEserial)
