Open Platform
Skip to content

Description of Feature Value ​

featureValue is a hexadecimal string in upper case, representing the features the lock have.

If you are building an APP base on our APP SDK, you can use the functions in APP SDK to judge if the lock have a specific feature.

If you have to do it in you server or web applications, refer to following details.

1、Rules ​

Convert the hexadecimal string into binary, each bit represents one feature, if the bit is set then the lock have the specific feature.

For example a lock have a featureValue of:

C2F44354CF1F3

Convert it to binary:

1100 00101111 01000100 00110101 01001100 11110001 11110011

Finally switch the endian :

11001111 10001111 00110010 10101100 00100010 11110100 0011

2、The features represented by each bit ​

bitfeature
0Passcode
1Card
2Fingerprint
3Wrist strap
4Support configuration of auto lock time
5Support clear passcode
6Firmware upgrade
7Management of passcodes
8Support lock command
9Hide or display the passcodes, you can control it.
10Support unlocking via gateway
11Support freeze and unfreeze lock
12Support cyclic passcodes
13Support door sensor
14Support configuration of unlocking via gateway, turn on or turn off it.
15Voice prompts management, turn on or turn off it.
16NB-IoT
17This bit is discarded.
18Support query of super passcode
19Support hotel card
20The lock does not have clock chip
21When the lock's Bluetooth is not broadcasting, you cannot unlock via APP.
22Passage mode
23When you have set auto lock of passage mode, turn off auto lock is supported
24Wireless keypad
25Support time config of of the light.
26Support backlist of hotel card
27Support ID card
28Tamper Alert can be turn on and turn off.
29Reset Button can be turn on and turn off.
30Privacy Lock can be turn on and turn off.
31This bit is not used
32Support deadlock
33Support exception of passage mode
34Support cyclic card and fingerprint
35Privacy lock can be control by APP
36Support setting of open direction
37Support Finger vein
38Telink bluetooth chip
39NB-IoT activate mode can be configed
40Support recovery of cyclic passcode
41Support wireless keyfob (remote control)
42Support query of accessory battery level
43Configuration of sound volume and language is supported
44Support QR code
45Support unknown status of door sensor
46Auto unlock in passage mode
47Support adding fingerprint via gateway
48Support Miaxis fingerprint data
49Support Syno fingerprint data
50Support wireless door sensor
51Support alert when door is not locked
53Support 3D face
55Support CPU card
56Support WiFi
58WiFi lock which support fixed IP address
60Support incomplete keyboard passcode
63Support dual certification
67Support Xmsilicon visual intercom
69Support Zhiantec face module
70Support plam vien
74Support single QR code
75Support Xiaocao visual intercom
77Support third-party Bluetooth device access
83Support WiFi power saving time range configuration
84Support multi-function wireless keyboard
93Supports unauthorized alarm function
98Support set working hours
108Supports custom QR codes
110Support Yisheng face module
OtherOther bits is not used at the moment

3、Code example ​

We only provide code example in Java and javascript, it will be appreciated if you can provide code in other languages, thanks in advance.

For example, a lock's featureValue is: C2F44354CF1F3, following codes judge if the lock have fingerprint feature.

3.1、JAVA ​
java
import java.math.BigInteger;
public class HelloWorld {
    
    public static void main(String []args) {
        
        //Replace the corresponding lock feature value
        BigInteger bigInteger = new BigInteger("C2F44354CF1F3", 16);
        //input the number of bits to be detected
        System.out.println(bigInteger.testBit(53));
        
    }
}
3.2、Javascript ​
javascript
  /**
* Equivalent to Java BigInteger.testBit(bitIndex)
* @param {string} hexStr: Hexadecimal string
* @param {number} bitIndex: Bit index (starting from 0)
* @returns {boolean}: Whether the bit is 1
 */
function testBitFromHex(hexStr, bitIndex) {
    const bigNum = BigInt(`0x${hexStr}`);
    const mask = 1n << BigInt(bitIndex);
    return (bigNum & mask) !== 0n;
}


// replace the corresponding lock feature value and input the number of bits to be detected.
const res = testBitFromHex("C2F44354CF1F3", 2);
console.log(res);
CopyRight © 2012-2026 TTLock.All Rights Reserved