The Master Controller includes several command-line utilities for security management, system testing, and manual overrides.
Security & Hashing
esctl-hash.pl
Used to generate secure hashes for card serial numbers and PINs before they are stored in the LDAP directory.
# Generate a hash for a card serial
./esctl-hash.pl 12345678
Diagnostics & Testing
emulate-node.pl
A utility that simulates the behavior of a physical door controller hardware node (door_232.ino). It connects to the Master Controller over TCP, handles online/offline status heartbeats, renders LED patterns and lock state, and sends card/PIN tokens.
It supports both an interactive terminal GUI (TUI) and a headless No-UI mode for automated CI/CD integration.
Usage Syntax
./emulate-node.pl -h <host> [options]
Command-Line Options
| Option | Description | Default |
|---|---|---|
-h <host> |
Master Controller hostname or IP address (Required) | None |
-p <port> |
TCP port | 12001 |
-n <node> |
Node ID number | 1 |
-d <desc> |
Node description | Emulated Node |
-s <serial> |
Node serial number | 1234 |
-m <mac> |
Node MAC address | 00:11:22:33:44:55 |
-u |
Run in No-UI (headless console) mode | Interactive TUI |
-t <token> |
Pre-loaded token (e.g. PIN:1234 or CARD:12345678) |
None |
-w <secs> |
Delay in seconds before sending pre-loaded token | 0 |
-x <secs> |
Delay in seconds to exit after sending token | None |
Examples
# Interactive TUI mode connecting to local controller
./emulate-node.pl -h 127.0.0.1 -n 1 -d "Front Door"
# Headless No-UI mode for CI automated testing (sends PIN:1234 after 1s, then exits)
./emulate-node.pl -h controller -u -t PIN:1234 -w 1 -x 1
send-cmd.sh
The primary tool for sending manual commands to a running node from the server console.
# Manually unlock door 1 for 5 seconds
./send-cmd.sh 1 "U5"
Support Scripts
functions.pm: The core Perl library containing shared logic for network communication and data parsing.raspi-install-cmds.txt: A reference list of Debian packages required for bare-metal installations.