Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 16 of 48

DS2208 Digital Scanner Product Reference Guide: Chapter 8 SSI Interface, pages 113 to 120

Pages 113 to 120 of 404, from DS2208 Digital Scanner Product Reference Guide

The original document is the PDF (12 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Zebra DS2208

Page 113

CHAPTER 8 SSI INTERFACE Introduction This chapter describes the system requirements of the Simple Serial Interface (SSI), which provides a communications link between Zebra decoders (e.g., scan engines, slot scanners, hand-held scanners, two-dimensional scanners, hands-free scanners, and RF base stations) and a serial host. It provides the means for the host to control the decoder or scanner.

Communication All communication between the scanner and host occurs over the hardware interface lines using the SSI protocol. Refer to the Simple Serial Interface Programmer’s Guide, p/n 72E-40451-xx, for more information on SSI. The host and the scanner exchange messages in packets. A packet is a collection of bytes framed by the proper SSI protocol formatting bytes. The maximum number of bytes per packet that the SSI protocol allows for any transaction is 257 (255 bytes + 2 byte checksum). Depending on the configuration, the scanner can send decode data as ASCII data (unpacketed), or as part of a larger message (packeted). SSI performs the following functions for the host device: • Maintains a bi-directional interface with the scanner • Allows the host to send commands that control the scanner • Passes data from the scanner to a host device in SSI packet format or straight decode message. The SSI environment consists of a scanner, a serial cable which attaches to the host device, and if required, a power supply. SSI transmits all decode data including special formatting (e.g., AIM ID). Parameter settings can control the format of the transmitted data. The scanner can also send parameter information, product identification information, or event codes to the host. All commands sent between the scanner and host must use the format described in the SSI Message Formats section. SSI Transactions on page 8-3 describes the required sequence of messages in specific cases.

Page 114

8 - 2 DS2208 Digital Scanner Product Reference Guide

Table 8-1 lists all the SSI opcodes the scanner supports. The host transmits opcodes designated type H. The scanner (decoder) transmits type D opcodes, and either can transmit Host/Decoder (H/D) types. Table 8-1

SSI Commands Name

Type

Opcode

Description

AIM_OFF

H

0xC4

Deactivate aim pattern.

AIM_ON

H

0xC5

Activate aim pattern.

BEEP

H

0xE6

Sound the beeper.

CAPABILITIES_REPLY

D

0xD4

Reply to CAPABILITIES_REQUEST; contains a list of the capabilities and commands the decoder supports.

CAPABILITIES_REQUEST

H

0xD3

Request capabilities report from the decoder.

CMD_ACK

H/D

0xD0

Positive acknowledgment of received packet.

CMD_NAK

H/D

0xD1

Negative acknowledgment of received packet.

DECODE_DATA

D

0xF3

Decode data in SSI packet format.

EVENT

D

0xF6

Event indicated by associated event code.

LED_OFF

H

0xE8

De-activate LED output.

LED_ON

H

0xE7

Activate LED output.

PARAM_DEFAULTS

H

0xC8

Set parameter default values.

PARAM_REQUEST

H

0xC7

Request values of certain parameters.

PARAM_SEND

H/D

0xC6

Send parameter values.

REPLY_REVISION

D

0xA4

Reply to REQUEST_REVISION, contains the decoder's software/hardware configuration.

REQUEST_REVISION

H

0xA3

Request the decoder's configuration.

SCAN_DISABLE

H

0xEA

Prevent the operator from scanning bar codes.

SCAN_ENABLE

H

0xE9

Permit bar code scanning.

SLEEP

H

0xEB

Request to place the decoder into low power.

START_DECODE

H

0xE4

Tell the decoder to attempt to decode a bar code.

STOP_DECODE

H

0xE5

Tell the decoder to abort a decode attempt.

WAKEUP

H

N/A

Wake the decoder from low power mode.

For details of the SSI protocol, refer to the Simple Serial Interface Programmer's Guide.

Page 115

SSI Interface 8 - 3

SSI Transactions General Data Transactions ACK/NAK Handshaking If you enable ACK/NAK handshaking (the default), all packeted messages must have a CMD_ACK or CMD_NAK response, unless the command description states otherwise. Zebra recommends leaving this handshaking enabled to provide feedback to the host. Raw decode data and WAKEUP do not use ACK/NAK handshaking since they are not packeted data. Following is an example of a problem which can occur if you disable ACK/NAK handshaking: • The host sends a PARAM_SEND message to the scanner to change the baud rate from 9600 to 19200. • The scanner cannot interpret the message. • The scanner does not implement the change the host requested. • The host assumes that the parameter change occurred and acts accordingly. • Communication is lost because the change did not occur on both sides. If you enable ACK/NAK handshaking, the following occurs: • The host sends a PARAM_SEND message. • The scanner cannot interpret the message. • The scanner CMD_NAKs the message. • The host resends the message. • The scanner receives the message successfully, responds with CMD_ACK, and implements parameter changes.

Page 116

8 - 4 DS2208 Digital Scanner Product Reference Guide

Decoded Data Transmission The Decode Data Packet Format parameter controls how decode data is sent to the host. Set this parameter to send the data in a DECODE_DATA packet. Clear this parameter to transmit the data as raw ASCII data. NOTE When transmitting decode data as raw ASCII data, ACK/NAK handshaking does not apply regardless of the state of the ACK/NAK handshaking parameter.

ACK/NAK Enabled and Packeted Data The scanner sends a DECODE_DATA message after a successful decode. The scanner waits for a programmable timeout for a CMD_ACK response. If it does not receive the response, the scanner tries to send two more times before issuing a host transmission error. If the scanner receives a CMD_NAK from the host, it may attempt a retry depending on the cause field of the CMD_NAK message. (1) DECODE_DATA

Decoder Data is captured by decoder

Host (2) CMD_ACK message sent

ACK/NAK Enabled and Unpacketed ASCII Data Even if ACK/NAK handshaking is enabled, no handshaking occurs because handshaking applies only to packeted data. In this example the packeted_decode parameter is disabled.

Decoder Data is captured by decoder

ASCII data

Host

Page 117

SSI Interface 8 - 5

ACK/NAK Disabled and Packeted DECODE_DATA In this example ACK/NAK does not occur even though packeted_decode is enabled because the ACK/NAK handshaking parameter is disabled.

Decoder

(1)

Data is captured by decoder

DECODE_DATA

Host message sent

ACK/NAK Disabled and Unpacketed ASCII Data The decoder sends captured data to the host.

Decoder Data is captured by decoder

(1) ASCII data sent

Host

Page 118

8 - 6 DS2208 Digital Scanner Product Reference Guide

Communication Summary RTS/CTS Lines All communication must use RTS/CTS handshaking as described in the Simple Serial Interface Programmer’s Guide, p/n 72E-40451-xx. If bypassing hardware handshaking, the host must send the WAKEUP command before all other communication or the first byte of a message can be lost during the scanner wakeup sequence. Zebra recommends not bypassing RTS/CTS hardware handshaking.

ACK/NAK Option ACK/NAK handshaking is enabled by default and Zebra recommends leaving it enabled. Disabling this can cause communication problems, as handshaking is the only acknowledgment that a message was received correctly. ACK/NAK is not used with unpacketed decode data regardless of whether it is enabled.

Number of Data Bits All communication with the scanner must use 8-bit data.

Serial Response Timeout The Host Serial Response Timeout parameter determines how long to wait for a handshaking response before trying again or aborting further attempts. Set the same value for both the host and scanner. NOTE You can temporarily change the Host Serial Response Timeout when the host takes longer to process an ACK or longer data string. Zebra does not recommend frequent permanent changes due to limited write cycles of non-volatile memory.

Retries The host resends data twice after the initial send if the scanner does not respond with an ACK or NAK (if ACK/NAK handshaking is enabled), or response data (e.g., PARAM_SEND, REPLY_REVISION). If the scanner replies with a NAK RESEND, the host resends the data. All resent messages must have the resend bit set in the Status byte. The scanner resends data two times after the initial send if the host fails to reply with an ACK or NAK (if ACK/NAK handshaking is enabled).

Baud Rate, Stop Bits, Parity, Response Timeout, ACK/NAK Handshaking If you use PARAM_SEND to change these serial parameters, the ACK response to the PARAM_SEND uses the previous values for these parameters. The new values then take effect for the next transaction.

Errors The scanner issues a communication error when: • The CTS line is asserted when the scanner tries to transmit, and is still asserted on each of two successive retries • The scanner does not receive an ACK or NAK after initial transmit and two resends.

Page 119

SSI Interface 8 - 7

SSI Communication Notes • When not using hardware handshaking, space messages sufficiently apart. The host must not communicate with the scanner if the scanner is transmitting. • When using hardware handshaking, frame each message properly with handshaking signals. Do not try to send two commands within the same handshaking frame. • There is a permanent/temporary bit in the PARAM_SEND message. Removing power from the scanner discards temporary changes. Permanent changes are written to non-volatile memory. Frequent changes shorten the life of the non-volatile memory.

Using Time Delay to Low Power Mode with SSI Time Delay to Low Power Mode on page 5-13 provides options to select a general time delay. To program a more specific delay value, use an SSI command according to Table 8-2. Table 8-2 Value

Values for Selecting Time Delay to Low Power Timeout

Value

Timeout

Value

Timeout

Value

Timeout

0x00

15 Min

0x10

1 Sec

0x20

1 Min

0x30

1 Hour

0x01

30 Min

0x11

1 Sec

0x21

1 Min

0x31

1 Hour

0x02

60 Min

0x12

2 Sec

0x22

2 Min

0x32

2 Hours

0x03

90 Min

0x13

3 Sec

0x23

3 Min

0x33

3 Hours

N/A

N/A

0x14

4 Sec

0x24

4 Min

0x34

4 Hours

N/A

N/A

0x15

5 Sec

0x25

5 Min

0x35

5 Hours

N/A

N/A

0x16

6 Sec

0x26

6 Min

0x36

6 Hours

N/A

N/A

0x17

7 Sec

0x27

7 Min

0x37

7 Hours

N/A

N/A

0x18

8 Sec

0x28

8 Min

0x38

8 Hours

N/A

N/A

0x19

9 Sec

0x29

9 Min

0x39

9 Hours

N/A

N/A

0x1A

10 Sec

0x2A

10 Min

0x3A

10 Hours

N/A

N/A

0x1B

15 Sec

0x2B

15 Min

0x3B

15 Hours

N/A

N/A

0x1C

20 Sec

0x2C

20 Min

0x3C

20 Hours

N/A

N/A

0x1D

30 Sec

0x2D

30 Min

0x3D

30 Hours

N/A

N/A

0x1E

45 Sec

0x2E

45 Min

0x3E

45 Hours

N/A

N/A

0x1F

60 Sec

0x2F

60 Min

0x3F

60 Hours

CAUTION With hardware handshaking disabled, the scanner wakes from low power mode upon receiving a character. However, the scanner does not process this character or any others it receives during the 7 ms period following wakeup. Wait at least 7 ms after wakeup to send valid characters.

Page 120

8 - 8 DS2208 Digital Scanner Product Reference Guide

Encapsulation of RSM Commands/Responses over SSI The SSI protocol allows the host to send a command that is variable in length up to 255 bytes. Although there is a provision in the protocol to multi-packet commands from the host, the scanner does not support this. The host must fragment packets using the provisions in the RSM protocol.

Command Structure

Byte

7

6

5

4

3

2

1

Reserved (0)

Reserved (0)

Cont'd packet

0

Length (not including the checksum)

1

SSI_MGMT_COMMAND (0x80)

2

Message Source (4 - Host)

3

Reserved (0)

4

Payload data (see the following example)

0

Retransmit

... Length -1 Length

2's complement checksum (MSB)

Length +1

2's complement checksum (LSB)

The expected positive response is SSI_MGMT_COMMAND which can be a multi-packet response. Devices that do not support this command respond with the standard SSI_NAK.

Response Structure

Byte

7

6

5

4

3

2

1

Reserved (0)

Reserved (0)

Cont'd packet

0

Length (not including the checksum)

1

SSI_MGMT_COMMAND (0x80)

2

Message Source (0 - Decoder)

3

Reserved (0)

4

Payload data (see the following example)

... Length -1 Length

2's complement checksum (MSB)

Length +1

2's complement checksum (LSB)

0

Retransmit