Compare commits
3 Commits
main
...
feature/im
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11d4e89b94 | ||
|
|
aee55a4292 | ||
|
|
e15cbcbdd6 |
@ -43,7 +43,7 @@ class NfcReaderService:
|
|||||||
|
|
||||||
if uid_hex == self._last_uid:
|
if uid_hex == self._last_uid:
|
||||||
connection.disconnect()
|
connection.disconnect()
|
||||||
time.sleep(0.5)
|
time.sleep(1)
|
||||||
self._last_uid = None
|
self._last_uid = None
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class NfcReaderService:
|
|||||||
self._last_write = now
|
self._last_write = now
|
||||||
|
|
||||||
except (CardConnectionException, NoCardException):
|
except (CardConnectionException, NoCardException):
|
||||||
pass
|
time.sleep(0.5)
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
|
|||||||
10
README.md
10
README.md
@ -4,14 +4,6 @@ This repository contains the tooling around NFC readers/writers.
|
|||||||
|
|
||||||
Currently supported NFC Device: ACR 1252U
|
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:
|
## Tools:
|
||||||
|
|
||||||
- card_reader
|
- card_reader
|
||||||
@ -25,6 +17,6 @@ The root path of the installation (next to `NfcReaderService.py`) needs to conta
|
|||||||
## Intended usage
|
## Intended usage
|
||||||
|
|
||||||
Start `NfcReaderService` on terminals where LAN team needs to verify guest identity, EZGG LAN manager then reads user ID from clipboard.
|
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.
|
Run `card_writer` when preparing tickets.
|
||||||
@ -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]
|
[Unit]
|
||||||
Description=NFC Reader Service
|
Description=NFC Reader Service
|
||||||
After=graphical-session.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
User=ezgg
|
||||||
WorkingDirectory=/opt/nfc
|
WorkingDirectory=/opt/nfc
|
||||||
|
|
||||||
ExecStart=/opt/nfc/venv/bin/python /opt/nfc/NfcReaderService.py
|
ExecStart=/opt/nfc/venv/bin/python /opt/nfc/NfcReaderService.py
|
||||||
@ -19,8 +14,5 @@ RestartSec=2
|
|||||||
|
|
||||||
Environment=PYTHONUNBUFFERED=1
|
Environment=PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
Environment=DISPLAY=:0
|
|
||||||
Environment=XAUTHORITY=%h/.Xauthority
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user