A Tool for Testing NFC Forum LLCP 1.3 (and More)

A guest blog post by Stephen Tiedemann, Sony 

The release of LLCP 1.3 marks an important evolutionary step for NFC peer-to-peer communication. With this update is has become possible for NFC devices to use an encrypted data transport channel for all information exchange, making the user data impossible to eavesdrop by a third party. While the chance of eavesdropping is generally low due to the limited propagation range of Near Field Communication, which propagates just about a couple of centimeters, it has been an ongoing concern that technological advances may allow a third party to successfully implement an eavesdropping attack in the future. With the deployment of LLCP 1.3 in commercial devices this will become impossible.

It is now up to device manufacturers to implement LLCP 1.3 into their platforms and devices and as always the case this requires the engineers to test and verify. As for earlier releases the NFC Forum also, this time, had encouraged its members to engage in early prototype implementation and testing while the specification was in candidate state. And one of those implementations, called nfcpy, is available under an open source license to any interested party.

The nfcpy open source project implements a full NFC stack that works with a broad range of commercial NFC reader/writer modules designed for use with desktops, laptops and small computing devices such as Raspberry Pi. It is completely written in Python, a programming language designed for readability and yet to be efficient. The project documentation is hosted on http://nfcpy.org where the link to the source code repository can also be found.

From a programmers point of view, the use of nfcpy may be twofold. For one, it is a library that can be used to add NFC communication capabilities to a project such as the prototype of an NFC-enabled application. But nfcpy provides also a decent couple of example command line applications ready to use and with many option flags to shape behavior. There is ndeftool.py to parse or generate NDEF data sets, the tagtool.py can read, write, format, protect all the NFC Forum tag types and even emulate some of them, and the beam.py application exchanges NDEF data with an Android smartphone. Test engineers can find simple tools to stress their implementations with continuous activation requests or just unexpected data, run test cases from any of the former NFC Forum specification validation plugfests, or execute a subset of the LLCP related NFC Forum conformance test cases before going to a test house.

With the release of the LLCP 1.3 specification the nfcpy implementation now officially supports and uses secure data transport for peer-to-peer communication by default, if supported by the peer device, and new test cases help to verify if a remote device correctly implements the secure data transport feature. Feel free to use it, it’s free to use.

Share

Leave A Comment?

You must be logged in to post a comment.