The easiest way to use libnfc with the Adafruit NFC Breakout is via serial UART, since it's well-supported by libnfc out of the box. Unfortunately the serial UART port on the Pi is already dedicated to other purposes, and needs to be freed up for libnfc…

The following steps (based on a clean Raspberry Pi OS installation) should make the serial UART available to us:

Using the Desktop/GUI “Full” OS

You’ll find these settings in the Raspberry Pi Configuration tool. From the Raspberry menu at the top-left…

Go to the “Interfaces” tab and you’ll see two options “Serial Port” and “Serial Console.” Toggle both of these away from their default states. Serial Port should be enabled, Serial Console disabled. Then click “OK.” Reboot when prompted.

With each new OS release, it’s normal that some configuration options may move to different menus or positions. If you can’t find it where shown, check under the other top-level menu options…even if moved, the name will likely remain similar.

Using the “Lite” Command-Line OS

These options can be found in the raspi-config tool, which must be run as root:

sudo raspi-config

Navigate down to “Interface Options” and then “Serial Port.” Answer “No” to the login shell question, and “Yes” to the serial port hardware.

Navigate back to the main menu, tab to the “Finish” button and reboot when prompted.

With each new OS release, it’s normal that some configuration options may move to different menus or positions. If you can’t find it where shown, check under the other top-level menu options…even if moved, the name will likely remain similar.

This guide was first published on Jul 29, 2012. It was last updated on Mar 08, 2024.

This page (Pi Serial Port) was last updated on Mar 08, 2024.

Text editor powered by tinymce.