NFC Tag Builder for Nokia N9

About

Tag Builder application lets you create NFC tag contents and write them on tags, as well as harvest and edit existing tags' contents.

Download application and source code

Tag Builder is an open source application. The source code can be found at github, and you can also download the latest build as a debian package from there.

Creating tag contents

The main page shows a list of tag content you have, and it is initially empty.

Start by pressing the '+' icon on the bottom left corner of the tag content list, and select what kind of tag you want to create. The following types are available:

Empty tag contents list

Tag contents list with entries

Tag type selection

Each tag type has its own edit page for filling in the details by hand, or picking the information from other applications on the phone. For instance, you can type in the Bluetooth details by hand, or select a known device's information. Check the menu of each page for available options.

Once you finish editing and store the tag contents, an entry will appear on the tag content list.

Creating Bluetooth tag contents

Bluetooth tags can be used to connect to and share content with Bluetooth devices which do not have built-in NFC functionality. As an example, you could create a tag for a Bluetooth-enabled digital picture frame, and push your photos to the frame by tapping the tag.

The tag name is for identifying the tag contents in the list, and you can enter whatever you want in the field.

Bluetooth tags contain the device's Bluetooth address, class of device, and optionally a human-readable name. You can either enter all the details manually, or use one of the menu options to fill in the details automatically. The following options are available:

Bluetooth device address must consist of six hexadecimal bytes separated by colons; device class must be three hexadecimal bytes. I recommend you use automatic detail filling whenever possible.

Bluetooth edit screen

Bluetooth edit menu

Creating Bookmark tag contents

Bookmark tags can contain web page links, email addresses, telephone numbers, or Foursquare venue links, as well as any other kind of URL data. For example, you could write the address of your blog on a tag and attach the tag to an advertisment for the blog.

The tag name is for identifying the tag contents in the list, and you can enter whatever you want in the field.

Bookmark tags contain an URL, and optionally one or many titles (easily readable descriptions of the content the URL points to), and an optional recommended action. You can either enter all the details manually, or use one of the menu options to fill in the details automatically. The following options are available:

Note that every title has an associated language which you can select, but each language must appear only once. This is an NFC specification restriction.

Bookmark edit screen

Bookmark edit menu

Creating Foursquare bookmark tag contents

Creating Foursquare bookmark tags is slightly more complicated than creating other bookmarks, so a detailed explanation follows below.

Note that the Foursquare functionality is currently experimental and may be improved in the future.

Foursquare authentication,
client identification

Foursquare authentication,
login page

Foursquare search screen

Foursquare search results

Foursquare bookmark completed

Creating Calendar tag contents

Calendar tags contain calendar entries or to-do items. You can, for instance, attach a tag with calendar details to a physical invitation card.

The tag name is for identifying the tag contents in the list, and you can enter whatever you want in the field.

For calendar entries you don't have any editable fields as such. Instead, you can pick an event or a to-do item from the calendar and choose which details to include. The selected details will be visible, but cannot be edited or removed after selection. If you want to redo the tag contents, select the option again from the screen menu.

Calendar edit screen

Calendar detail selection

Calendar edit screen with details

Creating Contact tag contents

Contact tags contain contact information, which can be added to the addressbook when the tag is read. For instance, you could attach a tag with your contact information on your business cards.

The tag name is for identifying the tag contents in the list, and you can enter whatever you want in the field.

For contact entries you don't have any editable fields as such. Instead, you can pick a contact from the addressbook and choose which details to include. The selected details will be visible, but cannot be edited or removed after selection. If you want to redo the tag contents, select the option again from the screen menu.

Contact edit screen

Contact detail selection

Contact edit screen with details

Creating Text tag contents

Text tags contain free form text and an associated language. You can use them e.g. for small human-readable notes attached to objects.

The tag name is for identifying the tag contents in the list, and you can enter whatever you want in the field.

Text contents are simply added to the imput field, and the desired language chosen from the list supplied.

Text edit screen

Writing tag contents on NFC tags

Tap on an entry on the list; you will be presented with a writing screen and can then write the selected tag contents by touching an NFC tag. You can continue writing as long as you like; press "Done" to return to the main screen.

Note that you need to have large enough NFC tags to hold the content you're writing. Also note that writing can take a little while, so do not lift your phone off the tag until the writing progress indicator disappears.

Write screen

Re-editing and removing tag contents

Long tap on an entry on the tag content list to bring up the entry menu, which contains options to edit or remove the entry.

Entry menu

Harvesting existing tag contents

When in the main screen, simply tap NFC tags to harvest their contents into the application. You will be presented with the appropriate editing screen where you can make modifications to the contents before storing. Note, however, that tags may contain some information which is currently not editable by Tag Builder; any such content is dropped during harvesting, so that you're not unknowingly writing data you don't want to. Examples of such data would be Bluetooth profile UUID lists and unsupported contact and calendar details.

Unsupported tags (with contents altogether different from the types handled by Tag Builder) can be harvested and written as-is to other NFC tags, but cannot be edited. For instance, any vendor-specific tags are unsupported.

Please contact me if you want some particular tag data to be supported in future versions of Tag Builder.

Unsupported tag display

Common Questions and Issues

Q: I can't write anything! The application says the writes fail all the time!

A: Check that the content you're writing can actually fit on the tag. Mifare Ultralight tags have only 48 bytes of writable memory, and due to formatting overhead only 46 bytes is actually available for NDEF records. Jewel/Topaz tags can hold roughly double that amount, while Mifare 1k tags can hold about 750 bytes.

You can check the size of your content on the "Stored tags" content list, under the content name.

If the contents you're trying to write exceed the tag capacity, and you don't have any larger tags available, consider the following space saving hints:

Q: That didn't help! I still can't write anything!

A: Check that you're holding the phone on the tag for long enough. A progress bar is displayed while the writing is ongoing, and it is safe to lift the phone off the tag only when the progress bar disappears.

Alternatively, the tags you are using may be write protected, unsupported by the phone, or actually broken. Unfortunately, the application is not given a specific error code as to why the write fails and thus cannot inform you of the exact reason.

Q: Can other devices than N9 read the tags I've written?

A: Yes, as the data written onto the tag conforms to NFC forum specifications.

Q: Where can I get NFC tags?

A: There are numerous mail order companies that can deliver small quantities of tags. I have ordered from two Finnish companies, Top Tunniste, http://toptunniste.fi/, and TagAge, http://www.tagage.net/ (I am not associated with either except as a customer). Besides those two, there are others, e.g., in the United States.

Before buying, study the characteristics of the tags (physical size, memory size, whether they can be mounted on metal, etc.) and see which tags best conform to your needs.

Q: Why do I have to authenticate to Foursquare when creating a Foursquare bookmark?

A: Foursquare venue search requires either user authentication or client application (userless) authentication. The latter unfortunately requires the use of a client secret. As Tag Builder is an open source application, it is impossible to embed a client secret into the code and keep it a secret. Thus, you have to have an account and do the user authentication instead.

Further Information

NFC Forum public specifications provide a comprehensive, although a very technical, view of different NFC Forum tag types:
http://www.nfc-forum.org/specs/spec_list/

Nokia has a number of NFC developer documents at:
http://www.developer.nokia.com/Community/Wiki/Category:Near_Field_Communication_(NFC)

Copyright (C) 2012 Hannu Mallat < hmallat at gmail dot com >
Last updated 28 June 2012