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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则