Tip
To set up and connect this device using the AWS Greengrass Lite SDK, refer to this QuickStart Guide
- Introduction
- Requirements
- Hardware Setup
- Device Setup
- Onboard Device
- Using the Demo
- Troubleshooting
- Resources
This guide is designed to walk through the steps to connect the STM32MP257F-DK to the Avnet /IOTCONNECT platform and periodically send general telemetry data.
This guide has been written and tested to work on a Windows 10/11 PC. However, there is no reason this can't be replicated in other environments.
- STM32MP257F-DK Purchase | User Manual & Kit Contents | All Resources
- 1 USB Type-C Cable
- Ethernet Cable or WiFi Network SSID and Password
Note
The demos for this device have been tested with the Scarthgap version 6.0.0 Yocto image release from ST. Older or newer versions may have significant incompatibilities, so it is recommended to use the 6.0.0 release. Download that image by clicking here
See the reference image below for cable connections.
Using the above image as reference, make the following connections:
- (OPTIONAL) Connect an Ethernet cable from your LAN (router/switch) to the Ethernet connector labeled #1. If you instead wish to use Wi-Fi, after booting your board refer to the WIFI guide.
- Connect the USB-C cable from your host machine to the "USB_PWR STLINK" USB-C connector on the board, labeled **#2 **.
- Install the included micro-SD card into the micro-SD slot labeled #3 on the underside of the board (make sure it clicks into place).
- Flash the downloaded v6.0.0 Scarthgap image to the device, referring to the "Populate the target and boot the image" page on the STM32MP257x-DK section of ST's wiki for guidance.
Note
It is recommended to use the provided version of the image and not download the newest version from ST as these demos have not been tested on newer releases and may have incompatibilities.
- Open a serial terminal emulator program such as TeraTerm.
- Ensure that your serial settings in your terminal emulator are set to:
- Baud Rate: 115200
- Data Bits: 8
- Stop Bits: 1
- Parity: None
- Noting the COM port value for "STMicroelectronics STLink Virtual COM Port" in the Device Manager list, attempt to connect to your board via the terminal emulator
Note
A successful connection may result in just a blank terminal box. If you see a blank terminal box, press the ENTER key to get a login prompt. An unsuccessful connection attempt will usually result in an error window popping up.
- If prompted for a login, type
rootfollowed by the ENTER key. - Run these commands to update the core board packages and install necessary /IOTCONNECT packages:
su
apt-get update && apt-get install python3-pip -y && python3 -m pip install iotconnect-sdk-lite requests
- Run this command to create and move into a directory for your demo files:
mkdir -p /opt/demo && cd /opt/demo
Tip
To gain access to "copy" and "paste" functions inside of a PuTTY terminal window, you can CTRL+RIGHTCLICK within the window to utilize a dropdown menu with these commands. This is very helpful for copying/pasting between your browser and the terminal.
Important
If users plan to deploy a KVS expansion demo, the device needs to be originally created in /IOTCONNECT with the plitekvs template (available here). During the device creation steps, the Stream Type should be set to "USB Based" and the Stream Resource should be set as either "Video Stream" (for the PutMedia demo) or "WebRTC" (for the WebRTC demo). The AWS backend will not register the device for KVS if it is created with a different template and then later switched to plitekvs, it needs to be set at device creation.
The next step is to onboard your device into /IOTCONNECT. This will be done via the online /IOTCONNECT user interface.
Follow this guide to walk you through the process.
Tip
If you have obtained a solution key for your /IOTCONNECT account from Softweb Solutions, you can utilize the /IOTCONNECT
REST API to automate the device onboarding process via shell scripts. For the STM32MP257F-DK, you will first need to run
apt-get install python3-cffi -y and then you can check out this guide
for more info on the rest of that process.
Run the basic demo with this command:
python3 app.py
Note
Always make sure you are in the /opt/demo directory before running the demo. You can move to this
directory with the command: cd /opt/demo
View the random-integer telemetry data under the "Live Data" tab for your device on /IOTCONNECT.
To return the board to an out-of-box state, you can flash a fresh image onto the SD card. For instructions on this process, refer to the "Populate the target and boot the image" page on the STM32MP257x-DK section of ST's wiki.
- Explore connecting the STM32MP257F-DK through the AWS Greengrass Lite SDK QuickStart
- Purchase the STM32MP257F-DK
- More /IOTCONNECT ST Guides
- /IOTCONNECT Overview
- /IOTCONNECT Knowledgebase

