Last Updated on : 2024-01-19 09:35:42download
When an update is available, update the firmware on the device via OTA. Firmware updates are used to add new features or fix bugs.
The firmware version is set during device initialization.
DEVICE_INFO_T device_info = {
TUYA_PID_STR,
FIRMWARE_NAME,
SOFTWARE_VERSION,
FIRMWARE_VERSION,
FIRMWARE_OTA_ID
};
tal_device_info_config(&device_info);
FIRMWARE_VERSION
: The firmware version. For example, the decimal 65545
is equivalent to 0X00010009
in hexadecimal. The major version is represented by the highest two bytes, the minor version by the middle byte, and the patch version by the last byte.SOFTWARE_VERSION
: The software version, aligning with the firmware version and corresponding to the SoftwareVersion
attribute of Matter’s Basic Cluster.FIRMWARE_OTA_ID
: The firmware OTA ID, which will be verified during an OTA update. If the verification fails, the update will not proceed.For more information, see JSON Configuration.
The firmware can only be updated if the new version is higher than the current one.
If you have any problems with TuyaOS development, you can post your questions in the Tuya Developer Forum.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback