NFC a beginners guide

Posted on September 21, 2012


A quick summary
It’s a slow and very short range radio connection between two devices, and only one needs to be powered, the other can be a tag, which are typically stickers.
In mobile the best use of NFC is to trigger actions. The tag is read and action(s) are carried out.

Firstly what does it stand for
Near Field Communications
And it allows devices to send data over a radio, yes it is yet another radio in your smart phone, however the distance over which it works is very short, typically 1 to 4 cms though in theory up to 10 centimetres is possible. Not only is is short range it is also, by today’s standards, slow at c. 106 Kbps though again there is a theoretical max of four times that.

An important aspect of it is that there is no setup required, unlike, say a wireless LAN or Bluetooth, it just works. This is sometimes referred to as low friction, but I would never stoop so low as to mention much a term.

Another really important aspect is that one of the devices can be “passive” that means that it does not need it’s own power source, all the power it needs is taken from the radio signal being used to read it. This is a key thing. So remember it, alright ! When a device is not powered it is likely to be a tag, and tags are really simple, and can be printed on a sticker, or built into almost anything that can let a radio signal through.

Here is an NFC tag  you can see the aerial,  and the little black dot in the miffle (ish) is the chip.

Some Uses for NFC

In short nfc joins the real with the virtual, you can touch a device and a virtual / web action, and this is the source of the vast majority of uses, however I suspect this will change over time. For example having a sticker with your vCard details contained in it, put it on your card holder, and you can transfer the data immediately.
Now you might be thinking about a QR code, which can also hold this data, however the user has to start up the camera or QR app, focus on the code and then the data is extracted.
So QR codes are great for online uses, eg in a email sig, or web page, but in the real the NFC tag is so much faster, can hold more data, and can be written to is needed, more on that in a mo.
Remember too, that the sticker with your contact details needs no power, so will always work.
Some other simple uses might be to share apps and pictures and the like, start the app, eg watching a video or looking at a picture, then touch the phones et voila the video or picture or what ever is then transferred. This could be an app too.
So you could be watching a movie on your phone, touch it to your tv or tablet and it resumes on the new device. All without any set up.
Of course advertisers and others can use it to embed in posters or signs that let you load up a web page or a video etc.
In shops you could just tag a picture of a thing and have it added to your basket. See my previous post on the supermarket that is on the wall of an underground train station, you shop, they drop, and you do this at a mural!

I have recorded a little video of my Samsung reading a tag and loading the bbc web page.  this used the NFC ReTag app.

I have an Android phone and so I’ll talk about that,
The android has APIs f or
Tag read; Tag write; peer to peer; and some others.
There are many types of NFC tag out there, the NFC forum has defined 4 types, and there are some proprietary ones too. The NFC forum types are the most likely to be readable by a phone.

The NFC data is held, typically, in NDEF which stands for, yep you guessed it, NFC Data Exchange Format and is designed to work across the different types of tags. This loose coupling is important as it allows for innovation and change in the tag technology.
For those that want to know NDEF has a series of records each of which contains a Type, an ID, and a payload, which is the actual data to you and me. The types could be URL or vCard etc.
The capacity of tags goes from a few bytes, through to 4k bytes, so they are not a place to store actual data, but rather pointers to it, so this plays well with cloud storage, web sites etc.
If you want to get a better faster connection then the use of NFC with Bluetooth makes a lot of sense, as you can use the low friction setup and then have the high speed and longer range connection of Bluetooth.

The type has two levels the TNF Type and a sub type. These are used to decide to which app the record is sent to. This is how different tags can do differ things, like launch the browser, or the contacts app etc. for the programmers you can put a mime type in here toe sure that your tags come back to your app.
Amusingly, at least for me, the records that list the dispatch information are called “intent-filters”.

However by default the NFC subsystem is off when the screen off. This stops ability for someone reading your phone while it is in your bag/ pocket, even if they could get that close.

It is recommended that when a tag is read that the app that handles it comes forward so that the user can see what is happening, and gets an instant gratification.
This is also good for privacy as the action can be seen.

Not all tags have NDEF however, and so uses such as transit tickets, credit cards, passports and access passes, are unlikely to have an NDEF record structure. So for some tags you may need to format them before you can use them in an app. Just don’t format your credit card or your access pass.

Android has had a lot of the protocols added so that it works with the majority of the tags out there , however there is little or no direct support for card emulation, as google is worried about this. Their official explanation is that the phone can only emulate one type of tag at a time, and so it is not a good user experience. I think the truth is that they are worried they will provide the to old for people to game the credit card system! And this is a good thing for them to take it slowly.

Posted in: mobile