46
9.5 Data Packaging (Packetizing)
Data packaging is available to boost the reliability of data transfers over the Bluetooth
wireless link from the scanner to
commercially available Bluetooth
®
devices or other target devices.
Data packaging wraps the transfer data in packets with the following format. After sending a packet, the scanner waits for a
response (ACK/NAK) from the communication adapters, commercially available Bluetooth
device, or other target device.
ACK indicates a successful transfer; NAK represents a request to resend.
The scanner configuration software (ScannerSetting) provides ACK/NAK timeout settings from 100 to 9900 ms in 100 ms
intervals.
If there is no response within the specified time limit, the scanner sounds the error beep to indicate that the data transfer was
unsuccessful. The scanner cannot read in a new code while it is waiting for a response.
This functionality provides a scanner operator working some distance from the host with better information as to whether the
transfer data has been correctly transmitted to the host. Note, however, that wireless communications are such that the scanner
can sometimes fail to receive ACK (or NAK) responses even when the data has been correctly transmitted. It is therefore
important to use the scanner in an environment supporting stable wireless communications.
Data transmission format
Header CRC
Terminator
DLE STX
Number of
data bytes
Container
number
Spare
Transfer data
Lower
half
Upper
half
DLE
ETX
The following describes each field in detail.
(1)
Header (2 bytes)
This data sequence indicates the start of data packaging (packetizing).
(2)
Number of data bytes (2 bytes)
This specifies the number of data bytes in the packet. This number includes everything from the header to the terminator.
(3)
Container number (1 byte)
Upper 4bit: transmission number, Lower 4bit: All transmission numbers
(4)
Spare (1 byte)
This field is for future expansion. The value is currently fixed at 00h.
(5)
Transfer data
This is the data before packetized.
(6)
CRC (2 bytes)
This 16-bit CRC is calculated from the “Number of data bytes” through “Transfer data” using the CCITT CRC polynomial
x16+x12+x5+1. The two bytes appear in little-endian order: LSB first, MSB second.
(7)
Terminator (2 bytes)
This data sequence indicates the end of data packaging (packetizing).
Note
: If DLE (10h) is contained in the data anywhere else other than in the header or terminator, it will be preceded by
another DLE in data transfer. If the connection target is other than the communications adapter in data packaging,
it is necessary to delete the added DLE in CRC calculation or data retrieval.