This proposal is to explain about the extension of IoTivity transports to NFC transport.
In the current IoTivity, we have different connectivity’s supported such as IP, BT and BLE but we don’t have any proximity transports to enable new use-cases. Here we want to show case how a NFC transport can be added to make more effective IoTivity solution
Data is exchanged between NFC devices using NDEF format ( NFC Data Exchange Format) which consists list of NDEF records. Each NDEF record contains mimetype and the data bytes.
In IoTivity as coap binary data is transmitted between devices, same binary is inserted in the NDEF record and transmitted to other IoTivity device. Receiving IoTivity device can parse the NDEF message and retrieve the NDEF record for CoAP data.
Retrieved CoAP data is transmitted to CA using the NDEF adapters.
Supported Platforms: Android NFC adapter is implemented using the Android APIs (https://developer.android.com/guide/topics/connectivity/nfc/index.html) in p2p Mode. Using the Android Beam invocation, IoTivity Protocol payload (data) is exchanged to the remote device in NDEF format.
During IoTivity server/client interactions, request and responses are prepared and sent to each connectivity adapters. When NFC is selected as medium of transport, the prepared IoTivity messages is pushed as payload in NDEF format for the remote device.
Received IoTivity device will parse the NDEF message and extract the IoTivity payload and send back to the Resource introspection layer for further analysis.
IoTivity samples can be built using the target transport as NFC when platform is selected as Android.
Ex: scons TARGET_OS=android TARGET_TRANSPORT=NFC TARGET_ARCH=armeabi RELEASE=0
Once Android samples are built as per the instructions,please execute IoTivity client and IoTivity server in two separate devices.
As NFC allows data communication only nearby devices,IoTivity client and server devices need to be bumped to make Android beam to transfer the data.
All kinds of IoTivity messages can be transmitted using NFC transport when devices are touched or close by.