# SA Applet Getting IP Address Ref Guide Vers 2.0

Application on Tablet connects using serial over USB to Verifone device and send the command to fetch the IP address of the terminal. This document provides the overview on Connection profile, command interface, sample request and response.

## Connection profile

\<CONNECTION\_PROFILE>

**RAW\_SERIAL**

\<SERIAL\_PORT>**USBD**\</SERIAL\_PORT>

**60000**

**115200**

**none**

**8**

**1**

**none**

\</CONNECTION\_PROFILE>

## Client App

### Communicating with a Device

1. For communication with a USB device, a new thread should be created on which to carry out all data transmissions, the UI thread does not get blocked.
2. Configure the serial port as per the **Connection profile** mentioned above.
3. Upon successful connection with the terminal over serial, App can start the listening thread to read the data. App may poll for every 10 milliseconds (ms) to check whether any data is available, if underlying OS or system does not provide any blocking callback for the same.
4. User can send request to terminal as per the format mentioned below. It is plain predefined JSON format. Currently supports command **GETIP**only.
5. Request sender must wait at least 1 min (60 seconds) before retry sending the request again.
6. Response format is as mentioned below.
7. There are no commands other than **GETIP** needs to be exchanged between Terminal and App.
8. Once App receive the IP, the user may remove or disconnect the USB from table.

Possible Sequence and flow diagram for the Client App as follows:

![](/files/c114b45fe8015c3173ecda519fdb7ba89d3907bb)

![](/files/22af4bab3f289410600caec77bcc2a627afab88b)

## Request and Response

Generic Request format is **case insensitive**. Request should be a valid JSON string.

**{**

**"cmd": ">",**

**"param": "<>" // optional**

**}**

Generic Response format is **Always uppercase**.

**{**

**"STATUS": "<\<OK/NOT\_OK>>",**

**"CMD": ">",**

**"DATA": "<<** **json data>>"**

**}**

### Supported Commands

Get IP

| **Request**          | **Response**                                                                                                                                    |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **{"CMD": "GETIP"}** | <p>{<br>"CMD": "GETIP",<br>"DATA": {<br>"IP": "192.168.1.13",<br>"MAC": "70:87:A7:BC:A3:C4",<br>"SSID": "DPDY"<br>},<br>"STATUS": "OK"<br>}</p> |

| **Request Format:**  |
| -------------------- |
| **Elements:**        |
| **"CMD"**            |
| **"param"**          |
| **Response Format:** |
| **"CMD"**            |
| **"DATA"**           |
| **"STATUS"**         |

Get System Information

| **Request**               | **Response**                                                                                                                                          |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **{"CMD": "GETSYSINFO"}** | <p>{<br>"CMD": "GETSYSINFO",<br>"DATA": {<br>"BATTERY": "82",<br>"DEVICE\_ID": "NA",<br>"SERIAL\_NUM": "451-653-580"<br>},<br>"STATUS": "OK"<br>}</p> |

| **Request Format:**  |
| -------------------- |
| **Elements:**        |
| **"CMD"**            |
| **"param"**          |
| **Response Format:** |
| **"CMD"**            |
| **"DATA"**           |
| **"STATUS"**         |

## Output

Valid command

![](/files/447d39f23e9d7320e13ea9d8f1a36780a3a574a0)

Invalid command

![](/files/f8b2c9f502cc49d85615b266bf3228a7dd52a585)

| ![](/files/e1659f04e6def638a4a31d31c8c39d9fa7bd297f) | <p>Thank you! We are the payments architects who<br>truly understand commerce. As payment architects we shape ecosystems for online and in-person commerce experiences, including all the tools you need… from gateways and acquiring to fraud management, tokenization and reporting. As commerce experts, we are here for you and your business. With our payment devices, our systems & solutions and our support. Everywhere. Anytime. So that your customers feel enabled, recognized and well taken care of, even beyond their expectations. Verifone. Creating omni-commerce solutions that simply shape powerful customer experiences.</p> |
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

Verifone

North America Development

The Royal Center Four

11700 Great Oaks Way, Suite 210

Alpharetta, GA 30022

[www.verifone.com](http://www.verifone.com)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.verifone.com/sca/tbd-documentation/sa-applet-getting-ip-address-ref-guide-vers-2.0.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
