Skip to content

Percepxion Serial API

The following commands are accessible through the Percepxion Serial API.

Command Description Gateway Action
percepxion_getsettings This command sends a request to the Lantronix gateway to read the device's configuration settings. The gateway reads the configuration for the serial device.
percepxion_register<payload> This command registers the device with the Percepxion server. You need to register the device and obtain the device authentication token before you can execute other device API calls. The gateway sends the request to register the device through the REST APIs. The gateway receives the response and parses and keeps a copy of the auth_token for subsequent commands.
percepxion_status<auth_token>,<payload> This command sends the current device status to Percepxion. Use this command to send device attributes for the capabilities that the device supports. Send the status update using the REST API.
percepxion_update<auth_token>,<payload> This command sends a request to check for all available firmware or configuration updates for the device. The response returns details about the available update. Send the request to check for an update through the REST API.
percepxion_download<auth_token>,<payload> Send a request to download the content file to the device. The request parameter includes the file info returned from Percepxion in the percepxion_update command. Send the request to download the content through the REST APIs.
percepxion_capability_exchange<auth_token>,<telemetry_host>,<payload> This command exchanges the capabilities of a device to Percepxion. The gateway exchanges the capabilities of a device with Percepxion through REST API.
percepxion_capability_selection<auth_token>,<telemetry_host>,<payload> This command sends the capability selection of a device to Percepxion. The gateway sends the capability selection of a device to Percepxion through REST API.
percepxion_telemetry_publish<auth_token>,<telemetry_host>,<payload> This command publishes the status of the groups or attributes of a device to Percepxion. The gateway publishes the attributes' values to Percepxion through REST API.

Accessing the Serial API Over the Serial Line

To access the serial API over the serial line using the Percepxion Interface:

This tutorial describes how to access the serial API over the serial line and send a command.

  1. Set Line 1 Protocol to Percepxion Interface.
  2. Set Percepxion Line 1 Configuration to Enabled and enter the Project Tag.
  3. Use a terminal emulator (e.g. Tera Term) to connect the gateway.
  4. Send the following API command: percepxion_getsettings. The API responds with the Percepxion settings, similar to:
{"project_tag":"MYSTQ_PT_778edaba-e7d5-4b5f-942d-0ef8f760f9cc",
"status_update_interval":"10",
"content_check_interval":"24"}

To access the serial API over the serial line using Mux commands:

This tutorial describes how to access the serial API over the serial line and send a command using Mux. See the Mux Reference for more detailed information about Mux commands and responses.

  1. Set Line 1 Protocol to Mux.
  2. Set Line Virtual_1 Protocol to Percepxion Interface.
  3. Set Percepxion Line Virtual_1 Configuration to Enabled and enter the Project Tag.
  4. Use a terminal emulator (e.g. Tera Term) to connect the gateway.
  5. Send the following API commands:
    1. 1v1. The API responds with K, indicating success.
    2. 1sb~. The API responds with 500K, indicating number of bytes allowed and success.
    3. percepxion_getsettings~. The API responds with K, indicating success.
    4. 1p. The API responds with K, indicating success.
    5. 1rb~2000. The API responds with the Percepxion settings, similar to:
{"project_tag":"MYSTQ_PT_778edaba-e7d5-4b5f-942d-0ef8f760f9cc",
"status_update_interval":"10",
"content_check_interval":"24"}