Contents
- 1 uFR Shell Environment – Command Line Interpreter
Contents
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.
uFR Shell executable software enables command-line execution for µFR Series devices in console mode.
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.
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.
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:
If the reader status is OK, we can proceed. Otherwise, please check if you have installed your hardware correctly.
To get the hardware serial number, use the command:
If the command has no additional parameters defined, the default output has a HEX format.
To get the data output in some other format, you need to specify the output format mode among available:
The command line for the specified output format will now have two elements:
As with the Reader serial number, to get the Card ID default output, simply use the command:
For this command line, the console will display the Card type, UID, and UID output in default HEX format.
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:
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:
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:
The screenshot above shows the default input value format preset to String (parameter s).
Let’s now run the test with the simple command line:
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.
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:
Note: The string content to be recorded is written in quotation marks in the command line.
Now, read the content output. Command-line is:
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.
This manual presents software examples with several essential functions. A list of all supported functions is included in the software download package.