Configuration and Connectivity

This guide covers how to manage application versions, handle specific compilation variants, and verify the communication link between your Host System and the Pinpad device.

Application Versioning

The application follows a semantic versioning format and a specific internal convention to ensure build traceability and OS compatibility.

Versioning Format

The versioning follows the format X.Y.Z-rc:
  • X (Major Version): Main software version.
  • Y (Minor Version): Addition of new functionalities.
  • Z (Revision): Code revisions or bug fixes.
  • rc: Stands for "release candidate."

Versioning Convention

To update the version, modify the versionCode and versionName in the build.gradle.kts(:app) file. This project requires the versionCode (an integer used by Android) to match the versionName with all non-numeric characters removed.
information icon
Example: If versionName is "1.9.8-rc", the versionCode must be 198.

Compilation Variants

The Pinpad Getnet project uses compilation variants to enable or disable functional logic at compile time via specific flags.

Flag Definitions

  • RemoveFlagScreen: When TRUE, it activates the "Remove Card" (Retire Tarjeta) screen upon transaction completion.
  • EmvSpecialTags: When TRUE, enables the transmission of EMV tags 9F1A, 5F2A, and 5F34 in the cryptogram responses.
  • ChangeYDL: When TRUE, the error screen during a remote download (YDL) remains visible indefinitely until manually dismissed. In this mode, the screen displays granular details including the failed package number, byte volume, and file path.

Variant Mapping Table

Select the variant corresponding to your required flag combination:

VariantBitsChangeYDLEmvSpecialTagsRemoveFlagScreen
F00000FALSEFALSEFALSE
F01001FALSEFALSETRUE
F02010FALSETRUEFALSE
F03011FALSETRUETRUE
F04100TRUEFALSEFALSE
F05101TRUEFALSETRUE
F06110TRUETRUEFALSE
F07111TRUETRUETRUE

Compiling Variants

  1. Open the Build Variants tool window in Android Studio (View > Tool Windows > Build Variants).
  2. Select the desired variant (e.g., F03Debug).
  3. To generate all debug APKs simultaneously, run ./gradlew assembleDebug in the terminal. Note that for production environments, assembleRelease is used.

Connectivity Check (Echo Test)

The Y0I (Echo Request) command verifies the serial link and retrieves technical identifiers from the terminal without changing the UI state.

Request [Host]

The Host must send the following payload:

FieldValueAttributeDescription
<STX>02h1 HStart of Message
[CID]“Y0I”3 ANSCommand Identifier
<ETX>03h1 HEnd of Message
{LRC}Algorithm1 HError Check (See Integrity & Checksums)

A minimal Echo request frame would look as follows:

text
<STX>Y0I<ETX>#

Response [Pinpad]

If functional, the Pinpad returns its hardware and software metadata, separated by <FS> (Field Separators - 1Ch).
FieldAttributeDescription
[CID]3 ANSCommand Identifier (“Y0I”)
[OWN]15 ANSPinpad owner (“GETNET”)
<FS>1 HField Separator
[VEN]1..15 ANSManufacturer ID (Retrieved from device)
<FS>1 HField Separator
[MOD]1..15 ANSPinpad model (e.g., “N750P”)
<FS>1 HField Separator
[VOS]1..15 ANSOS version (e.g., “Android 12”)
<FS>1 HField Separator
[SOF]1..15 ANSSoftware version (e.g., “1.9.7-rc”)
<FS>1 HField Separator
[NSF]1..15 ANSDevice Serial Number

A successful response frame would resemble the following:

text
<ACK><STX>Y0IGETNET<FS>newland<FS>N750P<FS>Android 12<FS>1.9.7-rc<FS>NDB400005172<ETX>g

Next Steps

With connectivity verified and the build system configured, you can proceed to:

  1. Architecture & Core Concepts: Understand the internal modules like HandlerCommands and Transaction.
  2. Security & PIN Model: Learn about RSA key generation and DUKPT injection.