This workshop walks you through configuring the STM32MP135F-DK board as a BLE-to-AWS IoT Gateway using AWS IoT Greengrass Lite. In this setup, the MP1 board bridges data from Bluetooth Low Energy (BLE) sensor nodes—such as the STEVAL-PROTEUS1 – Bluetooth LE sensor node—to the cloud via an AWS IoT Greengrass V2 Component Deployment:
In this hands-on guide, you'll configure your STM32MP135F-DK as a BLE gateway that collects sensor data from the STEVAL-PROTEUS1 industrial BLE node and transmits it to the cloud via AWS IoT Greengrass Lite.
This demo showcases how AWS IoT Greengrass Lite enables lightweight, cloud-connected edge computing on cost-effective embedded platforms. Greengrass Lite supports:
- Local data processing
- Secure AWS IoT Core connectivity
- Simple over-the-air (OTA) deployments and updates
- Seamless integration with AWS services for analytics, storage, and alerting
- Basic device health monitoring and lifecycle management
Paired with STM32MP1, this solution highlights a scalable, low-power, and production-ready option for IoT gateways. The STM32MP135F-DK delivers:
- Single-core Arm® Cortex®-A7 performance for Linux + BLE gateway workloads
- Certified security features suited for industrial applications
- Low energy consumption and reduced system cost
- Support for OpenSTLinux and STM32Cube development tools
- A rich ecosystem and long-term support from ST and its partners
Together, Greengrass Lite and the STM32MP1 form a powerful combination for developers seeking to build cost-effective, secure, connected, and maintainable edge-to-cloud IoT systems.
By following this guide, you will:
- Flash the STM32MP135F-DK with a OpenSTLinux starter image that includes required dependencies.
- Connect the board to Wi-Fi for cloud access.
- Install and configure AWS IoT Greengrass Lite on the board.
- Deploy a custom BLE Gateway Python component to interface with the STEVAL-PROTEUS1.
- Stream live BLE sensor data to the cloud.
- Flash the MP1: Install the OpenSTLinux starter image using STM32CubeProgrammer.
- Connect the MP1 to Wi-Fi: Enable internet access for AWS services.
- Install Greengrass Lite on MP1: Provision the device as a Greengrass core.
- Deploy BLE Gateway Comonent to MP1: Push a BLE data collection component to Greengrass.
You'll need the following hardware components:
- USB-A to USB-C data cable
- USB-C power cable
- USB-A to Micro-USB cable
- STEVAL-PROTEUS1 – Bluetooth LE sensor node
- STM32MP135F-DK – MPU development board
Make sure you install or have access to the following:
- STM32CubeProgrammer – for flashing the board
- STM32MP1 Starter Package Image – a pre-built Linux distribution from STMicroelectronics for STM32MP1 boards
- Git Bash – for running shell scripts on Windows
- AWS Account – required to provision IoT devices and Greengrass components
- AWS CLI – for managing AWS resources via the command line
You will need to clone the following repositories as submodules with this command:
git clone https://github.com/stm32-hotspot/GreengrassLite_STM32MP1_Workshop.git --recurse-submodules
If you've already cloned without submodules, you can initialize them manually with:
git submodule update --init --recursive
Contains provisioning scripts and component configurations for setting up Greengrass Lite on the STM32MP1 board.
Contains scripts and configuration files for deploying BLE functionality using the STEVAL-PROTEUS1 with AWS IoT Greengrass.
Before getting started, make sure the following setup steps are complete:
- All software prerequisites are installed on your development machine.
- All submodules are cloned using
--recurse-submodules
. - The STM32MP1 Starter Package Image is downloaded and extracted to an accessible location.
- AWS CLI is installed and setup for programatic access with the
aws configure
command on your development PC.
This section guides you through installing the necessary drivers and flashing the STM32MP1 Starter Package Image onto the STM32MP135F-DK using USB (DFU mode).
For background information, diagrams, and additional support, refer to the official STM32MP135x-DK Boot Image Setup Guide.
Install required USB packages and copy udev rules:
sudo apt-get install libusb-1.0-0
cd <STM32CubeProgrammer_Install_Path>/Drivers/rules
sudo cp *.* /etc/udev/rules.d/
This ensures your PC can detect and communicate with the board over USB.
Run the DFU driver installer:
cd <STM32CubeProgrammer_Install_Path>\Drivers\DFU_Driver\
.\STM32Bootloader.bat
If you encounter issues, refer to the troubleshooting guide: DFU Driver Installation Troubleshooting (ST Uncyclo)
-
Set boot switches to DFU mode:
1-Open 2-Open 3-Open 4-Open
-
Connect power using a USB-C cable to the
PWR CN12
port. -
Connect data using a USB-A to USB-C cable from your PC to the
CN7/USB_OTG
port. -
Launch STM32CubeProgrammer.
-
In the GUI, select USB mode and connect to the board.
-
Click Open File and select:
FlashLayout_sdcard_stm32mp135x-dk-optee.tsv
-
Set the Binaries Path to:
$[Starter_Pack_Path]/images/stm32mp1
-
Click Download to begin flashing.
-
After flashing completes:
This step sets up Wi-Fi connectivity on the STM32MP135-DK using its onboard WLAN interface.
For background information, diagrams, and support resources, visit the How to setup a WLAN connection
-
Connect the Board With power to the board, connect a
USB-A to Micro-USB
cable from your development PC to the STM32MP135-DK'sCN10/USB_STLINK
Micro-USB port. -
Update the Wi-Fi Credentials Depending on your host operating system, open the appropriate script (configureWifi.sh or configureWifi.ps1) in a text editor and update the SSID and PASSWORD fields:
-
Linux/macOS: edit
configureWifi.sh
# === USER CONFIGURATION === SSID="YOUR_WIFI_SSID" PASSWORD="YOUR_WIFI_PASSWORD"
-
Windows (PowerShell): edit
configureWifi.ps1
# USER CONFIGURATION $SSID = "YOUR_WIFI_SSID" $PASSWORD = "YOUR_WIFI_PASSWORD"
-
-
Run the Script from Your Development PC Use the terminal appropriate for your operating system:
-
Linux/macOS (Bash):
chmod +x configureWifi.sh sudo ./configureWifi.sh
-
Windows (PowerShell):
.\configureWifi.ps1
The script will send commands over the serial interface to configure the WLAN connection on your STM32MP135-DK.
-
This step configures your STM32MP135-DK as a Greengrass Core device with the Greengrass Lite runtime.
For background information, detailed setup instructions, and troubleshooting tips see the Full README for this section
-
Clone the submodules if not already done
git submodule update --init --recursive cd STM32MP1_AWS-IoT-Greengrass-nucleus-lite
-
Update the
config.json
with your board-specific and AWS settings:{ "BOARD_IP": "<IP address of your STM32MP135 DK>", "THING_NAME": "<Unique IoT Thing name>", "THING_GROUP_NAME": "<IoT Thing Group name>" }
-
Run the Greengrass provisioning script in shell terminal:
-
Linux/macOS:
chmod +x ./execute.sh ./execute.sh
-
Windows (PowerShell): assumes git bash is installed in default location
& "C:\Program Files\Git\bin\bash.exe" .\execute.sh
-
This will:
- Provision the device on AWS
- Create the necessary certificates, policies, and groups
- Install and start Greengrass Nucleus on the STM32MP1 board
This step configures your STM32MP135-DK as a BLE Gateway by deploying an AWS IoT Greengrass V2 Python component to the Greengrass core device.
For background information, detailed setup instructions, and troubleshooting tips see the Full README for this section
-
Unbox the STEVAL-PROTEUS1 board, which comes pre-imaged with compatible firmware—no additional flashing is required.
Connect the board to your computer via
USB-A to Micro-USB
. -
Navigate to the BLE gateway repo and update
config.json
:{ "TARGET_GROUP": "<IoT Group name>", "BASE_BUCKET_NAME": "<S3 bucket base name>", "REGION": "<AWS region>", "VERSION": "<Component version>", "COMPONENT_NAME": "<Greengrass component name>" }
-
Run the deployment script:
-
Linux/macOS:
chmod +x ./deploy.sh ./deploy.sh
-
Windows (PowerShell): assumes git bash is installed in default location
& "C:\Program Files\Git\bin\bash.exe" .\deploy.sh
-
This will:
- Package and deploy your BLE gateway component to the device
- Register the BLE device as a data source in AWS IoT Greengrass
- Begin collecting BLE sensor data from the PROTEUS1 board