Section 4. commands sent to device, Msr command, Setled command – MagTek Excella STX99875340 User Manual

Page 59: Ledn parameter, Commands sent to device

Advertising
background image

49

SECTION 4. COMMANDS SENT TO DEVICE

Section 4 describes device commands that can be sent to the device using the API function
MTMICRSendCommand (see Section 3). The device reply will include the CommandStatus and/or
DeviceStatus sections (and their corresponding Key-Value pairs) as described in later chapters.

The command is sent using a string with the following format:

DeviceCommand=[command]&[parameter=value]&[parameter=value]

Note - The total maximum string length is 255 characters.

MSR COMMAND


MSR commands that can be sent to the MagneSafe Reader

MSR command is sent using a string with the following format:

MSRCommand=[Command Number][Data Length][Data]*[Carriage Return 0x0D]**

*For detailed information on [Command Number], [Data Length] and [Data] you can refer to PN
99875398 “COMMANDS” section page 20.
**Each command and response is composed of a series of readable ASCII characters followed by the
ASCII character CR (0x0D). For detailed information on command format, refer to PN 99875398 page
21.


The response from the MagneSafe Reader is saved in
<DeviceInformation><CommandStatus><ReturnMsg> key.

The response format is [Result Code][Data Length][Data]*

* For detailed information on the result code refer to PN 99875398 “COMMANDS” section page 20

If the command is NOT correct, the response will be 0200

SETLED Command

This command allows the application to control the state of the LED’s when the device is in the idle state.
This command overrides the normal/default LED states.

When the device leaves the idle state to execute a transaction, the device resumes control with the
normal/default states for the LED’s.

LEDn Parameter

This parameter defines the state for each LED. Each LED is assigned an individual parameter as follows:
LED1 (left LED), LED2 (middle LED), and LED3 (right LED).

Advertising