简体   繁体   English

物联网无法使用MQTT + TLS连接到服务器

[英]IoT can't connect to the server with MQTT+TLS

I use MQTT+tls to connect the IoT device to the server with GPRS supported by SIM900. 我使用MQTT + tls通过SIM900支持的GPRS将IoT设备连接到服务器。

The IoT device connects to the server without any problem on HTTP or HTTPs. IoT设备连接到服务器,而HTTP或HTTP上没有任何问题。

However, When I set up the ssl proxy on the server with Tomcat,the IoT device can get status of "send ok" successfully,but always gets "wait send ok ack timeout" error. 但是,当我使用Tomcat在服务器上设置ssl代理时,IoT设备可以成功获取“发送确定”的状态,但始终会出现“等待发送确定应答超时”错误。

The wireshark installed on the server can't capture any useful infomation. 安装在服务器上的wireshark无法捕获任何有用的信息。

on SIM900 you can't use TCP+SSL. 在SIM900上,您不能使用TCP + SSL。 That's why you can do it with HTTPS but you can't do it with MQTT+SSL. 这就是为什么您可以使用HTTPS做到这一点,但不能使用MQTT + SSL做到这一点的原因。 You could use the MQTT protocol without SSL. 您可以使用不带SSL的MQTT协议。

What I did to get this working (MQTT+SSL) on SIM900 was encrypting the data using wolfSSL and then send it through a TCP, without SSL, connection. 为了在SIM900上正常工作(MQTT + SSL),我要做的是使用wolfSSL加密数据,然后通过没有SSL的TCP连接发送数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM