esp-mqtt
esp-mqtt copied to clipboard
MQTT5 packet support (IDFGH-7572)
This is an ongoing pull request
New features:
- supports MQTT5 packets
- support for multiple subscriptions/unsubscriptions
Fixes:
- events data is now cleaned on new received packet
- removed some gotos
- Removed duplicated code related to defines
- keepalive won't expire if time changes before connect but after initialization
TODO:
- implement checks for received properties not matching MQTT5 standard (disconnects for protocol errors)
TOCHECK:
- oversized publish
Note A commit on esp-idf will be required as well, currently: https://github.com/KonssnoK/esp-idf/commit/37cd0998e324d3963b3cc72bf69bbd9e78288247
rebased on top of master and squashed implementation commits into a single one
Hi @KonssnoK thank you for your contribution. We have an internal implementation of MQTT5 that was recently merged. Could you please take a look and see if you miss some feature on our implementation?
@euripedesrocha I'm using esp-idf (master). The esp-mqtt submodule alerady includes the mqtt5 related code but I cannot test mqtt5 because there is no config option to enable it. i.e. CONFIG_MQTT_PROTOCOL_5 is always not defined.
@euripedesrocha I'm using esp-idf (master). The esp-mqtt submodule alerady includes the mqtt5 related code but I cannot test mqtt5 because there is no config option to enable it. i.e. CONFIG_MQTT_PROTOCOL_5 is always not defined.
Hi @AxelLin, there is an idf MR that should be merged soon (there is a trend on our interactions here :) ), it also contains an example of MQTT5 usage.
Hi @AxelLin , MQTT5 example in idf has been merged. You can test it with newest IDF master branch. If you have any questions during the test, please feel free to ask.
Closing as MQTTv5 was merged in https://github.com/espressif/esp-idf/commit/5a7b17ff7d39e3768a1ee5a7fe6b04f8dca7f3be and the examples are available in https://github.com/espressif/esp-idf/tree/release/v5.0/examples/protocols/mqtt5
sorry for not keeping up with the discussion, i'm currently working on other stuff, i'll pick up the MQTT5 topic as soon as necessary.
On the PR on IDF, is there any plan to backport to v4.4 or is it to be considered as part of v5.0?