Bluetooth Low Energy Lock FAQ

Last Updated on : 2023-12-21 07:20:32download

Chip module firmware selection related

What kinds of docking methods are available for Bluetooth lock?

Shipment mode related

What is the shipping mode of Bluetooth lock?

SDK docking: chip + authorization code to ship (authorization code must be used to the upper computer of Tuya).
Module docking: directly out of the module.
Other shipping methods: everything is negotiable in large quantities.

What if the features of the public version of the Bluetooth door lock do not meet my needs?

Please organize your requirements into a clear document and give it to the project manager, who will summarize it to the product manager. Generic features will be considered for inclusion in the public version requirements, and non-generic features can be considered for custom requirements.

APP related

APP version issues?

There are two types of Tuya Smart APP: official APP and pre-release APP. The official APP can be downloaded from all major APP Stores, and the pre-release APP can be used to debug some features that have not yet been officially released, please contact the project manager for the download address.

The pre-release APP can be used to debug some functions that have not yet been officially released.

If cooperate with APP developers to debug problems, you may use.
Tuya Smart APP-Android-debug package Bluetooth log operation instructions

What services does Tuya provide regarding APP?

OEM APP, APP upload service, OEM APP update service, APP mall service, Siri access service, Widget access service, Apple Watch access service

Can I use my own company style and logo for APP?

