![Microchip Technology ATWINC 15x0 Скачать руководство пользователя страница 16](http://html1.mh-extra.com/html/microchip-technology/atwinc-15x0/atwinc-15x0_developers-manual_1785757016.webp)
Figure 4-5. Application Flowchart
System Initialization
Sensor Initialization
Wi-Fi Task Execution
Read Sensor Value
2 sec timeout ?
Publish to AWS IoT
Shadow
Yes
No
4.3.2
Cloud Connection
The host MCU runs AWS IoT SDK to connect the board to AWS IoT cloud. The AWS IoT SDK includes
cloud connection API and MQTT pub/sub API. MQTT Client ID is needed for the connection and Subject
Key Identifier (SKI) of the device certification is used as the MQTT Client ID. The board connects to AWS
IoT cloud with TLS 1.2 RSA cipher suite. Device certificate and private key are stored in ECC608
CryptoAuthentication device. WINC15x0 uses the certificate and key in ECC608 to perform the
authentication with the AWS IoT cloud.
4.3.3
Data Exchange
The board uses MQTT protocol to exchange the data with AWS cloud and mobile application. AWS IoT
acts as a MQTT broker; mobile application and sensor board act as MQTT Publisher and Subscriber.
AWS IoT Device Shadow service is used to store and retrieve the current state information of the board.
The board updates sensor and LED data to the AWS IoT by publishing MQTT message to Shadow
MQTT
/update
topics and get the LED latest state from AWS IoT by subscribing Shadow MQTT
/update/
ATWINC15x0 Smart Device Kit
Application Firmware
©
2019 Microchip Technology Inc.
User Guide
DS50002885A-page 16