首页 > 解决方案 > 基于 websockets 的 IoT Edge Mqtt

问题描述

我有一个小的边缘模块,使用 azure-iot-sdk-python 用 python 编写,它使用 Mqtt 将事件发送回 IoT 中心。这很好用。

当我切换到通过 websockets ( ) 使用 Mqtt 时,不再传递事件IoTHubTransportProvider.MQTT_WS

在 edgeHub 日志中,我可以看到: 2018-06-14 07:33:33.599 +00:00 [ERR] [Microsoft.AspNetCore.Server.Kestrel] - Uncaught exception from the OnConnectionAsync method of an IConnectionAdapter. System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> Interop+OpenSsl+SslException: SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL. ---> Interop+Crypto+OpenSslCryptographicException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol

当我手动将注入的EdgeHubConnectionStringexport EdgeHubConnectionString=...Device Details

如何使用注入的EdgeHubConnectionString模块连接字符串通过 websockets 获取 Mqtt,而不是从“设备详细信息”页面获取?

标签: azure-iot-sdkazure-iot-edge

解决方案


推荐阅读