Arduino NFC

Maker Faire - May 2013

Presented by Don Coleman / @doncoleman

What is NFC?

What can I do with NFC?

  • Mobile Payments
  • Sharing Data between Phones
  • Contact Info on Conference Badge
  • Pair with Bluetooth Device
  • Mass Transit Card
  • Smart Poster
  • Hack Stuff

Devices

Tags

Tags hold a tiny amount of data

Think bytes

not kilobytes, megabytes, or gigabytes

Tag Types

Common properties

  • UID
  • Type
  • Technology
  • Capacity
  • Is Locked
  • Is Lockable

Each tag type

  • Stores data in different binary format
  • Has different security features
  • Has different ways to read and write

NDEF

NFC Data Exchange Format

NDEF Message

NDEF Record

NDEF Record

  • TNF (Type Name Format)
  • Type
  • Payload
  • Record Id

TNF - Type Name Format

Indicates the structure of the value of the type field

TNF Constants

  • Empty
  • Well Known
  • Mime Media
  • External

Type

Identifier describing the type of the Payload

Must follow rules implied by TNF

Payload

Data for the user application

Empty Record

  • TNF = Empty

Text Record

hello, world

  • TNF = Well Known
  • Type = T
  • Payload = 2 + en + hello, world

URI Record

http://arduino.cc

  • TNF = Well Known
  • Type = U
  • Payload = 0x3 + arduino.cc

Mime Media Record

  • TNF = Mime Media
  • Type = application/json
  • Payload = { "message": "hello, world" }

Helper Methods

Quick Review...

NDEF Message

One or more NDEF Records

NDEF Record

Contains a payload of data

Information describing the payload

Adafruit NFC Shield

http://www.adafruit.com/products/789

Adafruit's Library

https://github.com/adafruit/Adafruit_NFCShield_I2C

NDEF Library

for Arduino

https://github.com/don/Ndef

Installing

Setup

Write Tag

Read Tag

DEMO

Memory

you will run out

Peer to Peer

(not yet)

Seeed Studio NFC Shield V2.0

Android Apps for NFC

Read Tags PhoneGap NFC Reader

Format and Unformat Mifare Classic Tags NXP Tag Writer

View Raw Data on Tag NFC Tag Info

Technical Specs

http://www.nfc-forum.org/specs/spec_license

Questions?

Thank You

Don Coleman

@doncoleman

don@chariotsolutions.com

http://don.github.io/slides/

 

 

Creative Commons License
Arduino NFC by Don Coleman is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at https://github.com/don/slides/tree/gh-pages/2013-05-18-arduino-nfc.