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

asked 3 years ago1543 views
2 Answers
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
answered 3 years ago
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!

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions