物联网无法使用MQTT + TLS连接到服务器 [英] IoT can't connect to the server with MQTT+TLS

查看:340
本文介绍了物联网无法使用MQTT + TLS连接到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MQTT + tls将IoT设备连接到具有SIM900支持的GPRS的服务器.

I use MQTT+tls to connect the IoT device to the server with GPRS supported by SIM900.

IoT设备连接到服务器,而HTTP或HTTP上没有任何问题.

The IoT device connects to the server without any problem on HTTP or HTTPs.

但是,当我在服务器上使用Tomcat设置ssl代理时,IoT设备可以成功获取发送成功"的状态,但始终会出现等待发送确认超时"错误.

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.

服务器上安装的Wireshk无法捕获任何有用的信息.

The wireshark installed on the server can't capture any useful infomation.

推荐答案

在SIM900上,您不能使用TCP + SSL.这就是为什么您可以使用HTTPS做到这一点,但不能使用MQTT + SSL做到这一点的原因.您可以在不使用SSL的情况下使用MQTT协议.

on SIM900 you can't use TCP+SSL. That's why you can do it with HTTPS but you can't do it with MQTT+SSL. You could use the MQTT protocol without SSL.

要使SIM900上的MQTT + SSL正常运行,我所做的就是使用wolfSSL加密数据,然后通过没有SSL的TCP连接发送数据.

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.

这篇关于物联网无法使用MQTT + TLS连接到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