PLTcloud User Manual

Introduction

This document describes the features of the PLT cloud with its different sections. As an example, it focuses on the “IoTSDK Demo” project, that aims to program the STM32 Discovery kit IoT node with a firmware image integrating the BLE protocol and test it.

Home

Use the Home page to navigate easily across the different sections of the PLTcloud website.

Home screen

PLTs

PLTs are grouped in “Deployment Groups”. These are groups of PLTs that are meant to run the same set of tests. For example, you can have a group of PLTs that you will want to use for In-Circuit (ICT) testing and another group of PLTs that you will want to use for Final Assembly, Test & Pack-out (FATP) testing.

New Deployment Groups can be created in the “PLTs” view.

PLTs, grouped in Deployment Groups

You can then fill out the name and the description of the group.

New Deployment Group

From the “PLTs” view, detailed information on a PLT can be seen by clicking on the dark-blue eye icon.

PLT Detail View

In the case of the “STM IoT SDK” project, we are deploying to PLTs that are part of the “DEV” group.

Adding a PLT

On the PLT UI panel, press the Menu button to enter the PLT Menu, and select Enroll.

The PLT will show an enrollment code on the OLED display.

Enrollment Code on PLT OLED
display

You can enroll your PLT under the “PLTs” section of the PLTcloud website. On the PLTcloud website, use this code as the Activation code in the “Enroll PLT” form.

PLT Enrollment Form

You can then set the PLT to a specific deployment group by clicking on on “SET DEPLOYMENT GROUP”.

Setting Deployment Group for a
PLT

For the “STM IoT SDK” project, we set to the “DEV” deployment group.

PLT Views

You can see a list of all PLTs by pressing “LIST” from the “PLTs” view:

PLT list view

Or in grouped by deployment group by clicking on on “DEPLOYMENT GROUPS”.

PLTs, grouped by Deployment
Group

Create Project

You can create a project or go through the list of projects already created by clicking on the 3 dots in the top app bar:

Project Menu

The list of projects allows you to switch between them and to select the project you want to work on in PLTcloud. In our case, we selected the “IoTSDK Demo” project.

Project List

Project Elements

You can add elements to a project.

Element List

Elements that you might want to add to a project can, for example, be firmware images (.hex, .elf, .bin), or test suite definition files (.yaml).

To test and program the STM IoT demo board, we need to upload the firmware and the test plan. The firmware can be uploaded as an ELF file, for example, STM32L4_IOT_HR.elf. The test plan is supplied as a YAML file, for example, suite-stm32l4DK-IOT-BLE.yaml:

title: "LY10-PLT demo: stm32 DK IoT node"
suite:
  - ident: ICT-T1
    title: Erase stm32l4_DevKit with USB ST-Link
    steps:
      - command: erase stm32l4_STLink
  - ident: ICT-T2
    title: Program STM32L4-IOT-BLE stm32l4_DevKit with USB ST-Link
    steps:
      - command: program stm32l4_STLink none,STM32L4_IOT_HR.elf,none
  - ident: ICT-T3
    title: Identify DUT
    steps:
      - command: identify stm32l4_IoT_STLink
  - ident: ICT-T4
    title: BLE discovery
    steps:
      - command: bledis %BLEMAC% 30  # Wait up to 30 seconds for BLE discovery to complete

Project Releases

You can create releases for your projects.

Release List (empty)

The elements that you will be able to add to a new release are elements that you will have previously added through the “Elements” section. You can create multiple releases per project.

For example, to create a new release, you would fill the version and description of cases of your release, and select the elements (firmware images and YAML files) you want to be part of your release.

In our case, we need to create a release of the firmware image (STM32L4_IOT_HR.elf) and of the YAML file (suite-stm32l4DK-IOT-BLE.yaml) for the “IoTSDK Demo” project. These two elements are therefore checked when creating the release that we named “STM32L4 IoT node BLE”.

New Release

Back to the main release section, you can click on the deployment icon next to the release you want to deploy to be able to update the PLTs part of that deployment group with this release. Here, it has been deployed to the “DEV” deployment group.

Release List

Project Settings

The Edit view can be used to modify basic project settings: - Project Name and Description - Serial Number Allocation scheme (Monotonic / Webhook)

Serial Number Webhook API

To perform number allocation through an external webhook API, select the Webhook Serial Number Allocation scheme.

Specify the API endpoint:

  • WebHook URL: URL of the API endpoint accepting HTTP POST requests from PLTcloud.
  • Authentication Token: Hex-encoded token, used to sign the JSON payload sent to the provided URL

Webhook Request payload

The configured webhook endpoint will be sent an HTTP POST request containing a JSON payload like below:

{
    "dut_id": "<DUT IDENTIFIER>",
    "ble_mac": "<BLE MAC>",
    "mcu_id": "<MCU ID>",
    "MYCUSTOMKEY": "my custom value"
}

For security reasons, you probably want to limit requests to those coming from PLTcloud. This can be accomplished by setting an authentication token, and validate the X-Hub-Signature header sent in the webhook request.

The X-Hub-Signature header contains a SHA1 HMAC hex digest of the webhook payload, using the webhook’s authentication token as the key and prefixed with sha1=. The way you verify this signature varies, depending on the language of your code base.

Webhook Response

The API endpoint should return something like:

{
    "serial_number": "<SERIAL NUMBER>"
}

Debug Keys

The Debug Keys view allow users with the Administrator role to manager public SSH keys to control local access to PLTs while in Debug Mode.

The SSH keys for which public keys are attached for a project can be used to upload test plan YAML files and other artifacts using SFTP.

Once a debug SSH (.pub) key is set on a project that is deployed to a PLT, the debug mode can be activated by an Administrator from the Reset section of the PLT view in PLTcloud:

  • Reset PLT in Debug Mode
  • Wait for PLT to restart in debug mode

While the PLT is in debug mode, an SFTP client (such as sftp or WinSCP) can be used to upload release elements.

$ sftp debug@<PLT IP>
debug@<PLT_IP>$ put myTestPlan.yaml
debug@<PLT_IP>$ put firmware.hex
debug@<PLT_IP>$ quit
Note
after adding or modifying test plan YAML files, use the on-screen menu to select "Restart" to ensure the new plans are available.

Reports

When a test is executed on a PLT, the report will be automatically generated and be available under the “Reports” section.

Reports are listed in chronological order, and they will be bold-ed if they were generated less than 5 minutes ago.