Bluetooth Mesh Capability Map

Last Updated on : 2024-06-25 04:07:10download

Built on top of TuyaOS capabilities, TuyaOS Bluetooth Mesh Development Framework is a set of SDKs used to build Bluetooth mesh products for different specifications and scenarios. Unified APIs and a variety of components allow you to focus on building applications with a consistent development experience, without taking care of specific implementations.

TuyaOS is designed with a modular approach, with capabilities covering basic services, security, networking middleware, and various IoT services.

Architecture

Bluetooth Mesh Capability Map

Capability list

Device management

Capability
Description
Initialization Understanding the initialization process can help you get through Bluetooth mesh software development.
Initialization is a process where after a device enters the main function after power on, it calls a range of APIs to initialize the hardware environment, TuyaOS software, and applications.
During the application initialization, take care of the sequence of API calls. Business logic is generally after the Bluetooth stacks. The dependencies for initialization vary depending on the modules.
Reset A reset can restore a device to the settings that the device had before it was paired.
Device reset can be triggered by hardware operation or mobile app operation.
Authorization Only authorized Bluetooth devices can connect to the Tuya Developer Platform.
Authorization is the process of writing the device identification information for authentication and pairing to the non-volatile memory (typically the flash memory) on the device. You have two options for adding authorization information: you can either write it directly into the code using the API, or download it to the device via Tuya’s host. Writing it into the code is intended for debugging, while downloading it is meant for mass production.

Device pairing and reset

Capability
Description
Pairing modes A device can be paired through GATT communication with a mobile phone or through advertising by a gateway. There are two approaches to pairing.
  • Standard Bluetooth mesh provisioning: The fixed and secure provisioning procedure defined in the Bluetooth mesh specification.
  • Tuya’s proprietary fast provisioning: The provisioning procedure using Tuya-defined custom GATT service and vendor model. Fast provisioning is a more efficient alternative to standard Bluetooth mesh provisioning. It allows for bulk provisioning at a faster speed and with a higher success rate.
Pairing approaches
  • Connect and pair a device over Bluetooth using the Tuya-enabled mobile app.
  • Communicate and pair a device over Bluetooth advertising using a Bluetooth gateway.
Reset A reset can restore a device to the settings that the device had before it was paired.
Two methods are available to reset a Bluetooth mesh device:
  • MESH_NETWORK_RESET: The reset action is irreversible.
  • MESH_NETWORK_RESET_WITH_RECOVER: The reset action is reversible because the Bluetooth mesh network information is not fully erased. The device network recovery API can restore the mesh network to its previous state before the reset.
    Removing a device from the mobile app is irreversible, whereas resetting a device physically is reversible.
Device network recovery After a device is reset locally, calling the recovery interface can restore to the latest network configuration.
This feature is particularly useful in cases where the device was accidentally reset locally. If the device remains unpaired after a certain time or is powered on again, its network configuration will be automatically restored to the latest version.

Bluetooth mesh communication

Capability
Description
Communication modes Bluetooth mesh devices are categorized into two types based on their supported communication modes.
  • Bluetooth mesh devices that support communication through advertising as well as GATT connection via Mesh Proxy service. They can be controlled through Bluetooth connection with mobile phones or through gateway advertising.
  • Bluetooth mesh devices that only support communication through advertising. They cannot communicate with mobile phones.
Binding with gateway A device can be bound with one gateway only. If a device is paired through a gateway, it is automatically bound with that gateway. If a device is paired through Bluetooth, the user needs to manually bind the device with a gateway on the gateway’s app panel.
When multiple gateways are on the same network, the user can unbind a device from a gateway and bind it with a desired one.
Proxy capability A node with the proxy capability enabled is called a proxy node. A proxy node acts as an intermediary to allow a non-mesh-supported Bluetooth LE device to interact with a Bluetooth mesh network.
This allows a mobile phone to monitor and control a mesh network via a proxy node through GATT data transmission.
Relay capability A node with the relay capability enabled is called a relay node. A relay node can retransmit messages that are broadcast by other nodes to extend the reach of these messages across the entire Bluetooth mesh network.

