Flash Firmware to and Authorize BT Series Modules

This topic describes two solutions about how to flash firmware to and authorize BT series modules.

Background information

After the module SDK firmware development is completed, you need to flash and authorize the module to enable connection to the Tuya Cloud. Tuya provides the following two flashing and authorization methods for different scenarios.

Supported chips

Applicable to the BT Series Module with the core chip of TLSR8250F512ET32. The following models are included.

An integrated solution for flashing and authorization

Solution description

Since the Tuya module must be authorized to connect to the Tuya cloud, the authorization step cannot be omitted.

This solution is suitable for the release stage. The overall process of this solution is as follows:

  1. Upload the compiled firmware to the Tuya IoT Platform.
  2. A firmware key is generated on the platform, and an authorization code is generated based on the firmware key.
  3. flash and authorize the modules on the Cloud Module flashing Authorization Platform.

Prepare hardware

Hardware preparation includes serial port assistant, any module equipped with chip platform TLSR8250F512ET32 (using BT3L Module Datasheet as an example in this topic), Telink Burning and Debugging Tool (BDT), and hardware connection diagram (including the connection diagram of Telink and serial port assistant).

Hardware wiring

Module pin Serial pin
TL_B7 (UART RX) TX
TL_B1 (UART TX) RX
GND GND
Module pin Telink pin
SWS SWM
3V3 3V3
GND GND

Upload firmware

In step 3 Hardware Development of the product development process on the Tuya IoT Platform, click Add custom firmware. Enter the firmware parameters as per the prompts and click OK. In the Generated Firmware area, click Upload production firmware.
image20201229204014884.png

Get authorization code and flash

  1. Get the authorization code on the platform according to the PID, and download the Cloud Module Burning Authorization Platform in reference to Burning and Authorization.

  2. Open the Cloud Module Burning Authorization Platform.

  3. Enter the authorization code.
    image20201230100940650.png

  4. Click Run and wait until the flashing is completed.
    image20201230100951913.png
    image20201230101039826.png

Separated solutions for flashing and authorization

Solution description

The feature of this solution is to authorize once and flash repeatedly, which is suitable for the development stage. If the module has already been authorized once, you need only to modify and flash the firmware demo to make the module work properly.

Prepare hardware

Hardware preparation includes serial port assistant, any module equipped with chip platform TLSR8250F512ET32 (using BT3L Module Datasheet as an example in this topic), Telink Burning and Debugging Tool (BDT), and hardware connection diagram.

Module pin Telink pin
SWS SWM
3V3 3V3
GND GND

Prepare software

Flashing process

  1. Import the project into the IDE.
    image20201230101846982.png

  2. Select an existing project.
    image20201230101934500.png

  3. Browse and select the target project, and click Finish.
    image20201230105843364.png

  4. Choose Project>Build All and start compiling the firmware.
    image20201230110151259.png

  5. After the compilation is completed, open the chip flashing tool and select 8285 and SWS to download the imported file.
    telink_btd.png
    image20201230110823829.png

  6. Click Download to download. The following image indicates a successful download.
    image20201230110908011.png