1
Secure IOT with AWS and Hornbill ESP32
https://exploreembedded.com/wiki/Secure_IOT_with_AWS_and_Hornbill_ESP32
https://exploreembedded.com/wiki/Secure_IOT_with_AWS_and_Hornbill_ESP32
管理—> 事物 —> 创建
注册单个 AWS IoT 事物
2 定义和附加策略
安全 --> 策略–>创建
验证一下 操作是否正确:
3 使用 MQTT Fx 1.3.0 测试一下
http://www.mqttfx.org/
管理–> 事物 : myTestThing
a3vw7fvq64xaow-ats.iot.us-west-2.amazonaws.com
$aws/things/myTestThing/shadow/update
4 客户端
AWS 网站上面的客户端
PC机 本地的客户端
5 策略都有哪些?
6 Arduino IDE 1.8.5 下载并安装 AWS IOT 库
https://exploreembedded.com/wiki/AWS_IOT_with_Arduino_ESP32
Arduino IDE 1.8.5 搭建好 ESP32 环境之后(参考本博客的其他文章),
Download the AWS IOT library for Arduino ESP32 from this link.
从如下连接:
https://github.com/ExploreEmbedded/Hornbill-Examples/tree/master/arduino-esp32/AWS_IOT
下载 AWS IOT library for Arduino ESP32
下载方式为:
https://github.com/ExploreEmbedded/Hornbill-Examples
下载下来的文件为:Hornbill-Examples-master.zip
将文件Hornbill-Examples-master.zip 解压
将目录Hornbill-Examples-master\arduino-esp32\ 下面的文件夹AWS_IOT
复制到:
C:\Users\JACK\Documents\Arduino\libraries
7 编译并且下载程序:
选择的开发板为:ESP32 Dev Module
使用的开发板为:
ESP-WROOM-32
8 修改源码文件
char WIFI_SSID[]=“xxxx”; //router
char WIFI_PASSWORD[]=“xxxxxx”; // 密码
char HOST_ADDRESS[]=“a3vw7fvq64xaow-ats.iot.us-west-2.amazonaws.com”;
char CLIENT_ID[]= “Esp32Client”;// 随便写的
char TOPIC_NAME[]= “$aws/things/myTestThing/shadow/update”;
修改另外一个文件:
C:\Users\JACK\Documents\Arduino\libraries\AWS_IOT\src\aws_iot_certficates.c
用到文件为:
AmazonRootCA1.pem
6fbcc343b1-certificate.pem.crt
6fbcc343b1-private.pem.key
9 运行效果:
串口波特率 :115200