Skip to content

Lock disconnects by itself after inactivity #2

@francisd84

Description

@francisd84

I tried your sample code on my ESP32 and a Yale lock with a Smart module (BLE + Wifi). Wifi isn't enable.

The lock disconnects after couple of seconds after the lock/unlock command.
Using the "getLastError()" property on the BLE object of the connection returns 0, so it seems that the lock disconnects since there is no more activity.

Starting Arduino BLE Client application...
August: "Init Bluetooth"
August: "Starting AugustLock BLE Library"
August: "Start Bluetooth scan"
After connection
End Setup
August: "Advertised Device found: Name: Seos, Address: da:63:19:22:bd:29, manufacturer data: 4c0002150000999900001000800000177a000002aaaabbbbce"
August: "Advertised Device found: Name: , Address: 24:1f:69:be:fc:0e, manufacturer data: 060001092022adf33e05f72a7d10d7338d7d24880c8c15122fd65c4187"
August: "Advertised Device found: Name: 904A3087, Address: 89:26:90:4a:30:87, serviceUUID: 0x9900, txPower: -2"
August: "Advertised Device found: Name: M5002WU, Address: 78:9c:85:3f:47:0e, manufacturer data: d10100, serviceUUID: 0xfe24"
August: "Found Our Service"
August: "Scan Ended"
August: "New client created"
August: "Connected ..."
August: "Connected to client: 78:9c:85:3f:47:0e"
August: "Lock command channel notification listener success"
August: "Got Secure Channel"
August: "Can Indicate"
August: "Handshake channel setup complete"
August: "Got Write Channel"
August: "Session Key: 0x8A870CBFAE2D61817DDC5F7A92ACDE4D"
August: "Handshake: 0x010000008A870CBFAE2D6181C74A92BF0F01"
August: "Encrypted: 0x0471AB4DCDE66FBB5B9A9557EA02DD090F01"
August: "Write no response"
August: "Wrote new value to: bd4ac613-0b45-11e3-8ffd-0800200c9a66"
August: "Setup complete"
August: "Notification listener setup, awaiting instruction"
August: "Decrypt: 0x02000000EED70B416FB57A48A17279760F01"
August: "handshake pt1 complete"
August: "SEC_INITIALIZATION_COMMAND: 0x030000007DDC5F7A92ACDE4DEE76C1370F01"
August: "Encrypted: 0xF370335CBE336C9560F3A4898881F5700F01"
August: "Write no response SEC_INITIALIZATION_COMMAND"
August: "Wrote new value to: bd4ac613-0b45-11e3-8ffd-0800200c9a66"
August: "Decrypt: 0x040000007DDC5F7A92ACDE4DED76C1370F01"
August: "handshake pt2 complete"
August: "Lock initialised"
August: "status: 0xEE02000C0200000000000000000000000200"
August: "status(Encrypt): 0xA5754BA6FD0219ED40571B2EA88413690200"
August: "Wrote new value to: bd4ac611-0b45-11e3-8ffd-0800200c9a66"
August: "Secure Lock: 0x649D90CE0A5F1F8B5D52A9254BFE8BF50200"
August: "Decrypt: 0xBB02003C0200000003000000000000000200"
Status Callback: Unlocked
August: "Already connected"
August: "Notification listener setup, awaiting instruction"
August: "78:9c:85:3f:47:0e: Disconnected"
August: "Already connected"
August: "Notification listener setup, awaiting instruction"
August: "Already connected"
August: "Notification listener setup, awaiting instruction"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions