Compare commits
2 Commits
feature/im
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c416eb8cef | |||
| 99bba1b59a |
@ -43,7 +43,7 @@ class NfcReaderService:
|
||||
|
||||
if uid_hex == self._last_uid:
|
||||
connection.disconnect()
|
||||
time.sleep(1)
|
||||
time.sleep(0.5)
|
||||
self._last_uid = None
|
||||
continue
|
||||
|
||||
@ -57,7 +57,7 @@ class NfcReaderService:
|
||||
self._last_write = now
|
||||
|
||||
except (CardConnectionException, NoCardException):
|
||||
time.sleep(0.5)
|
||||
pass
|
||||
|
||||
finally:
|
||||
try:
|
||||
|
||||
10
README.md
10
README.md
@ -4,6 +4,14 @@ 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
|
||||
@ -17,6 +25,6 @@ Currently supported NFC Device: ACR 1252U
|
||||
## 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.
|
||||
`NfcReaderService` may be used as part of a systemd unit, to automate the startup process. See service file for additional info.
|
||||
|
||||
Run `card_writer` when preparing tickets.
|
||||
@ -1,10 +1,15 @@
|
||||
# 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=network.target
|
||||
After=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=ezgg
|
||||
WorkingDirectory=/opt/nfc
|
||||
|
||||
ExecStart=/opt/nfc/venv/bin/python /opt/nfc/NfcReaderService.py
|
||||
@ -14,5 +19,8 @@ RestartSec=2
|
||||
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
|
||||
Environment=DISPLAY=:0
|
||||
Environment=XAUTHORITY=%h/.Xauthority
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=default.target
|
||||
|
||||
Loading…
Reference in New Issue
Block a user