NFC for Developers
Lots of developers that are aware of NFC always wonder why I founded Flomio. Truth is that building a comprehensive solution using NFC and RFID is really tough. The space is extensive and you can easily get stuck with incompatibilities. This post will attempt to open up this topic.
NFC is a wireless technology much like Bluetooth or Wifi but operates in the “near field” or within one wavelength of the source (@13.56Mhz = ~2in). Given the close proximity it’s very low power and hard to eavesdrop on. This feature frees NFC from any encryption complexity in it’s data exchange and allows it to interact with passive tags (battery-less). The flexibility of this technology has created several specifications and a largely fragmented market. At the high level there’s the NFC Forum specs and at the lower levels there’s the ISO14443/15693 specs. Drawing a parallel to the web, high level would be HTML/CSS and lower level would be TCP/IP. Much like the web, convergence won’t happen overnight. Flomio has selected NXP’s Mifare Ultralights (NFC-Type2 and ISO14443-TypeA) as our primary tags @ MSRP ~$1. This was due to their popularity, diverse form factors (stickers, cards, wristbands, etc), and price.
NFC tags are sometimes referred to as Contactless Integrated Circuit Cards (CICCs) since the idea evolved from Integrated Circuit Cards (ICCs), also known as Chip Cards, SAM cards, or Smartcards. Smartcards have been around for much longer than NFC and you’re likely to have used one (they’re inside all modern cell phones as SIM cards). They are great at storing small yet sensitive data such as account and authentication information. The first devices that could read Smartcards conformed to the PCSC (Personal Computer/Smart Card) spec and were mainly supported by Microsoft. All Windows releases come bundled with these drivers which is why the PCSC-based ACR122U works easily with them (good block diagram on page 10).
As Smartcard readers evolved to include more unique features, a more agnostic model offered by usb.org gained traction. It centered around the Chip Card Interface Device (CCID) and allowed for better compatibility across operating systems. Indeed the pcsc-lite project implements the PCSC interface for MacOSX/Linux over a CCID driver implementation. The implementers of the nfcpy project—a key ingredient to the Flomio client–use the CCID interface and pyUSB+libusb bindings to remain both reader and OS agnostic. This code is not as mature as the PCSC stack so there have been issues using it on Windows.
– Richard and the Flomies
Leave a Reply
Want to join the discussion?Feel free to contribute!