Raspberry NFC development
Computing power, expandability, good Linux support and finally the price have made the Raspberry platform very popular. Size and interfaces of the devices leave nothing to be desired - in this article we want to show you the possibilities of NFC development under Raspberry. In the following two possibilities of using NFC with Raspberry are compared.
NFC Breakout Board for Raspberry
With a breakout board based on the NXP PN532 NFC controller, the NFC function is made available via the PIN bar of the Raspberry. It is connected to the board via the serial interface using an FTDI cable. The breakout board can also be connected to an Arduino, but unlike the NFC shield described here, it is not PIN-compatible.
After connecting the board, the libNFC API can be used to control the chipset to read and write common NFC tags. The libNFC API has detailed documentation and examples for this.
NFC USB Reader for Raspberry
The NFC-USB readers available from us can also be used with the Raspberry. Raspbian and other distributions already provide the appropriate drivers for the ACR 1252U reader or the appropriate drivers are available in the repository.
After connecting the USB reader, the commands apt-get install pcscd pcsc-tools can be used for experimenting. The PCSC daemon outputs smart card IDs to the console after startup. There are examples for the PC/SC API in numerous programming languages, which demonstrate the connection to the reader and the reading of cards (C#, python, java, ...). An example for Python can be found behind the following link.
NFC Breakout Board vs. USB Reader
In comparison, both variants have their respective advantages and disadvantages. The Breakout Board allows hardware-near programming of the well-documented PN532 chipset, but is completely without housing and occupies PINs that may be needed for other modules. For typical NFC read and write operations, access via the PC/SC interface is often easier and faster. Furthermore, the USB readers already have a robust housing with integrated signal LED and beeper. Ultimately, however, it depends on the application. Regardless of this, you will find suitable NFC tags for all applications.