How To Troubleshoot Your Barcode Scanner
  • 29 Mar 2023
  • 2 Minutes to read
  • Contributors

How To Troubleshoot Your Barcode Scanner


Article summary

How To Troubleshoot Your Barcode Scanner

Here's how to discover issues with your barcode scanner in Tulip.

There are two reasons your barcode scanner may not work with Tulip:

  1. The device is not supported by Tulip.
  2. The scanner/reader is not configured correctly.

Tulip uses a barcode scanner’s identifier (comprising a combination of vendor ID and product ID) to distinguish between barcode scanners and other USB devices, like keyboards. For this reason that not all barcode scanners currently work with Tulip.

Refer to this Barcode Scanner Setup Guide if you are using a barcode scanner with Tulip for the first time.

Common Causes for Problems

For a barcode reader to work with a Tulip IoT Gateway or with the Tulip Player, Tulip must have registered the internal ID of the barcode, and the barcode reader must output in keyboard mode, with a new line at the end.

Barcode scanners are typically configured by scanning specific control barcodes. These are available in your barcode maker’s manual.

Note: Tulip uses the new line at the end of a barcode scan to mark the end of a message. If your barcode is not set up to add a carriage return to the end of its transition, then the message will not be sent into Tulip.

Barcodes can contain newline characters within them. Those barcodes which contain a return character will be split into pairs delimited by the return, and sent as separate messages to the Tulip back end.

Steps To Test Your Barcode Scanner

There are two ways to test your barcode scanner.

First, you can test whether a barcode scanner is successfully outputting as a keyboard.

In any app, create a new Form Step with a Text widget and give it any label. In the screenshot below, it is called "Barcode Input".

Then, open that Form Step in the player and scan any barcode with your scanner. It should populate the Text widget. If it does not, then the barcode is not formatted to output as a keyboard.

If you pass this test, then you should test whether a Trigger will successfully fire when you use the barcode scanner.

Create a new normal step, and add a Trigger that fires when a barcode scanner is used. Store the barcode data in a variable called "barcode_id". Here's what that looks like:

WHEN

  • "Device" "Barcode Scanner" outputs at "this station"

THEN

  • "Data Manipulation" "Store" data: "Device Output" "Barcode scanned -> data" location: "Variable" "barcode_id"

Then, add the "Variable text" widget and set the value to "barcode_id".

Then, open this step in the Tulip Player and scan a barcode. The value of the barcode should appear on the step. If it does not, then the Vendor ID and Product ID that you used to set up the barcode scanner within the Player are incorrect, and you should search for the correct details about your device.


Was this article helpful?