General principles
Quick access: Open NFC Interfaces Architecture 
Components of the Open NFC stack
The Open NFC package consists of the following components:
- Edition-specific bindings:
- For example, Java-based Open NFC Editions, such as the Android Edition, contain Java classes that implement the native API of the target platform and convert calls toward the native Open NFC API. These bindings are dependent on the Open NFC Editions; the Core Edition does not contain any binding. Refer to each Edition’s documentation for more information.
- Open NFC core module:
- The core of the Open NFC stack is a portable, hardware-independent module written in C. This module contains the logic necessary to handle the different protocols and modes of operation involved in NFC operation, but also the management of long-lived objects (connection handlers, states, …) and other similar tasks. The core module can be transparently compiled as one module (library) in monolithic porting, or as two modules in client-server porting or user-kernel porting. The document “C API of Open NFC” describes the API this module offers to applications. The API is contained in the file /core/interfaces/open_nfc.h, that an application should include. Note that compiling this module requires providing all the functions described in /core/interfaces/porting_os.h (Runtime-specific operations, such as memory allocation, …)
This core module relies on an NFC hardware-specific adaptation layer (NFC HAL) described below.
- NFC HAL module (sometimes also called NAL):
- The core module communicates with lower layer through an NFC HAL API (described in document SIS_NFC_1005-194 found under /core/porting/ and in header file /core/interfaces/nfc_hal.h). This lower layer is responsible for managing the specific hardware of the target platform: both the NFC controller itself, and the other hardware components involved in the communication, such as I2C, GPIO, … Please refer to the NFC Hardware section of this website for more information on the hardware-specific part.
Back to top 
Open NFC Interfaces Architecture
Almost all Open NFC interfaces are asynchronous: calling the interface returns immediately, and a callback is called again with the result code once the operation is completed. In many case, the first call also returns an operation handle that enables the application to cancel the operation before it completes.
Some interfaces are also provided with a synchronous counterpart. In that case, the call is blocking until the result of the operation is available. The synchronous counterpart is usually called [function]Sync, as for example “WVirtualTagStartSync“.
The Open NFC stack is schematically an event loop: calling an interface, receiving an NFC event or message from the hardware, timer expiring, etc., are all events that are stacked and handled in order. The Open NFC API Specification describes this mechanism in more details and specifies in particular how the events are pumped out of the loop (this differs depending on the porting).
Back to top 
Except as noted otherwise, this content is licensed under the terms of the
Apache 2.0 License.
For details and restrictions, see the
Content License.
Open NFC is a registered trademark of
Inside Secure, All logos and graphics are copyrighted.