简体   繁体   English

AWS IoT 设备载入

[英]AWS IoT Device Onboarding

I'm working on a learning project for IoT with AWS IoT Things and ESP32 using Arduino/C (no micro-python).我正在使用 Arduino/C(无 micro-python)使用 AWS IoT Things 和 ESP32 开展物联网学习项目。 While I have shadows and messages working well, the part I'm not sure about is the best approach to onboard new devices.虽然我的阴影和消息运行良好,但我不确定的部分是板载新设备的最佳方法。

Currently the onboarding process is:目前入职流程是:

  1. I create the Thing in the AWS Console我在 AWS 控制台中创建事物
  2. I create the certs我创建证书
  3. I save the certs to laptop我将证书保存到笔记本电脑
  4. I copy cert contents into the Shadow.h then upload the sketch to the ESP32我将证书内容复制到 Shadow.h 中,然后将草图上传到 ESP32

This feels incredibly manual:(这感觉非常手动:(

Hypothetically how would a reseller of ESP32-based IoT devices automate the onboarding process?假设基于 ESP32 的物联网设备的经销商将如何自动化入职流程? How can the Things and certs be automated?事物和证书如何自动化?

Many thanks in advance提前谢谢了

Ant Ant

We're talking about provisioning devices in cloud.我们正在谈论在云中配置设备。

If you (or your organization) is adding your own devices to your own cloud, then it's quite easy to automate.如果您(或您的组织)将自己的设备添加到自己的云中,那么自动化就很容易了。 Steps 1 and 2 are the cloud-side part of provisioning - just install the required SDK-s and write a script in your favourite supported scripting language to do the dirty work.第 1 步和第 2 步是配置的云端部分 - 只需安装所需的 SDK-s 并使用您最喜欢的受支持脚本语言编写脚本来完成脏活。 For steps 3 and 4 you just use the device's own Flash to store the device certificates.对于第 3 步和第 4 步,您只需使用设备自己的 Flash 来存储设备证书。 Espressif has a useful non-volatile storage system called NVS - it's fairly easy to use and supports Flash encryption (this bit could be more elegant, but it works). Espressif 有一个有用的非易失性存储系统,称为NVS - 它相当易于使用并支持 Flash 加密(这个位可能更优雅,但它有效)。 You can use their NVS Partition Generator to pre-create the required storage with the device's certs in it, then flash it into the device when setting it up.您可以使用他们的NVS 分区生成器预先创建所需的存储,其中包含设备的证书,然后在设置时将其 flash 放入设备中。 Device-side provisioning can be scripted together with cloud-side provisioning so you can do the whole thing in a single step.设备端配置可以与云端配置一起编写脚本,因此您可以一步完成所有操作。 The Arduino IDE is not the tool to use, though.但是,Arduino IDE 不是要使用的工具。 You just need the final program binaries, but everything else you need to create on your own.您只需要最终的程序二进制文件,但您需要自己创建其他所有内容。

If you're talking about a third party taking your device and provisioning it in their cloud, this is a bit more difficult (but not impossible).如果您谈论的是第三方获取您的设备并在他们的云中进行配置,这会有点困难(但并非不可能)。 Presumably they need to do steps 1 & 2 on their own and you need to give them a way to configure their AWS endpoints and certificates on the device.据推测,他们需要自己执行步骤 1 和 2,您需要为他们提供一种在设备上配置其 AWS 端点和证书的方法。 So you need to build some interface which allows them to do it.所以你需要建立一些允许他们这样做的接口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM