【问题标题】:I am trying to connect AWS IoT to my Arduino UNO, but there is some connection issue i am facing我正在尝试将 AWS IoT 连接到我的 Arduino UNO,但我遇到了一些连接问题
【发布时间】:2022-12-30 02:29:08
【问题描述】:

我正在使用这个命令

C:\Users\*******\aws-iot-device-sdk-python-v2\samples>py pubsub.py --topic topic_1 --ca_file "C:\Users\HP*************\AmazonRootCA1.pem" --cert "C:\Users\***********certificate.pem.crt" --key "C:\Users*************private.pem.key" --endpoint ********p-south-1.amazonaws.com
Connecting to ********ap-south-1.amazonaws.com with client ID 'test-2b05cc3d-70e6-4a15-8798-6057fbffaa13'...
Connected!
Subscribing to topic 'topic_1'...
Connection interrupted. error: AWS_ERROR_MQTT_UNEXPECTED_HANGUP: The connection was closed unexpectedly.
Connection resumed. return_code: 0 session_present: True
Connection interrupted. error: AWS_ERROR_MQTT_UNEXPECTED_HANGUP: The connection was closed unexpectedly.

连接时它会一次又一次地尝试连接并无限执行。 为此做什么?

【问题讨论】:

    标签: amazon-web-services amazon-s3 aws-iot aws-iot-core


    【解决方案1】:

    我的树莓派也有同样的问题。原来问题与不允许主题的政策有关。我能够使用测试主题 sdk/test/python 成功发布订阅,但任何其他主题都会失败。

    我最终来到了这个页面,它通过告诉我在哪里看来回答了我的问题:here

    一旦我修改了附加到我的“东西”的政策,我就可以发布我想要的任何主题。

    我希望这有帮助。如果您在修改政策方面需要帮助,请告诉我,我会向您展示我对我的政策所做的工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-10-04
      • 1970-01-01
      • 1970-01-01
      • 2020-12-24
      • 1970-01-01
      • 1970-01-01
      • 2022-12-07
      • 2020-10-13
      相关资源
      最近更新 更多