9 Commits

Author SHA1 Message Date
Euripedes Rocha d88fee8fbe Merge branch 'feature/mqtt_return_code' into 'master'
MR: feat(mqtt): Provide the user with reason code for UNSUBACK, PUBREC, PUBCOMP
See merge request espressif/esp-mqtt!232
2026-04-28 15:19:46 +02:00
Bogdan Kolendovskyy f1fc00ca44 feat: Provide reason code in MQTT event 2026-04-28 13:47:02 +02:00
Euripedes Rocha Filho e121e1b34b feat(mqtt5): Exposes server properties in connect event
ESP_MQTT_EVENT_CONNECTED exposes the server properties

Closes: #325
2026-04-28 11:06:09 +02:00
Euripedes Rocha Filho 04f8e3765d chore: Adds pre-commit checks and introduce conventional commits 2025-09-26 17:45:16 +02:00
Flavia Caforio 470cb93049 mqtt_client: Manage disconnect packet
In the mqtt5 protocol the broker can disconnect the client with
a disconnect packet. This packet contains a reason value that can be
useful for certain applications in which it is important to know
the reason of disconnection.
While the client is connected is possible that a disconnect packet
is reaceived by the broker to force a disconnection. Before this
patch this approach causes a generic error on transport in case of
disconnection from the broker. If the packet is managed before getting
an error it is possible to save the reason code in the
disconnect_return_code variable in the error_handle, and dispatch
the disconnect event that can be managed by the application event
loop, that now can know the reason of disconnection from the broker.
Reset the variable in case of error.

Signed-off-by: Flavia Caforio <flavia.caforio@amarulasolutions.com>
2025-02-18 16:24:13 +01:00
Euripedes Rocha 90b4a4538e feat: Add enum definition with typo to keep backwards compatibility
Added initial enum definitions with deprecated attribute.
Should be removed with a new version that can introduce a breaking
change.
2023-08-17 14:58:49 +02:00
Wang Kai dc775bb52e fixing typos in mqtt5_error_reason_code 2023-07-24 23:23:32 +08:00
Nebojsa Cvetkovic 1011e63cbe feature: Include subscribe_id in esp_mqtt5_event_property_t 2023-02-09 18:44:47 +00:00
yuanjm fdf2aeb36f Seperate MQTT5 from MQTT 3.1.1 2022-06-14 09:37:46 +00:00