Connection Interruption Error during Fleet Provisioning

0

Hi,

I am trying to get the sample Python AWS Device SDK Fleet Provisioning sample code working:
https://github.com/aws/aws-iot-device-sdk-python-v2/blob/main/samples/README.md

I have created the temporary cert and key and am then running the fleetprovisioning.py script. This is doing the initial connection ok but when it gets to registerthing_subscribed_accepted_future.result() it fails with the following error:

Connection interrupted. error: AWS_ERROR_MQTT_UNEXPECTED_HANGUP: The connection was closed unexpectedly.

Does anyone know what issues could be causing this? I'm fairly sure all my parameters are correct. Also, what is this call actually doing i.e. identity_client.subscribe_to_register_thing_accepted? Is this a topic that is used later on in the fleet provisioning process when the permanent keys and cert are provided?

Thanks

質問済み 3年前1555ビュー
2回答
0

Hi,
As mentioned docs[1], IoT Fleet Provisioning MQTT APIs are topic based. Devices subscribe to response topics (.../accepted, .../rejected) and publish to request topics. If your connection is successful but the subscription failed, please check if you have enough permission in the IoT policy attached to claim certificate. Also, you can enable CW logs (INFO mode) to get more information for troubleshooting. Refer [2] for enabling CW logs.

[1] https://docs.aws.amazon.com/iot/latest/developerguide/fleet-provision-api.html#register-thing
[2] https://docs.aws.amazon.com/iot/latest/developerguide/cloud-watch-logs.html

AWS
回答済み 3年前
0

Thanks for the explanation. I get the flow of things now. So my issue was a rookie mistake. The sample script i was using to create the temporary cert was using a different provisioning template to the one i was calling for the fleetprovisioning.py!

回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