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

天涯浪子 提交于 2021-01-29 05:47:33

问题


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

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

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.

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


回答1:


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.

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.



来源:https://stackoverflow.com/questions/38713176/iot-cant-connect-to-the-server-with-mqtttls

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!