Last Updated on : 2022-11-24 09:20:03download
Bluetooth Low Energy (Bluetooth LE) chip SDK development is a common SDK development method for various Bluetooth LE smart products. This topic describes how to implement custom Bluetooth LE chip SDK development on the Tuya IoT platform. This custom solution applies to product development with a Bluetooth LE chip SDK.
This series of topics is about the TuyaOS Bluetooth Chip SDK, and they were no longer updated as of August 24, 2021. If you want to see the updated content, please refer to Bluetooth Device Access of TuyaOS.
Bluetooth LE chip SDK development supports the following cloud connection modes: Tuya Standard Module MCU SDK and Self-developed Module SDK. These modes support the following features:
Tuya Standard Module MCU SDK
In this mode, network modules are used for SDK development. For more information, see Network Modules. Tuya production systems can be used to produce this type of module. You can upload your production firmware to the Tuya IoT Platform. Tuya flashes the firmware to the required module and authorizes the module. Then, you can use this module in the Bluetooth LE chip SDK development.
Self-developed Module SDK
In this mode, the modules cannot be produced by Tuya production systems. You must purchase chips and tokens on the Tuya IoT Platform and implement firmware flashing and module authorization.
Note: The Self-developed Module SDK mode is available to only the accounts in the whitelist. To add your account to the whitelist and enable this mode, submit a ticket to request technical support.
The Tuya Standard Module MCU SDK and Self-developed Module SDK modes follow similar development steps. To implement the Self-developed Module SDK mode, perform the following steps:
Log in to the Tuya IoT Platform, select the preferred category, set Development method to Custom Solution, and then enter the required product information. For more information, see Create Products.
Set data points (DPs) based on the required product functions. The DPs are classified into standard DPs and custom DPs. You can select the DPs to meet your business requirements.
For more information, see Function Definition.
In the Hardware Development step, specify Self-developed Module SDK as the cloud connection mode, set the SDK development parameters, and then download the required SDK and demo.
Note: The Tuya Standard Module MCU SDK mode is in the beta stage. To enable this mode, submit a ticket to request technical support.
Apply for the authorization code for testing and debugging. Select the delivery form that supports the specified flashing method. In this example, the BK3431Q module is used. Click Get 10 Free Licenses to open the Purchase wizard and choose License List from the Delivery form drop-down list. A license list is the authorization plaintext and used to flash firmware for BK343X chips. A production certificate is an independent authorization token and applies to authorization for Tuya modules and host software.
The downloaded SDK contains the app demo that can guide your SDK development. For more information, see Bluetooth LE SDK Demo Overview.
During the debugging, troubleshoot issues based on device logs. Tuya provides the following logs to support your debugging:
Local logs: the logs that are generated on local devices. For more information, see the SDK development documentation.
Cloud logs: the logs of communication between devices and the cloud. To query the logs, in the left-side navigation pane of the Tuya IoT Platform, choose Product > Device Logs to go to the Log query page, and enter the virtual device ID that is found on your app.
After the firmware that is developed based on the self-developed module SDK passes the functional test, you must upload the firmware to the Tuya IoT Platform and apply for the mass product authorization code to enable the test service provided by Tuya. Perform the following steps:
On the Hardware Development tab, click Add custom firmware. In the pane that appears, enter the firmware information, set Firmware Identifier to the name of the built firmware, and then set Firmware Category to Bluetooth Firmware for a Bluetooth LE product. Then, click OK.
In the Generated Firmware section, select the OTA Upgrade operation. In the Add Firmware Versions pane, enter the required firmware version information, upload the built firmware, and then click Confirm. For more information, see Update Firmware.
Go to the Test Services tab, follow the instructions to test the product functions with the Tuya Cloud Test app, upload the test report, and then click Product Release. The released product is in the Developed state and ready for mass production.
Is this page helpful?YesFeedback
Is this page helpful?YesFeedback