The text of a manual · part 14 of 39
Symbol MS4404/MS4407 Integration Guide: SSI Interface, pages 93 to 100
Pages 93 to 100 of 310, from Symbol MS4404/MS4407 Integration Guide
The original document is the PDF (5.2 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 Symbol MS-4407
Page 93
Chapter 8 SSI Interface Overview This chapter describes the system requirements of the Simple Serial Interface (SSI), which provides a communications link between Motorola 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.
Communications All communications between the decoder and host are done over the hardware interface lines using the SSI protocol. See the Simple Serial Interface Programmer’s Guide, p/n 72-40451-xx, for more information on SSI. The host and the decoder 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 allowed by the SSI protocol for any transaction is 257 (255 bytes + 2 byte checksum). Decode data can be sent as ASCII data (unpacketed), or as part of a larger message (packeted), depending on the decoder configuration. The SSI performs the following major functions for the host device:
• Maintains a bi-directional interface with the decoder • Allows the host to send commands that control the decoder • Passes data from the decoder to a host device in the formatted SSI packet format or straight decode message. The working environment of the SSI consists of a decoder, a serial cable which attaches to the host device, and in some instances, a power supply. SSI transmits all decode data including special formatting (e.g., AIM ID). The format of the transmitted data can be controlled via parameter settings. The decoder may also send parameter information, product identification information or event codes to the host. All commands sent between the decoder and host must use the format described in the SSI Message Formats section. The SSI Transactions section describes the required sequence of messages in specific cases.
Page 94
8-2
Symbol MS4404/MS4407 Integration Guide
Table 8-1 lists all the SSI Opcodes supported by the decoder. It identifies the SSI partner allowed to send a message of each type. The host transmits Opcodes designated type H. The decoder transmits type D Opcodes, and either partner 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 supported by the decoder.
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_ID
D
0xA6
Reply to REQUEST_ID; contains decoder's serial number.
REPLY_REVISION
D
0xA4
Reply to REQ_REV contains 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 decoder to attempt to decode a bar code.
STOP_DECODE
H
0xE5
Tell decoder to abort a decode attempt.
WAKEUP
H
N/A
Wakeup decoder after it has entered low power mode.
The details of the SSI protocol can be found in the Simple Serial Interface Programmer's Guide (72-40451-xx).
Page 95
SSI Interface
8-3
SSI Transactions General Data Transactions ACK/NAK Handshaking ACK/NAK handshaking may be enabled or disabled. If this parameter is set, all packeted messages must have a CMD_ACK or CMD_NAK response, unless the command description states otherwise. This parameter is enabled by default. This handshaking should remain enabled to provide feedback to the host. Raw decode data and WAKEUP do not use ACK/NAK handshaking since they are not packeted data. Example of a problem which may occur when ACK/NAK handshaking is disabled:
• The host sends a PARAM_SEND message to the decoder to change baud rate from 9600 to 19200. • The decoder cannot interpret the message. • The decoder does not implement the changes requested by the host. • The host assumes that the parameter changes have occurred and acts accordingly. • Communications are lost because the change did not occur on both sides. If the ACK/NAK handshaking is enabled, the following occurs:
• The host sends a PARAM_SEND message. • The decoder cannot interpret the message. • The decoder CMD_NAKs the message. • The host resends the message. • The decoder receives the message successfully, responds with CMD_ACK, and implements parameter changes.
Transfer of Decode Data The Decode Data Packet Format parameter controls how decode data is sent to the host. When this parameter is set, the data is sent in a DECODE_DATA packet. When the parameter is cleared, the data is transmitted as raw ASCII data. NOTE
When decode data is transmitted as raw ASCII data, then ACK/NAK handshaking does not apply regardless of the state of the ACK/NAK handshaking parameter.
Page 96
8-4
Symbol MS4404/MS4407 Integration Guide
ACK/NAK Enabled and Packeted Data The decoder sends a DECODE_DATA message after a successful decode. The decoder waits for a programmable time-out for a CMD_ACK response. If it does not receive the response, the decoder tries to send two more times before issuing a host transmission error. If the decoder receives a CMD_NAK from the host, it may attempt a retry depending on the cause field of the CMD_NAK message. (1)
Decoder Data is captured by decoder
DECODE_DATA
Host (2) CMD_ACK message sent
ACK/NAK Enabled and Unpacketed ASCII Data Even though the ACK/NAK handshaking is enabled, no handshaking occurs because the handshaking applies only to packeted data. In this example the packeted_decode parameter is disabled.
Decoder Data is captured by decoder
ASCII data
Host
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 Data is captured by decoder
(1) DECODE_DATA message sent
Host
Page 97
SSI Interface
8-5
ACK/NAK Disabled and Unpacketed ASCII Data Data captured by the decoder is sent to the host.
Decoder
(1)
Data is captured by decoder
Host
ASCII data sent
Communication Summary RTS/CTS Lines All communication must use RTS/CTS handshaking as described in the Simple Serial Interface Programmer’s Guide, p/n 72-40451-xx. If hardware handshaking is disabled or bypassed, the WAKEUP command must be sent prior to all other communications, or else the first byte of a communication message may be lost during the decoder wakeup sequence.
ACK/NAK Option ACK/NAK handshaking can be enabled or disabled. This handshaking is enabled by default and we suggest the option not be disabled. Disabling this handshaking may lead to communication problems, as handshaking is the only acknowledgment that a message was received, and if it was received correctly. ACK/NAK is not used with unpacketed decode data regardless of whether or not this option is enabled.
Number of Data Bits All communication with the decoder must use 8-bit data.
Serial Response Time-out The Serial Response Time-out parameter is used to determine how long to wait for a handshaking response before trying again, or aborting any further attempts. Both the host and decoder should use the same value for this parameter. NOTE
A temporary change may be made to the Serial Response Time-out when the host takes longer to process an ACK, or longer data string. Frequent permanent changes are not recommended due to limited write cycles of non-volatile memory.
Page 98
8-6
Symbol MS4404/MS4407 Integration Guide
Retries When sending data, the host should resend twice after the initial send if the decoder 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 decoder replies with a NAK RESEND, the host resends the data. All resent messages must have the resend bit set in the Status byte. The decoder 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 Time-out, ACK/NAK Handshake If the serial parameters above are changed using PARAM_SEND, the ACK response to the PARAM_SEND is sent using the previous values for these parameters. The new values then take effect for the next transaction.
Errors A communication error is generated by the decoder when:
• The CTS line is asserted when the decoder tries to transmit, and is still asserted on each of 2 successive retries
• Failure to receive an ACK or NAK after initial transmit and two resends.
Things to Remember When Using SSI Communication If hardware handshaking is not used, space messages sufficiently apart. The host must not communicate with the decoder if the decoder is sending. If hardware handshaking is used, frame each message properly with the 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. Temporary changes are lost when power is removed from the decoder. Permanent changes are written to non-volatile memory. Frequent changes shorten the life of the non-volatile memory.
Page 99
SSI Interface
8-7
Selecting Time Delay to Low Power Mode using SSI Time Delay to Low Power Mode on page 6-8 provides bar codes 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 Values for Selecting Time Delay to Low Power
Value
Timeout
Value
Timeout
Value
Timeout
Value
Timeout
0x00
15 Mins
0x10
1 Sec
0x20
1 Min
0x30
1 Hour
0x01
30 Mins
0x11
1 Sec
0x21
1 Min
0x31
1 Hour
0x02
60 Mins
0x12
2 Secs
0x22
2 Mins
0x32
2 Hours
0x03
90 Mins
0x13
3 Secs
0x23
3 Mins
0x33
3 Hours
N/A
N/A
0x14
4 Secs
0x24
4 Mins
0x34
4 Hours
N/A
N/A
0x15
5 Secs
0x25
5 Mins
0x35
5 Hours
N/A
N/A
0x16
6 Secs
0x26
6 Mins
0x36
6 Hours
N/A
N/A
0x17
7 Secs
0x27
7 Mins
0x37
7 Hours
N/A
N/A
0x18
8 Secs
0x28
8 Mins
0x38
8 Hours
N/A
N/A
0x19
9 Secs
0x29
9 Mins
0x39
9 Hours
N/A
N/A
0x1A
10 Secs
0x2A
10 Mins
0x3A
10 Hours
N/A
N/A
0x1B
15 Secs
0x2B
15 Mins
0x3B
15 Hours
N/A
N/A
0x1C
20 Secs
0x2C
20 Mins
0x3C
20 Hours
N/A
N/A
0x1D
30 Secs
0x2D
30 Mins
0x3D
30 Hours
N/A
N/A
0x1E
45 Secs
0x2E
45 Mins
0x3E
45 Hours
N/A
N/A
0x1F
60 Secs
0x2F
60 Mins
0x3F
60 Hours
Page 100
8-8
Symbol MS4404/MS4407 Integration Guide
Simple Serial Interface Default Parameters This section describes how to set up the decoder with a SSI host. When SSI is used, the decoder is programmed via bar code menu or SSI hosts commands. Throughout the programming bar code menus, default values are indicated with asterisks (*).
* Indicates Default
*Baud Rate 9600
Feature/Option
(06h) Option Hex Value for programming via SSI command
NOTE
Most computer monitors allow scanning the bar codes directly on the screen. When scanning from the screen, be sure to set the document magnification to a level where the bar code can be seen clearly, and bars and/or spaces are not merging.
Table 8-3 lists the defaults for the SSI host. There are two ways to change the default values:
• Scan the appropriate bar codes in this guide. These new values replace the standard default values in memory. To recall the default parameter values, scan the *Set All Defaults bar code on page 6-3.
• Download data through the device’s serial port using SSI. Hexadecimal parameter numbers are shown in this chapter below the parameter title, and options are shown in parenthesis beneath the accompanying bar codes. See the Simple Serial Interface (SSI) Programmer’s Guide for detailed instructions for changing parameters using this method. NOTE
See Appendix A, Standard Defaults for all user preferences, hosts, symbologies, and miscellaneous default parameters.
Table 8-3 SSI Default Table
Parameter
Parameter Number
Default
Page Number
Select SSI Host
N/A
N/A
8-10
Baud Rate
9Ch
9600
8-11
Parity
9Eh
None
8-13
Check Parity
97h
Disable
8-14
Software Handshaking
9Fh
ACK/NAK
8-14
Host RTS Line State
9Ah
Low
8-15
Decode Data Packet Format
EEh
Send Raw Decode Data
8-15
Stop Bits
9Dh
1
8-16