Integrating the STM32L4 Discovery Kit IoT Node with the Google Cl
India - Flag India

Please confirm your currency selection:

Indian Rupee
Incoterms:FCA (Shipping Point)
Duty, customs fees and taxes are collected at time of delivery.
Payment accepted in Credit cards only

US Dollars
Incoterms:FCA (Shipping Point)
Duty, customs fees and taxes are collected at time of delivery.
All payment options available

Bench Talk for Design Engineers

Bench Talk


Bench Talk for Design Engineers | The Official Blog of Mouser Electronics

Integrating the STM32L4 Discovery Kit IoT Node with the Google Cloud Platform Using Wi-Fi Greg Toth

The STMicroelectronics STM32L4 Discovery Kit for IoT Node is an Internet of Things (IoT) development kit containing an STM32 ultra-low-power microcontroller, several types of sensors, and several types of wireless communications interfaces, including Wi-Fi, Bluetooth, and Sub-GHz (868/915MHz). It’s ideally suited for prototyping sensor applications that connect to the cloud. Various integrated development environments (IDEs) can support software development. Libraries are available for implementing functions such as board initialization, sensor input/output (I/O), Transmission Control Protocol/Internet Protocol (TCP/IP) networking, cloud communication protocols, and security processing. The board contains a built-in ST-LINK interface for programming and debugging using a personal computer running Windows, Mac OS/X, or Linux. The embedded Wi-Fi module allows the board to connect to an 802.11b/g/n Wi-Fi access point for Internet connectivity.

Google Cloud IoT

Google Cloud IoT is a cloud service on the Google Cloud Platform. It allows you to define registered IoT devices along with their device identifications (IDs) and security credentials. This cloud service creates publish and subscribe topics, which allow the secure exchange of messages between IoT devices and the Google Cloud. Other applications and Google Cloud services can subscribe to receive these messages to take further action on the data. IoT devices can also receive commands and configuration parameters by publishing messages to corresponding topics.

Cloud communications take place using the Message Queue Telemetry Transport (MQTT) protocol or the Hypertext Transport Protocol (HTTP). The Transport Layer Security (TLS) secures communications, and the JavaScript Object Notation [JSON] Web Tokens (JWT) perform authentications. Each device uses public and private key pairs for secure authentications within the Google Cloud IoT. Individual devices can be enabled, disabled, or blocked by adjusting their parameters in the Google Cloud IoT console. Connection metrics and logging can be enabled in the cloud for monitoring and debugging purposes when necessary. Cloud functionality can be configured and controlled through a web-based console, a command-line tool, or through the Google Cloud Application Programming Interfaces (APIs). Google provides command-line tools and API packages for several programming languages as free downloads.

STMicroelectronics X-CUBE-GCP

The STMicroelectronics X-CUBE-GCP software package provides the essential software to get the STM32L4 Discovery Kit for IoT Node working with the Google Cloud. This software package contains several components and libraries including microcontroller initialization, board sensor I/O drivers, real-time operating system (RTOS), MQTT and TLS libraries, and a TCP/IP networking stack. An example program illustrates an end-to-end operation, and you can modify the source code to extend and adapt to your own applications. The software is downloadable for free from the STMicroelectronics website.

Using Your Own Dev Kit

To use your own STM32L4 Discovery Kit for IoT Node with the Google Cloud, check out our step-by-step Integrating the STM32L4 Discovery Kit IoT Node with Google Cloud Platform Using Wi-Fi article that walks you through the entire process of:

  • Setting up the development tools
  • Installing and running the necessary software components
  • Building the code and downloading it to the board
  • Configuring the board’s Wi-Fi and Google Cloud connection credentials
  • Running the board to generate real-time sensor measurements that are sent to the cloud

There, we also show you how to observe the published data by subscribing to the message-data topic using a Python program. A set of next steps gives you suggestions for how to extend and adapt the application for different IoT prototyping scenarios or to learn more.

« Back

Greg is an architect, engineer and consultant with more than 30 years experience in sensors, embedded systems, IoT, telecommunications, enterprise systems, cloud computing, data analytics, and hardware/software/firmware development. He has a BS in Electrical Engineering from the Univ. of Notre Dame and a MS in Computer Engineering from the Univ. of Southern California.

All Authors

Show More Show More
View Blogs by Date