How to get Lock State

To send specific commands to get Lock State you need to establish PTLS session.
After you have successfully established the PTLS session you need to turn on BLE indications on API commands characteristic.
You can get actual Lock state on demand by sending the “GET_STATE” command described here.
The command returns 2 bytes as a response, where first byte indicates the actual state of Lock, and second tells if the last operation was performed successfully.
For example, the following response…
[0x06, 0x00]
… means:
  1. the lock is in “locked” position (0x06)

  2. last operation was successfull and the lock is not jammed (0x00).

Note

The Lock sends “LOCK_STATUS_CHANGE” notification every time its state changes.
So, your system does not need to send GET_STATE command periodically if the notification is supported.