Data length, Data, Result code – MagTek MagneSafe V5 User Manual

Page 31: Get and set property commands, Get property command

Advertising
background image

Section 2. Communications

23

Value

Command Number

Description

0x28

Power Down Command (Wireless
USB Reader Only)

Powers down the MSR circuits (if running on
battery turns reader off).

0x29

Get Battery Status Command
(Wireless USB Reader Only)

Gets Charge Status of battery

0x30

Encrypt Bulk Data

Encrypts Bulk Data


Data Length

This one-byte field contains the length of the valid data contained in the Data field. For
example, a command with one byte of data would send 01 for this byte; a command with 18
bytes of data would send 12 for this byte.

Data

This multi-byte field contains command data if any. Note that the length of this field is fixed at
60 bytes (120 bytes for RS-232 models). 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.

05

Delayed

The request is refused due to anti-hacking
mode

07

Invalid Operation

Depends on context of command


GET AND SET PROPERTY COMMANDS

Get Property Command

Command number:

0x00

Description:

The Get Property command gets a property from the reader.


The Get Property command data fields for the requests and responses are structured as follows.

Advertising