Cat.x Device Development Kit

Last Updated on : 2024-06-25 03:50:52download

Cat.x Device Development Kit is built on top of the TuyaOS and designed for developing LTE Cat.1, Cat.M, and Cat.4 products.

Overview

This kit includes a host of features and interface functions to help you develop easily, including device pairing and activation, secure communication, cloud connectivity, device control, and OTA updates. You do not need to take care of feature implementation for different LTE Cat.x chip platforms. Just working on the standard APIs, you can connect your products to the Tuya Developer Platform and make them IoT-enabled.

Applicability

Cat.x Device Development Kit is designed to develop LTE-enabled IoT products.

Capability map

Device management

Capability
Description
Initialization After a device is powered on and started, it calls a range of APIs to initialize the hardware environment, TuyaOS software, and applications. On application initialization, you need to provide callback functions as needed to handle internal events including status changes, device controls, and firmware updates.
Reset A device is restored to the settings that the device had before it was paired and activated. Device reset can be triggered by hardware operation or mobile app operation. In terms of device status after a reset, there are two types of reset: normal reset (device unbound) and factory reset (device unbound with data erased).
Authorization Authorization is the process of writing the device ID assigned by Tuya to the non-volatile memory on the device for the purpose of authentication. You can perform authorization through code or a tool. The former is for debugging purposes, and the latter is for mass production.

Pairing and activation

Capability
Description
Device binding via QR code After the device is connected to the router, the mobile app scans the QR code on the device body or on the device’s screen to get device information. Then, through the cloud, the mobile app pushes the activation token to the device that has been connected to the server. The device authenticates with the cloud for activation using the authorization information and token.
Pairing over Bluetooth The mobile app sends the activation token to the discovered device via Bluetooth. The device authenticates with the cloud for activation using the authorization information and token.

Device control

Capability
Description
Data point (DP) model or device control protocol The TuyaOS device model description, which is used to control a physical device.
Control over Bluetooth When the mobile app is near an offline device, the device can be controlled over Bluetooth.
Channel priority You can prioritize the channels (cellular and Bluetooth) over which a device is controlled.

Basic services

Capability
Description
Secure storage Encrypted key-value store as well as file-based data storage in plain text.
Health checks Regularly check the device memory, wireless signal, and task status. You can customize the metrics.
Logging service Local logs that record device operations. Exceptions can be recorded, sorted, and reported to the cloud.
Event service Event subscription and publishing. This allows you to monitor and handle events as needed.
Time service (time zone and daylight saving time (DST)) Time management and maintenance. UTC time and local time are supported. Local time is determined by UTC time, time zone, and DST.
Timer queue Software timers.
Job queue Job queues used to process asynchronous low-priority tasks on which blocking might occur.
Connection management Device connection management, such as cellular and Bluetooth. It is used to maintain the direct connection between devices and the network.
Thread management Managing threads.
Bluetooth Low Energy (LE) and Cat.x services TuyaOS offers a device model that utilizes Bluetooth LE as the primary connectivity and cellular as the secondary. The Bluetooth LE module shares activation information with the cellular module in this model.

Cellular services

Capability
Description
Data connection Dialing.
Phone Phone calling.
SMS Text messaging.
Audio playback Audio function. Playback from memory or files, with features such as volume control.
DTMF detection Detect the dual-tone multi-frequency (DTMF) signal from the other side during a phone call.
LBS Location-based service (LBS) base station positioning.
Wi-Fi positioning The MAC address of the discovered Wi-Fi hotspot.
GNSS GPS positioning.
Virtual AT The virtual attention (AT) command service.

Device driver

Connection driver

Capability
Description
Bluetooth Bluetooth driver

Peripheral driver

Capability
Description
GPIO GPIO driver
ADC ADC driver
UART UART driver
SPI SPI driver
PMU PMU driver
LCD LCD driver
Flash Driver for external NAND flash.

Power management

Capability
Description
Low power cellular Low power cellular management

Scheduled task

Capability
Description
Local schedule The scheduled task is downloaded to the device with a timer created accordingly. The device runs the task after the timer expires.
Sunrise/sunset-based schedule One of the types of local schedule, allowing users to schedule tasks based on local sunrise and sunset.
Calendar-based schedule One of the types of local schedules, allowing users to schedule tasks with a recurrence pattern. For example, repeat weekly, repeat on odd or even days, or repeat every x day(s) or hour(s).

OTA update

Capability
Description
Silent update The device checks for and installs firmware updates automatically.
Update notification/forced update The mobile app notifies the device of available firmware updates.
Subordinate firmware update Update firmware on the device.

Device security

Capability
Description
Security system (security level and capability) Device authentication, secure storage, secure communication, and privacy and data compliance.

Network

Capability
Description
IoT-DNS Domain name configuration, certificate management, and domain name resolution.
HTTPS HTTPS library.
MQTT over TLS MQTT library.
Mbed TLS Mbed TLS library.

System services

Capability
Description
Memory management (Tuya heap6) TuyaOS proprietary heap management.
Modbus master service The Modbus master component maintained by TuyaOS.

Support and help

If you have any problems with TuyaOS development, you can post your questions in the Tuya Developer Forum.