Commit Graph

102 Commits

Author SHA1 Message Date
Bogdan Kolendovskyy c4ca04f88c docs: Clarify that esp_mqtt_client_reconnect behaviour
Closes https://github.com/espressif/esp-mqtt/issues/308
2026-04-29 11:27:01 +02:00
Bogdan Kolendovskyy f1fc00ca44 feat: Provide reason code in MQTT event 2026-04-28 13:47:02 +02:00
Euripedes Rocha Filho dbc6fed4f6 docs: Clarify defauls on configuation options 2026-02-03 12:30:24 +01:00
Bogdan Kolendovskyy 77a875c804 feat: Add API to get MQTT client's status
Add a function which returns the status of MQTT client, either initialized,
connected, reconnecting, or disconnected.

Closes https://github.com/espressif/esp-mqtt/issues/307
2025-12-02 14:59:39 +01:00
Euripedes Rocha Filho 04f8e3765d chore: Adds pre-commit checks and introduce conventional commits 2025-09-26 17:45:16 +02:00
dhb 00cc9dbd9a feat(mqtt): enable custom TLS cipher suites for MQTTs
- Add `ciphersuites_list` to `esp_mqtt_client_config_t` for specifying TLS cipher suites.
- Update SSL transport configuration to use the provided cipher suites.
- Users are responsible for managing the cipher suites list memory.
2025-05-21 10:05:00 +02:00
hrushikesh.bhosale b35a69121c feat(mqtt): Add support for ECDSA signing
Added support for ECDSA signing in MQTT.
2025-05-14 12:14:43 +05:30
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 ea036a5819 doc: Clarify deleted message event to cover QoS=0 case
Minor improvement on documentation for the event.

Merges github.com/espressif/esp-mqtt/pull/290
Closes github.com/espressif/esp-mqtt/issues/289
2024-11-15 10:38:10 +01:00
Bogdan Kolendovskyy 7c3227a24d feat: Add TCP keepalive configuration 2024-08-22 11:18:43 +02:00
Rocha Euripedes b5b80336b7 Merge branch 'fix/clean_transport' into 'master'
fix: set TCP transport every time when setting the config

See merge request espressif/esp-mqtt!218
2024-07-10 22:07:55 +08:00
Rocha Euripedes 97dc85a080 feat: Allow users to get the transport in use 2024-07-10 15:17:41 +08:00
Jackson Ming Hu c3c4cb9a2a fix: set TCP transport every time when setting the config 2024-07-01 16:54:47 +10:00
Rocha Euripedes fa88da5282 Merge branch 'lifetime_clarification' into 'master'
Clarify data that users need to take care of lifetime.

See merge request espressif/esp-mqtt!197
2024-01-26 19:10:50 +08:00
faceleft acdb66d5c6 add const char * to esp_mqtt_client_subscribe() generic macros 2024-01-25 15:35:32 +07:00
Euripedes Rocha 371f594cce docs: Clarify data that users need to take care of lifetime.
- Adds to field that the mqtt client doesn't copy a note about it.
2024-01-24 09:38:37 +01:00
Euripedes Rocha ea0df31e00 fix: Move buffer initialization to set config
When calling set config message buffers were not affected because the
creation was handled on init.

Closes https://github.com/espressif/esp-mqtt/issues/267
2023-10-25 07:47:05 +00:00
Rocha Euripedes c355e0b5ae docs: Adds missing documentation to outbox configuration. 2023-08-31 22:22:04 +08:00
Rocha Euripedes cb1e6cf218 docs: Clarify keepalive timeout
Adds information on the behavior of the PINGREQ message timeout and some
reasoning behind the choice.
2023-07-11 05:34:46 +08:00
Euripedes Rocha 363fbf7dab feat: Add option to bind interface of use
Enable user to set which interface should be used for client network,
allowing client to be binded to the interface selected by user forcing
it to go through the selected interface.

Closes https://github.com/espressif/esp-mqtt/issues/253
2023-06-14 14:48:44 +02:00
Euripedes Rocha 372ab7b374 feat: Introduces outbox limit
A memory limit for the outbox can be configured.
User will not be able to publish or enqueue if the new message goes
beyond the configured limit.
2023-06-13 15:59:55 +02:00
Rocha Euripedes ed628098a1 Merge branch 'feature/custom_transport' into 'master'
Add custom transport configuration

See merge request espressif/esp-mqtt!169
2023-06-13 14:30:24 +08:00
Euripedes Rocha a492935951 Removes leftover calls to event_handler
The possibility to add a callback as custom handler was removed from
the client in favor of esp_event. These removes the older alternative
that wasn't possible to use.
2023-06-09 10:44:50 +02:00
Niklas Gürtler 6195762d28 Added support to set server common name. 2023-06-08 08:46:41 +02:00
Euripedes Rocha a5c1b441dc feat: Add custom transport configuration
Today there is no way to add a new transport without applying
modifications to the transport list. This impose limitations on the
client usage. Adding the custom configuration we enable user defined
transports.
2023-06-08 06:38:53 +00:00
Rocha Euripedes 70cbaca728 Merge branch 'bugfix/cpp_compilation' into 'master'
Fix: Compilation in C++ with multiple subscribe

See merge request espressif/esp-mqtt!171

(cherry picked from commit 88413ec3f27102daa805ae1992dd145b42d4690d)

