Application Note
Connecting a bar code scanner to a STEPPII,STEPPIII, BOLERO-LT or FOX device

Part Number APP-0007
Revision A October 2019

Intellectual Property© 2019 Lantronix, Inc. All rights reserved. No part of the contents of this publication may
be transmitted or reproduced in any form or by any means without the written permissionof Lantronix.
Lantronix is a registered trademark of Lantronix, Inc. in the United States and othercountries.
Patented: www.lantronix.com/legal/patents/; additional patents pending.
All trademarks and trade names are the property of their respective holders.

Contacts
Lantronix, Inc.
7535 Irvine Center Drive, Suite 100
Irvine, CA 92618, USA
Toll Free: 800-526-8766
Phone:
949-453-3990
Fax:
949-453-3995
Technical Support
Online: www.lantronix.com/support
Sales Offices
For a current list of our domestic and international sales offices, go to the Lantronix website at www.lantronix.com/about/contact

Disclaimer
All information contained herein is provided “AS IS.” Lantronix undertakes no obligation to
update the information in this publication. Lantronix does not make, and specificallydisclaims, all warranties of any kind (express, implied or otherwise) regarding title, noninfringement, fitness, quality, accuracy, completeness, usefulness, suitability or
performance of the information provided herein. Lantronix shall have no liability
whatsoever to any user for any damages, losses and causes of action (whether in contract
or in tort or otherwise) in connection with the user’s access or usage of any of theinformation or content contained herein. The information and specifications contained inthis document are subject to change without notice.

Connecting a bar code scanner to a STEPPII, STEPPIII, BOLERO-LT or FOX device

2Revision History
DateRev.

Comments

September 2008

1.0.0

Initial version.

October 2014

1.0.1

Added configuration commands for the STEPPIII, BOLERO-LT andFOX.

October 2019

A

Initial Lantronix document. Added Lantronix document partnumber, logo, contact information, and links.

For the latest revision of this product document, please check our online documentation atwww.lantronix.com/support/documentation.

Connecting a bar code scanner to a STEPPII, STEPPIII, BOLERO-LT or FOX device

3Table of Contents

1

INTRODUCTION .......................................................................... 51.1
1.2
1.3
1.4
1.5
1.6FIRMWARE CONFIGURATION ...................................................................................... 5BAR CODE SCANNER SETTINGS ................................................................................. 5CONFIGURING A STEPPII DEVICE FOR DATA MODE ..................................................... 5CONFIGURING A STEPPIII, BOLERO-LT, FOX DEVICE .............................................. 6SENDING RECEIVED SERIAL DATA TO A SERVER .......................................................... 6WRITING SERIAL DATA TO HISTORY ............................................................................ 7Connecting a bar code scanner to a STEPPII, STEPPIII, BOLERO-LT or FOX device41 INTRODUCTION
This document describes how to connect a bar code scanner to a STEPPII, STEPPIII,
BOLERO-LT and FOX device and how to store or transmit the scanned data. This
example should give an idea on how to connect serial devices on a STEPPII, STEPPIII,
BOLERO-LT and FOX and process the incoming data in general.

1.1 Firmware configuration
Default operation of the RS232 port on the STEPPII AMP connector is the command mode.
In this mode the protocols and debug information are send to the serial port and it listensfor commands which the user can send to the device.
In order to get data from a bar code scanner via the RS232 port of the STEPPII, it has to be
set into data mode. In data mode the STEPPII can not receive PFAL commands anymore.
In this example one input will be programmed to be able to switch between commandand data mode.

1.2 Bar code scanner settings
The bar code scanner used for this application note is a Firescan D131. It uses a 38400
baud RS232 connection and sends a carriage return/line feed after sending its scanneddata.
By default, the serial port of the STEPPII, STEPPII, BOLERO-LT and FOX runs at 57600 baud. Inorder to make both devices talk to each other you will need to change the baud rate forthe used serial port to 34800 baud using the following command:
For STEPPII$PFAL,CNF.Set,DEVICE.SERIAL.BAUDRATE=38400
For STEPPIII, BOLERO-LT, FOX$PFAL,CNF.Set,DEVICE.SERIAL0.BAUDRATE=38400

