Online Store
Print Friendly, PDF & Email

uFR Shell Environment

NFC RFID Reader/Writer Command Line Interpreter

uFR Shell Environment

NFC RFID Reader/Writer Command Line Interpreter

uFR Shell is a command-line software interface for µFR Series hardware command execution on multiple operating systems. As the software title suggests, this is a shell environment with a set of variables defined by the µFR reader libraries.

Docs & Software Download

Software overview

Software functions:
Available programming languages:
  • Executable software
Supported operating systems, platforms, and environments:
  • Windows OS
  • Linux OS
  • MAC OS
  • Raspberry Pi
Supported tags, labels, cards:
  • MIFARE Mini®
  • MIFARE Classic® (1K, 4K, EV1)
  • MIFARE Ultralight®
  • MIFARE Ultralight C®
  • MIFARE Plus® (2K, 4K)
  • MIFARE DESFire® (Light, 2K, 4K, 8K, EV1, EV2)
  • NXP NTAG® 21x (210, 213, 215, 216, Tag Tamper)
  • NXP NTAG® 4xx DNA (413, 424)
Recommended hardware:
  • µFR Nano
  • µFR Nano Online
  • µFR Classic
  • µFR Classic CS
  • µFR Advance
  • µFR XL
  • Base HD (µFR compatibility mode)
ufr shell home screen
Software download
Description

uFR Shell executable software enables command-line execution for µFR Series devices in console mode.

Software manual

1. uFR Shell – Install and execute

Download: ufr-shell

Download and unpack the software file.

The extracted file root folder contains the subfolders with uFR Shell software executive files for supported operating systems.

The root folder also contains the software functions list and additional instructions.

If you have installed your hardware and related drivers correctly, you can now select and run the executable file for your current operating system.

urf shell folder

2. uFR Shell – Command-line interface

Regardless of the operating system, uFR Shell software runs as the command terminal. The software version displays in the first line of the screen.

ufr shell interface

3. uFR Shell – Software functions

To use the uFR Shell software for the execution of the commands on your uFR device, you need to have insight into all the available functions. You can find the function list in the software root folder, file UFR-Shell_list-of-functions.txt.

Please, find more details, as well as for instructions for functions implementation and application in API Docs.

urf shell functions

3.1  – uFR Shell – Command line execution

To select the right function for your command line, we recommend studying the Function help with all the functions description first. 

urf shell commands 600x342 1

3.2  – uFR Shell – Command-line execution examples

Now, let’s see how it works.

First, we need to establish communication with the connected µFR reader. So, our first command is going to be ReaderOpen.
Type the command:

  • ReaderOpen
ufr shell rearer open command

If the reader status is OK, we can proceed. Otherwise, please check if you have installed your hardware correctly. 

EXAMPLE 1

To get the hardware serial number, use the command:

  • GetReaderSerialNumber
ufr shell rearer sn get command

If the command has no additional parameters defined, the default output has a HEX format.

EXAMPLE 2

To get the data output in some other format, you need to specify the output format mode among available:

  • Hexadecimal (parameter h),
  • String (parameter s)
  • Decimal (parameter d).

The command line for the specified output format will now have two elements:

  • ‘Function’ ‘ parameter mode.’
ufr shell rearer sn get modes 1

EXAMPLE 3

As with the Reader serial number, to get the Card ID default output, simply use the command:

  • GetCardIdEx
ufr shell card id get command

For this command line, the console will display the Card type, UID, and UID output in default HEX format.

EXAMPLE 4

The Card ID output has tree output values. The previous example shows the Card ID output with no defined parameter mode in the command line
This example explains how to get a mixed output format. uFR Shell allows you to define the specific parameter mode for every output value.

The command line should look like this:

    • ‘Function’ ‘1. parameter mode’ ‘2. parameter mode’ ‘3. parameter mode’ 
ufr shell card id get modes

EXAMPLE 5

If you don’t define all the parameters in your command line, the output volume format without the assigned parameter mode will keep the HEX format (default).
The command line for tree values expected and two-parameter modes predefined has the following structure:

  • ‘Function’ ‘1. parameter mode’ ‘2. parameter mode’ 
ufr shell card id get modes part param

Section 3.2 explains how to define the output value format for a specified parameter. However, if you need to get the output in a non-hexadecimal format frequently, you may change the default format for all output values instead of defining each parameter separately.

For the permanent output format change (until the current console is closed), run the command line:

  • Set Output ‘ new parameters mode’
ufr shell permanent output format change

The screenshot above shows the default input value format preset to String (parameter s).

EXAMPLE 1

Let’s now run the test with the simple command line:

  • GetCardIdEx
ufr shell output format changed example 1

Now the output results are string values even though the command line has no additional parameter mode defined.

As you can see, all output values are string values with the Backslash character () at the place of their first character. The software automatically adds this character to the output values containing the non-printable characters.

EXAMPLE 2

The next example presents the string output when the value is printable.
Let’s write the content into the card with printable characters only. 

The example command line is:   

  • WriteUserData “Example-Test”
ufr shell write string data

Note: The string content to be recorded is written in quotation marks in the command line.

Now, read the content output. Command-line is: 

    • ReadUserData
ufr shell read data string

In this case, the output has no Backslash character at the beginning. The rest of the output content ( following the previously recorded content) are default values– unused bytes displayed as xFF values.

4. uFR Shell – Implementation differences in supported OS environments

  • Windows OS – Implementation on the Windows system does not require additional permissions to work with uFR Shell functions. It is enough to properly install the ufr reader and its libraries.
  • Linux OS – As usual in the Linux system, the full functionality of the uFR Shell software in communication with the device requires appropriate user permission.
  • MacOS – To ensure the instant software functionality on this OS, copy the libuRCoder.dylib library into the systems libraries folder. 

This manual presents software examples with several essential functions. A list of all supported functions is included in the software download package.