Error/Status Codes
Table 1: Error and Status Codes
Error/Status Code | Value | Description |
---|---|---|
SUCCESS | 0 | Generic success. |
STATUS_LOCKED | 10 | Device is locked by another application. |
ERROR_INVALID_APPHANDLE | 100 | Invalid application handle. Reserved parameter. Value is zero. |
ERROR_COMMLIB_UNAVAILABLE | 101 | Required Comm Lib is unavailable to support the requested Type. |
ERROR_NULL_BUFFER_POINTER | 102 | Null buffer pointer. |
ERROR_INVALID_BUFFER_POINTER | 103 | Invalid buffer pointer. |
ERROR_INCORRECT_BUFFER_SIZE | 104 | Incorrect buffer size. |
ERROR_DUPLICATE_TYPES | 105 | Requested Type IDs are duplicated. |
ERROR_INCORRECT_NUMBER_OF_TYPES | 106 | Incorrect value for number of Types. |
ERROR_INVALID_ARG | 107 | Invalid argument |
ERROR_INVALID_SCANNERID | 108 | Invalid scanner ID. |
ERROR_INCORRECT_NUMBER_OF_EVENTS | 109 | Incorrect value for number of Event IDs. |
ERROR_DUPLICATE_EVENTID | 110 | Event IDs are duplicated. |
ERROR_INVALID_EVENTID | 111 | Invalid value for Event ID. |
ERROR_DEVICE_UNAVAILABLE | 112 | Required device is unavailable. |
ERROR_INVALID_OPCODE | 113 | Opcode is invalid. |
ERROR_INVALID_TYPE | 114 | Invalid value for Type. |
ERROR_ASYNC_NOT_SUPPORTED | 115 | Opcode does not support asynchronous method. |
ERROR_OPCODE_NOT_SUPPORTED | 116 | Device does not support the Opcode. |
ERROR_OPERATION_FAILED | 117 | Operation failed in device. |
ERROR_REQUEST_FAILED | 118 | Request failed in CoreScanner. |
ERROR_OPERATION_NOT_SUPPORTED_FOR_ AUXILIARY_SCANNERS | 119 | Operation not supported for auxiliary scanners. |
ERROR_DEVICE_BUSY | 120 | Device busy. Applications should retry command. |
ERROR_ALREADY_OPENED | 200 | CoreScanner is already opened. |
ERROR_ALREADY_CLOSED | 201 | CoreScanner is already closed. |
ERROR_CLOSED | 202 | CoreScanner is closed. |
ERROR_INVALID_INXML | 300 | Malformed inXML. |
ERROR_XMLREADER_NOT_CREATED | 301 | XML Reader could not be instantiated. |
ERROR_XMLREADER_INPUT_NOT_SET | 302 | Input for XML Reader could not be set. |
ERROR_XMLREADER_PROPERTY_NOT_SET | 303 | XML Reader property could not be set. |
ERROR_XMLWRITER_NOT_CREATED | 304 | XML Writer could not be instantiated. |
ERROR_XMLWRITER_OUTPUT_NOT_SET | 305 | Output for XML Writer could not be set. |
ERROR_XMLWRITER_PROPERTY_NOT_SET | 306 | XML Writer property could not be set. |
ERROR_XML_ELEMENT_CANT_READ | 307 | Cannot read element from XML input. |
ERROR_XML_INVALID_ARG | 308 | Arguments in inXML are not valid. |
ERROR_XML_WRITE_FAIL | 309 | Write to XML output string failed. |
ERROR_XML_INXML_EXCEED_LENGTH | 310 | InXML exceed length. |
ERROR_XML_EXCEED_BUFFER_LENGTH | 311 | Buffer length for type exceeded. |
ERROR_NULL_POINTER | 400 | Null pointer. |
ERROR_DUPLICATE_CLIENT | 401 | Cannot add a duplicate client. |
ERROR_FW_INVALID_DATFILE | 500 | Invalid firmware file. |
ERROR_FW_UPDATE_FAILED_IN_SCN | 501 | Firmware Update failed in scanner. |
ERROR_FW_READ_FAILED_DATFILE | 502 | Failed to read DAT file. |
ERROR_FW_UPDATE_INPROGRESS | 503 | Firmware Update is in progress (cannot proceed another firmware update or another command). |
ERROR_FW_UPDATE_ALREADY_ABORTED | 504 | Firmware update is already aborted. |
ERROR_FW_UPDATE_ABORTED | 505 | Firmware Update aborted. |
ERROR_FW_SCN_DETTACHED | 506 | Scanner is disconnected while updating firmware. |
STATUS_FW_SWCOMP_RESIDENT | 600 | The software component is already resident in the scanner. |
Methods Invoked Through ExecCommand Or ExecCommandAsync
Table 2: List of Methods
Description | Method | Value |
---|---|---|
Scanner SDK Commands | GET_VERSION | 1000 |
REGISTER_FOR_EVENTS | 1001 | |
UNREGISTER_FOR_EVENTS | 1002 | |
Scanner Access Control Commands | CLAIM_DEVICE | 1500 |
RELEASE_DEVICE | 1501 | |
Scanner Common Commands | ABORT_MACROPDF | 2000 |
ABORT_UPDATE_FIRMWARE | 2001 | |
AIM_OFF | 2002 | |
AIM_ON | 2003 | |
FLUSH_MACROPDF | 2005 | |
DEVICE_PULL_TRIGGER | 2011 | |
DEVICE_RELEASE_TRIGGER | 2012 | |
SCAN_DISABLE | 2013 | |
SCAN_ENABLE | 2014 | |
SET_PARAMETER_DEFAULTS | 2015 | |
DEVICE_SET_PARAMETERS | 2016 | |
SET_PARAMETER_PERSISTANCE | 2017 | |
REBOOT_SCANNER | 2019 | |
Scanner Operation Mode Commands | DEVICE_CAPTURE_IMAGE | 3000 |
DEVICE_CAPTURE_BARCODE | 3500 | |
DEVICE_CAPTURE_VIDEO | 4000 | |
Scanner Management Commands | ATTR_GETALL | 5000 |
ATTR_GET | 5001 | |
ATTR_GETNEXT | 5002 | |
ATTR_SET | 5004 | |
ATTR_STORE | 5005 | |
GET_DEVICE_TOPOLOGY | 5006 | |
START_NEW_FIRMWARE | 5014 | |
UPDATE_FIRMWARE | 5016 | |
UPDATE_FIRMWARE_FROM_PLUGIN | 5017 | |
UPDATE_DECODE_TONE | 5050 | |
ERASE_DECODE_TONE | 5051 | |
RTA Configuration Commands (Real Time Alerts) | GET SUPPORTED RTA EVENTS | 5500 |
REGISTER_RTA_EVENTS | 5501 | |
UNREGISTER_RTA_EVENTS | 5502 | |
GET_RTA_ALERT_STATUS | 5503 | |
SET_RTA_ALERT_STATUS | 5504 | |
RTA_SUSPEND | 5505 | |
RTA_STATE | 5506 | |
Scanner Action Commands | SET_ACTION | 6000 |
Serial Scanner Commands | DEVICE_SET_SERIAL_PORT_SETTINGS | 6101 |
Other Commands | DEVICE_SWITCH_HOST_MODE | 6200 |
Keyboard Emulator Commands | KEYBOARD_EMULATOR_ENABLE | 6300 |
KEYBOARD_EMULATOR_SET_LOCALE | 6301 | |
KEYBOARD_EMULATOR_GET_CONFIG | 6302 | |
Scale Commands | SCALE_READ_WEIGHT | 7000 |
SCALE_ZERO_SCALE | 7002 | |
SCALE_SYSTEM_RESET | 7015 |
Zero Scale Operation
The weight reading of the scale can be set to zero by performing the Zero Scale operation. Once performed, the reading is set to Zero and this operation is applicable for both Read Weight and Async Read Weight.
NOTE: Only the weights less than 30g can be set to zero. Any weight higher than 30g will not set to Zero.
Action Attributes and Values
Table 3: Action Attributes and Values
Attribute Number | Attribute Name | Description | Data Type | Values |
---|---|---|---|---|
6000 | Beeper/LED | Triggers the beeper/LED via command | 'X' |
0 - 1 high short beep 1 - 2 high short beeps 2 - 3 high short beeps 3 - 4 high short beeps 4 - 5 high short beeps 5 - 1 low short beep 6 - 2 low short beeps 7 - 3 low short beeps 8 - 4 low short beeps 9 - 5 low short beeps 10 - 1 high long beep 11 - 2 high long beeps 12 - 3 high long beeps 13 - 4 high long beeps 14 - 5 high long beeps 15 - 1 low long beep 16 - 2 low long beeps 17 - 3 low long beeps 18 - 4 low long beeps 19 - 5 low long beeps 20 - Fast warble beep 21 - Slow warble beep 22 - High-low beep 23 - Low-high beep 24 - High-low-high beep 25 - Low-high-low beep 26 - High-high-low-low beep 42 - Green LED off 43 - Green LED on 45 - Yellow LED 46 - Yellow LED off 47 - Red LED on 48 - Red LED off |
6001 | ParameterDefaults | Initiates a parameter defaults command | 'X' |
0 - Restore Defaults 1 - Restore Factory Defaults 2 - Write Custom Defaults |
6003 | BeepOnNextBootup | Controls whether or not boot up/power up beep is suppressed on the next power up. | 'X' |
0 - Disable beep on next bootup 1 - Enable beep on next bootup |
6004 | Reboot | Remote reboot command. | 'X' | |
6005 | HostTriggerSession | Triggers the scanner to start scanning via command. | 'X' |
0 - start Host Trigger Session 1 - stop Host Trigger Session |
6011 | StatsReset | Reset/default a specific statistic. | 'X' | The specific statistic attribute to reset. Range: 15002-19999. |
6013 | StatsResetAll | Reset/default all statistics. | 'X' | |
6017 | ScaleReadWeight | Read Weight from scale. | 'A' |
Byte[0] status: 0 - scaleNotEnabled 1 - scaleNotReady 2 - stableWeightOverLimit 3 - stableWeightUnderZero 4 - nonStableWeight 5 - stableZeroWeight 6 - stableNonZeroWeight Byte[1] units: 0=kgs 1=lbs Bytes[2-5] weight in thousandths of units |
6018 | ScaleZero | Zeros the scale. | 'X' | |
6019 | ScaleReset | Resets the scale. | 'X' | |
6022 | ChangeAllCodeTypes | Enables/Disables all code types. | 'X' |
0 = Disable All Code types 1 = Enable All Code Types |
Description of Intelligent Document Capture Format
The Intelligent Document Capture output is presented as decode data of type BT_ISO15434. This data starts with Zebra specific items, such as the data length and message type, followed by one ISO/IEC 15434 message envelope containing one or more Format 09 (binary data) envelopes (one each for image and barcode data). Table 4 illustrates the format.
Table 4: Formats
Data | Length (Bytes) | Comment | |
---|---|---|---|
BT_ISO15434 | 1 | Packet Identifier | |
XXXXXXXX | 4 | Packet Length (32-bit unsigned) | |
MSG_EASYCAP | 1 | ISO/IEC 15434 Message type2 | |
[)>Rs | 4 | Message Header | ISO/IEC 15434 Envelope |
09GstttGsGsnnGs | varies |
Format Header ttt = BMP or JPEG or TIFF nn = number of bytes in data field |
Image |
Image Data | varies | Data5 | |
Rs | 1 | Format Trailer | |
09GstttGsGsnnGs | varies |
Format Header ttt = Barcode nn = number of bytes in data field |
Barcode4 |
Barcode Data | varies | Data6 | |
Rs | 1 | Format Trailer | |
Eot | 1 | Message Trailer |
NOTE
- Rs=0x1E; Gs = 0x1D; Eot = 0x04
- Currently only message type defined.
- Image and barcode entries may appear in any order.
- Barcode envelope (header, data and trailer) may be missing (Intelligent Document Capture doesn't always require a barcode).
- Image format same as is currently used for BT_SIGNATURE, with type of 0.
- Byte1=code type (BT_*), followed by decode data.
The following is a BT_ISO15434 decode message with one barcode (type DataMatrix with data ABC123456789) followed by one image (8x8x1, BMP format). This example shows how to map the bytes into the format detailed in Table 4.
0x0000 b5 00 00 00 95 00 5b 29 3e 1e 30 39 1d 42 61 72
0x0010 43 6f 64 65 1d 1d 31 34 1d 1b 41 42 43 20 31 32
0x0020 33 34 35 36 37 38 39 1e 30 39 1d 42 4d 50 1d 1d
0x0030 31 30 30 1d 03 00 00 00 00 5e 42 4d 5e 00 00 00
0x0040 00 00 00 00 3e 00 00 00 28 00 00 00 08 00 00 00
0x0050 08 00 00 00 01 00 01 00 00 00 00 00 00 00 00 00
0x0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070 00 00 00 00 ff ff ff 00 ff 00 00 00 ff 00 00 00
0x0080 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00
0x0090 ff 00 00 00 ef 00 00 00 1e 04
Addr | Data | Description |
---|---|---|
00 | b5 | Packet Identifier = BT_ISO15434 |
01 | 00000095 | Packet Data Length |
05 | 00 | Message type = MSG_EASYCAP |
06 | 5b 29 3e 1e | Message Header = "[)>Rs" |
0a | 30 39 1d 42 61 72 43 6f 64 65 1d 1d 31 34 1d | Format Header = "09GsBarCodeGsGs14Gs" |
19 | 1b | Code Type = BT_DATAMATRIX |
1a | 41 42 43 20 31 32 33 34 35 36 37 38 39 | Decode Data = "ABC 123456789" |
27 | 1e | Format Trailer = Rs |
28 | 30 39 1d 42 4d 50 1d 1d 31 30 30 1d | Format Header = "09GsBMPGsGs100Gs |
34 | 03 | File format = BMP |
35 | 00 | Type = DocCap |
36 | 0000005e | Bytes in image data |
3a | 42 4d | Signature = "BM" |
3c | 5e000000 | Size of the file |
40 | 0000 | Reserved |
42 | 0000 | Reserved |
44 | 3e000000 | Starting position of image data |
48 | 28000000 | Size of header |
4c | 08000000 | Image width |
50 | 08000000 | Image height |
54 | 0100 | Number of color planes |
56 | 0100 | Number of bits per pixel |
58 | 00000000 | Compression method |
5c | 00000000 | Size of bitmap |
60 | 00000000 | Horizontal resolution |
64 | 00000000 | Vertical resolution |
68 | 00000000 | Number of colors |
6c | 00000000 | Number of important colors |
70 | 00000000 ffffff00 | Color Palette |
78 | ff000000 ff000000 ff000000 ff000000 ff000000 ff000000 ff000000 ff000000 | Image Data |
98 | 1e | Format Trailer = Rs |
99 | 04 | Message Trailer = Eot |