Skip to main content

Device Debugging

Device debugging captures device logs over a serial port so you can track issues and troubleshoot behavior. After you flash TuyaOpen firmware, the serial log is the primary way to see what the device is doing.

info

The IoT and AI+IoT chips supported by TuyaOpen do not support J-Link debugging tools. Use serial port logging instead.

What you needโ€‹

Before you begin, get the following ready.

Hardwareโ€‹

Debugging toolโ€‹

Choose one of the following serial debugging tools:

  • Tuya's universal serial tool: graphical interface, easy to operate.
  • TuyaOpen tos command-line tool: command-line based, flexible options.
  • Third-party tools: SSCOM, MobaXterm, PuTTY, and more.

Configure the serial parametersโ€‹

Look up the serial port and baud rate for your chip before you connect. Using the wrong values means you get no readable log output.

Chip modelSerial portBaud rateRemarks
Ubuntu--Runs directly on Ubuntu and other Linux hosts
T2Uart2115200-
T3Uart1460800-
T5AIUart1460800-
ESP32/ESP32C3/ESP32S3Uart0115200-
LN882HUart1921600-
BK7231NUart2115200-
tip

Select the correct serial port and baud rate. Otherwise, you may not get log output.

Capture logsโ€‹

Pick the tool that matches your workflow.

Method 1: Tuya's universal serial toolโ€‹

The graphical tool is recommended for most users โ€” it has a friendly interface and complete functionality. See GUI - tyutool Graphical Tool.

Method 2: The tos command-line toolโ€‹

Use this method if you are comfortable on the command line and want more flexible options. See the tos monitor command.

Method 3: A third-party serial toolโ€‹

If you prefer another serial tool such as SSCOM, MobaXterm, or PuTTY, configure it using the serial parameters above and follow that tool's documentation.

Debugging tipsโ€‹

  • Check the connection: confirm the hardware connections are correct and the serial cable is undamaged.
  • Match the parameters: set the serial port and baud rate exactly as listed in the table above.
  • Analyze the logs: focus on startup logs, error messages, and unexpected output.
  • Record problems: note the issues you find and the fixes you apply as you go.
note

If you get no serial output, check the hardware connections, the serial parameter settings, and the driver installation.