# Online Flashing Tool

Connect your ESP32 board in the browser, select matching firmware, and complete flashing.

## Detailed Instructions

FastBee-Arduino source: <https://gitee.com/beecue/fastbee-arduino>

Setting up a device for the first time? [Open the Device Onboarding Wizard](https://www.fastbee.cn/doc/en/device-onboarding.html) for step-by-step flashing, networking, and login guidance.

### Quick Start

| Step | Action | Description |
| :--: | ------ | ----------- |
| 1 | Connect the board | Use a data-capable USB cable to connect your ESP32 board |
| 2 | Select serial port | Click **Select Serial Port**; the tool detects the chip and Flash, then filters compatible built-in firmware |
| 3 | Confirm hardware and firmware | Keep **Firmware Source** as **Built-in File**; confirm PSRAM from the module specifications and review the preselected or manually selected merged firmware |
| 4 | Start flashing | Keep address at `0x0` and click **Flash**; the tool validates chip, Flash, and PSRAM before writing and auto-resetting |

> If auto-reset fails, press the `EN` / `RST` button on the board once to restart. Some boards require holding `BOOT`, clicking Flash, then releasing `BOOT` after log output begins.

### Firmware Version Selection

Built-in firmware files come from `device/fim/manifest.json`. All are merged firmware images containing the bootloader, partition table, application firmware, and web filesystem. Most users only need to select one firmware matching their hardware and keep the flash address at `0x0`.

After the serial connection is established, the tool reads the chip model and Flash ID, then lists only firmware compatible with the detected hardware. It preselects a single candidate only when no additional PSRAM confirmation is needed. If multiple candidates remain, select the actual PSRAM capacity first. PSRAM cannot be identified reliably through ROM download mode and is never inferred from the firmware candidates.

| Chip / Board | Built-in Firmware | Flash / PSRAM | Recommended Use |
| --- | --- | --- | --- |
| ESP32 | `fastbee-esp32-F4R0.bin` | 4MB / None | Common ESP32 board; the first choice for a first-time experience |
| ESP32 | `fastbee-esp32-F8R0.bin` | 8MB / None | ESP32-WROOM 8MB OTA node |
| ESP32 | `fastbee-esp32-F8R8.bin` | 8MB / 8MB | ESP32-WROVER gateway/cache node |
| ESP32-S3 | `fastbee-esp32s3-F8R0.bin` | 8MB / None | S3 OTA node without PSRAM |
| ESP32-S3 | `fastbee-esp32s3-F8R8.bin` | 8MB / 8MB | Main S3 development/controller target |
| ESP32-S3 | `fastbee-esp32s3-F16R8.bin` | 16MB / 8MB | ESP32-S3 N16R8 module, high-capacity environments |
| ESP32-C3 | `fastbee-esp32c3-F4R0.bin` | 4MB / None | Low-cost WiFi/MQTT node |
| ESP32-C6 | `fastbee-esp32c6-F4R0.bin` | 4MB / None | WiFi 6 low-cost node |
| ESP32-C6 | `fastbee-esp32c6-F8R0.bin` | 8MB / None | WiFi 6 OTA node |

In the file names, `F` indicates Flash capacity and `R` indicates PSRAM capacity. For example, `F4R0` means 4MB Flash with no PSRAM, and `F16R8` means 16MB Flash with 8MB PSRAM.

> If chip or Flash detection fails, the complete firmware list remains available for manual selection. Confirm PSRAM from the board or module silkscreen, product page specifications, or serial boot log. A firmware-to-hardware mismatch may cause boot failure, web console errors, or storage partition issues.

### Tool Options

* **Baud Rate**: Default `115200` is the most stable; increase to `460800` or `921600` only if your cable and serial adapter are reliable.
* **Firmware Source**: Use **Built-in File** for first-time flashing; switch to **Local File** only when flashing a custom `.bin`.
* **Flash Address**: Built-in merged firmware always uses `0x0` — do not change this.
* **Advanced Options**: Flash mode, frequency, size, and auto-reset should usually remain at defaults. The actual Flash size is read on connection, and selecting built-in firmware keeps the write parameters aligned with its specifications.
* **Erase**: Clears the entire Flash, including network config, peripheral config, and runtime data. Use it only when it is clearly needed, the on-site configuration has been preserved, and the operation is authorized; an abnormal old config alone is not a valid reason for a full erase.

### Browser Requirements

1. Use a recent version of **Chrome** or **Edge**.
2. Web Serial requires HTTPS; local documentation server preview URLs also work.
3. If the serial port dialog does not appear, check browser serial permissions, USB drivers, data cable, and port availability.

### Post-Flash Configuration

After flashing, the device reboots. On first boot or when WiFi is not configured, it enters AP mode. When `apSSID` is empty, the hotspot name is generated from the device name and the first six chip-ID characters; the default password is `admin123`. Connect to the hotspot and visit `http://192.168.4.1`, then log in with `admin` / `admin123` and change the password before field use.

For network setup, peripherals and rules, see [Quick Start](https://www.fastbee.cn/doc/en/device/v2/getting-started/quick-start.md#step-2-initial-configuration). For local builds, scripted deployment, device smoke tests, or release checks, see [Hardware and Environments](https://www.fastbee.cn/doc/en/device/v2/getting-started/edition-comparison.md#verification) and the [Stability & Release Checklist](https://www.fastbee.cn/doc/en/device/v2/deploy/stability-release-checklist.md).

### FAQ

#### Browser Reports Serial Port Not Supported

Switch to Chrome or Edge, and confirm the page is served over HTTPS or a local documentation preview URL.

#### Serial Port Not Found

Make sure your USB cable supports data transfer and install the correct serial driver (see the [Downloads Center](https://www.fastbee.cn/doc/en/downloads.md)). Common Windows driver names include `USB-SERIAL CH340` and `CP210x USB to UART Bridge`. Close Arduino IDE Serial Monitor, PlatformIO Monitor, or any other program using the serial port before flashing.

#### Stuck Waiting for Sync

Some boards have an unreliable auto-download circuit. Try holding `BOOT`, clicking **Flash**, and releasing `BOOT` after log output begins. If it still fails, press `EN` / `RST` and retry.

#### Web Console Not Accessible After Flash

First confirm you selected a full merged firmware and that the chip, Flash, and PSRAM match your board. If you previously flashed a different firmware or partition table, preserve the identity, network, authentication, protocol settings, and the original image first, then verify the partitions and a recovery plan; when erasing is needed, clarify its scope before writing.
