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

gefragt vor 3 Jahren1555 Aufrufe
2 Antworten
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
beantwortet vor 3 Jahren
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!

beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen