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.Example: IfversionNameis "1.9.8-rc", theversionCodemust 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 tags9F1A,5F2A, and5F34in 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:
| Variant | Bits | ChangeYDL | EmvSpecialTags | RemoveFlagScreen |
|---|---|---|---|---|
| F00 | 000 | FALSE | FALSE | FALSE |
| F01 | 001 | FALSE | FALSE | TRUE |
| F02 | 010 | FALSE | TRUE | FALSE |
| F03 | 011 | FALSE | TRUE | TRUE |
| F04 | 100 | TRUE | FALSE | FALSE |
| F05 | 101 | TRUE | FALSE | TRUE |
| F06 | 110 | TRUE | TRUE | FALSE |
| F07 | 111 | TRUE | TRUE | TRUE |
Compiling Variants
- Open the Build Variants tool window in Android Studio (View > Tool Windows > Build Variants).
- Select the desired variant (e.g.,
F03Debug). - To generate all debug APKs simultaneously, run
./gradlew assembleDebugin the terminal. Note that for production environments,assembleReleaseis 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:
| Field | Value | Attribute | Description |
|---|---|---|---|
<STX> | 02h | 1 H | Start of Message |
| [CID] | “Y0I” | 3 ANS | Command Identifier |
<ETX> | 03h | 1 H | End of Message |
| {LRC} | Algorithm | 1 H | Error Check (See Integrity & Checksums) |
A minimal Echo request frame would look as follows:
text
<STX>Y0I<ETX>#
text
<STX>Y0I<ETX>#
Response [Pinpad]
If functional, the Pinpad returns its hardware and software metadata, separated by
<FS> (Field Separators - 1Ch).| Field | Attribute | Description |
|---|---|---|
| [CID] | 3 ANS | Command Identifier (“Y0I”) |
| [OWN] | 15 ANS | Pinpad owner (“GETNET”) |
<FS> | 1 H | Field Separator |
| [VEN] | 1..15 ANS | Manufacturer ID (Retrieved from device) |
<FS> | 1 H | Field Separator |
| [MOD] | 1..15 ANS | Pinpad model (e.g., “N750P”) |
<FS> | 1 H | Field Separator |
| [VOS] | 1..15 ANS | OS version (e.g., “Android 12”) |
<FS> | 1 H | Field Separator |
| [SOF] | 1..15 ANS | Software version (e.g., “1.9.7-rc”) |
<FS> | 1 H | Field Separator |
| [NSF] | 1..15 ANS | Device 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
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:
- Architecture & Core Concepts: Understand the internal modules like
HandlerCommandsandTransaction. - Security & PIN Model: Learn about RSA key generation and DUKPT injection.
On this page
Configuration and Connectivity