140 Commits

Author SHA1 Message Date
56799069af Enables cypher suite configurations on IDF => 5.5
Merges https://github.com/espressif/esp-mqtt/pull/298
2025-05-21 15:24:19 +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
7d9a384a4a fix(mqtt): Updated the idf version check for ECDSA support
ECDSA support from the esp-idf veriosn 5.2.0, although we had
support ECDSA peripheral for H2 since 5.1, but we had put the support
of ECDSA in esp-tls from v5.2.0
2025-05-16 11:36:25 +05:30
b35a69121c feat(mqtt): Add support for ECDSA signing
Added support for ECDSA signing in MQTT.
2025-05-14 12:14:43 +05:30
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
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
7c3227a24d feat: Add TCP keepalive configuration 2024-08-22 11:18:43 +02:00
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
97dc85a080 feat: Allow users to get the transport in use 2024-07-10 15:17:41 +08:00
c3c4cb9a2a fix: set TCP transport every time when setting the config 2024-07-01 16:54:47 +10:00
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
acdb66d5c6 add const char * to esp_mqtt_client_subscribe() generic macros 2024-01-25 15:35:32 +07:00
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
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
c355e0b5ae docs: Adds missing documentation to outbox configuration. 2023-08-31 22:22:04 +08:00
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
dc775bb52e fixing typos in mqtt5_error_reason_code 2023-07-24 23:23:32 +08:00
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
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
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
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
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
6195762d28 Added support to set server common name. 2023-06-08 08:46:41 +02:00
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
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
1011e63cbe feature: Include subscribe_id in esp_mqtt5_event_property_t 2023-02-09 18:44:47 +00:00
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
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
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
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
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
fdf2aeb36f Seperate MQTT5 from MQTT 3.1.1 2022-06-14 09:37:46 +00:00
3d275f42b9 mqtt: Support MQTT5 protocol 2022-06-14 09:37:46 +00:00
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
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
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
e1d5a9402f add qos and dup to MQTT_EVENT_DATA 2021-09-23 18:09:39 +02:00
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
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
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
db13533904 Remove unnecessary parentheses.
- Removed extra parentheses on definition of certificate bundle attach.
2021-06-24 18:35:26 +02:00
2e15c9a5fe Fix IDF supported features: cert-bundle from v4.4 2021-06-17 12:33:34 +02:00
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
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
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
06157be118 Add crt_bundle function pointer to be accessible from esp_mqtt_client_config_t 2021-05-24 10:32:10 +02:00
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
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
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
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