davi-nfc-agent

Installation

Pre-built Binaries

Download pre-built binaries from releases.

Building from Source

git clone https://github.com/dotside-studios/davi-nfc-agent.git
cd davi-nfc-agent
go build ./cmd/davi-nfc-agent

Requirements

The agent uses PC/SC for NFC reader communication. PC/SC is built into all major operating systems:

Supported Readers

Any PC/SC-compatible NFC reader works, including:

Troubleshooting

“No NFC devices found”

Reader LED and Buzzer

Flash and Beep on Scan in the tray menu makes the reader signal each operation: one green flash with a short beep when a tag is read or written, two red flashes when a write or a lock fails. It is off by default, and turning it on lasts as long as the agent runs.

The commands come from the ACS ACR122U instruction set, so ACR122 readers answer them; other readers report the feature as unsupported and are skipped. They are sent over SCardControl, and two stacks refuse to carry those commands until told to:

Neither is required while a tag is on the reader: the agent falls back to sending the same command over the card connection, and logs once when it does. A reader that answers on neither channel is left alone for the rest of the session.

Permission Denied (Linux)

Add your user to the pcscd group or add udev rules:

# Create udev rule for common NFC readers
sudo tee /etc/udev/rules.d/99-nfc.rules << 'EOF'
SUBSYSTEM=="usb", ATTR{idVendor}=="072f", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e6", MODE="0666"
EOF

sudo udevadm control --reload-rules
sudo udevadm trigger