Flash General Firmware to Third-Party Chips

Last Updated on : 2023-04-13 07:51:50download

Tuya opens up the general firmware used for connecting some of Tuya’s modules to third-party chips. This way, you can flash Tuya’s general firmware to your chips with Tuya’s authorization tool and third-party official firmware flashing tool.

This topic has stopped updating, and the content is for your reference only. For more information about firmware flashing, see Flash and Authorize.

This topic describes how to flash Tuya’s firmware to your ESP8266. After flashing the firmware, your ESP8266 can transmit raw data to an MCU with Tuya’s Serial Port Protocol.

Preparation

We have two steps to complete firmware flashing. First, flash your ESP8266 with Tuya’s firmware. Then, authorize your ESP8266 with a Tuya license. Before you get started, install the following tools and download the firmware.

Step 1: Flash firmware

  1. Open Espressif’s Flash Download tool.

  2. esp_common_raw.bin is the combination of all binaries, so you can download it to the address 0x0000.

    Flash General Firmware to Third-Party Chips

    We use Tuya’s TYWE3S module as an example to show how to connect ESP8266 to a USB-to-TTL serial adapter. You can change the pin connection based on your hardware.

    Flash General Firmware to Third-Party Chips

Step 2: Authorize chip

To connect ESP8266 to the Tuya IoT Cloud, we need to flash the chip with the Tuya license.

  1. Go to the Tuya IoT Platform and create a product to get the license.

    This section briefly describes how to create a product. For more information, see Create Products.

  2. Scroll down the page and click Can’t find the category? in the lower-left corner. Complete the required information and select Wi-Fi as the protocol.

    You must click Can’t find the category? for product creation because only this item supports independent authorization.

    Flash General Firmware to Third-Party Chips
  3. Function Definition and Device Panel are optional so you can just leave them as they are and directly click the Hardware Development tab.

  4. Click Tuya Standard Module SDK and select TYWE1S or TYWE3S. Both these two modules use the ESP8266 chip.

    Flash General Firmware to Third-Party Chips
  5. Select the module and add custom firmware, then click Get 10 Free Licenses.

    Flash General Firmware to Third-Party Chips
    Flash General Firmware to Third-Party Chips

  6. Select Production Certificate - Authorization Only as the Delivery form and submit the order. Click View Order List and download the production certificate.

    Flash General Firmware to Third-Party Chips

    Flash General Firmware to Third-Party Chips
  7. Unzip the file and copy the production certificate (that is the license).

  8. Apply for a PMS system account to use the Independent Authorization tool.

    Flash General Firmware to Third-Party Chips

    Open the tool and enter your PMS account and password, and token (the license). Plug the USB-to-TTL serial adapter into your computer. Select the correct COM port, set the baud rate to 9600, and click Independent Authorization.

Operation result

After you finish the above steps, you can develop with Tuya MCU SDK and connect your ESP8266-based project to the Tuya IoT Cloud.

For more information, see Wi-Fi Common Solution.