TKMBleLock

@objc
public class TKMBleLock : NSObject

A nearby Tapkey lock discovered via Bluetooth. Do not instantiate but use TKMBleLockScanner to get nearby Tapkey locks.

  • The lock ID. Use isLockIdComplete to determine if the lock ID is complete or truncated.

    The lock ID has the following format: LLX

    • LL: The length of the actual ID (X), encoded in 2 bytes, little endian.
    • X: The actual ID.

    The following, exemplary lock ID has two bytes of length header and four bytes of ID payload:

    04001234BFFB

    In case the ID is not complete, it is truncated from the start.

    Given the exemplary six-byte ID above, if the BLE advertising can only fit five bytes of ID, this method will return

    001234BFFB

    instead. Note, that it is not possible to determine whether the leading 00 is part of the actual ID or a length header.

    Declaration

    Swift

    @objc
    public let incompleteLockId: Data
  • Returns whether the lock ID is complete or not. The actual lock ID can be retrieved using incompleteLockId. Due to limited BLE advertising packet length, lock IDs that exceed a certain length may arrive truncated. This method can be used to determine if the lock ID is complete or not.

    Declaration

    Swift

    @objc
    public let isLockIdComplete: Bool
  • The lock’s Bluetooth address. The Bluetooth address is a 48-bit identifier represented as a String of 6 bytes in hexadecimal separated by colons. For example, 00:11:22:AA:BB:CC.

    Declaration

    Swift

    @objc
    public let bluetoothAddress: String
  • Time the lock was last seen nearby.

    Declaration

    Swift

    @objc
    public let lastSeen: Date
  • The RSSI of the lock. In dBm. The valid range is [-127, 126].

    Declaration

    Swift

    @objc
    public let rssi: Int32