Lock simulator
The lock simulator is a software model of a door lock actuator included in the reference applications for development and testing. It receives unlock and lock requests from the Access Manager callbacks and mimics real lock behavior: a configurable bolt travel delay, optional timed auto-relock, and LED feedback for secured and unsecured states. On a production device, replace the simulator with a driver for your motor, solenoid, or other lock hardware.
Kconfig options
Configure the simulator through Kconfig options in prj.conf as listed below.
Kconfig option |
Description |
|---|---|
|
Bolt travel time in milliseconds (default |
|
Enables automatic relock after unlock (default enabled). When enabled, the Access Manager does not trigger lock on UWB exit; the simulator relocks on its timer instead. |
|
Duration the lock stays unlocked before auto-relock, in milliseconds (default |
|
Enables visual lock-state feedback on a development kit LED (default enabled). |
Indicator hardware
When the indicator is enabled, set the lock-sim-indicator devicetree alias to the GPIO or LED used for feedback:
/{
aliases {
lock-sim-indicator = &led2; // green LED2
};
};
The LED turns on when the lock is unsecured and off when secured. It remains on for the simulated movement time plus the auto-relock duration.
Option definitions and defaults are in subsys/aliro/lock_sim/Kconfig.