Last Updated on : 2023-11-21 03:45:07download
To connect your modules to the cloud for access to cloud services, you need to authorize them with licenses. Tuya provides three options for license delivery. This topic describes how to get the license and write them to chips.
In the third step of Hardware Development, click Get 2 Free Licenses.
One Tuya IoT Development Platform account is eligible for a maximum of two free licenses.
Choose a Delivery Mode. Tuya provides three options, namely Credential, Credential (Authorization Only), and License List.
The license is delivered in a spreadsheet, including UUID, authkey, and MAC address. The server generates a license list. You can write licenses to your chips without an internet connection.
You are debugging Bluetooth modules and have control over production information.
Select License List as the delivery mode.
You can use the license for debugging purposes. Define it as consistent and write it to your SDK.
Modify the code in the SDK to obtain a temporary authorization.
Define macros in the header file with the information in the license list.
Enable the license in the
Change the value of two parameters, as shown in the following code.
.use_ext_license_key = 1, // 1: info in tuya_ble_sdk_demo.h. 0: auth info .device_id_len = 16, //DEVICE_ID_LEN,
In the earlier versions of the SDK, the member
use_ext_license_key is not included. You can change the value of
device_id_len. See the annotation in the following code.
device_param.device_id_len = 16; // If you use the license stored by the SDK, initialize the value 0; otherwise to 16.
A credential is a string. It includes information about firmware and authorization, which is required when you use the software Cloud Module Burning Authorization Platform to authorize your chips. This software depends on an internet connection to pull credential information from the cloud. You can view the available credentials in the user interface. For more information, see Flashing and Authorization for Wi-Fi SDK.
For projects involving multiple parties, you delegate Tuya to flash firmware to chips for functionality verification.
tuya_ble_sdk_demo.c. The configuration in
tuya_ble_sdk_demo.c defaults to using the authorization information stored in the flash memory of the chip. Authorization information is imported by the host.
use_ext_license_key = 0 device_id_len =0
tuya_ble_sdk_demo.h. The following table describes some parameters.
||Product ID (PID). Create a product on the Tuya IoT Development Platform, and this product will be assigned a unique PID.|
||Firmware identifier. The unique identifier of your firmware, which is a required field when you upload your firmware to the Tuya IoT Development Platform. The recommended naming convention is
||The firmware version number in hexadecimal format. To be aligned with
||The firmware version number in string format. This parameter is required when you upload your firmware to the Tuya IoT Development Platform. The supported format is
After the configuration above is completed, you can compile the firmware.
Go to Hardware Development and click Add Custom Firmware.
Complete all the required information.
The following table describes some fields.
|Firmware identifier||Enter the value you define for
|The firmware type.||Select Bluetooth Firmware.|
|Flash Size||Follow the chip specification.|
|Firmware Flashing by Tuya||If you choose Tuya Standard Module SDK, you can enable this option.|
After the configuration is completed, click Upload Firmware.
Note that the Firmware Version must match the one you specified in the SDK. The file types of Production Firmware, User Area Firmware, and Firmware Updates vary depending on the chip platforms. If you need help with the firmware types, file a service ticket. After you upload the firmware, you must enable the firmware to make it available.
Select Credential as the delivery mode.
Download the file.
Download the Cloud Module Burning Authorization Platform software and write licenses to the chip. For more information, see Flash and Authorize.
The procedure is as follows:
The credential (authorization only) is a string that does not include the firmware information and is only used for authorization.
You must use Tuya’s host to write licenses to your chips. The host must be connected to the internet to pull the authorization information from the cloud and display the number of available licenses.
You use Tuya’s host only for the purpose of writing licenses to chips.
Select Credential (Authorization Only) as the delivery mode.
Click Purchase > Order in the left navigation pane. Select the Debugging & Sample Order or Production Order tab according to your order type and download the credential. The downloaded TXT file includes the license, the number of licenses, and the date.
For authorization only, Tuya provides two methods for writing licenses to chips.
Log in to Smart PMS. Choose Production Support > Software Download. Click Production Toolkit to download.
After you have installed the software on your computer, log in to it with your PMS account. Click KingBird.
Enter your credential.
Click Independent Authorization.
When you are prompted with Start authorizing 10%, reset the chip or module.
If the process fails, set the baud rate to 9600 and try again, or try resetting the chip or module.
Wait for independent authorization to finish.
Convert your credential (authorization only) into the work order number.
If you get an error saying no permission, file a service ticket.
Input the work order number for authorization.
Input the work order and SN.
SN = work order number + 5-digit serial code in hex format. The serial code starts with zero, and the maximum value indicates the total number of licenses. For example, if the work order number is
FGSHFBE, the SN can be
Is this page helpful?YesFeedback
Is this page helpful?YesFeedback