Flashing and Authorization

Last Updated on : 2022-11-24 09:20:25download

This topic describes how to flash the firmware to the NB-IoT module and authorize the module to connect to the Tuya IoT Development Platform.

Build the firmware

Run the following command in the root directory where the extracted OpenCPU SDK resides:

./build_app.sh ./apps/tuyaos_demo_nb_sample mt2625gl_common 1.0.0

Description of the build script:

Field Description
/build_app.sh The build script.
./apps/tuyaos_demo_nb_sample The application directory.
mt2625gl_common The name of the firmware.
1.0.0 The firmware version.
clean The clean command.

If NB is displayed in the output window, it means the project is built successfully.

Flashing and Authorization

You can find the output in the following directory:

TuyaOS\vendor\mtk2625_sdk280\mt2625_os\project\mt2625_evb\apps\tuya_alpha\output\mt2625gl_common

Flashing and Authorization

Flash the firmware

  1. Extract the flash tool MT2625_FlashTool_exe_v2.8.3 in the SDK.

    Flashing and Authorization

  2. Enter the required parameters.
    ①: Choose the correct COM Port. The UART Baud Rate is 921600.
    ②: Click Open and choose the build file with the file extension of .cfg.
    ③: Click Start. Reset or power off and on the NB-IoT module to download code to the module.

    Flashing and Authorization

    If the success is displayed on the screen, it means the firmware is flashed to the module.

    Flashing and Authorization

Things to note

The Format menu is used to erase data from the chip. If you do not have the independent authorization tool, do not erase data because this will remove the authorization information. If you erase data accidentally, contact the technical support by service ticket.

To erase data, set the option on the Format page as shown in the following figure.

Flashing and Authorization

Authorize the module

For more information, see Flash and Authorize.

Tuya provides the official authorization tool, license, and a suite of documentation for related operations.