Getting started with Explore NFC on Raspberry Pi in 60 seconds (Also Raspbmc)

The docs from NXP are slightly over verboose, here I make the assumption you already have a Pi installed and know a little about SSH and using the Linux Terminal. It’s worth noting I’m doing some of these steps on Raspbmc too so things may differ slightly from your environment. I will try cover both wheezy and Raspbmc

Put module onto Raspberry Pi by y’know, putting it on the Pi.. Reboot..

SSH into your Pi username pi, password raspberry
ssh pi@your-pi-ip-address

Update your Pi and install some deps
SPI was added late 2013 so it might not be available in your Kernel, doing an update is easy, do..
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install ca-certificates git-core cmake
— Make a cup of tea

cd ~ && sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update && sudo rpi-update
sudo ldconfig

Note: If you get a prompt saying you might not need this firmware or it’s the wrong update then just skip this step.

Enable SPI (not required on Raspbmc)
sudo nano /etc/modprobe.d/raspi-blacklist.conf
— Comment out blacklist spi-bcm2708
— Change it to read (note the hash)
# blacklist spi-bcm2708

Enable Pi on Rasmbmc
sudo boblightd
For posterity further information about this fix is on this thread — Note that sudo boblightd toggles SPI pins so running it twice might not work..

Reboot
sudo shutdown -r now
— Make a cup of tea

Grab the demo polling app from my Git Repo of the NXP S/W
cd ~
git clone https://github.com/JohnMcLear/NXP-Raspberry-Pi-Card-Polling-Demo.git
cd NXP-Raspberry-Pi-Card-Polling-Demo
cmake source
make

— Make a cup of tea

Test
sudo ./card_polling

My end goal here is to use my NFC Ring to start/play/pause videos in xbmc using the Pi shield.. Wish me luck..

Q: I get Failed to open bal.
A: You forgot to run card_polling as sudo.. sudo ./card_polling

2 thoughts on “Getting started with Explore NFC on Raspberry Pi in 60 seconds (Also Raspbmc)

  1. Hello , the NXP EXPLORE-NFC expansion board for Raspberry Pi contains 26 pins and it’s the hole number of the pins in raspberry pi . My problem is that I need to use 2 pins from raspberry as output , so I want to know if some pins of the EXPLORE-NFC expansion board are not used by the raspberry in the case of Card Emulation.
    Thank you

  2. the EXPLORE-NFC board only uses the following pins of the Raspberry Pi:

    For use with the SPI interface (default):

    Pin 1 or Pin 17
    Pin 2 or Pin 4
    Pin 6 or Pin 9 or Pin 14 or Pin 20 or Pin 25
    Pin 19
    Pin 21
    Pin 23
    Pin 24

    For use with the I2C interface:

    Pin 1 or Pin 17
    Pin 2 or Pin 4
    Pin 6 or Pin 9 or Pin 14 or Pin 20 or Pin 25
    Pin 3
    Pin 5

    My Question : How can i write on the Explore NFC over my Raspberry PI ?

Leave a Reply

Your email address will not be published. Required fields are marked *