Bluetooth Connection Strategy

Last Updated on : 2022-08-23 07:05:14download

Background information

Numerous Bluetooth products have emerged within Tuya’s ecosystem and been widely used in complex scenarios. In order to break the limits of Bluetooth connections and broaden the scenario coverage of a single Bluetooth connection strategy, the scenarios of Bluetooth connection and disconnection are classified, as described in the following sections. Choose the connection and disconnection strategy that suits your product features and optimize the Bluetooth connection.

Set up Bluetooth connection strategy

  1. Go to the Tuya IoT Development Platform and click Product.

  2. Find a product in the Developing status, and click Continue to Develop in the Operation column.

    Bluetooth Connection Strategy

  3. In the Function Definition step, scroll down the page, find the Advanced Functions section, and then enable Bluetooth Connection Strategy.

    Bluetooth Connection Strategy

  4. Click Configuration to set up the device connection and disconnection logic.

    Bluetooth Connection Strategy

Bluetooth connection and disconnection strategy

The following figure shows the app’s logic to process Bluetooth connection and disconnection.

Bluetooth Connection Strategy

App’s logic of connection over Bluetooth

Connection option Open app or pull homepage to refresh Enable Bluetooth Open panel Initiate access to panel feature Automatic reconnection to device
Default connection
Connect on demand
Keep connected
Do not connect
  • ✅: Indicates that the connection will be triggered or the feature is supported. Note that the item “Initiate access to panel feature” only indicates whether the feature is supported. The implementation depends on the specific panel features.

  • ❌: indicates that the connection will not be triggered.

App’s logic of disconnection from Bluetooth

Disconnection option Close the app or disable Bluetooth Disconnected from panel for 30s Always-on or running in background for 30s Terminate access to panel feature
Disconnect in time
Disconnect on demand
Continuous connection
Disconnect in time & on demand
  • ✅: indicates that the device will be disconnected from Bluetooth.

  • ❌: indicates that disconnection will not be triggered.