Device control

Capability
Description
Data point (DP) model DP models are used for device control on the Tuya Developer Platform. The gateway and mobile app can convert the DP model data to the Bluetooth mesh model and opcodes. For more information, see the SDK documentation.
Bluetooth SIG models Models defined by the Bluetooth Special Interest Group (SIG) in the Bluetooth Mesh Model Specification are known as Bluetooth SIG models. Tuya uses the Generic OnOff Model and lighting models for lighting and electrical products.
Vendor models Tuya-defined vendor models transmit information about raw-type DPs. Vendor model opcodes are used to transmit data for standard DPs that cannot be converted to Bluetooth SIG model opcodes. For more information, see the SDK documentation.
Channel priority If a device is bound with a gateway and connected to a mobile phone over Bluetooth, gateway advertising takes precedence when the device is controlled with a mobile app. Device control through Bluetooth connection to a mobile phone is used only when a device is not bound with a gateway or the gateway is offline.

Basic services

Capability
Description
Request for time data After connected to a mobile phone or bound with a gateway, a Bluetooth mesh device can request the current time and location coordinates (longitude and latitude) from the cloud.
Request for daylight saving time (DST) After connected to a mobile phone or bound with a gateway, a Bluetooth mesh device can request DST information from the cloud.

Advanced services

Capability
Description
Reliable data reporting The channel for reliable data reporting helps to ensure the successful delivery of data to the gateway. You can choose a suitable reporting method as required.
Advanced mesh capability Send commands with the TID included. Package the responses to device status queries.

Device driver

Capability
Description
GPIO GPIO driver, with debugging routines. With a host, you can set a GPIO to output high or low and check the current state of a GPIO.
UART UART driver, with debugging routines. With a host, you can set the baud rate for a UART and control a UART to send custom data.
PWM PWM driver, with debugging routines. With a host, you can set the frequency and duty cycle of a PWM and restore a PWM to the initial state.
ADC ADC driver, with debugging routines. With a host, you can read the value or voltage of an ADC channel and change the resolution of an ADC.
SPI SPI driver, with debugging routines. With a host, you can control the SDI and SDO of an SPI module to receive and send custom data and change the transfer rate of an SPI module.
I2C I2C driver, with debugging routines. With a host, you can control an I2C module to turn on an OLED screen and display custom data.
RTC RTC driver, with debugging routines. With a host, you can set or get the RTC of a device and start or stop the RTC module.
Watchdog Watchdog driver, with debugging routines. With a host, you can start or stop the watchdog, enable or disable automatic feeding, and test manual feeding.

Power consumption

Capability
Description
Standard power Bluetooth mesh devices use advertising and scanning to send and receive packets. A typical Bluetooth mesh node should always be in scanning mode to avoid missing packets, which requires continuous energy consumption. The power consumption varies by chip platforms, generally ranging from 5 mA to 8 mA.
The transmitter power has minimal impact on overall power consumption. Instead, it is the RF and MCU operation during scanning that consumes significant amounts of power. The power consumption of typical Bluetooth mesh devices is mainly affected by the RF process and MCU clock rate.
Ultra-low power Ultra-low power devices are in sleep mode most of the time and typically woken up by timers. They can also be woken up by external interrupts, during which they remain awake briefly to collect and report data before returning to sleep mode. Generally, power consumption is below 10 μA in sleep mode.
During the pairing process, the device must stay awake for a specific duration.

Update service

Capability
Description
Update Bluetooth firmware via OTA A device establishes a GATT connection with the Tuya Smart app or a gateway to receive an OTA update. Resumable transfer, data integrity check, and exception processing are supported.

Device accessory

Capability
Description
Bluetooth mesh remotes A remote control can connect to and operate Bluetooth mesh devices directly, without the need for a mobile app or gateway.
Bluetooth beacon remotes Users can control the device using their existing Bluetooth LE remotes because the device can receive and process custom Bluetooth advertising data.

Support and help

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