1.3 Configuring a STEPPII device for data mode
As mentioned above, one of the inputs of the STEPPII will be used to switch between
Command and Data mode:❖ When, for example, the input 1 is switched on, the STEPPII is set into the Data
mode:
$PFAL,CNF.Set,AL5=IO.IN.e0=redge:CNF.Set,DEVICE.COMM.SERIAL=data=0,1,F
Parameters for data= 0, 1, F0:
Received data is not transferred immediately but can be used to1:

❖execute alarms.
Enables events when the system
return/linefeed.
All system status have to be transmitted.

detects

acarriage

F:
When input 1 is switched off, the STEPPII is reset into the Command mode:$PFAL,CNF.Set,AL6=IO.IN.e0=fedge:CNF.Set,DEVICE.COMM.SERIAL=cmd,FConnecting a bar code scanner to a STEPPII, STEPPIII, BOLERO-LT or FOX device51.4 Configuring a STEPPIII, BOLERO-LT, FOX device
The STEPPIII, BOLERO-LT and FOX do not need to be set into the Data mode, because thecommand mode allows also event generation for incoming text messages terminated bythe line feed <LF> character that do not start with PFAL. It is assumed that, the text sentfrom the scanner is terminated by the line feed <LF> character, otherwise no event would
be occurred.
To use one of the above-mentioned device for scanner application, make sure that
Serial0 is in the Command mode. To change the Serial0 into the Command mode executethe followin command:$PFAL,MSG.Mode.SERIAL0=7F,CParameters for command mode=7F, C
7F:
All system status and protocols have to be transmitted.
C:
Sets the Serial0 into the command mode.
D00218C767CB560D

1.5 Sending received serial data to a server
The STEPPII, STEPPIII, BOLERO-LT or FOX device gets configured to send the received serialdata together with the actual date, time and position to an internet server:
For STEPPII$PFAL,CNF.Set,AL7=Sys.eSerialData:TCP.Client.Send,8,"TrackingNumber: &(SerialData)"
For STEPPIII, BOLERO-LT, FOX$PFAL,CNF.Set,AL1=SYS.Device.eStart:MSG.Send.RawSerial0,0,"start"$PFAL,CNF.Set,AL7=Sys.eSerialData0:TCP.Client.Send,8,"TrackingNumber: &(SerialData0)"

To send the received Serial0 data to the Trace4You - server use the following alarm withthe event <sfal.event.text='&(SerialData0)'> in the user text. For information on Trace4You,
contact support at www.lantronix.com/support.
$PFAL,CNF.Set,AL7=Sys.eSerialData0:TCP.Client.Send,8,"<sfal.event.text='&(SerialData0)'>"➢ The event Sys.eSerialData for STEPPII or Sys.eSerialData0 for STEPPIII, BOLERO-➢➢

LT or FOX device occurs every time when the STEPPII detects a carriage
return/line feed for STEPPII or the STEPPIII, BOLERO-LT, FOX detects a line feedon the serial port (as configured before).
TCP.Client.Send,8,"TrackingNumber: &(SerialData0)" command sends the GPRMC
protocol and the user defined text to a remote server.
The dynamic entry &(SerialData) for STEPPII and &(SerialData0) for STEPPIII,
BOLERO-LT and FOX device contain the received serial data from the RS232
port.

Connecting a bar code scanner to a STEPPII, STEPPIII, BOLERO-LT or FOX device

6Figure 1:

Screenshot from the Online Tracking Solution including a STEPPII history with scannedbarcode data.

1.6 Writing serial data to history
Besides sending the received serial data to a server, it is also possible to store the datain the device history and read it out later.
If the data should only be stored in history change, the alarm can be defined as follow:
For STEPPII$PFAL,CNF.Set,AL7=Sys.eSerialData:GPS.History.Write,8,"Tracking Number: &(SerialData)"

For STEPPIII, BOLERO-LT, FOX$PFAL,CNF.Set,AL7=Sys.eSerialData0:GPS.History.Write,8,"Tracking Number: &(SerialData0)"

Connecting a bar code scanner to a STEPPII, STEPPIII, BOLERO-LT or FOX device

7