问题
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