Compare commits

..

3 Commits

Author SHA1 Message Date
David Rodenkirchen
11d4e89b94 blub 2026-04-29 12:26:41 +02:00
David Rodenkirchen
aee55a4292 rollback 2026-04-29 12:24:45 +02:00
David Rodenkirchen
e15cbcbdd6 Improve Performance 2026-04-29 12:14:37 +02:00
3 changed files with 6 additions and 22 deletions

View File

@ -43,7 +43,7 @@ class NfcReaderService:
if uid_hex == self._last_uid:
connection.disconnect()
time.sleep(0.5)
time.sleep(1)
self._last_uid = None
continue
@ -57,7 +57,7 @@ class NfcReaderService:
self._last_write = now
except (CardConnectionException, NoCardException):
pass
time.sleep(0.5)
finally:
try:

View File

@ -4,14 +4,6 @@ This repository contains the tooling around NFC readers/writers.
Currently supported NFC Device: ACR 1252U
## Installation
Make sure you have the apt packages `python3-dev` and `libpcsclite-dev` installed before installing the dependencies from `requirements.txt`.
## Configuration
The root path of the installation (next to `NfcReaderService.py`) needs to contain the `hmac_key.txt`. The correct key can be retrieved from sys admin.
## Tools:
- card_reader
@ -25,6 +17,6 @@ The root path of the installation (next to `NfcReaderService.py`) needs to conta
## Intended usage
Start `NfcReaderService` on terminals where LAN team needs to verify guest identity, EZGG LAN manager then reads user ID from clipboard.
`NfcReaderService` may be used as part of a systemd unit, to automate the startup process. See service file for additional info.
`NfcReaderService` may be used as part of a systemd unit, to automate the startup process.
Run `card_writer` when preparing tickets.

View File

@ -1,15 +1,10 @@
# THIS IS A USER-LEVEL SERVICE
# ~/.config/systemd/user
# systemctl --user daemon-reload
# systemctl --user enable nfc-reader.service
# systemctl --user start nfc-reader.service
[Unit]
Description=NFC Reader Service
After=graphical-session.target
After=network.target
[Service]
Type=simple
User=ezgg
WorkingDirectory=/opt/nfc
ExecStart=/opt/nfc/venv/bin/python /opt/nfc/NfcReaderService.py
@ -19,8 +14,5 @@ RestartSec=2
Environment=PYTHONUNBUFFERED=1
Environment=DISPLAY=:0
Environment=XAUTHORITY=%h/.Xauthority
[Install]
WantedBy=default.target
WantedBy=multi-user.target