Using the ThingMagic Sargas RFID Reader
Trimble’s ThingMagic Sargas is an all-in-one embedded Linux UHF RFID reader that comes in a compact package with connectivity (Ethernet), 2 antenna ports (RP-SMA), GPIO, USB, and others. The processor board in the Sargas is a BeagleBoard Black, and runs Debian Linux. The Sargas spec sheet may be found here. The Sargas supports reading of EPC Gen 2V2 tags, IPx, and ISO18000-6B tags through optional firmware. It also supports LLRP V1.1.
Configuration: Initial Setup
Here's how to do the initial setup:
1. Connect an antenna to ANT1 and an Ethernet cable to the Sargas. Do not yet connect USB.
2. Now connect AC power (not USB).
3. Using the same network as the Sargas, navigate a desktop browser to the address printed on the Sargas unit (e.g. http://sargas-5205d0). If you have difficulty connecting, add “.local” to the address (e.g. http://sargas-5205d0.local).
4. The initial username and password of the Sargas is ‘web’ and ‘radio’, respectively.
5. Now, in the web interface (Settings > Reader), turn on ANT1 and make sure ANT2 is off.
6. Next, you can test reading tags using the web Read interface.
A more detailed set of setup instructions may be found on the ThingMagic firmware and manuals site.
If you’re still having trouble connecting to the Sargas, try connecting the Ethernet directly to your PC. On a Mac, you can use a Thunderbolt to Ethernet adapter. You can also enable Internet Sharing to have the Sargas route through your Mac to the Internet.
In addition to the Ethernet, the Sargas supports a multi-function USB interface that includes communication and USB mass storage. For communication it supports a CDC ACM driver that provides a terminal session. There are a number of cross-functional terminal programs, but a good cross-platform tool is ‘screen’. You can launch it from a command prompt. For example, on a Mac or Linux box, you can connect to the Sargas like this (tty may vary -- find it using ‘ls /dev/tty.usb*’):
% screen /dev/tty.usbmodem1413 115200 #device from dmesg or ls
For Windows, searching for ‘screen for Windows’ can be very confusing for Google. (Yes, that was supposed to be funny.) If you have Windows 10 Anniversary Edition (or later), install the Windows Subsystem for Linux toolset and viola, you have it. Otherwise, you can install an alternative like PuTTy. For additional information on the Sargas USB connectivity, refer to the Sargas User Guide. The default login for the Sargas from the terminal is ‘debian’ with password ‘rootsecure’.
Author's Note 9/12/16: The Windows Subsystem for Linux version of screen is not fully working. The recommended procedure is to start Windows Device manager and attach the Sargas to a Windows computer. When the Sargas is connected to Windows, you will be able to see the COM port in Device Manager > Ports. On my computer, it shows up as COM3. Then, use PuTTY to create a serial connection to COM3 at a speed of 115200.
You may want to use the Sargas for LLRP (network protocol) application, but since it has an embedded ARM processor, you may want to write application software for it that runs directly on the device. In the home directory of the debian user, you will find sargas-mercuryapi-22.214.171.124.tar.gz (or a more recent version). You can extract that file and build the sample apps with the following commands:
% tar zxvf sargas-mercuryapi-126.96.36.199.tar.gz % cd /home/debian/mercuryapi-188.8.131.52/c/src/api % make | tee make.log # log results to make.log
You will find sample source code under the c/src directory, as well.
The Sargas documentation is sparse with respect to testing the reader from the command line. Here are a couple of things that I learned:
The reader configuration files are stored in /tm.You can run a test app, ‘rfidscan’ from /tm/bin. The usage message talks about tmr:///com4, which is totally unhelpful. The reader is /dev/ttyO1 on the Sargas. So, you can try ‘rfidscan tmr:///dev/ttyO1 --ant 1’ for example.
Note: after publishing this article, we learned that ThingMagic recommends that you use tmr://localhost for on-reader programming. In particular, GPIOs do not work when programmed through /dev/ttyO1.
The Sargas firmware (FW) comes in multiple Debian (.deb) files. All of the files must be loaded in order to complete update the firmware. You can find the latest firmware at the Thingmagic website. Download the latest firmware and extract the files from the archive.
To update the firmware, navigate to the Firmware section of the web interface. For each of the Debian files, upload a firmware file and select “Continue without restart”. On the last file, you must restart the system. In some cases, you will also want to “Revert to default settings” (factory reset).
The Sargas FW release notes on the download page provide additional detail.