Python module for near field communication

News and announcements

A major update for nfcpy

Written for nfcpy by Stephen Tiedemann on 2013-07-08

A lot of things have changed and improved with the recent merge of the dev-phdc branch into trunk. Triggered by the wish to support the Sony RC-S380 certified reader and have tag emulation to fully implement NFC Forum PHDC (which is the Personal Health Device Communication specification), this work had the side effect of some general cleanup and improvements. Below is a list of things that have changed along from the new PHDC implementation.

- The driver API needed to change in order to support tag emulation, as possible now with the RC-S380 reader.
- The main application interface is now consolidated into the single method ContactlessFrontend.connect().
- Applications interface with connect through a set of callbacks, rather than combining different calls as before.
- All example programs are now based on the same command line interface code in cli.py and share the common options.
- The code in cli.py implements a common test framework so applications can concentrate on the test implementation.
- Much of the exception handling up and down the stack is improved and shows more robustness.
- A lot of unittests have been added as well as an NFC Forum DTA for the P2P tests (though still a bit left do)
- The ipsim driver used during the early days of LLCP implementation is replaced by a cleaner and better udp driver.
- Support for libusb-1.0 and pyusb-1.0 finally made it into nfcpy, which can now work with either the old or new version.

As popularized by Google some (late) spring cleaning has also happened:

- Implementation of the Google NDEF Push Protocol (NPP) is gone. Android supports NFC Forum SNEP and it's time to move on.
- The example code for D-Bus integration is gone. There is now official NFC support in Linux and that'll do the job better.

I'm afraid that all existing code built on nfcpy will initially be broken. However it will be fairly easy to adapt to
the new API and mostly be a matter of removing code that has become unnecessary, like running the poll-listen cycle.
Althoug still not complete, the documentation has seen quite a few improvements and especially the "getting started"
tutorial should help the transition.

Connection handover client with test suite

Written for nfcpy by Stephen Tiedemann on 2012-10-12

The examples/handover-test-client.py program is a ready-to-use command line program with a current suite of 8 different tests to validate a dynamic connection handover server (selector) implementation. Documentation of the test suite and command line parameters can be found at http://nfcpy.org/docs.

Updated on 2012-10-12.

Connection Handover test tool

Written for nfcpy by Stephen Tiedemann on 2012-09-25

The new handover-test-server.py in the examples section provides an easy way to run a handover server with a highly flexible list of selectable carriers - from the autodiscovered local Bluetooth adapter (only Linux) to whatever selection of crafted valid or invalid carriers. And it's actually also possible to just use to get smartphone images to the laptop/desktop by "simply touch" (tested on Ubuntu with gnome-file-share-properties Bluetooth receive enabled).

New tool for parsing and generating NDEF

Written for nfcpy by Stephen Tiedemann on 2012-09-04

The new examples/ndeftool.py provides a command line interface for dealing with NDEF data. Various NDEF messages can be generated and the list will certainly grow further. Want to pack an image into NDEF format? Just say "ndeftool pack <filename>".

Support for Type 1 and Type 4 Tags added

Written for nfcpy by Stephen Tiedemann on 2012-03-14

Finally found some time to implement the NFC Forum Type 1 and Type 4 Tag Operation specifications (initial code for type 1 tag reading contributed by Alexander, many thanks ). A limitation on Type 1 Tag read/write is that only the static memory model is supported but in reality there seem to be no Type 1 Tags that have more than 120 bytes memory, so this seems to be only a theoretical limitation for now.

15 of 11 results