5.3.15. NxpNfcFrontendTokenProvider

The module NxpNfcFrontendTokenProvider implements the auth_token_provider interface. It reads data from NXP NFC frontend chips like CLRC663. It relies on NxpNfcRdLib_Linux_v07.10.00_PUB.zip which users need to obtain from NXP: [nxp.com](https://www.nxp.com/design/design-center/development-boards-and-designs/nfc-reader-library-software-support-for-nfc-frontend-solutions:NFC-READER-LIBRARY). The variety of hardware supported by NxpNfcFrontendTokenProvider is limited by the time of writing but could be extended by modification of the nxpnfcrdlib_wrapper.

5.3.15.1. Building the module

The module can be built in two ways:

  • Setting CMake variable EXTERNAL_NXPNFCRDLIB_ZIP_PATH_NxpNfcFrontendTokenProvider to the path to NxpNfcRdLib_Linux_v07.10.00_PUB.zip.

  • Leaving this option undefined uses the included NamedPipeDataSource which acts as a drop-in replacement without any external build dependencies but does not support real NFC hardware.

To enable users who do not use NxpNfcFrontend to build EVerest without having to explicitly set variables or options, the variable is undefined by default.

5.3.15.1.1. NamedPipeDataSource

Cannot interface real NFC hardware. During runtime it creates a named pipe (FIFO) at /tmp/EV_NXP_NFC_FRONTEND_TOKEN_PROVIDER_FIFO_SUBSTITUTE and tries to read from it. As soon, as it can read a \n-terminated line, it tries to parse it as <protocol>:<uid> (see examples below).

5.3.15.2. Configuring the module

Runtime configuration allows to

  • token_debounce_interval_ms: select a minimum intervall between publishes

See manifest.yaml for details.

5.3.15.3. Testing the module

The module does not implement any commands.

5.3.15.3.1. Using NamedPipeDataSource

Possible input for ISO14443 (MIFARE card) emulation:

echo "ISO14443:44332211" > /tmp/EV_NXP_NFC_FRONTEND_TOKEN_PROVIDER_FIFO_SUBSTITUTE

Possible input for ISO15693 (Vicinity card) emulation:

echo "ISO15693:8877665544332211" > /tmp/EV_NXP_NFC_FRONTEND_TOKEN_PROVIDER_FIFO_SUBSTITUTE

It publishes an types::authorization::ProvidedIdToken to the topic everest/tokenprovider/main/var.

It publishes whenever the NFC chip is able to detect a RFID card of the supported types.

Published JSON:

{
    "data": {
        "authorization_type" : "RFID",
        "id_token" : {
            "type" : "ISO14443",
            "value" : "74F2EF5B"
        }
    },
    "name" : "provided_token"
}

5.3.15.3.2. Using NxpNfcFrontendWrapper

Requires NFC hardware from NXP. A hardware setup similar to the one shown in the nxpnfcrdlib_wrapper documentation can be used. Detection of an RFID card of the supported type will trigger publishing of a types::authorization::ProvidedIdToken.