English
English
简体中文
Contact Us
Register
Log In
layoutIndex

Flash Firmware to and Authorize WB Series Modules

Last Updated on : 2021-04-26 04:35:48download

This topic describes two solutions about how to flash firmware to and authorize WB 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.

  • An integrated solution for flashing and authorization. This solution is made to flash and authorize modules on the Cloud Module flashing Authorization Platform, which is suitable for the release stage.

  • Separated solutions for flashing and authorization. This solution is made to flash modules with chip flashing tools and authorizes modules on the Cloud Module flashing Authorization Platform, which is suitable for the development stage.

Binaries

After the chip of this module model is compiled, the following types of .bin files are generated:

  • oem_bk7231s_light_ty.2.9.5.bin: boot + user area firmware.
  • oem_bk7231s_light_ty_QIO_2.9.5.bin(production firmware): boot+user area firmware+detection firmware.
  • oem_bk7231s_light_UA_2.9.5.bin: user area firmware.
  • oem_bk7231s_light_ty_UG.2.9.5.bin: update area firmware.
    Flash Firmware to and Authorize WB Series Modules

Supported chips

Applicable to the WBX Series Module with the core chip of BK7231T. The following models are included:

Method 1: An integrated solution for flashing and authorization

Solution description

This solution is suitable for the release stage. Since the Tuya module must be authorized to connect to the Tuya platform, the authorization step cannot be omitted.

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 BK7231T (using WB3S Module Datasheet as an example in this topic), and hardware connection diagram.

Flash Firmware to and Authorize WB Series Modules

Flash Firmware to and Authorize WB Series Modules

Module pin Serial pin
RXD1 TX
TXD1 RX
VCC VCC3.3V
GND GND

Upload firmware

  1. In step 3 Hardware Development of the product development process on the Tuya IoT Platform, click Add custom firmware.Flash Firmware to and Authorize WB Series Modules

  2. Enter the firmware parameters and click OK.

    Parameter Description
    Firmware identifier It must be consistent with name of the compiled firmware.
    Firmware type The module firmware
    Other parameters Enter as required.
    Flash Firmware to and Authorize WB Series Modules
  3. In the Generated Firmware area, click Upload production firmware.
    The production firmware to be uploaded is as follows

  4. Upload the firmware and click Confirm.

    • Production firmware: Upload the .bin file with QIO in the file name.

    • User area firmware: Upload the .bin file with UA in the file name.
      Flash Firmware to and Authorize WB Series Modules

      Flash Firmware to and Authorize WB Series Modules

Get the authorization code and flash firmware

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

The flashing steps are:

  1. Power off the module in the first place.
  2. On the Cloud Module flashing Authorization Platform, enter the authorization code and click Run.
  3. After the flashing is completed, power on the module.

Method 2: Separated solutions for flashing and authorization

Solution description

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

Prepare hardware

Hardware preparation includes serial port assistant, any module equipped with chip platform BK7231T (using WB3S Module Datasheet as an example in this topic), and hardware connection diagram.

Flash Firmware to and Authorize WB Series Modules

Flash Firmware to and Authorize WB Series Modules

Module pin Serial pin
RXD1 TX
TXD1 RX
VCC VCC3.3V
GND GND

Prepare software

Download and open the BK7231T chip flashing tool. The following figure shows the window of the chip flashing tool. The following table describes the required parameters boxed in red in the figure.

Parameter Description
Flashing Target The chip platform is BK7231T. Therefore, BK7231 is used.
Start address Set the value to 0x00011000 in most cases.
Operation length Select 0x001EF000 (0x00200000-0x00011000)
Baud rate Select 921600

Download description

The flashing steps are:

  1. Power off the module in the first place.
  2. After you open the flashing tool, click Browse and select the oem_bk7231s_light_UA_2.9.5.bin file to upload.