mbedTLS error with MQTT
Posted: Thu Feb 07, 2019 3:55 pm
I am working on a project that involves receiving a large number of messages to an MQTT topic in quick succession, as part of an OTA system. The messages are approximately 1kB in size, and are transmitted every second or so (the device requests the next message upon processing the current one). The approach works fine without TLS, but when I add mbedTLS into the mix I get the following:
I have tried sending larger messages less frequently (50kB). This does seem to reduce, but not eliminate, the problem. It appears to be the frequency at which messages are received that causes the issue.
This is using the MQTT module from commit bed50a93f of the esp-idf. Is this likely to be something that I am doing wrong, or a problem with the libraries?
Edit: Researching the error code (-27648 = -0x6C00) results in MBEDTLS_ERR_SSL_INTERNAL_ERROR, which isn't particularly helpful.
Code: Select all
E (194719) esp-tls: write error :-27648:
E (194719) TRANS_SSL: esp_tls_conn_write error, errno=Success
E (194729) MQTT_CLIENT: Error write data or timeout, written len = -27648
E (194729) MQTT_CLIENT: Error to public data to topic=<removed>, qos=0
E (194739) OTA: Failed to request next page
E (194749) OTA: Failed to process new page
E (194909) esp-tls: read error :-80:
E (194909) TRANS_SSL: esp_tls_conn_read error, errno=Connection reset by peer
E (194909) MQTT_CLIENT: Read error or end of stream
This is using the MQTT module from commit bed50a93f of the esp-idf. Is this likely to be something that I am doing wrong, or a problem with the libraries?
Edit: Researching the error code (-27648 = -0x6C00) results in MBEDTLS_ERR_SSL_INTERNAL_ERROR, which isn't particularly helpful.