mqtt_header_state_t was added by commit 0450bd0093 ("MQTT Client: Added support for receiving empty payload"),
but it's no longer used since commit fd564b1f17 ("client receive: refactor receive to read only one message to fragment only payload for longer messages").
Thus remove the unused mqtt_header_state_t.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Added a separate config value to allow disable the keepalive mechanism (and keep the existing API the same)
Internally though, the keepalive value (in connect_info) is in line with 3.1.2.10 Keep Alive from mqtt spec:
* keepalive=0: Keep alive mechanism disabled (server not to disconnect the client on its inactivity)
* period in seconds to send a Control packet if inactive
Closes https://github.com/espressif/esp-mqtt/issues/179
Allow application to get current outbox_size.
Application may try to send many publish request for a long period and then
system can hit OOM when publish QoS>1 with a busy borker.
Reduce OUTBOX_EXPIRED_TIMEOUT_MS does not help too much because the publish
freauency depends on the data received in different environment.
i.e. In some environment, sometimes it's easy to hit OOM before reaching OUTBOX_EXPIRED_TIMEOUT_MS.
To avoid such issue, add esp_mqtt_client_get_outbox_size API, so the application
can stop publishing to avoid OOM when outbox takes too much memory.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Also renamed error type MQTT_ERROR_TYPE_ESP_TLS to
MQTT_ERROR_TYPE_TCP_TRANSPORT, as the former was confusing and might
have implied the error occurred in TLS layer.
Applicable IDF version >= v4.3
Closes https://github.com/espressif/esp-idf/issues/5906
Previously, uint32_t and size_t were used interchangeably. These types are
interchangeable on Xtensa gcc (uint32_t == size_t == unsigned int), but not on most
other 32-bit gcc architectures (where uint32_t == unsigned long, size_t ==
unsigned int).
Digital Signature enables hardware accelerated RSA signature
for TLS handshake.The RSA private key(client key) is also stored in
encrypted format and ecryption key is stored in hardware(efuse) which adds
additional level of security for mutual authentication.
* Digital Signature is only supported for ESP32-S2.
Applicable IDF version >= v4.3
As long as the client was disconnect no cleanup were performed,
consuming memory for every message published. Even if they were already
expired and would be discarded when reconnected.
Also moves delete of expired msgs before retransmit is done.
This avoids situtations where a message could be sent even if it was
expired.
Closes https://github.com/espressif/esp-idf/issues/5668
esp_mqtt_client_stop would lead to a deadlock (with itself) when called
from the event handler.
Updated comments to reflect that some functions should not be called from
the event handler.
Closes https://github.com/espressif/esp-mqtt/issues/163
ii) fix secure_element error return
The feature allows use of secure element for TLS connections, which makes use of hardware security for storage of client private keys(only keys with ECC algorithm)
Applicable IDF versions: >= 4.2
Both input and output buffers had the same size, but it is desirable in embedded environment to use asymetric buffers. Added configuration option to defined output buffer size, if not defined output buffer defaults to the same size as the input buffer.
Closes https://github.com/espressif/esp-mqtt/issues/152
Add config option for selecting protocol version at runtime.
This also fixed MQTT protocol version 3.1 which wasnt working with the original implementation
Closes https://github.com/espressif/esp-idf/issues/4448
Closes IDFGH-2311
Closes IDF-1320
Configured network timeout was used to receive separate characters
in the message. This change waits for the configured timeout if reading
the mqtt packet was left in progress (mqtt_message_receive() returns 0)
Closes FCS-254
Initialization of the outgoing message buffer is now done during mqtt_init,
which means messages can be queued before the first connection is made.
The client now checks for fail_message after creating a message, and cancels
the current operation if this happens. Updated error handling in client_publish
to be more inline with API documentation.
Closes https://github.com/espressif/esp-idf/issues/4349
Closes https://github.com/espressif/esp-mqtt/issues/140