Porting libnfc to Android

Libnfc-1.4.1 has been ported to Android!

For this project a Nexus One (also called Passion) with Android is able to detect an external NFC reader. Also, an Arygon desktop NFC reader is used. This reader is connected to the Nexus One, by using a USB-Dual cable to supply the external reader with additional power. This external power sources is necessary since the Nexus One alone is not capable of powering the card reader. The steps which are taken, are written in this document. This manual provides instructions to:

  • Preparing Ubuntu to compile Android source code
  • Port libnfc and libusb to Android
  • Set the Nexus One into usb-host mode (thanks to Sven Killig)
  • Load the kernel into the boot.img
  • Flash the device

IMPORTANT: Before using this manual, you should be sure that you know what you are doing.

I have tried to make this manual as convenient as possible. However, if something is unclear or wrong, do not hesitate to leave a comment.

If someone is interested in the LaTeX sources files of the document, please sent an email to hak300 few vu nl.

About these ads

About appelmelk

This blog contains an outline for my Master project @ the VU - Amsterdam.
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

9 Responses to Porting libnfc to Android

  1. Galip YORO says:

    Hello i can’t add usb library and nfc library i think i don’t undesrtand android.mk file or miss understand could you help me please
    for example

    ./libnfc-1.4.1/libnfc/drivers/arygon.c
    ./libnfc-1.4.1/libnfc/buses/uart_posix.c
    ./libnfc-1.4.1/libnfc/chips/pn53x.c

    this lines must be in nfc.h or something else

  2. Galip YORO says:

    hello again thanks for reply

    external/libnfc/libnfc/buses/uart.c:27:22: error: config.h: No such file or directory
    In file included from external/libnfc/libnfc/buses/uart.c:38:
    external/libnfc/libnfc/buses/uart_posix.c: In function ‘uart_receive':
    external/libnfc/libnfc/buses/uart_posix.c:265: warning: implicit declaration of function ‘MIN’
    make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libnfc_intermediates/buses/uart.o] Error 1

    • appelmelk says:

      Try to move the config.h to libnfc/libnfc/include, this file is usually placed int ./libnfc

      I’ll email you a copy of my port on the end of the day. This should be more convenient.

  3. Galip YORO says:

    last position

    anakin@anakin-desktop:~/myandroid$ mmm ~/myandroid/external/libnfc-1.4.1

    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=2.2.1
    TARGET_PRODUCT=generic
    TARGET_BUILD_VARIANT=eng
    TARGET_SIMULATOR=
    TARGET_BUILD_TYPE=release
    TARGET_BUILD_APPS=
    TARGET_ARCH=arm
    HOST_ARCH=x86
    HOST_OS=linux
    HOST_BUILD_TYPE=release
    BUILD_ID=MASTER
    ============================================
    make: Entering directory `/home/anakin/myandroid’
    make: Nothing to be done for `all_modules’.
    make: Leaving directory `/home/anakin/myandroid’
    libusb.so ok
    but libnfc.so doesn’t

    thank you

    I’m going crazy

  4. Galip YORO says:

    hello,

    Sorry i’m late.i have a some problems about my computer :)
    I will try tomorow.My mail address galipyoro@gmail.com.

    thank you,

  5. Alia Morsi says:

    I can’t get access to the manual you’re referring to.. is the link still active?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s