NFC

From OMAPpedia

Revision as of 22:45, 26 July 2012 by Bvijay (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

[edit] NFC Drivers Location

NFC driver and are hosted at [1] under the folder libnfc-ti. [2] under the folder Nfc. [3] under the folder drivers/Nfc.


[edit] Building NFC modules

Set the following environment variables,

run . ./build/envsetup.sh
lunch choose the platform to build for

Build the drivers by providing this simple make command,

go to external/libnfc-ti/
mm -B
go to packages/apps/Nfc
mm -B

[edit] Modules built

Following shared libraries and apps will be generated,


out/target/product/omap5sevm/system/lib/libnfc_ndef.so
out/target/product/omap5sevm/system/lib/libnfc.so
out/target/product/omap5sevm/system/app/Nfc.apk
out/target/product/omap5sevm/system/lib/libnfc_jni.so

[edit] Module insertion

The below mentioned modules need to be installed into the /system/lib/ and /system/app of the target AFS,

cp -v    out/target/product/omap5sevm/system/lib/libnfc_ndef.so $TARGET_FS/system/lib/
cp -v    out/target/product/omap5sevm/system/lib/libnfc.so      $TARGET_FS/system/lib/
cp -v    out/target/product/omap5sevm/system/lib/libnfc_jni.so  $TARGET_FS/system/lib/
cp -v    out/target/product/omap5sevm/system/app/Nfc.apk        $TARGET_FS/system/app/

[edit] Modification needed to device.mk and init.rc file

Make sure the following entries in the device.mk file frameworks/base/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \ frameworks/base/nfc-extras/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfcextras.xml \ device/sample/nxp/com.nxp.mifare.xml:system/etc/permissions/com.nxp.mifare.xml \ device/ti/omap5sevm/nfcee_access.xml:system/etc/nfcee_access.xml \

Make sure to set the proper permissions to nfc dev node /dev/nfc 0666 system system


[edit] Necessity of libnfc-ti & Switching back to libnfc-nxp

libnfc-ti is NCI complaint TI NFC stack built on top of libnfc-nxp. To switch a product from libnfc-ti to use libnfc-nxp, You can follow these steps:

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox