0% found this document useful (0 votes)
207 views17 pages

PIN Pad Commands: September - 2018

This document describes PIN pad commands for displaying QR codes, creating and reading/writing files, displaying images, and starting surveys on a PIN pad. It provides commands for (1) displaying a QR code with optional line text, (2) creating a new file and writing/reading blocks of data to it, (3) displaying an image file from a specified location with coordinates and timeout, and (4) starting a survey with configurable display text, entry keys, and timeout. The document contains warnings, revision history, and tables of contents to aid in navigation.

Uploaded by

Antonio Oliveira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
207 views17 pages

PIN Pad Commands: September - 2018

This document describes PIN pad commands for displaying QR codes, creating and reading/writing files, displaying images, and starting surveys on a PIN pad. It provides commands for (1) displaying a QR code with optional line text, (2) creating a new file and writing/reading blocks of data to it, (3) displaying an image file from a specified location with coordinates and timeout, and (4) starting a survey with configurable display text, entry keys, and timeout. The document contains warnings, revision history, and tables of contents to aid in navigation.

Uploaded by

Antonio Oliveira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

PIN pad Commands

Version 1.00
September - 2018
WARNING

This document and the information in it are provided in confidence. No part of it may be
reproduced, transmitted or translated into any human or computer language, in any form
or by any means without the prior written permission of Gertec Brasil Ltda.

Information in this document may change without prior notice. To make sure this is the
latest version of it, you need to contact Gertec.

While every care has been taken in preparing these documents, Gertec makes no
representations and gives no warranties of whatever nature in respect of these
documents. If you find any problem related but not limited to the accuracy or
completeness of any information, please contact Gertec for improvements in the next
version.

Gertec Brasil Ltda, its subsidiaries, the directors, employees and agents cannot be held
liable for the use of and reliance of the opinions, estimates, forecasts and findings in
these documents.

All rights reserved.

All trademarks mentioned are proprietary of their respective owners.

PIN pad Commands 2 CONFIDENTIAL


Revision History

Version Date Editor Description


1.00 28-Set-18 Juliana Miranda Released.

PIN pad Commands 3 CONFIDENTIAL


Table of Contents
1 Introduction .......................................................................................................... 5

2 QRCode ............................................................................................................... 6

3 Create a new file .................................................................................................. 8

4 Insert/Read a byte block to/from a file ................................................................ 10

5 Closes file .......................................................................................................... 11

6 Send Image ....................................................................................................... 12

7 Survey ............................................................................................................... 14

PIN pad Commands 4 CONFIDENTIAL


1 Introduction
All Gertec protocol messages have the format:

HOST: <STX> [LEN1] [LEN2] [Send] <ETX> [CKS]

PIN : <ACK>

PIN : <STX> [LEN1] [LEN2] [Answer] <ETX> [CKS]

HOST: <ACK>

Where: <STX> - Byte 0x02

<ETX> - Byte 0x03

<ACK> - Byte 0x06

[LEN1] [LEN2] – Total size of the command, from the <STX> to [CKS] in bytes.
Required to be 2 bytes.

[CKS] – Checksum of the message (XOR of all other bytes)

[Send] and [Answer] – They will be described according to the commands given to
follow.

PIN pad Commands 5 CONFIDENTIAL


2 QRCode
Send QRCode on pin pad.

Send: QR01 [Timeout] [LineType] [LineLength] [QRCodeLength] [LineData]


[QRCodeData]

Where: [Timeout] – (3 char) Command timeout in seconds. From "000" to "999".


"000" means infinite;

[LineType] – (1 char) Line positioning:


“0”: there's no line;
“1”: top line positioning;
“2”: bottom line positioning;

[LineLength] – (2 char) Line Length in ASCII format (from "00" to "99");

[QRCodeLength] – (4 char) QRCode Length in ASCII format (from "0000" to


"9999");

[LineData] – ([LineLength] char) Line data (ASCII format);

[QRCodeData] – ([QRCodeLength] bytes) QRCode data (byte array);

Answer: QR01 [Status]

Where: [Status] – (1 char) Operation status.


“0” - Success (timeout expired);
“E” - Line data size is greater than line character limit.
“F” - Requested QRCode doesn't fit on device screen;
“H” - Command Aborted by Host;
“I” - Invalid length of line and QR Code data
“L” - QR support not installed;
“M” - RAM Memory insufficient;
“N” - No data for QR Code PayLoad;

PIN pad Commands 6 CONFIDENTIAL


“P” - Invalid Parameter;
“S” - Command not supported;
“U” - Command Aborted by User;

Example:
HOST: <STX> [NUMB] QR01 [Timeout] [LineType] [LineLength]
[QRCodeLength] [LineData] [QRCodeData] <ETX> [CKS]

DEV : <ACK>

<STX> [NUMB] QR01 [Status] <ETX> [CKS]

HOST: <ACK>

PIN pad Commands 7 CONFIDENTIAL


3 Create a new file
Create a new file with given name. Overrides if file already exists. It waits for blocks to
be written in file with subsequent callings of command FS02.

Send: FS01 [Mode] [Blocks] [FileName]

Where: [Mode] – (1 char) Mode:


“0”: Read;
“1”: Write;

[Blocks] – (4 char) Number of blocks to be transmitted. Only in write mode,


"0000" otherwise.

[FileName] – (Variable) Use “img” + image file name.

Answer: FS01 [Status] [Blocks]

Where: [Status] – (1 char) Operation status.


“0” - OK;
“1” - Invalid Parameter [Blocks];
“2” - File System Error;
“3” - Already Called. Must Call FS03 to finish;
“4” - Invalid Parameter [File name];
“5” - Invalid Mode;

[Blocks] – (4 char) Number of blocks to be transmitted. Only in read mode.

Example:
HOST: <STX> [NUMB] FS01 [Mode] [Blocks] [FileName] <ETX> [CKS]

DEV : <ACK>

DEV : <STX> [NUMB] FS01 [Status] [Blocks] <ETX> [CKS]

PIN pad Commands 8 CONFIDENTIAL


HOST: <ACK>

PIN pad Commands 9 CONFIDENTIAL


4 Insert/Read a byte block to/from a file
It appends/reads a block into the given file created/requested by FS01.

Send: FS02 [BlockSize] [Data]

Where: [BlockSize] – (4 char) Block length. Only in write mode.

[Data] – (Variable) Data to be written. Only in write mode.

Answer: FS02 [Status] [BlockSize] [Data]

Where: [Status] – (1 char) Operation status.


“0” - OK;
“1” - Invalid Parameter [Block length];
“2” - Error writing to file;
“3” - Invalid Sequence Call;
“4” - Error processing command;

[BlockSize] – (4 char) Block length. Only in read mode.

[Data] – (Variable) Data. Only in read mode.

Example:
HOST: <STX> [NUMB] FS02 [BlockSize] [Data] <ETX> [CKS]

DEV : <ACK>

DEV : <STX> [NUMB] FS02 [Status] [BlockSize] [Data] <ETX> [CKS]

HOST: <ACK>

PIN pad Commands 10 CONFIDENTIAL


5 Closes file
Save file permanently into memory/Close file. Only if SHA256 hash is OK.

Send: FS03 [SHA256]

Where: [SHA256] – (32 byte) SHA-256 hash. Only in write mode.

Answer: FS03 [Status] [SHA256]

Where: [Status] – (1 char) Operation status.


“0” - OK;
“1” - Invalid Call;
“2” - Error closing file;
“3” - Invalid Sequence Call;
“4” - Error processing command;

[SHA256] – (32 byte) SHA-256 hash. Only in read mode.

Example:
HOST: <STX> [NUMB] FS03 [SHA256] <ETX> [CKS]

DEV : <ACK>

DEV : <STX> [NUMB] FS03 [Status] [SHA256] <ETX> [CKS]

HOST: <ACK>

PIN pad Commands 11 CONFIDENTIAL


6 Send Image
Send image on pin pad.

Send: SP02 [XStart] [YStart] [Timeout] [ImageFile]

Where: [XStart] – (3 char) X coordinate, beginning on the left (from "000" to the
maximum display width).

[YStart] – (3 char) Y coordinate, beginning on the top (from "000" to the


maximum display width).

[Timeout] – (3 char) Image timeout in seconds: from "001" to "999". Use


"000" for infinite. If timeout expires, screen will be cleaned.

[ImageFile] – (Variable) Use “img” + image file name.

Answer: SP02 [Status]

Where: [Status] – (1 char) Operation status.


“0” - OK;
“C” - Invalid coordinates;
“D” - An error occured when getting display resolution;
“I” - An error occured when showing image;
“M” - The received message size is below its minimal size;
“X” - Command is not supported on this device;

