Using input tag sensors like RFID/NFC readers

Table of Contents

    NOTE: Option One described below - out-of-the-box support for libnfc - was discontinued in IntuiFace Version 6.0. It is documented here solely for those still using IntuiFace Version 5.x.

    Overview

    RFID/NFC readers are contactless devices that can capture the unique ID of a properly configured card/badge/tag/etc. In IntuiFace, we refer to these sources of unique IDs as "input tags. These IDs can be used to structure queries for additional information and/or to control displayed content. For example, advancing your experience to a specific scene based on the detected tag ID.

    Integrating Your Reader With IntuiFace

    Option One: Readers Compatible with libnfc

    IntuiFace natively supports any RFID/NFC reader compatible with the libnfc library. A list of compatible readers can be found here. If your device is not on that list, ask your device's manufacturer if it is compatible with libnfc.

    NOTE: Despite the name, libnfc is not limited to NFC reader support. It can work with any contactless reader.

    IntuiFace will automatically detect and receive events from a libnfc-compatible device. This enables you to use the following IntuiFace triggers:

    • Detects a specific tag; Same as "Detects a tag", also includes a second parameter, "Tag ID", which would contain a specific tag ID.
    • Detects a tag;
    • Loses a Specific tag; Same as "Looses a tag" also includes a second parameter, "Tag ID", which would contain a specific tag ID
    • Loses a tag;

    tagid-triggers.PNG

    Option Two: All Other Readers

    For IntuiFace Version 6:
    Configure your device to send an HTTP GET request to Player by following the directions here. The GET request will raise the Message is received trigger.

    For IntuiFace Version 5:
    Configure your device to use IntuiFace's remote action syntax. With this syntax, your reader can alert IntuiFace to when a tag is detected and to the tag ID.

    NOTE: Configuration of peripherals to automatically call these remote actions will likely require that you write some code for your peripheral's input drivers. This is typically a predefined capability of peripherals and thus shouldn't be too difficult.

    IntuiFace recognizes 2 different input tag events. You need to configure your peripheral to make remote action calls alerting IntuiFace to these tag events. Here is the syntax of those calls:

    • Tag detected
      http://[YourComputer]:8000/intuifacepresentationplayer/input/tags/tagdetected?spec=xxx, where xxx is replaced by the tag identifier.
      Example: http://127.0.0.1:8000/intuifacepresentationplayer/input/tags/tagdetected?spec=1234

    • Tag lost
      http://[YourComputer]:8000/intuifacepresentationplayer/input/tags/taglost?spec=xxx, where xxx is replaced by the tag identifier.
      Example: http://127.0.0.1:8000/intuifacepresentationplayer/input/tags/taglost?spec=1234

    The result of these remote action calls is to activate the following triggers:

    • Detects a specific tag
    • Loses a specific tag

    detecttag.png

    Capturing the tag ID

    For IntuiFace Version 6:
    When the Message is received trigger is raised, its parameter values are accessible within IntuiFace. Follow the directions here.

    For IntuiFace Version 5:
    Input tag triggers - Detects/Loses a tag or Detects/Loses a specific tag - have a read-only "Tag" property. This property contains the tag ID, making it available via binding for action parameters

    tagidbinding.png

    Testing the connection between IntuiFace and an input tag reader

    For IntuiFace Version 6:
    The HTTP GET request that raises the **Message is received
    * trigger can be called from any Web Browser. Doing so will test the ability of Player on a give device to receive events from external devices.

    For IntuiFace Version 5:
    You can test your connection to a tag reader using Composer's Edit Mode.

    1. Make sure your reader is connected and powered on.
    2. Open a new or existing project in IntuiFace Composer.
    3. Launch Play Mode at least once to initialize the embedded RFIC/NFC integration engine.
    4. Return to Edit Mode (e.g. by pressing the ESC key).
    5. Select the active scene in your experience and open the Triggers and Actions panel.
    6. Select the Tags Trigger category and the Detects a specific tag trigger.
    7. Place a tag in front of your reader.
    8. The tag ID should appear in the Tag ID field in the Parameters section of the Triggers and Actions panel. See image below.

    gettagID.PNG

    A great sample to learn more

    We have developed a great RFID-based sample named "Exploring RFID Technology" that you can start exploring here.