Using libnfc with the PN532 (Linux)

Posted by:  |  Saturday, February 19, 2011

Go Back

While there is no dedicated project page (yet) for the new NFC PN532 Breakout Board, if you want to test it out using the open-source libnfc library in Linux, the following steps will help you to get started with the included libnfc examples.  This tutorial was tested using Ubuntu 10.10 Desktop.

Step 1: Download the latest version of libnfc (ex. "libnfc-1.4.1.tar.gz") and extract the contents

$ wget http://libnfc.googlecode.com/files/libnfc-x.x.x.tar.gz
$ tar -xvzf libnfc-x.x.x.tar.gz
$ cd libnfc-x.x.x

Step 2: Configure libnfc for PN532 and UART*

$ ./configure --with-drivers=pn532_uart --enable-serial-autoprobe

*Note: libnfc can also be built in debug mode by adding '--enable-serial-autoprobe' (minus the single quotes) to the configure options

libnfc ./configure results

Step 3: Build and install libnfc

$ make clean
$ make
$ make install

Step 4: Check for installed devices

$ cd examples
$ ./nfc-list

Step 5: Try to read a 13.56MHz card (mifare, etc.)

$ ./nfc-poll

nfc-poll results

  • Facebook
  • DZone It!
  • Digg It!
  • StumbleUpon
  • Technorati
  • Del.icio.us
  • NewsVine
  • Reddit
  • Blinklist
  • Furl it!