Table of Contents

Since batocera 43, you can use a nfc reader and cards to start/stop your games or execute any custom action (like shutting down batocera).

Required hardware

A nfc reader

It is recommanded to use a pn532 reader while it is recognized by both software you can use in batocera. It costs about 10€.

The integrated batocera nfc service supports only pn532 readers.

The Zaparoo nfc service supports more hardware (see https://zaparoo.org/docs/readers/)

Nfc tags

Any tag ntag215. Cards or stickers.

Available softwares

batocera.linux offers 2 software solutions to make a nfc reader to work.

  1. the integrated batocera nfc service
  2. Zaparoo nfc service

The integrated batocera nfc service and Zaparoo nfc service both offers:

The integrated batocera nfc service:

The Zaparoo nfc service:

The integrated nfc service

Installation

Plug the nfc reader to batocera

Plug the nfc reader to batocera.

Start the nfc service

From emulationstation, go in the system menu, find the services entry, and enable the simple nfc service.

Note that the nfc reader must be connected to batocera first. If when starting, the simple nfc service detects no hardware, it stops.

The simple nfc service is not enabled by default in batocera, cause the hardware used for nfc readers (uart converter) is generic, and cannot be distinguished from some other hardware.

Write the name of a card on a nfc tag

From emulationstation, choose a game, and press a long time on it to display its menu. Choose “Write an nfc tag for this game”.

If the entry is not present, it means that the nfc reader was not detected.

Put the nfc tag on the reader to write it.

Usage

Default behavior :

Customized scripts

By default, when you connect a tag, the nfc service will execute all the script present in the following system directory :

If you create the following directory, the system default scripts will not be executed, instead, the one of the custom directory will be executed.

The same behavior occurs for disconnect with the following directories :

Extra file : When a nfc service detects a nfc reader and listen to it, it create the following file :

When the hardware is removed, this file is removed. Thanks to this, emulationstation takes the decision to show or not the write entry in the menu. You could use this file to know whether a nfc reader is listening tags or not.

The Zaparoo nfc service

Installation

Details given in the following video : https://www.youtube.com/watch?v=XpH27Yswe38