Page 1 of 1

how to read/write image from NFC tag

Posted: Sun Jan 04, 2015 6:55 pm
by srikanth401
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..

Re: how to read/write image from NFC tag

Posted: Wed Jan 07, 2015 12:47 pm
by topguy
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.