Command 0x1840 – Card Emulation

Card emulation is initiated by receiving a 0x1840 command from the host. The device will prepare card emulation with the parameters provided in the command and start card emulation.

The sequence of events is as follows:

1

Host ensures device is idle

The host ensures the device is not currently running another command, for example, that it is not running a transaction or PIN entry.

2

Host composes and sends command

The host composes a command request in the format described below and sends it to the device.

3

Device validates and prepares

The device receives the command and verifies that the parameters are valid and the device is in a state that allows the execution of card emulation.

4

Device prompts customer (if display available)

If the device has a display, a prompt will be displayed asking the customer to tap their phone to the device.

5

Timeout behavior and response

  • If the timeout parameter is not included or set to 0x00, then there is no timeout.

  • If the timeout parameter is set to a specific number of seconds, the device returns a command response message with its Operation Status Summary byte set to 0x01 (OK, Started / Running).

6

Host can cancel emulation

The host may issue a 0x1840 command with Tag 0x81 set to 0x00 to cancel the execution of card emulation.

7

Completion notification

After the timeout expires, host cancel or the card is read, the device sends a 0x1805 notification to inform the host.

Table - Request Data for Command 0x1840 – Card Emulation

Tag
Len
Value / Description
Req
Default

/81

01

Start/Cancel

  • 0x00 = Cancel (See the example of 0x1840 cancel command below)

  • 0x01 = Start

R

/82

01

Timeout in seconds

  • 0x00 = No timeout

  • 0x01 to 0xFF = 1 to 255 seconds

O

0x00

/83

<= 254

URL

URL to use as card data. Required when starting card emulation. Optional and ignored if canceling emulation. Example: https://www.magtek.com/

O/R

Table - Request Example

Example (Hex)
AA 00 81 04 01 01 18 40 84 21 18 40 81 01 01 82 01 00 83 17 68 74 74 70 73 3A 2F 2F 77 77 77
2E 6D 61 67 74 65 6B 2E 63 6F 6D 2F

Table - Response Example

Example (Hex)
AA 00 81 04 82 01 18 40 82 04 01 00 00 00

Table- Example of 0x1840 Cancel Command

Last updated