Skip to main content

Batch Auth: Operator Guide

Written for operators using tyutool for batch flashing and authorization โ€” a "just do it" order, no technical background needed.

note

Firmware developers should read the Developer Guide.

The workflow, in order: โ‘  Pre-flight checklist โ†’ โ‘ก Configuration โ†’ โ‘ข Wiring & start โ†’ โ‘ฃ Read results ยท troubleshooting ยท safety rules.

What this tool doesโ€‹

Plug several devices into several serial ports, click "Start all", and flash + authorize them simultaneously, with authorization codes read automatically from an Excel sheet.

Batch page โ€” completion banner / dashboard (flash totals ยท auth totals ยท this batch) / config panel / toolbar (auto-assign ยท port filter ยท read-all ยท start-all) / port list

Batch page โ€” completion banner / dashboard (flash totals ยท auth totals ยท this batch) / config panel / toolbar (auto-assign ยท port filter ยท read-all ยท start-all) / port list.

Pre-flight checklistโ€‹

ItemHow to know it is ready
Desktop tyutoolInstalled and launches
Authorization-code ExcelHas at least UUID + AuthKey columns; purchased from tuyaopen.ai/pricing
Devices + serial cablesWired and devices can enter download mode
Serial driversCH340/CP2102/FT232 installed
Firmware fileThe .bin for this batch

Installer packages (version pinned for reference โ€” always check GitHub Releases for the latest):

PlatformFile
Windows..._windows_x86_64_nsis_x.x.x.exe
macOS (Universal)..._macos_universal_dmg_x.x.x.dmg
Linux..._linux_x86_64_appimage_x.x.x.AppImage (run chmod +x first)
T5/T5AI wiring

These devices have two serial ports โ€” be sure to connect the flashing/authorization port, not the log port.

Authorization codes are valuable

Keep the Excel safe.

Configuration handoffโ€‹

Config itemDeveloper fillsOperator verifies
Chip modele.g. esp32 / t5aiMatches the device
Operation modeauth-only vs flash-then-auth (Path A/B)"Flash firmware" switch matches
Firmware file & versionfilename + versionbatch-summary.json records SHA256
Flash baud ratee.g. 921600Set correctly
Auth baud ratee.g. 115200Set correctly
Storage modeKV / OTPOTP โ†’ single-device validation first
Conflict policyskip / overwriteOTP can only skip
Authorization sheetremaining โ‰ฅ new devices in this batchRecover/retry of registered devices doesn't consume new codes
WiringnotesConfirm RTS wired to reset pin
MAC uniquenesseach MAC globally uniquetyutool does not check MAC conflicts โ€” a duplicate MAC makes devices share an auth code
Single-device smoke testpassedDone before scaling
Special notesโ€”Read
tip

If something doesn't line up, stop and confirm with the developer โ€” don't change the configuration yourself.

Workflowโ€‹

Go to Toolbox โ†’ Batch flash & auth.

note

The first time you enter, a disclaimer dialog appears (irreversible operation). You can tick "don't show again"; to re-show it see Settings.

Phase 1 โ€” Configurationโ€‹

  1. Pick the chip (ESP32 / T5AI; for auth-only choose other).
  2. Flash baud rate.
  3. Auth baud rate.
  4. Whether to flash firmware (flash-then-auth).
  5. Firmware file (local / default auth-firmware).
  6. Pick the firmware location or choose a version.
Configuration area โ€” shared config panel

Configuration area โ€” shared config panel.

  1. Pick the authorization sheet (.xlsx).
  2. View statistics: total / used / in-use / remaining (assigning codes to new devices needs remaining > 0; recovering/retrying already-registered devices can start even with remaining 0 โ€” they find their original code by MAC).
  3. Devices already carrying authorization: skip (recommended) / overwrite.
Batch auth configuration โ€” sheet statistics

Batch auth configuration โ€” sheet statistics.

(T5AI only) Pick the storage mode: KV is rewritable; OTP writes once and is irreversible (see Safety).

Phase 2 โ€” Wiring & startโ€‹

tip

First run one device all the way through โ†’ small-batch 2โ€“4 devices โ†’ then the whole batch.

Once wired, two steps:

  1. Click Auto-assign (scans and adds slots, one row per port showing "idle").
  2. Click Start all (if more than 8 idle ports, a confirmation prompt appears first).
Last 30-second check before start

Re-read each config line against the handoff sheet. If OTP: single-device validation done?

Toolbar and port list โ€” slots per port

Toolbar and port list โ€” slots per port.

Other toolbar buttons

โ‘ก Port filter ยท โ‘ข Read all (read-only, no write) ยท โ‘ฃ Cancel ยท โ‘ค Retry failed ยท โ‘ฆ Read single port.

Phase 3 โ€” Wait and verifyโ€‹

  1. Watch the dashboard until it completes (the banner shows: all success / all failed / partial success / all skipped).
  2. Verify row by row (on failure, look at retry).
  3. Once the whole order is done, click "Archive" (you don't need to archive mid-batch rounds).
Dashboard and completion banner (archive button on the right)

Dashboard and completion banner (archive button on the right).

Reading resultsโ€‹

StatusMeaningWhat to do
doneComplete, good unitโ€”
failedFailedRetry
skippedAlready authorized, skipped per policyโ€”
no_codeNew device but remaining = 0Top up the sheet and rerun
otherIn progressWait

Archivingโ€‹

One "Start all" = one round; one authorization sheet = one order (often many rounds). Archiving is per order.

info

One-click archive: pick a directory and it creates a timestamped folder batch-archive_20260717-143205_esp32/ containing: authorization-sheet copy / firmware (with SHA256) / logs.zip / batch-summary.json / batch-slots.csv. The summary's lastRun and the CSV are only a snapshot of the last round.

Archive contents:

FileWhat it is
Authorization-sheet Excel copyThe sheet used
Firmware fileThe flashed .bin
logs.zipCompressed logs
batch-summary.jsonRun summary
batch-slots.csvPer-slot snapshot of the last round
Completion banner screenshotOptional record
warning

The archive contains UUID + AuthKey โ€” prevent leaks. For troubleshooting, share only the logs and error info; do not send the authorization sheet out.

Troubleshootingโ€‹

SymptomWhat to do
App won't open / blank screenSee FAQ ยท Linux blank window
Port doesn't appearSwap cable/port, install drivers, close other apps โ€” see FAQ ยท ports
All failedRun a single device through, drop to 115200, check power supply
Excel "file in use"Close Excel/WPS and reselect
Excel sheet invalidCheck the UUID + AuthKey columns and their lengths
Need detailed logsSave per Save the scene, see FAQ ยท logs

Save the scene firstโ€‹

While the scene is still live, click "Archive" to save everything; then manually add three things: a UI screenshot (mask the AuthKey, UUID can stay) / the problem device itself (label it and set it aside) / a one-line symptom description.

note

Don't wait and don't leak: archive the same day; when sharing out, give only the logs and error info.

Safety rulesโ€‹

This is the only feature that triggers irreversible hardware operations.

Rule 1: OTP writes are irreversible

OTP (T5AI only) burns authorization into the chip once and can never be undone. A wrong configuration ruins the whole batch โ€” always validate by running one device all the way through before going to scale.

When OTP is selected, the UI warns the write cannot be undone

When OTP is selected, the UI warns the write cannot be undone.

Rule 2: devices marked "cancelled after write" must be set aside

Devices carrying the "cancelled-after-write" danger badge may already have had authorization written and their state is uncertain โ€” they are neither good units nor safe to rerun directly. Set them aside and verify individually.