Nokia Lumia 610 - with NFC

jures33 | 11 April, 2012 12:56

At WIMA 2012 in Monaco, Nokia announced a new NFC smartphone. The Nokia Lumia 610 NFC.

The device is Nokia's 1st Windows Phone NFC enabled smartphone.

Using the Lumia 610 as a reference product design, Nokia in cooperation with partners added the NFC support. The device, just like its predecessor, is powered by Windows Phone 7.5 operating system. For general detailed specifications on the Lumia 610 please visit our device specification section. Further I will concentrate on general overview of the "NFC" part of the Lumia 610 NFC.

NFC support

Nokia worked together with INSIDE Secure, a company well known in the NFC industry for providing leading NFC solutions, to integrate NFC hardware and software support on top of the already established Lumia 610 product. 

Supporting Operating Modes

  • Peer-2-peer

The device supports peer-2-peer exchange over the NFC radio. The supported protocols are SNEP (Simple NDEF Exchange Protocol) and the lower level LLCP (Logical Link Control Protocol)

  • Reader/writer

The device is able to read and write to a number of NFC tags. Supported technologies are NFC forum Type 1,2,3,4 (Including Topaz, Ultralight C, NTag, Felica, DesFire, ISO-14443 Type A/B, ..), Mifare Std, Kovio and others

  • Virtual Tag

The device is able to simulate an NDEF Type 4 Tag

  • Card Emulation

