Skip to content

Run AWS IOT core MQTT sample on EK‐RA8M1

Duy Nguyen edited this page Jul 12, 2024 · 8 revisions
  • Hardware connection

Remove jumper J61 to enable Ethernet B

Jumper Configurations
J61 Open
  • AWS IoT Core setup
  1. To run this sample, you need to create an account on Amazon Web Services: https://aws.amazon.com/

  2. Once your account is created, sign in to AWS console as root user: https://aws.amazon.com/

  1. After signing in to AWS console, in the search bar, search for "IoT core" and open it
  1. Create a thing name "zephyr_sample", add certificate and policy for it.

Important: After press "Create thing" you will be asked to download the Certificates and Keys, check and download Device Cerificate, Public key and Private key.

  1. Copy the downloaded the certificats and keys file in step 4 to "zephyr/samples/net/cloud/aws_iot_mqtt/src/creds" and execute "zephyr/samples/net/cloud/aws_iot_mqtt/src/creds/convert_keys.py", it will help to generate the key in form of C code for the sample.

  2. Modify "CONFIG_AWS_ENDPOINT" config in "zephyr/samples/net/cloud/aws_iot_mqtt/src/prj.conf" to your AWS account End point (it can be check in IoT Core console -> Settings)

  1. Build and Flash application to board.

cd ~/zephyrproject/zephyr

west build -b ek_ra8m1 -p always samples/net/cloud/aws_iot_mqtt/

west flash

  1. Verify result using "MQTT test client" on AWS IoT console.
  • The sample is created to Publish a message to topic "zephyr_sample/data" and Subscribe to topic "zephyr_sample/downlink". On AWS IoT console "MQTT test client" we can

Home

Getting started guide

Supported MCU/MPU family

Samples and Demo Hardware Configuration Reference

RA Sample and Demo Hardware configuration
RX Sample and Demo Hardware configuration
RZ Sample and Demo Hardware configuration
Clone this wiki locally