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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南