srikanth401
Posts: 2
Joined: Sun Jan 04, 2015 6:50 pm

how to read/write image from NFC tag

Sun Jan 04, 2015 6:55 pm

Hello Friends..

kindly suggest me some solutions..

how to read/write image from NFC tag(mifare 4K) using NFC reader (PN532) which connected to raspberry pi using SPI..

thanks in advance..

User avatar
topguy
Posts: 6523
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: how to read/write image from NFC tag

Wed Jan 07, 2015 12:47 pm

You are talking about a graphical "image", a .png or a .jpg ?

There are a few libraries out there with pn532 support, libnfc for example. It seems to support SPI also.
http://nfc-tools.org/index.php?title=Li ... _using_SPI
You should probably start with using libnfc.

Adafruit has a nice tutorial for builing it on the Pi here: https://learn.adafruit.com/adafruit-nfc ... i/overview
(Just ignore the part of "freeing the UART" since you are not using serialport for communication )

If the tag you have is a Mifare 1 (aka. Mifare Classic) with 4kb memory then you should look up the memory layout of that card.
Then you have the option of using the smartcards memory directly or go through the NFC standard which uses NDEF datastructures that can be recognized by other NFC devices (like mobile phones). With direct memory access you will probably have around 3KB of usable space, with NDEF probably around 2KB.

Return to “C/C++”