Amazon AWS IoT Cloud Demo#

The AWS IoT cloud demo displays the sensor data from the SiWx91x Dev Kit, which features built-in sensors. In this demo, the SiWx91x Dev Kit and the mobile application connect to the same access point and establish a secure connection to the AWS IoT. On successful connection, the application collects and processes sensor data and displays it on the mobile dashboard. Additionally, you can control the LED on the Dev Kit board by pressing a button on the mobile application.

SiWx91x Dev kit Setup#

Connect the SiWx917 Dev Kit board (BRD2605A) to a PC/Laptop and open Simplicity Studio, then locate and create the Wi-Fi Coex - Wi-Fi Client BLE Provisioning with AWS example project.

Configure the following parameters:

  • SUBSCRIBE_TO_TOPIC

  • PUBLISH_ON_TOPIC

  • AWS_IOT_MQTT_HOST

You will receive default topic values, which you can keep or modify as per your convenience.

app.c mobile app screenshotmobile app screenshot

aws_iot_config.h mobile app screenshotmobile app screenshot

Before proceeding, you must carefully read the README file of the project to understand how to configure it with AWS IoT. Once the configuration is complete, build the project.

Erase the board and flash Wi-Fi Coex - Wi-Fi Client BLE Provisioning with AWS firmware from Simplicity Studio into SiWx917 Dev Kit (BRD2605A) board.

Please make sure to use the same endpoint, certificates, and topics to configure the mobile app as given below in the section Configure AWS IoT

Simplicity Connect mobile app setup#

Connect your mobile to an access point with internet connectivity.

Select the AWS IoT section from demo tile screen, and then choose the device you want to connect to.

mobile app screenshotmobile app screenshot mobile app screenshotmobile app screenshot

Provisioning the Dev kit#

Steps:

  1. Provision the SiWx917 Dev Kit (BRD2605A). Make sure an Access Point (AP) has an active internet connection.

  2. Ensure Bluetooth is enabled on mobile device. The Dev Kit requires BLE (Bluetooth Low Energy) to establish a connection.

On successful selection of the 917 Dev Kit device, you will be redirected to the Wi-Fi Commissioning screen to commission the device. Select the access point you want to connect, and enter the password.

mobile app screenshotmobile app screenshot mobile app screenshotmobile app screenshot mobile app screenshotmobile app screenshot

Once connected to the access point, you will be redirected to a new screen where you should have the following:

  1. The AWS certificates can be generated from here.

  2. Provide the publish and subscribe topics as described here.

  3. Provide the end point details as described here.

The mobile app will publish the lock or unlock command to the configured topic.

Script to Create a .p12 Certificate File#

Run the command below to generate the certificate file:

  • OpenSSL pkcs12 -export -legacy -out <Certificate_File_Name.p12> -in aws-certificate.pem.crt -inkey aws-private.pem.key

mobile app screenshotmobile app screenshot mobile app screenshotmobile app screenshot

Note: Certificate files should be sent to the mobile phone in a ZIP file and then unzipped on the phone.

Configure AWS IoT#

mobile app screenshotmobile app screenshot mobile app screenshotmobile app screenshot

Note: Ensure all information entered into the phone is same as entered in SiWx91x Dev Kit Setup.

With a successful connection with AWS IoT, you can view the temperature, humidity, ambient light, and white light data on the AWS Dashboard screen.

mobile app screenshotmobile app screenshot

Click the Motion button to see the orientation and acceleration data.

mobile app screenshotmobile app screenshot

Click the LED button to control the LEDs on the board.

mobile app screenshotmobile app screenshot mobile app screenshotmobile app screenshot mobile app screenshotmobile app screenshot

Note: After a successful connection, the BLE connection with the mobile app will be disconnected, as sensor data is now being received over Wi-Fi.