Commit Graph

10 Commits

Author SHA1 Message Date
Rocha Euripedes
bdda020a1a Merge branch 'feature/parse_disconnect_mqtt5' into 'master'
feat(mqtt5): Add parsing of DISCONNECT packet to mqtt5 client

Closes IDFGH-14489

See merge request espressif/esp-mqtt!229
2025-02-21 19:43:53 +08: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
Nebojsa Cvetkovic
6b7b9c32ed Reduce log verbosity for MQTT v5 ACKs 2025-02-11 02:22:33 +00:00
Wang Kai
dc775bb52e fixing typos in mqtt5_error_reason_code 2023-07-24 23:23:32 +08:00
Euripedes Rocha
122875bf8a refactor: Group access to output buffer in mqtt_connection_t
- Moves mqtt_connect_info to mqtt_connection_t.
  - Removes outbound_message in favor of accessing it trough connection.
2023-06-13 11:56:05 +02:00
yuanjianmin
5cce2c4f35 mqtt5: Fix flow control will increase count when send fragmented packet
Closes https://github.com/espressif/esp-mqtt/issues/255
2023-03-17 16:55:25 +08:00
Nebojsa Cvetkovic
65a4fdaff5 fix: Allow MQTT v5 zero length payload
Merges https://github.com/espressif/esp-mqtt/pull/250
2023-02-27 12:46:22 +01:00
Nebojsa Cvetkovic
1011e63cbe feature: Include subscribe_id in esp_mqtt5_event_property_t 2023-02-09 18:44:47 +00:00
yuanjianmin
ed76036744 mqtt5: Fix flow control will regard the DUP packet and not consider PUBCOMP packet
Closes https://github.com/espressif/esp-mqtt/issues/243
2023-01-18 14:16:28 +08:00
yuanjm
fdf2aeb36f Seperate MQTT5 from MQTT 3.1.1 2022-06-14 09:37:46 +00:00