Command number, Data length, Data – MagTek USB KB SURESWIPE & USB KB SWIPE READER User Manual

Page 26: Result code

Advertising
background image

USB Keyboard Emulation Swipe Reader

18

COMMAND NUMBER

This one-byte field contains the value of the requested command number. The following table
lists all the existing commands.

Value

(Hex)

Command Number

Description

00

GET PROPERTY

Gets a property from the device

01

SET PROPERTY

Sets a property in the device

02

RESET DEVICE

Resets the device

03

GET KEYMAP ITEM

Gets a key map item

04

SET KEYMAP ITEM

Sets a key map item

05

SAVE CUSTOM KEYMAP

Saves the custom key map


DATA LENGTH

This one-byte field contains the length of the valid data contained in the Data field.

DATA

This multi-byte field contains command data if any. Note that the length of this field is fixed at
22 bytes. Valid data should be placed in the field starting at offset 2. Any remaining data after
the valid data should be set to zero. This entire field must always be set even if there is no valid
data. The HID specification requires that Reports be fixed in length. Command data may vary
in length. Therefore, the Report should be filled with zeros after the valid data.

RESULT CODE

This one-byte field contains the value of the result code. There are two types of result codes:
generic result codes and command-specific result codes. Generic result codes always have the
most significant bit set to zero. Generic result codes have the same meaning for all commands
and can be used by any command. Command-specific result codes always have the most
significant bit set to one. Command-specific result codes are defined by the command that uses
them. The same code can have different meanings for different commands. Command-specific
result codes are defined in the documentation for the command that uses them. Generic result
codes are defined in the following table.

Value

(Hex)

Result Code

Description

00

SUCCESS

The command completed successfully.

01

FAILURE

The command failed.

02

BAD PARAMETER

The command failed due to a bad
parameter or command syntax error.

Advertising