You can use OEM APP: [OEM APP](https://developer.tuya.com/en/docs/iot/app-development/oem-app/oem-app-instruction/oem-app-instruction? id=K9kjw3q2udb9y)

Panel related

Is there only one set of UI for the Bluetooth door lock public version? Can I customize my own style?

Due to manpower reasons, only one set is supported at the moment.
Customization is possible, if you have a good panel style, please prepare a reference and communicate with the product manager.

Gateway related

Does Bluetooth door lock support Bluetooth gateway?

Yes, please contact the gateway product manager (Jay Zheng) for more related questions.

Other related

What if I don’t know the meaning of many terms during the communication with Tuya?

Please refer to “Tuya_ble_lock_class_DP point specification” – Overview --Nouns explained.

Are there corresponding English versions of the various documents related to Bluetooth door locks?

The following documents are currently available in English.
Bluetooth Door Lock Public SDK Development Guide" i.e. the corresponding “readme” of the SDK development kit
The English version of the Bluetooth licensing and production test-related documents is in progress …
For other documents that need English versions, please ask the customer/project manager/product manager/R&D to make a request and contact the corresponding documentation person to promote them together.

Which version of Bluetooth protocol is supported by Tuya’s SDK? Bluetooth 4.2? Bluetooth 5.0?

Simple answer: Bluetooth 4.2

Detailed answer.

About the Bluetooth protocol

The Bluetooth protocol is forward compatible, so if a higher version of the protocol is supported, naturally a lower version will be supported, but the reverse is not true. The higher version of the Bluetooth protocol will support richer features, if you want to maintain compatibility with the lower version of the protocol, you should discard some features that are only supported by the higher version, such as

  • LE Data Packet Length Extension (Bluetooth 4.2 and above).
  • 2 Msym/s PHY for LE (Bluetooth 5.0 and above).
  • LE Long Range (Bluetooth 5.0 and above).
  • LE Advertising Extensions (Bluetooth 5.0 and above).
    For more features, please refer to Bluetooth Core Specification Vol 1→Part C

About Tuya SDK

The Tuya SDK itself is not related to the version of the Bluetooth protocol, which version of the Bluetooth protocol is supported depends on the chip using the Tuya SDK, but there are several features of the Tuya SDK that need special attention.

  • MTU = 23 Bytes, valid data 20 Bytes.

Wiring related

What does tethering mean in Bluetooth door lock?

Binding refers to a security state defined in the security mechanism of the Tuya Bluetooth communication protocol, only the communication between the bound device and the Tuya Smart APP is secure, the unbound device does not have the ability to communicate with the Tuya Smart APP. The process of binding is called mapping, and only the successfully mated devices can be called bound devices.

What is the difference between strong and weak binding?

Strong and weak bindings reflect the level of security, so there are also medium bindings, the specific meaning of which is.

  • Strong binding: requires the previous user to unbind in order to re-match the network.
  • Medium binding: No need to unbind the previous user to re-match the network and send a PUSH notification message to the previous homegroup/default group administrator.
  • Weak binding: No need to unbind the previous user to re-match the network.

Why is the device name searched for after writing with Tuya license not the name of the PID setting I created?

  • Change it to my own PID in the demo package.
  • The “static const char auth_key_test” and “device_id_test” parts of the license, use spi’s downloader, erase them all, and re-burn them again.

Change the mac address to match.

Why didn’t I find the broadcast packet after burning the transceiver firmware?

  • Check if the firmware is burned successfully (make sure the power is supplied when burning).
  • After burning the firmware, you must go to Tuya authorization, otherwise Tuya Smart can’t search the relevant mating broadcast packets (you can directly use ble debugging assistant to search TY’s Bluetooth broadcast information).

Where to modify authkey and uuid?

auth key and device id are not effective in tuya_app_handler.h, you need to change them in auth_key_test and device_id_test in tuya_ble_storage.c

Apple phone as a master device, connection parameters update?

  • Max connection interval * (slave delay + 1) <= 2s
  • Minimum connection interval >= 20ms
  • min connection interval + 20ms <= max connection interval
  • Slave delay <= 4
  • Timeout time <= 6s
  • Max connection interval * (slave latency + 1) * 3 < timeout time

SDK is used as master docking, why does it show the device after license modification, but can’t be successfully mated?

  1. Make sure the PID in the SDK has been replaced
  2. make sure the license in define TUYA_DEVICE_DID has been replaced with the license of the PID you created
  3. make sure the mac address in define APP_PORT_DEFAULT_MAC_ADDR_STR has been replaced with the mac information of the PID you created
  4. make sure that after all the erasures (do not use keil to erase), you have re-burned

After the module is online, only the heartbeat is sent, no other data?

IO11 is pulled low so that the module will receive data

What is the difference between the module unbinding and the reset module sent by MCU?

Reset module means the module is restored to factory settings (clear device ID information), module unbinding is simply unbinding
If it is a weakly bound PID, sending both command words will enter the mating mode.

How long does the Bluetooth gateway (version 1.4.2+) default to a device being offline if it does not scan for broadcast packets from a single device?

Dynamic time, change dynamically depending on how many devices, i.e. 30s for 0-8 devices, 60s for 8-32 devices, 90s for 32-64 devices, 120s for 64-128 devices

Why does it sometimes take several seconds to open the APP connection?

This depends on several factors.

  1. the low-power broadcast cycle of the lock will determine the connection speed, such as the lock to save power.
  2. our APP is going to scan all the Bluetooth devices, to queue one by one.
  3. Bluetooth signal stability. If it is not stable, a cycle can not be connected, to several cycles, this time is normal.
  4. phone brand, this is the main consideration is compatibility.

Password-related

How to understand the concept of [temporary password] in Bluetooth door lock?

Please refer to Tuya_ble_lock_class_DP point specification

What is the role of Tuya serial number, server serial number, and door lock manufacturer number in the temporary password?

  1. Tuya serial number: The number of the temporary password stored in the Tuya platform, used for the platform to store data logic.
  2. Server-side serial number: Used to record the number of content data changes (including changes in non-password data such as start and end times, password names, etc.) for the temporary password number.
  3. door lock vendor number: the temporary password number stored in the door lock, the temporary password to open the door record number display using this value.

How to understand the concept of [Offline password] in Bluetooth door lock?

Please refer to Bluetooth Door Lock DP Reference.

How to understand the concept of [dynamic password] in Bluetooth door lock?

Please refer to Bluetooth Door Lock DP Reference.

Remote door opening related

How do I understand the concept of [remote password-free door opening] in Bluetooth door lock?

Trigger conditions.

  • Use Bluetooth to unlock the door when the device and the gateway are connected.
  • Voice unlocking.

Alert push related

Why can’t I see alarm records?

Both door records and alarm records belong to record type DP (with timestamp when reporting) and need to add DP in the configuration statistics before the records will be displayed. Users can contact the project manager directly to help open it.

How to use the “Hijack Alarm” function on the Smart Door Lock App?

This function works as follows.

  1. There is already a fingerprint or password in use on the lock, number X.
  2. Open the door lock App interface, and in the Member Management Center, assign the X number to a user name, and then mark the X number as a hijack alarm.
  3. Use the X unlocking method on the door lock to open the door once.
  4. The alarm record is displayed in “My” - “Message Center” and can be viewed at any time.

What is the difference between the alarms in the App panel and the alarms that I receive in the notification bar after I exit the App?

The alarms in the App panel are reported directly by DP, and MCU must report them by themselves to display. The alarms received in the notification bar of the cell phone after the App exit requires the customer to set the alarms in the cloud configuration of the IoT platform, and then notify the Tuya project manager for review and approval before pushing, and the customer needs to open the relevant message pushing permission (the alarm pushing is done by the Tuya cloud to match the scene linkage rules, i.e. to match the reported (whether the DP meets the linkage)

Open door record related

Why can’t I see the open door record?

The door opening a record and alarm record are both record type DPs (with timestamp when reported) and need to add DPs in the configuration statistics before the records will be displayed. Users can directly contact the project manager to help open it.

What command word is used to report door opening records?

For Bluetooth locks, all use record type data upload and do not distinguish between Bluetooth connection status packets. But for status display (e.g. power, open/close status, etc.) you need to distinguish whether Bluetooth is offline or not.

Why the user I created only opens the door by Bluetooth, some products also have fingerprint or password to open the door, etc.?

If DP44 is checked, it means that the local RTC of the device is accurate, and it can record the exact time of the door opening method, so it is open to the sharing user. If it is unchecked, for security reasons, only the Bluetooth door opening permission is open.

Door opening method synchronization related

How do I synchronize commands to the door lock?

Go to the list of hardware door opening methods in the app / pull down and refresh the list of hardware door opening methods in the app.

What is the difference between hardware id and member id?

Hardware id: it is the specific hardware door opening method id, for example, fingerprint

  • password

  • card

  • This id number is assigned and stored by the lock itself, and the hardware id will be reported to the app for synchronization when synchronizing commands.

    Member id: corresponds to a specific member, if the member is created on the app, this member id number is assigned and managed by the app, when synchronization command is reported, if the door opening method created locally does not have this member id number, the member id is reported as 0xFD, and the cloud unifies the locally added door opening method to be hung under the distribution account.

When synchronizing the command synchronization, do I need to synchronize the previously added door opening methods on the app and report them again? Or do I only need to synchronize the door opening methods created locally?

All door openers under the same hardware type need to be reported, including those added in the app and those created locally.

When synchronizing commands, do I report all door openers such as fingerprint, password, card, etc. or only those of a certain hardware type?

Only one hardware type of door opening method is reported, and the exact one is determined by the hardware type enumeration value in the synchronization command sent.

Do I need to report multiple frames if there are multiple door openers reported in the sync command?

It depends on the situation, if the total length of the final data is more than 200 bytes after multiple door openers are framed, then it needs to be sent in multiple frames, if it is not more than 200 bytes, then it does not need to be split into multiple packets for reporting.

How to fill in the packet number and a total number of packets when reporting?

Packet serial number: start from 0, for example: for the first frame, the packet serial number is 00, for the second frame, the packet serial number is 01

A total number of packets: indicates the total number of packets reported above, if one frame of data is reported, the total number of packets is 1, if two frames of data are reported, the total number of packets is 2.

Do you have an example and explanation of reporting?

36 00 0A 00 (in sync) 00 (packet serial number) 0B (hardware id) 01 (hardware type - password) FD (locally created door opener - user id) 01 (not frozen) 0C (hardware id) 01 (hardware type - password) FD (locally created door opener - user id) 01 (not frozen)
36 00 02 01 (end of synchronization) 01 (total number of packets)
Explanation: Synchronize two locally created door openers of password type, with hardware ids 0x0B and 0x0C, respectively

If there is no local door opener, how to fill in the synchronization instruction?

APP can only resolve the synchronization of at least 1 door opening method and does not support deleting all of them.

Member management

Why do some of the shared electronic keys have a specific door opening methods and some don’t?

According to the DP, if you choose the DP of local clock RTC, the default local time management can be done, then there is a specific door opening method under the shared account (such as fingerprint card, etc.), if you don’t choose the DP of RTC, the default only one door opening method is Bluetooth unlocking.

How to share the device with Bluetooth door lock?

Two methods.

  1. Share directly inside the member management to complete the timeliness setting.
  2. Pencil in the top right corner for sharing, and then go back inside this panel after sharing to set the statute of limitations for that shared member.

Exit network-related

How do I understand the concept of [Offline Removal] in Bluetooth Door Lock?

Offline removal is also known as abnormal unbinding.
It refers to the unbinding/restore factory settings operation performed by Tuya Smart App on the panel without connecting the Bluetooth device and the operation is successful when the device side is still in the binding state. Thereafter, the device makes a Bluetooth broadcast (bound state), if any of the Tuya Smart APP scans the device and finds that its broadcast is bound to state but it has been unbundled in the cloud, it will take the initiative to connect to it and send an abnormal unbundling command after successful connection (there is no change in the APP interface for this process), at which time the Bluetooth device can receive an abnormal unbundling event and perform an abnormal unbundling operation.
Abnormal unbinding event: TUYA_BLE_CB_EVT_ANOMALY_UNBOUND.

Does Bluetooth lock support offline removal?

Yes, the lock can be removed remotely even if the phone is disconnected from the Bluetooth lock, but note that the lock does not know it is reset and removed at this time, the new app needs to open the search network and check the binding status to the cloud via Bluetooth broadcast packet information, if the cloud returns unbound, the lock will be automatically reset at this time, refer to the offline removal link diagram for details.

Restore factory settings related

What is the difference between removing and restoring factory settings of Bluetooth door locks?

  • Remove from APP side: The cloud will keep the virtual id and lock-related parameters of the device, and the panel will pull the information kept in the cloud before the removal after binding again, now called “unbinding”.
  • Restore factory settings on APP side: The cloud will clear the virtual id and lock-related parameters of the device, and the device that has been restored to factory settings is equivalent to a brand new device without any record on the cloud, now called “unbind and clear data”.
  • Abnormal unbinding: equivalent to “APP side removal”.
  • Rebundling (the concept of the module): equivalent to “APP side removal”.

What is the difference between remove and reset of Bluetooth door lock?

Removal and reset both require the door lock to clear all local parameters, removal will not change the device ID information, reset will change the device ID information

Freeze and unfreeze related

How do I understand the concept of “freeze and unfreeze” in Bluetooth door lock?

  • Freeze and unfreeze are for other members (including shared users).
  • Both the family owner and administrator can freeze/unfreeze other members.
  • To maintain consistency with local, freeze/unfreeze commands can only be operated on the panel when the device is connected.
  • Once frozen, all door opening methods under that member will be frozen unless unfrozen.
  • Once frozen, the member also has no permission to add, delete, change, etc. operations on the door opening methods unless unfrozen.
  • Once frozen, the only action available to the homeowner and administrator is to “unfreeze” it.

Manual/automatic locking related

How do I understand the concept of “manual/automatic lockout” in Bluetooth door lock?

1 Manual locking

  • Preconditions
    • ((Select DP33, DP36, DP46 and DP47) && (Auto Unlock Off))|| (Select DP46, DP47 only)
  • Operation flow
    • Long press to unlock, DP47 reports unlocking, the interface jumps to unlock status (with long press to lock button).
    • Long press to lock, DP47 reports off-lock, the interface jumps to off-lock status.

2 Auto lockdown

  • Prerequisite
    • (Select DP33, DP36, DP46, and DP47) && (Auto Lockout On)
  • Operation flow
    • Long press to unlock, DP47 reports to unlock, interface jumps to unlock state (with long press to lock button).
    • Local delay ends, DP47 reports off the lock, and the interface jump to off lock status.

3 No drop lock function

  • Prerequisite conditions
    • The prerequisites of manual lock-down and automatic lock-down are not met (generally, DP33, DP36, DP46, and DP47 are not selected).
  • Operation flow
    • Click to unlock, the interface does not jump.

4 DP point enumeration

  • DP33–Automatic lock-down switch
  • DP36–Timed lock-down
  • DP46–Manual lockout
  • DP47 - Lock open/close status

Low power consumption related

What are the factors affecting low power consumption in Bluetooth lock applications?

  1. Broadcast interval, please refer to the question below for more details.
  2. Connection interval, please refer to the question below for details.
  3. Bluetooth data communication: including mating, reconnection, and business data communication.
  4. basic power consumption of the chip: high power consumption in wake-up state and very low power consumption in a hibernation state, depending on the specific platform.
  5. other peripherals: turn off as much as possible in the hibernation state, pay attention to the hardware design without accidental leakage current, other needs to be adjusted independently by customers, not in the scope of this issue.

How should the Bluetooth broadcast interval be set?

Please search “APP_PORT_ADV_INTERVAL” macro globally in the code, the default broadcast interval is 152.5ms, please set the value reasonably according to the end customer experience and power consumption requirements (unit: ms).

Module docking: low-power mode broadcast interval 1s (can be modified by command), non-low-power mode broadcast interval 100ms.

How should the Bluetooth connection interval be set?

Please search “APP_PORT_MIN_CONN_INTERVAL” and “APP_PORT_MAX_CONN_INTERVAL” macros globally in the code, the default connection interval is 180 ~200ms, please set the value reasonably according to the end customer experience and power consumption requirements (unit: ms).

Module docking: default broadcast interval 20~40ms (close to 40ms), no modification is supported.

Why is the power consumption when the phone is connected higher than when the gateway is connected?

There are several cases as follows.

  • Mobile phone and SoC connection: After successful binding, the gatekeeper delays 1s to update the connection parameters to 200ms, and the final connection interval is 200ms.
  • Gateway and SoC connection: After successful binding, the gateway immediately updates the connection parameters to 600ms, the door lock delays 1s to update the connection parameters to 200ms (the gateway will reject), and the final connection parameters are 600ms.
  • Mobile phone and module connection: After successful connection, the module immediately updates the connection parameters to 40ms, and the final connection parameters are 40ms.
  • Gateway and module connection: After a successful connection, the module immediately updates the connection parameters to 40ms, and after successful binding, the gateway immediately updates the connection parameters to 600ms and the final connection parameters to 600ms.

Description.

  • SoC refers to the device to which the SDK is docked.
  • Connection status → Distribution network → Binding status.
  • All other conditions being equal, the larger the connection parameter, the lower the power consumption and the worse the user experience (slow response time). The smaller the connection parameter, the higher the power consumption and the better the user experience (fast response time).

Online offline related

What does the cloud consider to be the Bluetooth gateway drop timeout?

3 minutes offline timeout

Why does it show offline even though I am already connected by the gateway but the person is far away from the door lock?

The door lock is connected by one Bluetooth device at the same time, i.e., either by Bluetooth on A’s phone, Bluetooth on B’s phone or by the gateway.

  • When it is directly connected by cell phone, only the connected party will show online, other family members (or the device being shared) cell phone door lock interface can only be offline
  • When connected by the gateway, all family members (or the device sharer) show online
  • Check if the gateway version is above 1.0.7 and 1.4.0
    If the phone is not connected, please do the troubleshooting based on the above information.

Output test related

What is the process of production test authorization?

Please refer to the [Bluetooth Door Lock General Authorization & Production Testing Guide](https://developer.tuya.com/en/docs/iot/device-development/access-mode-product-solution/product-solution-lock/ product-solution-lock-ble/burningandproductiontestingprocess)

Do customers have to use the Mac address provided by Tuya?

There are two cases (without considering the presence of a gateway).

  • Customer does not use Tuya’s entire production test protocol: You can not use the Mac address provided by Tuya.
  • Customers who use Tuya’s full production test protocol: The Mac address provided by Tuya must be used.
    It is recommended to use the Mac address provided by Tuya to avoid other issues not considered (only the embedded side is considered above)

Do customers have to use Turow’s licensing tools?

If customers have the ability to develop the upper computer, they can also develop their own upper computer for production testing, and Tulip also provides the [SDK] for production testing upper computer development (https://developer.tuya.com/en/docs/iot/smart-production/production-test-solution/) production-testing-service-scope/production-test-sdk/bluetooth-devices-sdk).

Why “Failed to enter test mode” during production licensing?

Please click “Run” in the testbench before powering on the chip, make sure the firmware can receive the production test command within 500ms of power on, and then enter the test mode.

Why does the “Authorization Test” item of the host tool show “No operation privilege” when I perform production authorization?

You need to click “Activation Code Confirmation” in the “Factory Work Order” section on the left side of the host tool to ensure that the factory to which the activation code belongs is the same as the PMS account that you have logged in.

What should I do if I forget the password of my PMS account?

  1. First, search the email sent by the system to find the password.
  2. If you can’t find the email, you need to send the PMS to Tuya, and Tuya’s development backend will change the new password.

What is the naming rule of the firmware key for Bluetooth chip docking?

Naming rule reference: BM_A1_SDK_NORDIC (identification name)_QIO (communication method)_1.0.0 (version number)

Order confirmation related

When purchasing, as a solution provider, I have multiple customers (multiple PIDs), can I place a unified order?

Yes. Tuya offers a generic procurement method that is not associated with PIDs at the time of procurement, you can provide PIDs and associate them when you actually use them, please contact the project manager (project manager contact Little Prince) for details.

Will the modification of standard DP on the product side affect the existing products?

No, products already created in the IoT platform have all the platform-related attribute values determined and will not change with the change of the standard DP. But pay special attention to the following two points.

  • The product manager/project manager should ensure compatibility on the panel side, and the compatibility on the panel side is not influenced by the platform.
  • Try to avoid re-creating the product, re-creating the product will use the latest standard DP and will lead to the problem of bad traceability of PID-related information of test results.

Why can’t the IoT platform extract the activation code (not displayed)?

IoT platform hardware development docking method should be changed to “MCU docking” instead of “SDK docking”, currently the SDK method can not extract the activation code

Why I can’t see the PID in the purchase order of B after I associate the PID under A account to B account?

Only if the PID is in mass production status, it can be seen.