English
English
简体中文
Contact Us
Register
Log In

Flashing and Authorization

Last Updated on : 2023-01-29 09:27:16download

The firmware and license must be flashed to the module to enable the connection to the cloud services. Tuya provides different solutions to achieve this purpose. You can select one that best fits your needs.

Solutions

Three solutions for flashing and authorization are available for different development stages, chip types, and production methods.

Flashing and authorization combined

This solution applies to devices that use Tuya standard modules, with the firmware maintained on the Tuya IoT Development Platform. You can use Tuya’s ready-made module firmware or upload custom module firmware to the Tuya IoT Development Platform. You have two options for flashing firmware.

  • Flashed by Tuya: Tuya delivers the module that has been flashed with the license and firmware to you. The module is ready for use when you get it.

  • Flashed by yourself: You flash the license and firmware to the module with the provided tools and documentation.

Flashing and authorization separated

This solution applies to the debugging stage or devices that use non-Tuya standard modules. You use a flashing tool to flash the firmware to the module and use Tuya’s Cloud Module Burning Authorization Platform only for authorization.

  • Debugging stage: You use a flashing tool to flash the firmware and license to the module. If you update the code, you only need to flash the user firmware again, and the license is not erased.

  • Non-Tuya standard module: Tuya’s Cloud Module Burning Authorization Platform does not support non-Tuya standard chips. You use the flashing tool from the chip vendor to flash the firmware and use the Cloud Module Burning Authorization Platform to write the license.

Production test SDK

If you do not require the Cloud Module Burning Authorization Platform and already have a production system, you can integrate Tuya’s production test SDK into your existing production system for flashing and authorization. For more information, see PMS Communication SDK.

Procedure

The following procedure applies to the case where you use Cloud Module Burning Authorization Platform for flashing and authorization or authorization only.

Download and install software

  1. Register with and log in to Smart PMS.

  2. In the left navigation bar, choose Knowledge Base Management > Software Download.

  3. Enter TYProductionToolkit in the search box and click Search.

  4. Click Download and install the software on your computer.

    Flashing and Authorization

Connect hardware

The hardware connection varies depending on the chip or module you use.

  • Wi-Fi module

    Serial communication is used for flashing and authorization. Connect the pins as shown in the following table.

    Flashing tool Pins on module Pins on flashing tool
    USB to TTL converter 3V3 3V3
    TX RX
    RX TX
    GND GND
  • Bluetooth module

    A dedicated programmer is used for firmware flashing and serial communication is used for license flashing. Connect the pins as shown in the following table.

    Flashing tool Pins on module Pins on flashing tool
    Telink programmer 3V3 3V3
    SWS SWM
    GND GND
    USB to TTL converter TX RX
    RX TX
    GND GND
  • Zigbee module

    J-Link is used for firmware flashing and serial communication is used for license flashing. Connect the pins as shown in the following table.

    Flashing tool Pins on module Pins on flashing tool
    J-Link debugger RST RESET
    SWDIO SWDIO
    SWCLK SWCLK
    3V3 VCC
    USB to TTL converter TX RX
    RX TX
    GND GND

Perform flashing and authorization

  1. Connect the hardware to the computer and install the required driver.

    Flashing and Authorization
  2. Set up the software according to the flashing and authorization solution you use.

    • Flashing and authorization separated

      1. Open the chip flashing tool and flash firmware to the device.

      2. Open the Cloud Module Burning Authorization Platform. In the menu bar, click File > Set Up and enable Only Auth.

        Flashing and Authorization
    • Flashing and authorization combined

      In the Cloud Module Burning Authorization Platform, disable Only Auth.

  3. Choose the correct COM Port. Enter Token. Select Burning Authorization for the work station and click OK.

    Flashing and Authorization
  4. If the operation is successful, you will get the following screen.

    Flashing and Authorization
  5. (Optional) If you get an error, you can click Error Details to check the reason. After you correct the error, try flashing again.

    Flashing and Authorization