The device is able to emulate a SmartCard, with data exchange with a SIM based card application over SWP (Single Wire Protocol) supporting payment and ticketing use cases (Secure NFC

MasterCard PayPass® and Visa payWave® certified   

The Nokia Lumia 610 NFC passed Mastercard and Visa contactless payment certification.

Availability

The Nokia Lumia 610 NFC is initially planned to be available with Orange later this year. Other markets and operators availablity has not been announced yet.

APIs and functionalities

The above mentioned functionalities are exposed via the InsideSecure's Open-NFC platform. It includes APIs to access the whole NFC functionality enabling creation of a variety of NFC application use cases. InsideSecure made a port of the Open NFC platform to Microsoft Platforms. Visit the Open NFC platform pages for more details. 

3rd party application development

To develop NFC applications for the Lumia 610 NFC developers need the standard Windows Phone development environment  plus:

  • Open NFC for WP libraries
  • Nokia Lumia 610 NFC device with custom firmware 

At the moment the Open NFC WP7 port/addon is not publicly available.

Partners of Nokia (including Nokia Developer PRO and Launchpad program members) are invited to contact their Nokia contact person or send a query to nokia.developer.PRO@nokia.com for detailed information and requirements.

Distribution of NFC enabled apps in Microsoft Marketplace

In order to be offered for the Lumia 610 NFC, 3rd party apps must be signed by either Nokia or a mobile operator. This will enable them to be published in Windows Phone Marketplace. The application developers must also ensure that the application will install and work also on non-NFC enabled Windows Phone phones, i.e. by disabling the NFC features of the application to the user

More info to follow!

Payment and ticketing with Nokia 603 and 808 PureView

jures33 | 11 April, 2012 10:47

Nokia 603 with Symbian Belle Feature Pack 1 and Nokia 808 Pureview are ready for implementing Payment and Ticketing solutions! In this post I will go into the details on Secure NFC implementation and how developers can get started in development of secure NFC applications on Nokia Symbian devices.

Support for SIM based NFC architecture using SWP protocol

Secure storage and provisioning of sensitive information (i.e. Credit Card details, values, PINs etc) needed to perform secure transactions with mobile devices is handled by the UICC/SIM card. Nokia HW/SW provides a channel for both external NFC infrastructure (POS readers, transit terminals, OTA provisioning) as well as on-device UI applications (wallets) to be able to securely exchange data over SWP protocol with the secure applications stored (and managed) on the SIM card.

Card Emulation mode

The Symbian NFC component has now added support for Card Emulation mode and it works interchangeably to peer-2-peer mode and reader mode when NFC radio is active. In card emulation mode all communication with the NFC radio is routed directly to the SIM card via the SWP protocol. The communication is usually in the form of ADPU packets follwoing the ISO 14443 standard (Smart Cards)

Typical architecture

In a typical use case the MNO will issue to the customer a UICC enabled SIM card. Additionally it could offer the customer a contactless payment or ticketing service (in partnership with a local Bank, loyalty or transportation service).

Subject to service agreement with the customer, the operator or service provider will issue the related payment or transportation cardlet to the user's SIM card using a provisioning service provider or TSM (Trusted Service Manager). TSM's role is to manage the secure provisioning & management of payment and ticketing services to end users. Usually this provisioning is done using OTA (Over-the-air) deployment (using BIP - bearer independent protocol).

The provisioning of these services may also include a dedicated Wallet application that is installed on the customers device which can then manage all (or some) the cards stored on the customer's SIM card and is actually what the customer sees and uses to perform transactions with contactless/NFC infrastructure.

Low Battery mode

In payment and ticketing use cases it is important to offer customers NFC/contactless services in cases when the phone battery runs out (i.e. to be able to use transportation or to pay for services). To satisfy requirements Nokia has implemented an operator variant customizable Low Battery mode which will enable to make a few transactions with the card emulation mode in cases where the device will shut down due to low battery.

Devices supporting Card Emulation

Nokia 603 with Symbian Belle Feature Pack 1 and Nokia 808 Pureview

Note: at the time of writing the Nokia 603 has received MasterCard Paypass certification

Development environment:

Development of Card Emulation solutions differs a bit from regular mobile application development as it requires more infrastructure capabilities. One might say that the wallet development is the easy part, the more challenging part is to have the right e-2-e infrastructure. Usually the solutions on mobile devices have 2 parts,

- the Wallet UI application (managing user's cards and for listening, preparing cards for transactions). For the Wallet UI application the Development environment is Java ME

- the "card" applications (cardlets, applets) running on the SIM card. For the "Card" applications the development environment depends on the SIM manufacturer (usually JavaCard technology)

Recommended Development Setup 

Related APIs 

The Contactless Communications API defines support to exchaning information between contactless targets

The Security and Trust Services API for J2ME defines support for smart card communication, generation of digital signatures, and low-level cryptography operations.

Nokia extensions to the JSR257 API

  • FakePower off API

API for receiving notifications about the low battery mode state (i.e. to alert the user) 

  • Branding API

API for registering post transaction events. (i.e. play video, show bitmap, launch application)

Examples

Nokia made available an example application demonstrating a typical wallet application supporting contactless transactions using all the necessary APIs and available as source code. (The project is available to Nokia Developer Launchpad/PRO members only)

Avaliability 

The mentioned enablers for building NFC enabled payment & ticketing solutions on Nokia Symbian devices are available to Nokia Developer Launchpad and PRO members only.

Cross Platform NFC Geo Tags

ajakl | 22 March, 2012 10:37

Nfc Geo Tag on the Nokia N9.Imagine the following: you're playing a treasure hunt game in your home town. At one station, you touch an NFC tag with your Nokia phone; this opens Nokia Maps to reveal the location of the final place where to collect the treasure. Similar scenarios are possible if you'd like to use Nokia Maps to navigate to the point of interest that you just read about; for example, the St. Stephen's Cathedral in Vienna, after reading about it in a tourist brochure.

Alternatives

To implement this, you need to store the longitude and latitude of the landmark on the NFC tag (you could also call them "GPS coordinates"). But how to store them? This use case hasn't been set by the current NDEF URI RTD specification of the NFC Forum, so there isn't necessarily a solution that works across all NFC enabled phones.

One approach is using the geo: URI scheme (RFC 5870). In the most simple and short form (important due to the limited space on a tag), the URI to write to the tag could look like the following: "geo:60.17,24.829". This encodes the decimal coordinates with latitude of 60.17 and longitude 24.829 in WSG-84 (the location of the Nokia House in Finland, by the way). This works fine with the N9 and directly opens the Nokia Maps client showing the correct location, given that you have PR 1.1+, which is required for default NFC tag handling by the phone. However, Symbian currently can't understand Geo URIs.

An alternative is to write the URL to Nokia Maps to the tag, according to the Nokia Maps Rendering API. For example: http://m.ovi.me/?c=60.17,24.829. When opening this URL on a Symbian phone, it automatically opens the Nokia Maps client at the correct location. On other devices like the PC, it redirects to the full Nokia Maps web client or the HTML5 version of it. However, MeeGo Harmattan just shows the static map image and doesn't start the Nokia Maps client.

Cross Platform Geo Tags

So, those two approaches don't work across the Nokia portfolio. However, there is a simple solution: store the URI of a small script on a server, which then redirects a MeeGo (or Android) phone to the Geo URI, and every other device to the Nokia Maps URI. You can retrieve the operating system by checking the user agent of the browser.

On MeeGo, you can directly send out an HTML header to redirect the browser to the Geo URI (causing it to open Nokia Maps), without loading and rendering the actual web page. On Symbian, a JavaScript redirect can put the browser on the right track and trigger it to open the Nokia Maps client.

Creating Nfc Geo Tags

To make this easier for you, the new Nfc Interactor app (available for Symbian and the Nokia N9) lets you conveniently write geo tags by just entering the coordinates. In the tag compose view, you can also choose which of the three variants you want to write to the Nfc tag. The app will take care of formatting the actual NDEF message for the tag.

For your experiments, the maps redirection PHP script explained above is hosted on http://nfcinteractor.com/m.php and can be used with a URI on the NFC tag like this:

http://nfcinteractor.com/m?c=60.17,24.829

Note that there is no service or uptime guarantee for the hosted script at nfcinteractor.com – it's intended for testing purposes only and could be removed at any point. You should host the script on your own server for real-world deployment. See the web services information page for more details.

Additionally, hosting the service on your own web server allows you to add custom-named places to the script, so that the link on the tag doesn’t need to contain the coordinates, but you can link to a custom place-name instead. See the source code of the script for details on how you can add your own places. Example:

http://nfcinteractor.com/m?l=nokia

The source code of the Geo Tags redirection script is now also available under the open source BSD license, so that you can adapt it to your needs, add custom locations (instead of specifying the coordinates as parameters) and upload the script to your own web server.

Nfc Interactor: Full Access to NFC Tags!

ajakl | 24 February, 2012 14:50

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

jures33 | 25 November, 2011 12:49

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

ajakl | 25 November, 2011 12:49

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

jures33 | 26 October, 2011 16:55

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

ajakl | 06 October, 2011 17:35

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!

ajakl | 29 September, 2011 11:43

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

jures33 | 29 September, 2011 10:18

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 webinar scheduled

jures33 | 27 September, 2011 11:20

We have announced an NFC focused webinar for developers, ideal to get you started with NFC development.

DATE: October 11th 2011
Time: 10 a.m CET + 1 ( covert into your own timezone )


Getting Started with NFC on Qt

Near Field Communication (NFC) is a short-range wireless-connectivity technology that is rapidly gaining traction among mobile phone users around the world, adding exciting and creative new possibilities for developers. Find out more about this technology, how it is implemented in Nokia phones, and how to use the Nokia Qt SDK to leverage NFC in your applications. The webinar will provide a general NFC introduction, supply practical examples, and explain how to get started with your first NFC app-development project using the Qt SDK.

Register: http://www.developer.nokia.com/info/sw.nokia.com/id/8f874ad1-b55b-4b36-bfba-e999dc727270/getting_started_with_nfc_on_qt.html


Hope to see many of you there!

NFC use cases summarized

jures33 | 23 September, 2011 12:12

So, what can one do with NFC technology and what are the related standards that ensure interoperability across devices?

Well given the fact that it is a shortwave technology that operates at very close distances (up to 10 cm in theory but as implemented in devices the distance to get a good reading is just few centimeters) it inherently means that it requires a the users to do something specific with the device (expressing intent). In Nokia we describe this gesture as a "Tap". In its essence it means users using their phone by almost touching it with another NFC related object to accomplish an action.

Below I describe a few use case families that we try to group these actions and related standards

Tap to share

This family of use cases is all about users exchanging content using two NFC enabled devices/phones in so called peer-2-peer mode. The information exchanged can be either content or small objects. 

The exchange relies on LLCP (Logical Link Control Protocol) defined in NFC Forum so that developers can implement sharing with multiple device types coming from various manufacturers (provided that they are NFC Forum compliant).  Sharing of content can be 2 users exchanging a photo, video, file using NFC as a signaling channel to connect the devices via a secondary bearer (like Bluetooth or WLAN) information and do the transfer over it automatically.

The second area of use cases is more application centric, allowing applications to exchange objects between each other to perform operations. The objects can be simple contact, social profile information, unlock level object, virtual currency, game objects and much more. Furthermore these objects can be standardised so they become application agnostic. The SNEP (Simple NDEF Exchange Protocol) is the NFC forum Standard covering these use cases.  

Tap to initiate a service 

Here we are talking about using your NFC mobile phone in the context of interacting/tapping passive NFC tags. The tags, a small and inexpensive IC, can be embedded in a product (i.e. consumer HW, toys, other consumer goods), in a poster/sticker, in a business card or badge, and all sorts of other ingenious ways. The expectation is that when user is tapping such a smart product (which usually needs to have a visual indication on where to tap it) a service will be initiated automatically.

What kind of service? The most common service is automatically launching a predefined URL (to show product information, to automatically connect, to follow on Twitter, check-in to a service, like on Facebook). Furthermore the use cases can be sending an automated SMS (SMS - info, ticketing, entertainment services etc.), get vCard information or the tag contains application specific code (i.e. unlock hidden levels in a game, get a voucher). An NFC tag can contain multiple information (multiple NDEF records), for instance application specific code (i.e. to unlock levels) and a generic URL record (to download the application from the application store). 

What type of information NFC devices expect/can read from NFC tags is summarised by the RTD (Record Type Definition) specification and how the data is stored on the tag is defined by NDEF (NFC Forum Data Exchange Format) specification.

Tap to pair

Here we are talking about devices using NFC to easily establish connection with each other using a secondary bearer such as Bluetooth. This case applies to easy and convenient way of pairing of devices such as headphones, speakers, printers, computers and other HW allowing the tap gesture (=intent) to replace discovery, PIN exchange and setup steps otherwise necessary to perform the pairing of devices. The related standard that governs this kind of use cases is the NFC Forum Connection Handover Specification

Tap to pay/gain access

This family of use cases is mostly related to (secure) transactions such as ticketing and payment. In this case the device acts as a smartcard and when tapped together with a NFC reader (say a POS payment terminal, a security/access check gate or a transport reader) user performs a transaction (pays for goods/services, opens gate/door, validates train ticket etc). These use cases require that the information is stored (and provisioned) securely to the Device. In NFC jargon we are talking about a Secure Element - a tamper proof storage, ideally physically isolated as a chip embedded on the device HW, integrated into a SIM card or available as a SD card .

When a user touches an NFC reader to perform a transaction the reader needs to read the secure information (card number, status, value of credit, credentials etc) via NFC radio and a secure protocol - called SWP (Single Wire Protocol). 

This is by far the most complex family of use cases to implement. In many cases it involves several stakeholders i.e. HW manufacturer, service provider, trusted service manager, banking system and other players to make it work. Recently players in the industry also started working on solutions using peer-2-peer protocols/architectures using LLCP (i.e. Google Wallet)

This is in a nutshell NFC use case families that we are thinking about in Nokia, most certainly there are more that we haven't thought of yet so we would not like the community to limit themselves to this when thinking how NFC can benefit their business/cause, but rather provide a frame on how the differend standards that ensure interoperability were designed.

NFC is here with Belle, MeeGo and Anna

jures33 | 07 September, 2011 11:48

Wow! What a time for Nokia and NFC!

Symbian Belle, 3 brand new smartphone models, all with NFC technology inside, Symbian Anna update available for C7 and N9 availability just around the corner! That's 5 devices all scheduled to be available on the market this quarter.

 Really goes to show our commitment to NFC and working on the »chicken and egg«* problem so many in the industry are referring to as being one of the challenges stifling NFC takeoff in recent years.

As mentioned by one of our senior spokespersons we believe in a gradual approach with focus on enabling simple use cases connected to NFC tags, Easy device pairing and peer-2-peer interactions with support for the »card emulation« use cases (used to enable mobile payments and ticketing) introduced later on.

More on the NFC use cases later. If you have been playing with C7, C7 Oro or C7 Astound with Symbian Anna you will notice quite a few improvements in the NFC experience we introduced in Symbian Belle.

I personally like the move from a dedicated NFC Sharing application (where you needed to open a special app to share contacts and media) to instant sharing of contacts and photos. Also what we've done in the new models was improve antenna performance, we preloaded games and apps taking advantage of NFC as well as put NFC tags into the sales box to teach customers the new behaviour paradigm  (tap) – what (in this person's opinion) NFC is all about.

Not to make existing C7 customers unhappy, we will make all of the SW level improvements available to them via the upcoming Symbian Belle upgrade (unfortunately one cannot upgrade antenna improvements :( ).

With this I would like to welcome you to this newly created blog on NFC technology where we will give you more information on what\s happening around NFC and Nokia and how best to leverage this technology as a developer. Your questions and opinions matter, so do raise them in the comments section and we'll try to address them in subsequent entries..

Also we started creating a section on the developer portal on NFC: http://developer.nokia.com/Develop/NFC . Be sure you bookmark it if you are interested in developing NFC enabled apps! We are going to update it regularly with news, docs, examples and most importantly tools to get you started with NFC development.

Next time we'll be talking use cases with NFC and also go into more techie side of things on how to develop apps with NFC. For now we leave you off with a nice introductory video from the Symbian Belle device launch featuring the core NFC use cases that come with it.

Enjoy!

* - The "chicken and egg" problem is referring to service providers hesitant to roll out NFC enabled services (smart posters, device pairing, payment & ticketing) due to lack of NFC capable mobile handsets on the market and on the other hand device manufacturers hesitant to add NFC into their devices due to lack of available NFC available services for customers.

Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2012 All rights reserved