A robust, pure Rust implementation of the ZK attendance device protocol (TCP/UDP).
- Protocol Support: Full TCP and UDP implementation.
- Biometric Data: Retrieve users, fingerprints, and face templates.
- Timezone Aware: Automatic device timezone synchronization and ISO-8601 timestamps (e.g.,
2023-10-27T10:00:00+07:00). - Robustness: Handles fragmented packets, connection retries, and protocol quirks.
- Cross-Platform: Runs on Linux, macOS, and Windows with zero C dependencies.
Add rustzk to your Cargo.toml:
[dependencies]
rustzk = "0.3.1"... (keep existing quick start)
The following examples are available in the examples/ directory:
check_device_info.rs: Basic device info, MAC, SN, and Capacity.check_time.rs: Check device time and drift.check_timezone.rs: New! Scan for timezone configuration (TZAdj, StandardTime).get_attendance.rs: Fetch historical attendance logs.live_events.rs: Monitor real-time clock-in events.user_management.rs: Add, delete, and list users.fingerprint_management.rs: Manage biometric templates.
Run any example using cargo:
cargo run --example check_timezone -- 192.168.1.201Detailed documentation is available in the documents/ directory:
- Overview - Goals and architecture.
- Domain Model - Users, attendance, and fingerprints.
- Source Code - Project structure.
Contributions are welcome! Please check Standards for coding guidelines.
MIT License. See LICENSE for details.
This project is inspired by the pyzk library.