ABC Script Tool Help


Contents

1. Introduction

1.1. General

1.2. Prerequisites

1.3. Supported Operating Systems

1.4. Running the AB Circle Script Tool

2. Usage

2.1. Main Window

2.2. General Usage

3. Menu

4. Script

4.1. Writing a Script

4.2. Supported Commands

4.3. Example Script


1. Introduction

1.1. General

The ABC Script Tool is an application used to read, write and run scripts for use with AB Circle smart card readers and smart cards. These scripts can then be used to control script execution and send commands to a connected smart card reader.

1.2. Prerequisites

In order to run the AB Circle Script Tool, you will need a Java Runtime Environment (JRE) installed on your machine.
The Java Runtime Environment can be downloaded from here: https://www.java.com/en/download/.
For help on installing Java, please see also here: https://java.com/en/download/help/index_installing.xml.

1.3. Supported Operating Systems

The ABC Script Tool supports the following operating systems:

Note: Other operating systems should work as well (as long as there is java support), but are not tested at this time.

1.4. Running the AB Circle Script Tool

After installing java (see also 1.2. Prerequisites on how to install):


⇑ Back to top

2. Usage

2.1. Main window

The main program window consists of 3 parts:

  1. Menu: holding all options in the program which control card reader connections, handling scripts, and script execution.
  2. Script Panel: used for displaying and editing scripts.
  3. Output Panel: used for displaying messages and statuses.

2.2. General usage

In order to run a script on a smart card reader in general the following steps should be performed:

  1. Create a new script or open an existing script through the "File" menu

  2. Select the smart card reader to run the script on from the "Readers" menu.
    The program will show all AB Circle readers connected to the system.

  3. Select the connection options for connection to the reader through the "Connection" menu (or alternatively, define the options in a script).

  4. Control script execution through the various options, or build a script by inserting script commands through the "Script" menu

  5. Select "Validate" (or its shortcut F4) to validate the script or "Run" (or its shortcut F5) to run the script.
    The output window will display the result of the script run(s).

⇑ Back to top

3. Menu

There are various menu options in the program which control smart card readers, scripts and script execution.
These are listed below:

⇑ Back to top

4. Script

4.1 Writing a Script

A smart card reader script consists of a collection of commands that either;

  1. control the script execution
  2. control the card handling and connection
  3. APDU / Escape commands sent to a selected smart card reader and/or card
Note: commands that control script execution override settings chosen in the menu.

The usual order of writing a script is usually:

The real order of commands does not matter since the complete script is parsed before running.
But the commands are executed from top to bottom, thus an ITERATIONS command followed by a RUNINFINITE will be overridden by the latter and the script will run infinite.

4.2 Supported Commands

The list of supported commands is listed below:
1. Controls script execution
.ITERATIONS:N:Number of script iterations to execute, where N should be a number between 1 and 999999.
.RUNINFINITE:Run script infinitely
.WAITFORCARD:Wait for a detected card before running the script
.COMMANDDELAY:X:Delay between commands in milliseconds, where X should be a number between 1 and 999999.
.SCRIPTRUNDELAY:Y:Delay between script runs in milliseconds, where Y should be a number between 1 and 999999.
2. Control card connection
.RESET:Resets the card in/on the reader using current active protocol
.CONNECTT0:Connect to the card in/on the reader using T=0 protocol
.CONNECTT1:Connect to the card in/on the reader using T=1 protocol
.CONNECTDEFAULT:Connect to the card in/on the reader using the card default protocol
.CONNECTDIRECT:Connect card using Direct mode
.DISCONNECT:Disconnect a previously connected card
Note: a card will always be disconnected at the end of an iteration or script run (depending on selected option)
3. Commands to send to the reader / card
APDU command:APDU command to send; should be in the format: command # [optional return bytes] response
.ESCAPE:Escape command to send; should be in the format: .ESCAPE@control code: command # [optional return bytes] response

4.3 Example Script


// Example Script for Contactless Mifare 1K card.

// Wait for detected card before running script
.WAITFORCARD
// Number of script iterations (1 iteration here)
.ITERATIONS: 1
// Connect card using T=1 protocol
.CONNECTT1
// Send APDU commands (Format: command # [optional return bytes] response)
//Load Authentication Key (Key Index 0)
ff 82 00 00 06 ff ff ff ff ff ff#90 00
//Authenticate (Block 4, Key Type A, Key Index 0)
ff 86 00 00 05 01 00 04 60 00#90 00
// Write 16 bytes into Block 4
ff d6 00 04 10 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F#90 00
// Read 16 bytes from Block 4
ff b0 00 04 10#00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 90 00
// Set Value Block 5 to 5
ff d7 00 05 05 00 00 00 00 05#90 00
// Read Value in Block 5
ff b1 00 05 00#00 00 00 05 90 00
// Increment Value in Block 5
ff d7 00 05 05 01 00 00 00 01#90 00
// Read Value in Block 5
ff b1 00 05 00#00 00 00 06 90 00
// Decrement Value in Block 5
ff d7 00 05 05 02 00 00 00 02#90 00
// Read Value in Block 5
ff b1 00 05 00#00 00 00 04 90 00
// Disconnect card
.DISCONNECT

// (c) 2020, AB Circle Limited

⇑ Back to top

Copyright © 2020, AB Circle Limited