Nfc Interactor: Full Access to NFC Tags!

Nfc Interactor composing a Geo Tag on the Nokia N9.Ever saw an NFC tag at a bus station and wanted to know what’s really stored on it? Just touch the tag with the Nfc Interactor app running on your phone, and you will instantly see low level information about the NFC tags and its contents.

If you’re lucky enough to have unlocked NFC tags, the dynamic NDEF message editor UI lets you create your own tags in the most flexible and comfortable way.

Nfc Interactor is now conveniently available in the Nokia Store for several NFC-enabled Symbian phones and the Nokia N9 with MeeGo Harmattan. The app is based on Qt and is completely open source as a code example, to inspire you and to enable re-use of its versatile and completely documented components for your own NFC apps.

NFC Tag Reading & Writing

Aimed at enthusiasts and developers, Nfc Interactor reveals low-level information about the NFC tags you touch, including their tag types, UIDs and for some tags additional information like the memory size and lock status.

Most NFC tags contain standardized NDEF messages (like Smart Posters, URIs or business cards), which are parsed and shown on-screen, nicely formatted so that you can easily read their contents.

The most powerful part of Nfc Interactor is the dynamic NDEF editor UI. Compose your own NDEF messages containing multiple NDEF records, just by adding all the records you need to a list. Many records support optional information, which you can supply if needed (e.g., the Smart Poster supports multiple titles in different languages and allows setting the recommended action for the reader). A short help text explains the basics of each record type. The top bar will always keep you updated on the size in bytes of your current creation, so that you can ensure it actually fits on your tag. Once finished, write your message to as many NFC tags as you like.

Advanced Nfc Tags

Nfc Interactor includes many ready-made templates for conveniently writing more advanced tag types. This includes Geo Tags to link to coordinates and launch the Maps application on the phone, or App Store tags to link to your app in the store corresponding to the actual mobile operating system of the user. More details about the web services working behind the scenes to enable those use-cases will be explained in upcoming blog posts.

On the social side, you can write business cards (in the common vCard format) and social network tags, which link to your favorite social service like Twitter, Facebook, LinkedIn or vKontakte. In the SMS record editor, you can directly enter the telephone number of the receiver and the body text to be sent — these records can for example also be used for payment via premium SMS (this method is used for many NFC tags that let you purchase a public transport ticket).

