Skip to content

Instantly share code, notes, and snippets.

@paulomcnally
Last active December 15, 2023 06:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulomcnally/bff698549d71854c8119fe13488a9250 to your computer and use it in GitHub Desktop.
Save paulomcnally/bff698549d71854c8119fe13488a9250 to your computer and use it in GitHub Desktop.
PN532 on Raspberry Pi With Ubuntu for Raspberry Pi 3
```
$ sudo apt install gcc
$ sudo apt install make
$ sudo apt-get update
$ sudo apt-get install libusb-dev libpcsclite-dev i2c-tools
```
```
cd ~
wget http://dl.bintray.com/nfc-tools/sources/libnfc-1.7.1.tar.bz2
tar -xf libnfc-1.7.1.tar.bz2
```
```
cd libnfc-1.7.1
./configure --prefix=/usr --sysconfdir=/etc
make
sudo make install
```
```
cd /etc
sudo mkdir nfc
sudo nano /etc/nfc/libnfc.conf
```
```
# Allow device auto-detection (default: true)
# Note: if this auto-detection is disabled, user has to set manually a device
# configuration using file or environment variable
allow_autoscan = true
# Allow intrusive auto-detection (default: false)
# Warning: intrusive auto-detection can seriously disturb other devices
# This option is not recommended, user should prefer to add manually his device.
allow_intrusive_scan = false
# Set log level (default: error)
# Valid log levels are (in order of verbosity): 0 (none), 1 (error), 2 (info), 3 (debug)
# Note: if you compiled with --enable-debug option, the default log level is "debug"
log_level = 1
# Manually set default device (no default)
# To set a default device, you must set both name and connstring for your device
# Note: if autoscan is enabled, default device will be the first device available in device list.
device.name = "_PN532_SPI"
device.connstring = "pn532_spi:/dev/spidev0.0:500000"
#device.name = "_PN532_I2c"
#device.connstring = "pn532_i2c:/dev/i2c-1"
```
More info on: http://wiki.sunfounder.cc/index.php?title=PN532_NFC_Module_for_Raspberry_Pi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment