How to Send Custom Commands to TSL Handheld Readers

Overview

This article will review the steps to send custom commands to handheld readers by TSL. We will be using the Sleep Timeout command and the Alert command as examples. For information on what these and other commands do, please see the PDF in the Downloads section.

Downloads

ASCII Protocol Explorer

TSL ASCII Protocol 2.5Rev A (PDF)

Method 1: ASCII Protocol Explorer

The ASCII Protocol Explorer tool is a program developed by TSL to assist with the formatting and execution of their custom command set, which is known as the ASCII Protocol.

The advantage to sending commands this way is that the ASCII Protocol Explorer tool will build the command for you. The user chooses the desired command from a list of supported commands, and the program creates the command with the appropriate parameters. Also, this method of command execution does not require any additional hardware, versus using an SD card. The disadvantage of using this method is that if the reader goes to sleep, the reader will "forget" the command, and you will need to repeat the process (this is true of most, but not all commands).

This means that this method is best for formulating and testing commands to then use on the SD card.

To begin sending commands to your reader using the ASCII Protocol Explorer, follow the steps outlined below:

Step 1. Download and install ASCII Protocol Explorer via the link in the downloads section. When installation is complete, launch the program.

Step 2. Connect the TSL handheld reader to your computer.

a. Plug the reader into your computer via a micro USB cable.
b. At the top of the program, click Reader > Refresh Ports. Then click Reader > Port and ensure that a port such as COM5 is checked. Finally, click Reader > Connect.

Step 3. Build your command.

a. Click the dropdown under CommandName and choose the relevant command. For our first example, we will use Sleep TimeoutCommand, which tells the reader how long to wait between reads before going into an idle mode.

b. In the Parameters section, click to the right of Sleep Timeout and/or Sleep TimeoutHid, depending on which mode of inventory your reader is currently running (SPP or HID). Enter a number of seconds between 15 and 999. Note that these two can be set separately, so the timeout will depend on whether it is in HID mode. In our case, we've chosen the default for Sleep Timeout and 150 for HID mode. Note that increasing this time will decrease battery life as the reader will be "awake" for a longer time, even if you're not using it.

c. Click Send to send your command to the reader.

Step 4. Testing

a. Ensure the reader is in HID mode. Disconnect the reader from the computer.

b. Connect to the reader with your mobile device, and scan a tag. Wait for the number of seconds you entered, 150 in our example.

c. At the end of this time, the reader should make a small beep (unless you've changed the alert setting), and the light should go off. The reader is now asleep and will forget the commands. To wake it up again, simply pull the trigger. Now it's ready for testing a new command.

Method 2: SD Card

This method uses a micro SD card to keep a copy of the command in non-volatile memory, so that the reader will retain the command when the reader goes to sleep. For our example, we're going to change the alert to vibrate instead of beep.

Step 1. Write the command. In our example, the command is ".al LCMD 000001 -von -boff". This command turns off the beep alert and turns on the vibration. We could do various combinations of turning these on or off and changing the volume of the beep. Note that one or both of these must be on. Disabling both beep and vibrate will result in an error.

a. Open Notepad or a similar application that can create .txt files.

b. Write your command. You can use the PDF at the top for guidance on this. If you're unsure about the syntax, you can use ASCII Protocol Explorer to build the command. Then simply copy and paste into the Notepad app.

c. Save the document as a .txt file to a micro SD card, and name the file "auto.txt".

Step 2. Testing

a. Insert the micro SD card into your reader. This will vary based on your model, so check your manual or our setup videos for more information about how to reach the micro SD card slot. Reassemble the reader.

b. Connect to your reader with your mobile device, and scan a tag. The reader should vibrate, but not beep.

Conclusion

If you have any questions about how to choose an RFID tag for your system, do not hesitate to contact us or leave a comment below.

If you would like to learn more about all things RFID, check out our blog or our YouTube channel.