For low-level writing, you can also create custom records, which are needed for example to store app-specific information or to create autostart tags for apps (Nfc Interactor itself can be automatically launched through touching a tag that contains a record of the external RTD "nokia.com:nfcinteractor". Of course, a template for this is available in the editor UI as well.

Open Source Code Example

Nfc Interactor is completely open source and — like most Qt code examples — released under the open source BSD license. Many months of development went into creating the current version of the app, directly saving you development time.

While Qt Mobility already offers classes to conveniently handle Text and URI NDEF records, Nfc Interactor adds classes that manage Smart Posters, business cards, images, geo tags, app store tags, social network tags and SMS tags.

Additionally, you can see a real-life use of reading and writing NFC tags. For NFC Forum Tag Type 1 + 2 tags, the app uses tag-specific low-level commands to read their size and lock status (Symbian only). You will also see all components in place for automatically launching the app, for both MeeGo Harmattan and Symbian.

On the non-NFC side, the app also features a cross-platform UI for MeeGo Harmattan and Symbian using the respective Qt Quick Components — most parts of the QML code are similar, as a developer you only have to take account for a few UI differences!

Availability

Nfc Interactor is available for the Nokia N9 with MeeGo Harmattan (PR 1.1+ recommended), as well as the Nokia C7 / Astound / Oro with Symbian Anna, plus the Nokia 700 and Nokia 701. Support for the Nokia 603 and the C7 with Nokia Belle should be added by the Nokia Store soon.

The app can be downloaded for free. In addition to demonstrating the NFC APIs, it is also a real-life example and showcase for In-App-Advertising and In-App-Purchasing. The free version is always reads NFC tags, plus it writes an unlimited number of basic tags (e.g., URI, Text or Smart Poster) and up to 10 advanced tags. It is supported by the Qt ad-APIs provided by inneractive.

Upgrading to the Nfc Interactor Unlimited removes the ads and unlocks writing an unlimited number of advanced tags. On Symbian, you can conveniently purchase those upgrades through the Qt In-App-Purchasing APIs. For Harmattan, the Nfc Interactor Unlimited is an extra app available through the Nokia Store.

The complete source code of the application is available on the SVN server at Nokia Developer Projects.

Foursquare gets NFC ‘magic’ @ Nokia World

At Nokia World 2011 we have introduced some of the major apps that have gotten "the magic tap".

The latest addition to the growing number of NFC enabled apps like Angry Birds Magic, Poken, Bounce and Asphalt5 is Foursquare.

With the newest version of the application you can use your NFC enabled phone to check-in automatically by just tapping and NFC enabled/tagged poster. No more tedious steps of launching an application waiting for location fix, connecting etc… With NFC this is all done with a simple tap.

Furthermore, the developer made it even easier for the user to check-in – without the need to have the app running – just tap and the app starts automatically and checks you in. Pretty awesome and again demonstrating the convenience of NFC! In a separate post Andreas explains how as a developer you can implement application autostart 

Foursquare with NFC support is available in the Nokia Store for Symbian NFC enabled phones (download Symbian version here,N9 support coming soon) . And the best thing about it is that it is not a separate application just for NFC sake. Developers simply added the support for NFC to the existing application version!

Opportunities for venue owners

Venue owners can now create smart posters asking users to Check-in with embedded NFC tags, so that visitors of their venues that have an NFC enabled phone (from any brand) can easily perform the check-in by just tapping the smart poster. Additionally NFC check-ins can be considered as real check-ins as the user had to physically be there to check-in, giving venue owners the potential to have much more accurate data versus normal check-ins. We have demonstrated this concept as verified check-ins at Nokia World 2011 (read NFC Times article here)

How to create Foursquare Check-in Smart Posters?

There are several ways to do it. All you need is an NFC tag encoded with the foursquare venue URL (i.e.: https://foursquare.com/v/nokia-house/4af3fa31f964a520bbef21e3 ) that you stick behind your 4Sq sticker/poster. NFC Hub, for instance offers a readymade solution for 4Square Check-in campaigns. Here is a demo example of a smart poster I did for an event this weekend.  

Where to get tags?

 

Some of the options on how to get NFC tags are listed here: https://www.developer.nokia.com/Develop/NFC/Getting_started/Step_3.xhtml

 

App Autostart on NFC Tag Touch

Nfc Ndef Autostart on the N9 with MeeGo HarmattanYou’ve created your first NFC app, which acts upon data stored on tags. Wouldn’t it be nice if the phone automatically launches the app when you touch your NFC tag?

This guide explains how to achieve this using Qt Mobility APIs. You need some background knowledge about NDEF messages and records in general to be able to make most out of this guide. To take a deeper dive into the standards covered here, take a look at the specifications at the NFC Forum.

Record Type Names

Each NDEF record has a type name; some are standardized by the NFC Forum for compatibility (e.g., the Smart Poster [urn:nfc:wkt:Sp], URL [urn:nfc:wkt:U], etc.). Every NFC capable phone should be able to handle those well-known types.

You can also read these record types from within your application. However, you can’t register your app to be started when touching a tag that only contains a well-known record — it’s always the phone that handles those (but you can write a browser-plugin to react to specific URLs and use this to open your app, like the FourSquare application for Symbian & MeeGo is doing – read more about the FourSquare app at Jures blog post).

To autostart your app directly when touching a tag, you need to use your own, custom record type.

Your custom type name has to follow a standardized format as well — according to the NFC Forum External Type Name. Like the well-known type, it starts with "urn:nfc", but then continues with the namespace "ext". Afterwards, your type name must contain the domain name of your organization, then a colon, and then your own type name. A complete example:

urn:nfc:ext:nokia.com:nfccorkboard

Note: the first three parts of the type name ("urn:nfc:ext:") are actually encoded in just one byte on the tag. The rest of your name is stored in plain text; with the usually very limited size of the tags, make sure that the name you choose isn’t as long a whole novel.

In addition, you can store any kind of data (payload) for this record on the tag, and usually only your application will be able to understand the contents. For example, a custom record to check in to a social network may contain the ID and the name of the place in the payload.

Handling Custom Type Names

Your app can obviously read and understand your own record type, and it can also be started when the user touches a tag that contains your custom record. But what if the phone doesn’t have your app installed yet?

The solution is elegant: you simply store two records in the NDEF message on the tag. First your own, custom record; then a well-known URL or Smart Poster – for example a link to the Nokia Store, allowing users to download your app. See below for instructions on how to create such a tag.

What happens when you touch the tag is the following: if your app is already installed and registered for your custom record type, it will be started. Otherwise, your custom type will be unknown to the phone, and it’ll ignore your record and proceed and handle the next record — the well-known URL. The phone will take care of this one and send your potential future user to the Nokia Store to download the app.

Autostart Registration

Now that the basics are in place, let’s take a look at how to register your app to be stared. This is different in Symbian and MeeGo, as it is tightly integrated with the services of the OS. The process is described in detail here: http://doc.qt.nokia.com/qtmobility/qnearfieldmanager.html#automatically-launching-ndef-message-handlers

The ndefheadergen tool mentioned in the docs isn’t shipped with the Qt SDK, but it’s actually not required — it just auto-generates the same few files that you can easily take and adapt from the documentation (linked above) as well. If you’d like to get the tool nevertheless, download the Qt Mobility source code and compile the ndefheadergen project for your desktop OS.

On Symbian, you only need to adapt an XML registration file and ensure that it’s installed together with your project by adding the deployment into your .pro file. Just insert the name of your app, as well as the custom record type name you’ve selected for your application.

Note: the phone needs to be restarted after registering your app in the current Symbian version (see the report). A second small issue is that at the moment the registration doesn’t get fully removed when you uninstall the application again (bug report).

On MeeGo, your app needs to be registered as a service over the D-Bus. To achieve this, two files have to be deployed during installation: a bus configuration file as well as a service file. For the phone to find your app and its icon, the name of the .desktop file has to be %APPNAME%.desktop (and not %APPNAME%_harmattan.desktop, as is the default file name from Qt Creator). As the last step, you have to add a .postinst and a .prerm file to your debian package — these files contain scripts that are executed when the app is installed or removed from the phone and register your app over the D-Bus with the service.

Note: you need to have PR 1.1+ installed on your N9 for autostart to work; the PR 1.0 firmware didn’t handle NFC tags, and consequently also no custom autostarts.

Application Setup

In case your application doesn’t use the registerNdefMessageHandler() method of the QNearFieldManager already, you need to call this method on application startup as well, so that your app registers at runtime to handle the message.

Writing a Custom Record Type to an NFC Tag

If your app doesn’t support writing its own tags, you can use any of the more customizable tag writing apps to create your own custom tags. For example, use the Nfc Interactor to write a "Combination Tag", which consists of a custom record type name that you can define, plus a URL record. Or, use the "Custom Tag" function to only write your custom record type to the tag, without an additional standardized URL record.

NFC Autostart Example Application

If you’d like to see autostart on tag-touch in action, simply install the Nfc Corkboard application (version 1.4.0+). It works on MeeGo and Symbian (don’t forget to restart your Symbian phone after installing the app for the autostart feature to work!) and is started when touching a tag that contains a record with the type name: "urn:nfc:ext:nokia.com:nfccorkboard". The app also supports writing its own autostart tag — just swipe to the Wednesday corkboard, and press the red NFC flag of the yellow note "Corkboards Autostart"

You can also use this app as a reference to add autostart functionality to your own app.

NFC Apps Store category available

Besides educating Nokia customers of the benefits of NFC technology out of the box, we also ensure that Nokia NFC phone customers can take advantage of a growing number of apps that leverage NFC in an easily accessible way.


The Nokia Store NFC Apps Collection

Instead of customers having to look for different applications where they can put this technology to use, we’ve made the work for them… We are constantly on the lookout in our publishing system for apps utilising NFC and make sure they are all accessible in the Nokia store at an arms lenght – the "NFC Apps" collection. Users can find all the latest and greatest apps using NFC by simply going into the Categories section of their Nokia Store client using their NFC enabled phone, or browse the content from the Store web front.


Incentive for developers

Not only is this good news to consumers, I beleive it’s a really good incentive for developers. The NFC Apps collection gives NFC applications much sought visibility in the storefront, making it more likely for users to discover it.

Nokia NFC Apps Collection is available on the following devices: Nokia C7 Astound, Nokia C7-00Nokia 600, Nokia 603, Nokia 700, Nokia 701 and N9


How to get your app featured?

For Apps to be featured in the NFC Apps collection, publishers need to make sure that our system can identify that the application published is using NFC. To do that they need to include the keyword "NFC" in at least one of the following metadata areas before submitting the Content Item to Nokia Publish Quality Assurance:

  • Application Name
  • Application Description
  • Keyword metadata

 

NFC tags turned inside out – parse tag contents with the open source Nfc Info app

As a developer or interested end-user, you often want to take a closer look at the contents of NFC tags. The new Nfc Info app is here to provide the corresponding knowledge, given that you have an NFC capable Symbian (Nokia C7 [Astound], 600, 700, 701) or MeeGo phone (Nokia N9). Simply touch a tag and the app will show you plenty of data about the Nfc tag contents. You will see:

  • Generic NFC tag information (e.g., NFC Forum Tag Type 1, its UID and version)
  • The records contained in the NDEF message plus its size (e.g., a custom record + a URL record)
  • For most standardized records also a nice textual overview of the parsed contents (e.g., URI, title, action for a Smart Poster)
     

Internally, this is done using convenience classes that hide the complexity and bit/byte-encodings of the records. Luckily, Qt Mobility already provides those for the most common record type definitions (RTD): text and URI. In the Nfc Info source code, you will now find additional ready-made classes that parse Smart Poster, Mime/Image and vCard (for storing business cards) RTDs.

Best of all, you can easily plug those classes into your own project. It’s so simple that I’ve embedded them into the Nfc Corkboard example within a few minutes, so that also that app now handles Smart Posters and business cards.

Usage of the new classes is simple: first, convert the generic record class into the corresponding derived, specialized class. From now on, you have access to methods that return the individual components of the record, or you can assign components for writing.

A short example, which parses a Smart Poster and adds textual information to a string called tagContents:

QString tagContents;

    
if
(record.isRecordType<NdefNfcSpRecord>())




    {



        // Convert to a Smart Poster record type class (urn:nfc:wkt:Sp)



        NdefNfcSpRecord spRecord = NdefNfcSpRecord(record);



        // Uri



        tagContents.append("Uri: " + spRecord.uri().toString() + "\n");



        // Title



        tagContents.append("Title count: " + QString::number(spRecord.titleCount()) + "\n");



        if (spRecord.titleCount() > 0) {



            foreach (QNdefNfcTextRecord curTitle, spRecord.titles()) {



                tagContents.append(curTitle.text());



            }



        }



        // Image



        if (spRecord.imageInUse()) {



            QByteArray imgFormat = spRecord.image().format();



            if (!imgFormat.isEmpty()) {



                tagContents.append("Image format: " + imgFormat + "\n");



            }



        }    



    }


The features of the new classes — including read and write support for all listed properties:

  • Smart Poster (urn:nfc:wkt:Sp): Uri, title(s) & their languages, action, size, type and image.
    (Note however that most phones currently on the market do not process the last three details listed here in their default phone tag handling UI)
  • Image (MIME, image/[png,gif,jpg,…]): en/decode all image formats supported by Qt (includes png, gif, jpg) or use raw image data. Automatically sets the correct mime type.
  • vCard (MIME, text/x-vCard): parse the versit document and get a list of all contained contacts, already provided in a convenient QContact instance. You can query all details through that class, or go ahead and add it to the phone’s address book.
     

To get started, just download the binary of the example (.sis for Symbian, .deb for MeeGo Harmattan). If you’re using the C7 [Astound], make sure that you update the device firmware to Symbian Anna in order to enable NFC support. You will also need to install Qt Quick Components, Qt 4.7.4 and the Qt Mobility 1.2 package and from the Qt SDK. See the Nfc Info release notes for more details, or read the "Start NFC Development with the Qt SDK today" blog post for full details. If you should be lucky enough to have Symbian Belle on an NFC phone, you only need to install Qt Quick Components from the Qt SDK (the Smart Installer isn’t used in the Nfc Info app at the moment). On the N9, you’re good to go with the standard firmware — everything is in place by default.

Happy tag-reading!

Nfc Info on the Nokia N9

Start NFC Development with the Qt SDK today!

Qt NFCWith the current Qt SDK (1.2.0 or newer) the scope of Nokia’s NFC developer offering took a significant step forward. It features the final environment for developing NFC apps on Symbian and Harmattan using Qt.

In order to enable you to take full advantage of the Qt / NFC development options, read this small guide that will make your first steps easier. For more information, please also check out the NFC technology pages at Nokia Developer!

Windows, Linux, Mac

You can develop NFC apps for the Nokia N9 with MeeGo Harmattan on all platforms supported by the Qt SDK: Windows, Linux and Mac OS X.

Tools Installation

When you download and install the Qt SDK, ensure the following are selected:

  • Development Tools -> Symbian Toolchains -> Symbian Anna
  • Development Tools -> Harmattan

In case you forgot to enable for example the Harmattan package during installation, start the "SDK Maintenance Tool" to download and add these components to your existing Qt SDK installation.

Device Setup

Follow the instructions for all devices you want to enable for working with NFC:

  • Nokia N9 / MeeGo Harmattan: The device already ships with Qt Mobility 1.2; no installation is needed. The Nokia N950 is running the same MeeGo Harmattan platform, but lacks NFC hardware.
  • Nokia C7-00 with Symbian^3: NFC hardware comes with every C7 in the market, but you need Symbian Anna to enable NFC functionality. Therefore, make sure you run the "SW update" on the device, or use the Nokia (Ovi) Suite to start the firmware and the following application update! Your device should have software version Symbian Anna / 022.014 or newer (enter *#0000# in the dialer to check).
  • Nokia C7-00 with Symbian Anna: the device is ready for NFC development using Java ME or Symbian native C++. In order to use Qt for NFC development, you need to update the device environment to the latest version, in case the new Qt versions are not already on your phone:
    • Install Qt 4.7.4: C:\QtSDK\Symbian\sis\Symbian_Anna\Qt\4.7.4\Qt-4.7.403-for-Anna.sis
    • Qt WebKit: C:\QtSDK\Symbian\sis\Symbian_Anna\Qt\4.7.4\QtWebKit-4.8.1-for-Anna.sis
    • Qt Mobility 1.2.1: C:\QtSDK\Symbian\sis\Symbian_Anna\QtMobility\1.2.1\QtMobility-1.2.1-for-Anna.sis
    • (Recommended) Qt Quick Components: C:\QtSDK\Symbian\sis\Symbian_Anna\QtQuickComponents\1.1\QtQuickComponents-1.1-for-Anna-Belle.sis
  • Nokia 603 / 700 / 701 / C7-00 / 808 PureView with Nokia Belle or newer: if you’re lucky enough to have a NFC capable device with Nokia Belle +, you don’t need to do anything to enable Qt NFC development. Qt 4.7.4+ and Qt Mobility 1.2+ are already pre-installed and work out of the box. Do not overwrite the existing Qt / Qt Mobility installation with files from the Qt SDK that are intended for the Symbian Anna version only!

In addition, make sure you make your phone ready for communication with the Qt Creator IDE and on-device-debugging. This involves installing the "CODA" debug agent on all Symbian devices (no matter which version), or the "SDK Connectivity" tool on the Nokia N9. See the help of Qt Creator for more details.

Development

In general, it is highly recommended to use Qt Quick Components for developing the UI of your NFC application. Qt Quick Components are supported on all NFC capable Symbian and MeeGo phones. More information, for example on NFC availability detection, is available on the NFC technology pages.

Nokia N9 / MeeGo Harmattan: simply select the MeeGo Harmattan target to build and deploy your application to the Nokia N9.

Symbian: select the "Qt 4.7.4 for Symbian Anna" target of Qt Creator to develop your application to any Symbian^3 / Anna / Belle phone.
Note: Qt SDK offers a Symbian Belle specific SDK. The apps developed with the Anna target are also compatible to Belle; you only need the Belle SDK in case you access native Symbian libraries (=> non-Qt) unique to Nokia Belle.

Examples to get started

The best way to get started is reading through the Nokia NFC Development with Qt Mobility presentation. It explains the basics of NFC specifications, how the Qt Mobility APIs provide easy access to the technology and then walks you through two hands-on examples.

The three recommended sample-projects to check — all of them are working on Symbian and on MeeGo Harmattan:

  • Nfc Info: Shows all information about NFC tags available through Qt Mobility APIs. Includes reusable convenience classes for handling additional record types: Smart Poster, Image and vCard.
  • Nfc Corkboard: Extends the Qt Quick Corkboards example of the Qt SDK with NFC functionality: touch a tag and its NDEF contents appear as a new note on the screen. Press the NFC flag of a note on the screen and its contents will be written to the tag. Parses URI, text, Smart Poster and vCard records and shows a generic post-it for all other tag types. Includes NDEF autostart support for MeeGo Harmattan PR 1.1+.
  • Nfc Chat: The Nfc Chat is a sample app that demonstrates how to use the NFC LLCP protocol to create a peer-to-peer connection between two compatible NFC Forum devices and how to send messages between those devices.

More information can be found on the NFC technology pages.

Nokia Store Deployment

Deploying NFC apps to the Nokia store is fully supported on the Nokia Store. For more details on the deployment of NFC applications, make sure to check our NFC developer pages!

Known Limitations

To save you some time, the known limitations at this time:

  • No raw, tag-specific access on Symbian Anna: this doesn’t mean that the phone cannot interact with specific tags; reading and writing NDEF messages always works fine.
    Each tag type platform (e.g., NFC Forum Type 1 Tag Platform) has its own low-level protocol, where you can send commands as byte-arrays, and then parse the byte-array returned from the tag. This raw access does work fine on Symbian Belle, but is unsupported using the current Qt Moblity 1.2.1 version on Symbian Anna.
  • No raw, tag-specific access on MeeGo Harmattan: as described in the Qt Mobility documentation, tag-type specific access as described above is not supported on MeeGo Harmattan.
  • Qt Simulator: the simulator has a very powerful editor to create your own NDEF messages and records. You can use it to test your Qt application.
    Note that the two-step method of reading messages consisting of listening for targets and then asking the target for its contents does not work as expected. If you use the direct one-step process through QNearFieldManager::registerNdefMessageHandler(), the simulator works fine.
  • NFC QML Bindings: even though Qt Mobility 1.2 includes QML bindings to make the Qt/C++ NFC-APIs available in the QML environment, it’s recommended to use only the Qt/C++ APIs. The documentation and features supported by the QML bindings are very limited. It’s easy to combine a C++ NFC-handler class with your QML user interface code — all three Qt NFC examples linked above (Nfc Info, etc.) demonstrate how to do this. You can then take the NFC-handling C++ class and simply plug it into any QML project you wish.

Update (22. November 2011): Adapted the article with the latest status following the release of the Qt SDK 1.1.4.

Update (6. March 2012): Added Nokia 808 PureView to compatibility, updated references to Qt SDK 1.2.

NFC Device Kit available

While development and testing of applications can be done using simulators and emulators, nothing beats running and debugging your application on a real device. For this purpose we are making a special Nokia NFC Device Kit available for developers

For applications utilising NFC the need for a physical device is even more important. To be able to test how 2 devices react to each other with your application running, how well they react to different tags and different content stored on those tags, having access to a physical device is paramount.

For that reason we have made avaialable a dedicated NFC device KIT for developers. The kit includes:

  • 1 X Nokia C7 (with Sybmian Anna software supporting NFC)
  • 12 X Type 1 NFC tags (Topaz 96 bytes) 
  • 12 X Type 2 NFC tags (Ultralight C 64 bytes)
  • 1 X Special offer voucher for NFC products in TopTunniste webshop

The price of the NFC device Kit is 180 Euros. Note: the device indended use is for development and testing and thus special sales terms apply.

The Device Kit is available to Nokia Developer PRO and Launchpad program members (companies/organizations only). If your company/organization does not have a membership yet, not to worry -> we are offering a 1 year Nokia Developer Launchpad subscription FREE OF CHARGE. Go here and register.

 

 

NFC Device Kit available

While development and testing of applications can be done using simulators and emulators, nothing beats running and debugging your application on a real device. For this purpose we are making a special Nokia NFC Device Kit available for developers

For applications utilising NFC the need for a physical device is even more important. To be able to test how 2 devices react to each other with your application running, how well they react to different tags and different content stored on those tags, having access to a physical device is paramount.

For that reason we have made avaialable a dedicated NFC device KIT for developers. The kit includes:

  • 1 X Nokia C7 (with Sybmian Anna software supporting NFC)
  • 12 X Type 1 NFC tags (Topaz 96 bytes) 
  • 12 X Type 2 NFC tags (Ultralight C 64 bytes)
  • 1 X Special offer voucher for NFC products in TopTunniste webshop

The price of the NFC device Kit is 180 Euros. Note: the device indended use is for development and testing and thus special sales terms apply.

The Device Kit is available to Nokia Developer PRO and Launchpad program members (companies/organizations only). If your company/organization does not have a membership yet, not to worry -> we are offering a 1 year Nokia Developer Launchpad subscription FREE OF CHARGE. Go here and register.

 

 

Hands-on Tutorials for NFC Development

Recently at the WIMA conference in Monaco, Rovio revealed the new Angry Birds Magic together with Nokia. It unlocks additional levels when you touch the phones of friends, or if you find special promotional tags. This is done using Near Field Communication (NFC) technology.

How can you implement such exciting features yourself?

During the very same conference, Nokia hosted an NFC workshop where we were guiding through our new NFC developer offering. After an introduction by Sixten “Sigge” Sandstrom, Riikka Kivela explained the NFC architecture in Symbian devices. At the end of the event, Tuukka Ahoniemi from Digia quickly dissected their ShopWizer NFC app, followed by Jure Sustersic talking about business opportunities with NFC and Nokia.

During the main two hour tech session in the middle, I had the opportunity to first briefly introduce the large audience to Nokia’s NFC developer offering. After the environment setup with the latest Qt SDK 1.1 and Qt Mobility 1.2 Beta, you’re ready to code. At the moment, a Nokia C7 updated with a pre-release Symbian Anna is needed to test apps. This firmware version will be released soon, but is not publically available yet. Once you get the new version on your existing C7, the operating system’s backend for Qt’s NFC APIs are instantly available!

 

 Nfc Corkboards application running on the C7

 

After those preparations were done, we went right into coding the first NFC app. Instead of starting totally from scratch, we took the Corkboards example from the Qt SDK and extended it with NFC functionality. The original app has several dynamic notes pinned to different corkboards; you can easily switch between boards by swipe gestures.

After following the step-by-step instructions of the NFC workshop materials, a new note instantly appears when touching an NDEF formatted NFC tag – the contents of the message are shown on the screen (URI and Text NDEF records are parsed). If you then press the little NFC flag glued to each note, the note’s current contents are written back to the tag. You can download a slightly extended version of the solution from Forum Nokia Projects.

Thanks to the separation of the NFC handling engine in C++ and the UI written with Qt Quick, the engine itself can simply be plugged into every other project to augment it with NFC. After the workshop, I saw the NFC engine working in an existing Cover Flow-like image browsing app; this was done in a matter of minutes without any modifications to the engine itself.

 

Nfc Chat application running on the C7

The second example was the NFC Chat. Simply by touching two phones, you can send chat messages back and forth. On the tech side, this is all handled by NFC, where two devices communicate using LLCP. Touching is enough to establish the connection between the app running on both phones.

This time, we created a new app from scratch – which can be done in a matter of minutes when using the Qt Quick Designer. The NFC target discovery is then very similar to the previous example – only that we’re this time setting up sockets to communicate to another device, instead of reading messages from a tag. A server socket is then used to send messages to the other device; the client socket receives our UTF-8 formatted text messages.

The workshop materials are now all online for you to enjoy:

To find out more about developing NFC apps, also take a look at the new NFC Wiki page. More event coverage – including an interview with Mark Selby about Nokia’s NFC plans – check out Nokia Conversations.