PN7160TokenProvider

PN7160 RFID/NFC token provider returning the token as soon as the tag can be read by the reader

Handwritten Documentation

This module provides authentication tokens obtained from RFID cards via the NXP PN7160 NFC chip.

It uses a modified libnfc-nci as external dependency to interface the chip via I²C or SPI, either from user space or via a kernel module.

Hardware Interface Configuration

Configuration of the hardware interface is possible at runtime. The module installs two configuration files:

  • libnfc-nci_config/libnfc-nci.conf: define NFC options

  • libnfc-nci_config/libnfc-nxp.conf: choose the hardware interface (kernel module vs. userspace; I²C vs. SPI, …)

Module Configuration

The EVerest module can be adjusted in its behaviour as follows:

  • token_debounce_interval_ms: Publish tokens in minimum intervall of this timespan in order not to flood subscribers.

  • disable_nfc_rfid: Allows to load the module without actually initializing the hardware.

Auto-Generated Reference

Provides

Implementation of PN7160 RFID/NFC token provider
config:
transport: string <optional>
default: “file”
Defines which interface to use to access the reader, that is usually either I2C or SPI. The third option ‘file’ - which is the default - is only to provide backwards compatibity - in this case, the/a static configuration file (usually /etc/everest/libnfc_config/libnfc-nxp.conf) is used and the following hardware related config options here are not used at all.
enum:
- file
- i2c
- spi
device: string <required>
This is either the I2C bus user-space device, e.g. ‘/dev/i2c-1’, or the SPI user-space device, e.g. ‘/dev/spidev0.0’.
i2c_address: string <optional>
default: 40
When using ‘i2c’ as transport, defines at which I2C address the reader can be found. Note that this configuration value must be given as hex string and so quoted correctly!
enum:
- 40
- 41
- 42
- 43
pin_int: string <optional>
default: “”
Defines which input GPIO is connected to the interrupt pin of the PN7160. This can be either an integer value when using the older number based sysfs interface, or a GPIO line name (defined for example via board’s device tree) when libnfc-nci is compiled with enabled libgpiod support. Note: When using plain GPIO sysfs numbers, then this must be properly enclosed in quotes since this configuration option must be given as string.
pin_enable: string <optional>
default: “”
The output GPIO which is used as enable/reset pin. This can be either an integer value when using the older number based sysfs interface, or a GPIO line name (defined for example via board’s device tree) when libnfc-nci is compiled with enabled libgpiod support. Note: When using plain GPIO sysfs numbers, then this must be properly enclosed in quotes since this configuration option must be given as string.
pin_fwdnld: string <optional>
default: “”
The output GPIO which is connected to the firmware download mode pin. This can be either an integer value when using the older number based sysfs interface, or a GPIO line name (defined for example via board’s device tree) when libnfc-nci is compiled with enabled libgpiod support. Note: When using plain GPIO sysfs numbers, then this must be properly enclosed in quotes since this configuration option must be given as string.
token_debounce_interval_ms: integer <optional>
default: 3000
Minimal wait time in ms until next token will be published (debounce interval).
disable_nfc_rfid: boolean <optional>
default: False
Disable NFC RFID reader
debug: boolean <optional>
default: False
Show debug output on command line.

Metadata

Authors

Cornelius Claussen
Kai-Uwe Hermann
Thilo Molitor
Anton Wöllert
Christoph Burandt

License