Last Updated on : 2024-06-25 04:06:13download
This topic describes the initialization process of the TuyaOS Integrated SDK in terms of initialization phases, use cases, and related APIs.
Initialization is made up of a set of interfaces needed to build a minimal software model for an NB-IoT device. The interfaces initialize the hardware, TuyaOS software, and applications.
The product ID (PID) is required to bind a device with the Tuya Developer Platform. Call the following interfaces in sequence to set the PID during initialization.
tuya_user_api_set_product_key
tuya_user_api_event_loop_set_cb
tuya_user_api_event_loop_start
tuya_user_api_dp_write_default_cb
tuya_user_api_dp_report_record_ack_register_cb
```mermaid
graph TD
1[Device power- --> --> --> 4["pre_init() (invoked by user layer) --> 5["Basics initialization (RF, PMS, and time zone) --> --> 7["Tuya NB-IoT initialization (watchdog,
network LED indicator, DP, OTA update) --> 8["device_init() (user application
initialization and development)"]
end
```
For more information, see OpenCPU SDK.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback