English
English
简体中文
Contact Us
Register
Log In
Language
English
English
简体中文
Contact Us
Log In
Register
Go to main website
App Develop

App Development Platform

App development platform provides multiple development methods such as no-code or IoT App SDK development to maximize the monetization of IoT apps.
layoutIndex

Flash and Authorize

Last Updated on : 2021-08-19 11:27:15download

After the firmware development is completed, you need to flash the firmware and authorization code to the device before connecting to the Tuya cloud. Tuya provides a variety of flashing and authorization methods for you to choose according to different development stages.

Authorization and flashing solution

According to different development stages, chip types, production methods, Tuya provides three flashing and authorization solutions. For more information, see the following:

An integrated solution for flashing and authorization

It is suitable for you if you are using Tuya standard modules. The firmware needs to be maintained on the Tuya IoT Platform (select Tuya’s existing module firmware or upload self-developed module firmware to the Tuya IoT Platform). Based on the production difference, two approaches are available.

  • Delegate Tuya to flash and authorize

    The module you receive from Tuya is flashed and authorized that you can use directly.

  • Flash and authorize by yourself

    Tuya provides a set of documentation including cloud module flashing tool, authorization code, flashing instructions, flashing tooling production instructions. You can authorize and flash the module in reference to the documentation that Tuya provided.

Separated solutions for flashing and authorization

Suitable for debugging stage and non-Tuya standard module solution. You can flash the firmware with the chip flashing tool, and the Tuya Cloud Module Burning Authorization Platform is for authorization only.

  • Debugging stage

    After flashing the firmware and authorization code with the chip flashing tool for the first time, for the subsequent code updates. you need only to re-flash the user area firmware without erasing the authorization code information, which is convenient for debugging.

  • Non-Tuya standard module solution

    The Tuya Cloud Module Burning Authorization Platform tool does not support non-Tuya standard chip firmware flashing. You can only use the original tool to flash the firmware, and then use the Tuya Cloud Module Burning Authorization Platform tool for authorization.

Connection solution for production test SDK

It is suitable for you if you have a complete flashing production system. Without using the Tuya Cloud Module Burning Authorization Platform tool, you can flash the firmware and authorization code through the connection between the Tuya production test SDK and your own production flashing system. For more information, see Cases of Production Test Connection.

Procedure

The following process applies to the solutions for flashing and authorization or authorization only through the Tuya Cloud Module Burning Authorization Platform tool.

Prepare flashing software

Enter the Tuya PMS, register an account, and log in. Click Download Software to download the Tuya Cloud Module Burning Authorization Platform.

Flash and Authorize

Build hardware flashing environment

Build the hardware environment according to the chip and module flashing method. The chip flashing methods falls into the following three categories based on different protocols.

  • Wi-Fi module flashing

    Usually, you flash and authorize with the serial port method, and connect the hardware pins correspondingly as follows.

    Flashing tool Module pin Flashing tool pin
    USB-to-TTL converter 3V3 3V3
    TX RX
    RX TX
    GND GND
  • BLE module flashing

    Usually, you flash the firmware with the chip flashing tool and flash the authorization code with the serial port, and connect the hardware pins correspondingly as follows.

    Flashing tool Module pin Flashing tool pin
    Telink Burning and Debugging Tool (BDT) 3V3 3V3
    SWS SWM
    GND GND
    USB-to-TTL converter TX RX
    RX TX
    GND GND
  • Zigbee module flashing

    Usually, you flash the firmware with J-link and flash the authorization code with the serial port, and connect the hardware pins correspondingly as follows.

    Flashing tool Module pin Flashing tool pin
    J-link flashing tool RST RESET
    SWDIO SWDIO
    SWCLK SWCLK
    3V3 VCC
    USB-to-TTL converter TX RX
    RX TX
    GND GND

Description of flashing and authorization process

  1. Connect the hardware to the PC and install related drivers.

    Flash and Authorize

  2. Choose whether to use the chip flashing tool according to the flashing and authorization solution, and configure the host

    • Separated solutions for flashing and authorization

      a. Open the chip flashing tool and follow the operating instructions to flash the firmware.
      b. Configure the host to authorizing mode only.
      Flash and Authorize

    • An integrated solution for flashing and authorization

      Configure the host to flashing and authorization mode.

      Flash and Authorize

  3. Select the serial port information, enter the authorization code, and click RUN.

    Flash and Authorize

    The host will display the flashing progress and result. If an error occurs, you can click the Error Details below to check the cause, and follow the prompts to flash again after rectification.

    Flash and Authorize

This section contains the following topics to help you quickly understand related concepts and how-to guides: