Using the Alien Gateway Command Line
This article will show the use of the Command Line functionality of the Alien Gateway software with basic commands and autonomous workflows.
The RFID Gateway software by Alien is a very user-friendly and useful tool for connecting to and configuring Alien RFID readers. This software allows user to easily setup their readers and test different configurations in order to find the best settings for their application.
For this demo, we will be using the ALR-F800 reader. For help setting up your reader for the first time and connecting to the Gateway software, please see Setting Up Your Alien ALR-F800 Reader.
The Command Line Interface
The Alien Gateway software provides 4 interface modes that allow for the user to interact with the reader and tags in the surrounding area. This article will focus on the Command Line Interface mode, which allows users to configure the reader directly via custom commands and setup the reader's autonomous workflow modes.
The Command Line interface can be accessed directly via the Alien Gateway software, or can be used through a third-party software connection, such as PuTTY. For this demo, we will focus on using the Alien Gateway software.
When the Command Line interface is accessed from the Alien Gateway home screen, the user will need to provide a username and password to the reader in order to use the command line. The default credentials for using the command line are:
These credentials, as well as all recognized commands, will be input into the textbox at the very bottom of the application. In addition to entering commands manually, there are also customized button slots available to quickly call common commands. These are found on the left-hand side of the Command Line interface.
All available commands can be found in the Reader Interface Guide linked in the Downloads section above, or by simply typing "help" into the Command Line interface. The following sections will show the most common commands and how they can be used to setup an Alien fixed reader in an RFID application.
These commands are used to interface with the reader itself in order to obtain information about the reader, connected antennas, and additional help and information. A few of the most commonly used commands are:
- help - Displays a list of all available commands
- info - Displays a list of all current reader settings
- ! - Repeats the last command
- save - Saves all current settings to the reader (non-volatile memory)
- quit - Exits the Command Line interface
- reboot - Reboots the reader (this is necessary for some commands to take affect)
Network commands are some of the most common commands used for reader setup and integration into an application. These commands are used to find the reader's current networking configuration and change it to match the network into which it needs to be integrated. A list of some of these helpful commands can be seen below.
- info network - This command will show the reader's current network configuration
- dhcp = on/off - This command allows you to enable or disable the reader's DHCP functionality. The reader must be rebooted in order for this command to take affect.
- ipaddress, gateway, netmask = xxx.xxx.xxx.xxx - If DHCP is not being used, these commands can be used to manually set the reader's IP address, gateway, and netmask respectively. To use this command, simply type the parameter you would like to configure and then enter the desired value. After a successful configuration, save the settings and reboot the reader.
- Example: ipaddress = 169.254.1.100
The time commands for Alien fixed readers are used to synchronize the reader's internal clock with that of another machine. These commands are:
- TimeServer = xx.xx.xx.xx - This command allows the user to set the reader to connect to a specified NTP server for automatic clock synchronization on boot.
- TimeZone = x - These commands allow the current time zone to be assigned to or retrieved from the reader. The time zone specifies the number of hours that must be added to or subtracted from UTC (Coordinated Universal Time; also known as GMT or Zulu) to determine a local time reference. For example, to set the Time Zone to Central Daylight Time (UTC-5), you would use:
- TimeZone = -5
- Time = YYYY/MM/DD hh:mm:ss - This command allows the user to manually set the local time for the reader, in the format YYYY/MM/DD hh:mm:ss.
External I/O Commands
These commands can be used to interact with external sensors or devices, like photo eyes and alarms.
- ExternalInput? - This command retrieves the state of each reader input (GPI) in a byte format. This means that the information will be in binary, but it is represented as a decimal number. For example, if the F800 reader's GPI pins 11 and 12 (which correlate to inputs 0 and 1, respectively) were connected to two different devices, we can retrieve the state of each of those connected devices.
If we assume that the device on pin 11 is sending a HIGH signal and the device on pin 12 is sending a LOW signal, the output of the ExternalInput? command would be "2", which translates to binary "10". If both devices were sending HIGH signals, the command response would be "3", which is binary "11".
- ExternalOutput = x - This command is used to set the reader's external GPO signals either HIGH or LOW. Similarly to the ExternalInput command, the ExternalOutput command expects a binary byte argument to set the appropriate pins. Using the F800 GPO pins 3 and 4 (output 0 and 1), let's assume we need to send a HIGH signal on Output 1, but leave Output 0 on a LOW signal. To do this, use ExternalOutput = 1, because "1" translates to binary "01".
- Depending on the devices connected to the reader's input or output pins, the logic of the signal may need to be reversed. To accommodate this, both of the I/O commands above have "invert" options: InvertExternalInput and InvertExternalOutput.
- IOStreamMode = ON/OFF - This command allows the user to specify that each change in external inputs and outputs should be streamed to a specified TCP port or the reader's serial port. This functionality can help in applications that require the reader to constantly poll the inputs, or in applications where data needs to be streamed to a TCP port for processing or to a PLC.
- IOStreamAddress = hostname:port/serial - This command sets the address to which the I/O data will be streamed after enabling the IOStreamMode. This commands accepts arguments for either a TCP port (hostname:port format), or can use the reader's serial port by simply typing the word "serial".
The TagList commands are commands specifically meant to help the user interact with RFID tags. These commands are used to read and report tags, and can configure the reader to stream tags to a specific location or endpoint.
- Get TagList(t) - This command retrieves the most recently saved Tag List from the reader's memory. In the reader's default state, this command tells the reader to perform and inventory and report the tags read to the Command Line interface screen. This command can also be entered simply as "t".
- TagStreamMode = ON/OFF - This command allows the user to stream tag data from the reader to a TCP port or serial port. This allows the user to constantly receive the tag data instead of polling the reader for data at set intervals.
- TagStreamAddress = hostname:port/serial - This sets the address to which the tag data should be streamed after enabling the TagStreamMode.
This group of commands allows the user to adjust the protocols used for UHF RFID tag inventory operations. This includes parameters such as Acquire Mode, Session, and tag masks (filtering).
- AcquireMode = Inventory/Global Scroll - This command allows the user to specify how the reader should search for tags.
The Inventory acquire mode performs a full anti - collision search on tags in the reader’s field of view. This method locate s and distinguish es multiple tags in front of the reader at the same time. The Global Scroll acquire mode i nstructs the reader to read a single tag repeatedly. This is a very fast tag reading method that is most effective when only one tag at a time is expected to be within reader range, as in conveyor belt applications.
AcqG2Session = 0/1/2/3 - This command allows the user to set the Session, which is the inventory session used by the reader when acquiring Class1/Gen2 tags. Basically, it sets the persistence of the tags being scanned in the inventory, which is to say that it defines which tags are available for a read at a given time. The nominal persistence times for each session are shown in the table below. For more information on search modes and sessions, please see the article linked here: https://www.atlasrfidstore.com/rfid-insider/understanding-epc-gen-2-search-modes-and-sessions
- AcqG2Mask = memory bank, bit pointer, bit length, character array (in bytes) - This command allows for filtering of the inventory to tags that meet a specific criteria. For example, if we needed to read only tags that have an EPC starting with the characters "5550", we would use the command below:
- AcqG2Mask = 1, 32, 16, 55 50
The Gen2 memory banks are assigned the integer values shown in the table below. Since we are filtering to the EPC memory bank, we choose "1" for the command's memory bank argument.
The portion of the EPC we care about does not include the PC bits, so we are going to start the mask at bit 32. Since we filtering all values to those that contain 4 characters, we will specify that the bit length will be 16 (4 bits per hexadecimal character). Finally, we specify the actual character array that we are looking for, which is "5550". The command expects this argument to be broken up into bytes, which is 2 hexadecimal characters (8 bits), hence the space between "55" and "50".
When we enter this command and then run another Get TagList command, we see the output shows only tags that match our new tag mask.
This section will outline the AutoMode commands for the Alien F800 reader, which allow the user to perform a one-time configuration of the reader via commands or scripts and then leave the reader to perform automatically.
- AutoMode = ON/OFF - This command enables or disables the AutoMode feature of the reader.
- AutoAction = action - This command specifies which action the reader should take during AutoMode. The default setting is "Acquire". The table below shows the available arguments.
- AutoStopTimer = time (in milliseconds) - This command sets the amount of time the desired AutoAction should take place. For example, if we want the reader to automatically perform an inventory for 30 seconds, we would enter the command as
- AutoStopTimer = 30000
- AutoModeTriggerNow - This command tells the reader to begin its AutoAction immediately instead of waiting for an external trigger.
Setting up an Autonomous Workflow
Now that we are familiar with the command structure and functionality of the Command Line interface, let's put all of this information together into a cohesive demonstration.
For this demo, we will configure an ALR-F800 reader to autonomously begin an inventory cycle for tags that have an EPC starting with the characters "5550" and stream all tag reads to a TCP/IP port. The Alien Gateway's Notification Listener can then be pointed at that TCP port to display the data.
First, we set the TagStreamAddress to a TCP port of our choosing. I chose 192.168.1.50:80:
Next, we enable the TagStream Mode:
Then, assign the tag mask to filter only the tags that contain the desired EPC:
And set the reader to perform an inventory for only 30 seconds:
Once everything is configured, start the workflow:
When we enable the Notification Listener in Alien Gateway, we can now see the tag data being streamed to the TCP port in real time.
If you have any questions about configuring your Alien reader, please don't hesitate to reach out to us at support@atlasRFIDstore.com.