Fix CONNECT for long password/username/client identifiers
This release fixes connect()
for use with large (>127 bytes) payloads such as a long password (JSON Web Tokens), client identifier, or last-will message.
- The remaining length calculation previously used by this library has been removed in favor of using the algorithm described by the MQTT V3.1.1 specification (https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718030).
- Default
keepalive
value increased to 60 seconds to ensure the MQTT broker rejects incorrect connections, instead of hanging.
To use in CircuitPython, simply install the Adafruit CircuitPython bundle.
To use in CPython, pip install adafruit-circuitpython-minimqtt
.
Read the docs for info on how to use it.