Releases: bertmelis/espMqttClient
Bugfix - empty payload parsing
Fixed: when a PUBLISH packet with an empty payload was received, the client would wait for a next packet to arrive before "releasing" the PUBLISH packet to the user. It now does it immediately.
Other improvements:
- lowered default stack size to 5000 words instead of 10000. This will give you some more heap space.
- Nagle is effectively disabled on the secure client. This might speed up the transmission when sporadically sending data.
- moved the docs to a subfolder instead of a separate branch to keep everything in sync more easily.
- more testing!
Bugfix: recover after disconnect during big payload parsing
espMqttClient would not recover when during receipt of a large message it got disconnected. The parser would be stuck in parsing the payload instead of trying to parse CONNACK, which is the very first message from the broker when connecting. Hence, the client would disconnect rightfully.
This release fixes this issue.
It also "synchronizes" the code with the docs. According to the docs, the client by default connects with cleansession
to true but was actually false. By default, the client now connects with cleansession
set to true.
Many thanks to @serfreeman1337
Linux compatibility
espMqttClient now:
- runs on Linux*
- has
void mqttClient.disconnected()
in the API - has separate options for rx and tx buffer size
Linux compatibility is mainly for automatic testing. It relies on a quick and dirty Arduino-style Client
class with a POSIX TCP client underneath and Arduino-style IPAddress
class. These classes are lacking many features needed for proper Linux support.
Bugfix release: fix ping mechanism
After a client initiated disconnect because of ping timeout, the ping mechanism stopped working.
- the stack usage debug statement on esp32 is more readable now.
Bugfix: Secure client not connecting
Secure client was not able to connect. This release fixes this issue.
Bugfix: multiple pings
This bugfix release fixes the issue where PINGs were continuously being sent until the broker responds.
Async Mqtt Clients
This version includes async clients using ESPAsyncTCP or AsyncTCP. For the most part, both non-blocking and async APIs are the same. Differences are the constructor the lack of a client.loop()
method for the async client. See the examples for async versions.
Reminder: TLS is not supported for async out-of-the-box as the TCP libraries themselves do not support it.
Bugfix - keepalive for client and server activity
This release fixes a bug where the client would disconnect after the server is inactive during the keepalive period while being expected to be inactive. This happens when sending only QoS0 packets during the keepalive period.
Also, the timing requirement to send PING packets is relaxed and calculation simplified.
Bugfix - Align clientID with MQTT specification requirements
Client IDs with alphanumerical characters and a length between 1 and 23 characters must be allowed by a broker. This bugfix aligns this library with that requirement.
Also fixes the missing definition of getclientId()
.
v1.1.0 Extra config options
It is now possible via a compile-time parameter to
- publish without being connected
- enable the watchdog for the MQTT client
Furthermore, you can now force disconnect when you already tried to disconnect graciously.
extra:
- various small code and testing improvements
- first preparation made to implement underlying async tcp