Over the past couple of years, we’ve helped customers achieve keystroke entry from an NFC tag. Barcode scanners have for years come with this as a standard feature yet NFC readers for the most part don’t come with this capability in a built in or plug and play fashion. In this article we’re going to discuss this topic and the various solutions to this problem.
Types of USB and Bluetooth Peripherals
Popular communication protocols can host many types of peripherals such as headphones, flash drives, and even heart rate monitors. Human input devices (HIDs) are just one type which makes it easy for keyboard and mouse products to be compatible across all devices without installing drivers. In technical parlance this is called device enumeration – how does a device present itself to the operating system?
There are a few readers on the market that enumerate as keyboards. Some readers only input tag unique IDs and offer no data reading capability, which is often needed. The readers offered by large OEMs are also often complex to configure and designed for system integrators. However, most all-purpose NFC readers are designed for desktop applications and enumerate as PC Smart Card readers (PC/SC). This is great for reader interchangeability; however, unfortunately, it makes them unable to be a plug and play keyboard. The operating system simply doesn’t expect keystrokes to come from this device and therefore won’t treat any data received from it as such.
At the moment TapTrack Tappy readers don’t enumerate as keyboards either. The TappyUSB enumerates as a USB serial port and the TappyBLE enumerates as a proprietary BLE device. In these cases, developers often turn to middleware to achieve NFC keyboard entry capability; this ‘middleware’ is a piece of software connects to the reader and emulates keystrokes. The feasibility of developing this middleware depends on the platform and SDK support as we will discuss in the next section. At TapTrack, we aimed to achieve an elegant middle ground in the near term using our existing readers with the hope to soon make them available as true plug and play keyboard devices.
Keyboard Entry Middleware on Windows
The excellent integration of Windows with the .NET framework and Visual Studio development tools makes keyboard entry middleware on Windows a simple matter. There are libraries available that support emulated keystrokes with just a few lines of code in a .NET C# application. As a result, there are various Windows utilities that TapTrack offers that enable NFC keyboard entry with full tag reading as well as support for both TappyUSB and TappyBLE variants. Best of all, because all of our NFC utilities are fully open source, customizing them to your specific needs (such as by adding custom NDEF record parsing) is not a big development effort.
NFC Keyboard Entry using the Tappy Windows Utility
As of version 2.3, the general purpose Tappy Windows demo tool has a keyboard wedge utility added to it that is shown below. When active, the utility will enter any text records found in NDEF messages discovered on scanned tags as keyboard entry. This utility works with both TappyUSB and TappyBLE models. Future releases will also accept URLs.
Tappy Windows Utilty Keyboard Entry Demo
NFC Keyboard Entry with automatic configuration upon bootup
Some clients have insisted that NFC keyboard wedge functionality be automatically engaged when the PC starts up. Such a feature greatly simplifies operations by reducing the setup needed by users. For this purpose, we’ve made a tool for Windows that can achieve this by providing a simple command line tool that connects to a Tappy and automatically begins scanning for NFC tags to enter as keystrokes. To have it run when the PC boots up, just place it in the “Startup” folder in Windows. Use a simple batch file to configure the tool with non default options. See below for download and source code links.
NFC Keyboard Entry on Windows with Bluetooth Connection Monitoring
For TappyBLE applications where the operator is far away from the PC, there may be a need for a higher reliability setup where the reader only accepts scans when the Bluetooth connection is healthy. For example, a utility operator client explained that workers scan equipment tags while elevated with the laptop located on the ground. This application needed a workable wireless NFC keyboard entry on Windows and, with elevated workers in harms way, a silent failure in the Bluetooth connection would be unacceptable. When set to stream NFC tag information, the TappyBLE will continue to accept scans even if the Bluetooth connection is dropped, which can cause the operator to think data is still being entered as keystrokes when in fact the connection has been dropped and no data is being transmitted. The TappyBLE heartbeat keyboard wedge utility addresses this concern and monitors the health of the Bluetooth connection while reading NFC tag data for keyboard entry. If you’re interested in more detail we’ve written an application note that describes the various options for NFC keyboard entry over Bluetooth on Windows.
NFC Keyboard Entry Middleware on Android
In Android, the Input Method Editor (IME) is an input-method framework that allows applications to provide users alternative input methods. Using the IME capabilities in Android, developers can create middleware in the form of keyboards that the user selects when using the phone or tablet. TapTrack has developed a keyboard that will allow Android device to use a Tappy NFC reader (USB or Bluetooth) and enter either the tag’s data or its unique identifier as keyboard entry. This application is listed on the Play Store (see below) and is compatible with most Android devices.
Making the Tappy reader into a true keyboard device
The Tappy reader line is evolving and we’re always looking to improve the product with useful innovations. In the future, we may offer a variant of the Tappy with true keyboard entry without requiring middleware or an adapter that would turn any Tappy into a keyboard entry device. If you’d be interested in either of these options, please sign up below to be notified of this product’s release.
NFC Keyboard Entry on Android
For Android-based solutions, we have a keyboard app that integrates with our Tappy External NFC app to provide a method of entering either NDEF or UID data from NFC tags using TappyUSB or TappyBLE readers.
TappyBLE Keyboard Wedge for Windows
For use cases that demand wireless NFC keyboard entry on Windows where the operator would benefit from knowing if the Bluetooth connection has failed, we’ve developed a Windows utility that maintains a heartbeat with the reader to actively monitor the health of the Bluetooth connection.
Auto Launcher NFC Keyboard Wedge for Windows
For applications where it’s desirable for Windows to automatically have NFC keyboard entry enabled upon bootup, this simple tool can be used to minimize the amount of user setup required upon rebooting.
Tappy Demo Utility for Windows
Built into the example Windows demo utility is a keyboard entry feature that works with with the TappyUSB and TappyBLE models.
Sept 24, 2018