Bluetooth Beacon Mesh Capabilities

Last Updated on : 2024-06-25 09:34:04download

Overview

TuyaOS is designed with a modular approach, with capabilities covering basic services, security, networking middleware, and various IoT services. Built on top of TuyaOS capabilities, TuyaOS Bluetooth Beacon Mesh Development Framework is a set of SDKs used to build Bluetooth beacon 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.

Architecture

Bluetooth Beacon Mesh Capabilities

Capability list

Device management

Capability
Description
Initialization Understanding the initialization process can help you get through Bluetooth 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.
If a device is reset locally, it can restore to the previous network connection after being powered off and on. This is used for network recovery after an accidental reset. If a device is removed from the mobile app, network recovery does not apply. The device is still in an unpaired state after being powered off and on.
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 can perform authorization by editing the code or using a host. The former is for debugging purposes, and the latter is for mass production.
Production testing Testing in the production process helps you identify any Bluetooth hardware issues for better yield.
There are PCBA testing and end product testing.
  • In PCBA testing, communication with Bluetooth devices is established through the serial port.
  • In end product testing, communication is over Bluetooth
to test the device’s radio and peripheral functionality.

Power consumption

Capability
Description
Standard power A standard power device can communicate in both directions and assist other nodes in forwarding data.
Ultra-low power Ultra-low power devices such as sensors and remote controls keep their radio on during the pairing process. Once paired, the device reports data only when woken up by an interrupt or a timer, and then it immediately goes back to deep sleep.

Network capability

Capability
Description
Group Bluetooth beacon mesh network allows for 0x0001 to 0x5FFF groups. A node can belong to up to eight groups simultaneously.
Relay The upstream and downstream messages can be relayed up to three hops away from the originating node.
Remote control Beacon remote controls can operate paired or unpaired Bluetooth beacon mesh devices after code pairing. There is no need to add the remote to the Tuya-based mobile app. Due to its weak security, this feature typically applies to lights, fans, and radio-controlled cars.
  • A Bluetooth beacon mesh device can pair with three remote controls simultaneously.
  • A remote control supports up to six groups and one overall control.
  • When a new remote control tries to pair with a Bluetooth beacon mesh device that already has three paired remote controls, the device will automatically unpair the earliest remote controls.
  • The remote control is authenticated using the sampling proxy authentication strategy.
Firmware update Devices with reprogrammable chips support OTA updates.
  • The update file is transmitted through advertising. It takes about 10 minutes to update 40 KB firmware.
  • OTA updates can only be sent through the gateway, not via mobile phone due to their lengthy transmission time.
  • Dual backup prevents the device from becoming permanently unavailable in case of any exceptions during the update process. As a result, double flash memory is used.
Dual-link A device can be added either through a mobile phone locally or a gateway. The system automatically selects either of these two links for device control.

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.

Device security

Capability
Description
Security system Tuya’s proprietary algorithms secure devices regarding connection authentication, request authorization, and command sending, with the following measures.
  • One-device-one-key authentication mechanism: Each Bluetooth chip connected to the Tuya Developer Platform is written with a unique license for identity authentication.
  • An encryption algorithm similar to AES-128 but with fewer operations and a low memory footprint.
  • With an anti-replay protocol, the sender increments the sequence number by 1 for each packet it sends.
  • Each command performs a strict self-integrity check.

Support and help

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