SDK Architecture

Last Updated on : 2022-11-24 09:19:57download

Block diagram

SDK Architecture

Architecture description

Layer Description
Application Applications built on top of the Bluetooth SDK.
MessageorCallBack The SDK sends data or events to the mobile app using messages or the registered callbacks.
Main Process Function Serving as the main engine of the SDK. This function is called by Application.
  • If your chip runs an operating system (OS), the SDK will automatically create a task by using the OS API from the port layer to run Mainprocessfunction.
  • If your chip does not run an OS, this function is called in a loop.
Tuya Bluetooth LE SDK API The SDK provides APIs for managing Bluetooth communication.
  • If your chip runs an OS, API calls are made based on asynchronous message-based communication, and the result of an operation is returned to the device application through a message or a callback.
  • If your chip does not run an OS, the return value of an API call is the result of an operation.
SDK Config The configurable SDK allows you to tailor functionality by editing the macro in the config file. For example, you can configure a general pairing mode for various network protocols, and the considerations can be Bluetooth LE devices, Elliptic Curve Diffie-Hellman (ECDH) encryption scheme, OS, and more.
Tuya Bluetooth LE SDK Tuya’s Bluetooth communication protocol is included in the SDK to provide the required interfaces for Bluetooth-based applications.
Port The abstract hardware interfaces that you need to port to your chip platform.
Platform The chip platform. The chip and protocol stack is maintained by the chip producer.

SDK directory

ty_iot_sdk_ble_common
├─ app #  Application layer
├─ doc #  Documentation
├─ extern_components #  Components
├─ port #  Hardware abstraction layer
├─ sdk # SDK
│  ├─ include # Header file
│  ├─ lib # Library
│  └─ src # Source code
├─ tuya_ble_config.h  # Configuration file
├─ tuya_ble_sdk_version.h  # Header file for updates
├─ tuya_ble_sdk_version.txt  # Changelog
├─ README.md # SDK introduction