Get an operating system (Arch) running
- Prepare an SD-Card by following the instructions on archlinuxarm.org
- Enable SPI by putting
device_tree_param=spi=onin /boot/config.txt
Install prerequisites
- Install git:
pacman -S git - Install development tools (for AUR):
pacman -S --needed base-devel - Install sudo and add the standard user (alarm) to the group sudo
pacman -S sudo
groupadd sudo
usermod -a -G sudo alarm
Get NFC related software
The required library libnfc is in the AUR, it needs some prerequisites:
pacman -S cmake libusb-compat pcsclite
Get the build files (as normal user)
mkdir build-repos
cd build-repos
git clone https://aur.archlinux.org/libnfc.git
cd libnfc
Add the architecture to the PKGBUILD by adding armv6h to the arch variable.
arch=('i686' 'x86_64' 'armv6h')
Build and install the package
makepkg -sri
Configure libnfc
As root, create the folder /etc/nfc and put the following in libnfc.conf (source)
allow_autoscan = true
allow_intrusive_scan = false
log_level = 1
device.name = "Itead_PN532_SPI"
device.connstring = "pn532_spi:/dev/spidev0.0:500000"
Test
Connect the reader (with the Raspberry Pi powered off).
As root, check whether the reader is found
nfc-list
Test the reader
nfc-poll