The easiest way to use libnfc with the Adafruit NFC Breakout is via UART, since it's well-supported by libnfc out of the box. Unfortunately the UART port on the Pi is already dedicated to other purposes, and needs to be freed up for libnfc.
The following steps (based on a clean 2012-07-15-wheezy-raspbian install but should also work with Adafruit's Occidentalis) should free UART up for us:
Step One: Edit /boot/cmdline.txt
From the command prompt enter the following command:
$ sudo nano /boot/cmdline.txt
$ sudo nano /boot/cmdline.txt
And change:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 $
to:
dwc_otg.lpm_enable=0 console=tty1 $
Step Two: Edit /etc/inittab
From the command prompt enter the following command:
$ sudo nano /etc/inittab
$ sudo nano /etc/inittab
And change:
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
to:
#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
(note that new # at the beginning of the second line!)
Step Three: Reboot your Pi
After rebooting the Pi for the above changes to take effect, you can proceed with building and testing libnfc ...
Last updated on 2013-04-20 at 02.51.47 AM