Example:
HOST: <STX> [NUMB] SP02 [XStart] [YStart] [Timeout] [ImageFile] <ETX>
[CKS]

DEV : <ACK>

DEV : <STX> [NUMB] SP02 [Status] <ETX> [CKS]

PIN pad Commands 12 CONFIDENTIAL


HOST: <ACK>

PIN pad Commands 13 CONFIDENTIAL


7 Survey
Start the survey on pin pad.

Send: EX08 [Mask] [Timeout] [Screen] [DspTopType] [DspTopLen] [DspTopData]


[DspBottomType] [DspBottomLen] [DspBottomData]

Where: [Mask] – (3 char) Mask of Entry keys for EX08 command (XOR):
"8000" - Arrow UP;
"4000" - Arrow DOWN;
"2000" - Arrow LEFT;
"1000" - Arrow RIGHT;
"0800" - Cancel;
"0400" - Clear;
"0200" - Enter;
"0100" - Power;
"0080" - F1;
"0040" - F2;
"0020" - F3;
"0010" - F4;
"0008" - RFU;
"0004" - RFU;
"0002" - RFU;
"0001" - RFU;

[Timeout] – (3 char) Capture timeout, from "001" to "999". "000" means infinite;

[Screen] – (1 char) Style of screen:


“4” – 4 lines;
“8” – 8 lines;
“C” – 12 lines;

[DspTopType] – (1 char) Type configuration for the top of screen:


“0” - User-defined text message;

PIN pad Commands 14 CONFIDENTIAL


“1” - Pre-defined text message;
“2” - Pre-defined image;

[DspTopLen] – (3 char) Length of [DspTopData].

[DspTopData] – (Variable) Configuration to be displayed on top of screen.


Depends on [DspTopType]:
Images:
"00" - RFU;
...
"99" - RFU;

Default messages:
"000" - RFU;
...
"999" - RFU;

[DspBottomType] – (1 char) Type configuration for the bottom of screen:


“0” - User-defined text message;
“1” - Pre-defined text message;
“2” - Pre-defined image;

[DspBottomLen] – (3 char) Length of [DspBottomData].

[DspBottomData] – (Variable) Configuration to be displayed on bottom of


screen. Depends on [DspBottomType].
Images:
"00" - RFU;
"40" - Four key (F1-F4) - Great/Good/Regular/Bad -
Yellow;
"41" - Four key (F1-F4) - Great/Good/Regular/Bad -
White;
"42" - Four key (F1-F4) - Great/Good/Regular/Bad -
Blue;
...

PIN pad Commands 15 CONFIDENTIAL


"45" - Four key (F1-F4) - Bad/Regular/Good/Great -
Yellow;
"46" - Four key (F1-F4) - Bad/Regular/Good/Great -
White;
"47" - Four key (F1-F4) - Bad/Regular/Good/Great - Blue;
...
"99" - RFU;

Default messages:
"000" - RFU;
...
"999" - RFU;

Answer: EX08 [Status] [Response]

Where: [Status] – (1 char) Operation status:


“0” - OK;
“1” - Invalid Parameter [Mask];
“2” - Invalid Parameter [Timeout];
“3” - Invalid Parameter [Screen];
“4” - Invalid Parameters [DisplayTop];
“5” - Invalid Parameters [DisplayBottom];
“H” - Command Aborted by Host;
“I” - Internal error;
“T” - Command Aborted by TimeOut;
“U” - Command Aborted by User;

[Response] – (3 char) Response captured (only if successful):


"8000" - Arrow UP;
"4000" - Arrow DOWN;
"2000" - Arrow LEFT;
"1000" - Arrow RIGHT;
"0800" - Cancel;
"0400" - Clear;

PIN pad Commands 16 CONFIDENTIAL


"0200" - Enter;
"0100" - Power;
"0080" - F1;
"0040" - F2;
"0020" - F3;
"0010" - F4;
"0008" - RFU;
"0004" - RFU;
"0002" - RFU;
"0001" - RFU;

Example:
HOST: <STX> [NUMB] EX08 [Mask] [Timeout] [Screen] [DspTopType]
[DspTopLen] [DspTopData] [DspBottomType] [DspBottomLen] [DspBottomData] <ETX>
[CKS]

DEV : <ACK>

DEV : <STX> [NUMB] EX08 [Status] [Response] <ETX> [CKS]

HOST: <ACK>

PIN pad Commands 17 CONFIDENTIAL

You might also like