我正在嘗試使用此鏈接中提到的 Python 腳本設(shè)置 AWS IoT :我可以在沒有 WebSocket 的情況下連接 AWS IoT MQTT(使用 x.509 證書)。# creates the AWS IoT def createIoT(): iot = AWSIoTMQTTShadowClient('AWSHome') # update this with your own endpoint from the IOT dashboard iot.configureEndpoint('allj.iot.reg.amazonaws.com', 443) iot.configureCredentials('rootCA','private.key','certificate.crt') iot.configureConnectDisconnectTimeout(10) # 10 sec iot.configureMQTTOperationTimeout(5) # 5 sec iot.connect() return 但是當(dāng)我嘗試使用 WebSocket 連接 AWS IoT MQTT 時,出現(xiàn)以下錯誤:使用通過運(yùn)行此命令生成的證書:wget# creates the AWS IoT def createIoT(): iot = AWSIoTMQTTShadowClient('AWSHome') # update this with your own endpoint from the IOT dashboard iot.configureEndpoint('asdasd.reg.amazonaws.com', 443) iot.configureCredentials('VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem') iot.configureConnectDisconnectTimeout(10) # 10 sec iot.configureMQTTOperationTimeout(5) # 5 sec iot.connect() return
添加回答
舉報(bào)
0/150
提交
取消