47da99fb Fix: Compilation in C++ with multiple subscribe
2023-06-01 17:02:05 +08:00
Euripedes Rocha 32102558d3 Feature: Enable SUBSCRIBE to multiple topics
- Adds an api for multiple topics on SUBSCRIBE message.

Apply 2 suggestion(s) to 1 file(s)

Removing headers

y
2023-02-03 14:19:24 +01:00
Euripedes Rocha 9af5c26045 Adds error code to MQTT_EVENT_SUBSCRIBED in case of failure
- Payload data parsed for error codes. Check only for first filter
  because our subscribe function only handle one topic filter in each
  call.

- Closes https://github.com/espressif/esp-mqtt/issues/233
2022-10-20 13:29:16 +02:00
David Cermak 97503cceb3 client: Add support for user events
Also supporting configurable queue size for the internal event loop.

Closes https://github.com/espressif/esp-mqtt/issues/230
2022-07-29 09:08:52 +02:00
Euripedes Rocha a9a9fe76bf Adds unregister event API
- Added to enable users to unregister event handler.

 Closes https://github.com/espressif/esp-idf/issues/9194
2022-07-28 10:36:24 +00:00
Euripedes Rocha ae53d799da Restructure the client configuration struct
- Groups configuration fields by context.
- Removes user_context in favor of the event loop.
2022-07-13 08:37:20 -03:00
yuanjm fdf2aeb36f Seperate MQTT5 from MQTT 3.1.1 2022-06-14 09:37:46 +00:00
yuanjm 3d275f42b9 mqtt: Support MQTT5 protocol 2022-06-14 09:37:46 +00:00
Euripedes Rocha e31834c00f Fix documentation of config struct
- Transport selection enum was incorrectly pointed as having precedence
  over URI.

- Added names to unnamed enums and structs on typedefs.

- Reorganize config struct fields grouping fields with related context.
2022-05-02 13:29:39 -03:00
Euripedes Rocha 1fd50dd2cb Adds a config flag to allow an empty client id
This commit covers a use case where the user can select to send an
empty user id.
2021-11-01 18:17:29 +01:00
Bert Melis de47f1c341 add payload to MQTT_EVENT_SUBSCRIBE
+ documentation
+ cleanup logging

Closes https://github.com/espressif/esp-mqtt/issues/200
Merges https://github.com/espressif/esp-mqtt/pull/203
2021-10-04 10:38:02 +02:00
Bert Melis e1d5a9402f add qos and dup to MQTT_EVENT_DATA 2021-09-23 18:09:39 +02:00
David Čermák 89894bd0c6 Merge branch 'feature/configurable_retransmit' into 'master'
Add configurable retransmit (GitHub PR)

See merge request espressif/esp-mqtt!110
2021-09-15 18:10:50 +00:00
Umer Ilyas 1b009c840b Config: Add configurable retransmit timeout
sometime user want to configure retransmit timeout due to network or other requirement

Merges https://github.com/espressif/esp-mqtt/pull/199
2021-09-15 18:43:23 +02:00
Euripedes Rocha 88f4b8ed50 Reports config conflicts error to the user
- Configuration conflicts were verified, logged but not reported to the
  user.
2021-09-15 15:09:23 +08:00
Euripedes Rocha db13533904 Remove unnecessary parentheses.
- Removed extra parentheses on definition of certificate bundle attach.
2021-06-24 18:35:26 +02:00
David Čermák 78fcf23947 Merge branch 'bugfix/partial_transport_writes' into 'master'
Address partial writes and retain flags

See merge request espressif/esp-mqtt!99
2021-05-26 15:56:08 +00:00
David Čermák 048f12f55f Merge branch 'feature/add_crt_bundle' into 'master'
Added support for certificate bundle

See merge request espressif/esp-mqtt!98
2021-05-26 15:54:21 +00:00
David Cermak a00a3134c6 Add support for Retain flag in messages posted by events
Closes https://github.com/espressif/esp-mqtt/issues/193
2021-05-24 10:57:37 +02:00
flohas 06157be118 Add crt_bundle function pointer to be accessible from esp_mqtt_client_config_t 2021-05-24 10:32:10 +02:00
Euripedes Rocha 5b27d1896e Fix: Adds missing field at config struct.
If an user chooses to config broker by hostname it wasn't possible to
 add the path.
2021-05-14 15:57:42 +01:00
David Čermák 1db731f985 Merge branch 'feature/mqtt_unit_test_cleanup' into 'master'
Reduce the includes used in files.

See merge request espressif/esp-mqtt!93
2021-04-07 11:37:00 +00:00
Euripedes Rocha Filho 87fcce72c9 Reduce the includes used in all files.
- To reduce the dependencies to the minimal the number of includes was
  reduced.
2021-04-07 10:49:49 +01:00
suren.gabrielyan 2f57985c0b esp-mqtt: Added nullchecks for public APIs
Closes IDFGH-4724
Closes https://github.com/espressif/esp-mqtt/issues/185
2021-03-04 18:30:27 +04:00
David Cermak e2de0f3e3e Publish: Allow for qos=0 messages to be stored using esp_mqtt_client_enqueue()
The API presents a boolean parameter to control storing the qos=0
messages into the internal outbox
2020-12-15 19:43:33 +01:00