RFID readers

From SpinetiX Support Wiki

Jump to: navigation, search

This page is related to Interactivity via USB.


Radio-frequency identification (RFID) refers to a wireless system comprised of two components: tags and readers. An RFID reader uses electromagnetic fields to automatically identify and track RFID tags attached to tools, equipment, inventory, assets, people, or other objects.

Radio-frequency identification

RFID tags can be either passive, active or battery-assisted passive. When triggered by an electromagnetic interrogation pulse from a nearby RFID reader device, the tag transmits digital data, usually an identifying inventory number, back to the reader.

The RFID readers / scanners are usually connected and powered via USB - the HMP is theoretically compatible with any RFID reader that offers standard HID keyboard emulation, meaning that the tag data is transmitted as a series of key-press events. An HMP would display a different content on the screen based on the data sent by the reader.

Note Notes:

Compatible RFID readers

The following list is not exhaustive. You are invited to share your experiences with devices you have successfully tested, so the list remains up-to-date.

Manufacturer Model Added on Tested by Notes
iDTronic USB Desktop Reader EVO HF

USB Pen Stick Reader EVO HF KEMU

2014-09-29 SpinetiX A sample project is available below.

Elementi project

Version: 1.0 (revision history)
Release date: 2014-03-12

This sample project demonstrates how an RFID reader (with keyboard emulation) can be used to interact with the HMP in order to display certain information on the screen based on the data sent by the reader. We've used the IdTronic USB Desktop Reader EVO HF (which sends 16 characters followed by an "Enter" for each tag), but any other compatible RFID reader should work as well, although you might need to change the JavaScript code below.

The project contains two files:

  • index.svg
    Reads the data sent by the RFID device and updates a Shared Variable with the tag code (which can also be displayed on the screen).
    Note that you might need to change the "Tag code length" property, if your device sends tag codes of different length.
  • Action to Switch.svg
    This is the "Action to Switch" widget, simply configured to use some test values for the Shared Variable.

Sample code

The following JavaScript code is included into the index.svg file to interpret the quick succession of keystroke commands emulated by the RFID device.

var buffer = '';

$(function () {
    var txt = $('#jsonLayers').text();
    if ( $.trim(txt) != "" ) {
        $('#layers').add( $.uncan($.parseJSON(txt)) );
    var config = $.parseJSON( $('#config').text() );    // load the configured properties
    var sv = createSharedVariable( config.sv_name );    // create the shared variable
    if ( config.show_tag ) {
        var textArea1 = $.textArea({
            "displayAlign" : "before",
            "fill" : "#000",
            "fontFamily" : "Arial",
            "fontSize" : "20",
            "height" : 190,
            "id" : "t",
            "left" : 0,
            "textAlign" : "start",
            "top" : 0,
            "width" : 1280
        }).text('Waiting for RFID tags ...').addTo('svg');
    $('svg').textInput( function( evt ) {
        buffer += evt.data;
        if( buffer.length >= config.max_len * 5 ) {
            alert('Error: The reader is sending a wrong signal. Discarding existing data.');
            buffer = '';
    }).keydown( function( evt ) {
        if( evt.keyIdentifier == 'Enter' ){
            if ( config.show_tag ) {
                textArea1.text( buffer );
            if ( buffer.length >= config.max_len ){
                sv.set( buffer.slice( -config.max_len ) );
                buffer = '';
            } else {
                alert('buffer size: ' + buffer.length);
This page was last modified on 1 May 2023, at 11:52.