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
David Čermák
9f2db7b4b6
Merge branch 'bugfix/queue_license' into 'master'
...
Add license information to queue
See merge request espressif/esp-mqtt!163
2023-03-09 14:37:30 +08:00
Euripedes Rocha
36f0faa80d
Add license information to queue
...
File was copied from BSD header without the license information.
2023-03-02 08:02:57 +01:00
Rocha Euripedes
7089fac9c0
Merge branch 'prs/mqtt5_fixes' into 'master'
...
MQTTv5: Fixes and additions from GitHub PRs
See merge request espressif/esp-mqtt!162
2023-02-28 16:25:53 +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
Rocha Euripedes
5a156f56b4
Merge branch 'feature/multiple_subscribe' into 'master'
...
Feature: Enable SUBSCRIBE to multiple topics
See merge request espressif/esp-mqtt!156
2023-02-08 15:35:31 +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
Rocha Euripedes
5adbe11aaf
Merge branch 'feature/config_read_poll' into 'master'
...
Adds Kconfig option to configure poll read timeout
See merge request espressif/esp-mqtt!159
2023-02-02 20:52:02 +08:00
Rocha Euripedes
2fa945d0b8
Adds Kconfig option to configure poll read timeout
...
A new Kconfig option was added to allow users to configure poll read
timeout.
Closes: https://github.com/espressif/esp-mqtt/issues/245
2023-02-02 20:52:02 +08:00
Rocha Euripedes
86d21e4902
Merge branch 'bugfix/nano_printf_format' into 'master'
...
Fix formatting when using printf nano
See merge request espressif/esp-mqtt!160
2023-02-02 20:24:24 +08:00
Rocha Euripedes
e9b865eb9d
Fix formatting when using printf nano
2023-02-02 20:24:24 +08:00
Rocha Euripedes
acab02f2c5
Merge branch 'bugfix/fix_mqtt5_flow_control' into 'master'
...
mqtt5: Fix flow control will regard the DUP packet and not consider PUBCOMP packet
See merge request espressif/esp-mqtt!158
2023-01-18 16:03:31 +08: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
Rocha Euripedes
c96f6f804c
Merge branch 'bugfix/coverity_fix' into 'master'
...
Remove possible null pointer dereferences
See merge request espressif/esp-mqtt!157
2023-01-04 20:26:27 +08:00
David Čermák
dffabb067f
Merge branch 'feature/esp_mqtt_as_managed_component' into 'master'
...
Moves mqtt build files to esp-mqtt and adds a component file
See merge request espressif/esp-mqtt!149
2022-12-17 01:46:11 +08:00
Euripedes Rocha
159b1638b2
Reorganize mqtt build structure
...
- Integrate build definitions from idf
- Changes CMakeLists to allow import
- Added host test from idf
- Added test code from idf
2022-12-16 08:52:54 +01:00
Euripedes Rocha
f27cb47c0f
[MQTT] Simplifies MQTT CMakeLists file
...
- Uses mocks from tools instead of creating them.
- Move host based definition to test code.
2022-12-16 08:38:48 +01:00
Ivan Grokhotkov
ee9b52b7d2
build system: re-add -Wno-format as private flag for some components
2022-12-16 08:38:48 +01:00
yuanjm
01d0f34654
test: Add mqtt5 unit-test
2022-12-16 08:38:48 +01:00
yuanjm
0b98c63247
mqtt: Add mqtt5 Kconfig
2022-12-16 08:38:48 +01:00
David Cermak
94ecca2073
esp_netif/lwip: Fix deps cycles to "lwip -> esp_netif -> phy-drivers"
...
Fix dependency tree so that lwip doesn't depend on any specific network
interface component.
Network interface drivers shall depend on esp_netif.
esp_netif shall depend on lwip (but not on any specific interface
driver) -- it optionally depends on vfs and esp_eth (need ethernet
header for L2/bridge mode)
2022-12-16 08:38:48 +01:00
Euripedes Rocha
1e598b071b
[MQTT] - Updates esp_mqtt configuration struct
...
- Layered config struct
- Fix examples.
2022-12-16 08:38:48 +01:00
Fu Hanxi
d4ee31f627
docs: changes docs supported targets tables
2022-12-16 08:38:48 +01:00
Euripedes Rocha
411ea65ec7
[MQTT] - Adds esp-timer as dependency and change version.
...
- Current time is now from esp_timer.
2022-12-16 08:38:48 +01:00
David Cermak
bc30b9a8e3
mqtt: Update tests to start with valid transport
2022-12-16 08:38:48 +01:00
David Cermak
d372bbf09e
mqtt: Fix client_enqueue(len=0), Improve transport memory
...
* Update submodule: git log --oneline 64f88b4412ea6649dbf207a07370c2617160d044..a21c387d6280260894981c22494017c893d505b9
Detailed description of the changes:
* mqtt_client: Added checks for cleanly-closed connection and timeout
- See merge request espressif/esp-mqtt!118
- Added checks for cleanly-closed connection and timeout (espressif/esp-mqtt@e05d873 )
* mqtt_client: fix esp_mqtt_client_enqueue for len=0 (GitHub PR)
- See merge request espressif/esp-mqtt!135
- mqtt_client: fix esp_mqtt_client_enqueue for len=0 (espressif/esp-mqtt@69b6493 )
* Fix implicit malloc/free inclusion
- See merge request espressif/esp-mqtt!134
- See commit https://github.com/espressif/esp-mqtt/commit/9299f54
* feat(mqtt): Optimize mqtt transport list and remove unused transport
- See merge request espressif/esp-mqtt!131
- See commit https://github.com/espressif/esp-mqtt/commit/647e0ef
* Fix WSS default port selection through menuconfig.
- See merge request espressif/esp-mqtt!132
- - Closes https://github.com/espressif/esp-mqtt/issues/223
- See commit https://github.com/espressif/esp-mqtt/commit/f6caaff
2022-12-16 08:38:48 +01:00
David Cermak
610db7b934
mqtt: Fix and add mqtt host test to CI
2022-12-16 08:38:48 +01:00
David Cermak
62c5545f2d
esp-netif: Make dependency on esp-eth optional
...
* esp-netif to optionally depend on esp-eth (only for l2tap config)
* esp_eth.h now includes the original ethernet header and the
ethernet-netif glue layer
* Updated examples and test to explicitely use esp-eth dependency if
needed
2022-12-16 08:38:48 +01:00
Djordje Nedic
b80d4d468c
tools: Increase the minimal supported CMake version to 3.16
...
This updates the minimal supported version of CMake to 3.16, which in turn enables us to use more CMake features and have a cleaner build system.
This is the version that provides most new features and also the one we use in our latest docker image for CI.
2022-12-16 08:38:48 +01:00
David Cermak
5539c83c0a
mqtt: Fix incorrect reads on error; Update ping processing
...
* Update submodule: git log --oneline 4874bab35659bd2301e65fd849f6559d7380d4f1..64f88b4412ea6649dbf207a07370c2617160d044
Detailed description of the changes:
* Fix documentation of config struct
- See merge request espressif/esp-mqtt!129
- See commit https://github.com/espressif/esp-mqtt/commit/e31834c
* Changes the moment we update keepalive_tick.
- See merge request espressif/esp-mqtt!127
- See commit https://github.com/espressif/esp-mqtt/commit/2c2e6f3
* MQTT: Fix signature matching for some integer values
- See merge request espressif/esp-mqtt!128
- Closes https://github.com/espressif/esp-idf/issues/8482
- MQTT: Fix signature matching for integer values (espressif/esp-mqtt@6b794e4 )
* Make the mqtt submodule logging tags lower case
- See merge request espressif/esp-mqtt!122
- See commit https://github.com/espressif/esp-mqtt/commit/fb3184c
Closes https://github.com/espressif/esp-idf/issues/8482
Closes https://github.com/espressif/esp-idf/issues/8550
2022-12-16 08:38:48 +01:00
Ivan Grokhotkov
0a507f1205
build system: remove lwip from common requirements
...
lwip was added to common requirements list to provide "sys/socket.h"
header to all components without additional requirements specified.
However, lwip pulls in a lot of dependencies on other components.
This commit removes lwip from common requirements to reduce the number
of components in G1-only apps.
To compensate for this removal, the following changes are made:
- newlib (which is a common requirement) has a public dependency on
lwip if lwip is present in the build. This ensures that sys/socket.h
is available as long as lwip component is included into the build.
- lwip is now a public requirement of esp-tls since esp_tls.h includes
sys/socket.h header.
- lwip is now a public requirement o esp_http_client because
sys/socket.h is included from esp_http_client.h
- lwip is now a private requirement of esp_wifi for "smartconfig_ack"
- lwip is now a private requirement of mqtt for socket functions
- lwip is now a public requirement of tcp_transport because
esp_transport_tcp.h includes sys/socket.h header.
- mbedtls checks if lwip component is present in the build. If yes,
net_sockets.c is added to the build, along with the dependency on
lwip. Previously lwip was a public requirement of mbedtls
unconditionally.
system/g1_components test app is updated to reflect the changes
Default public dependencies of a component before and after this
change, except common requirements:
- esp_timer (public dependency of freertos)
- bootloader_support (public dependency of esp_hw_support)
- vfs (public dependency of lwip)
- esp_wifi (public dependency of lwip)
- esp_event (public dependency of esp_wifi)
- esp_netif (public dependency of esp_event)
- esp_eth (public dependency of esp_netif)
- esp_phy (public dependency of esp_wifi)
After:
- esp_timer (public dependency of freertos)
- bootloader_support (public dependency of esp_hw_support)
Altogether, the following components have been always added as
public requirements to all other components, and are not added now
([breaking-change]):
- lwip
- vfs
- esp_wifi
- esp_event
- esp_netif
- esp_eth
- esp_phy
Application components now need to explicitly declare dependencies on
these components.
2022-12-16 08:38:48 +01:00
Anton Maklakov
77e41479d7
components: correct printf() placeholder for time_t
...
Using C99 %jd, https://en.cppreference.com/w/c/chrono/time_t
2022-12-16 08:38:48 +01:00
Anton Maklakov
a88eaebad9
esp-mqtt: fix warnings
2022-12-16 08:38:48 +01:00
Laukik Hase
8dc8e5ae0b
kconfig: Changed default values of bool configs
...
- Some bool configs were using default values true and false,
instead of y and n.
2022-12-16 08:38:48 +01:00
Sagar Bijwe
933da9efed
Remove legacy system event framework.
2022-12-16 08:38:48 +01:00
Sudeep Mohanty
a840bcf274
esp_hw_support/esp_system: Re-evaluate header inclusions and include directories
...
This commit updates the visibility of various header files and cleans up
some unnecessary inclusions. Also, this commit removes certain header
include paths which were maintained for backward compatibility.
2022-12-16 08:38:48 +01:00
Darian Leung
fcd548daab
freertos: Remove legacy hooks
...
This commit refactors the legacy hooks as follows:
- Removed CONFIG_FREERTOS_LEGACY_HOOKS
- FreeRTOS hooks are now enabled via:
- CONFIG_FREERTOS_USE_IDLE_HOOK
- CONFIG_FREERTOS_USE_TICK_HOOK
- Update IDF hooks documentation
2022-12-16 08:38:48 +01:00
David Cermak
23e5c5a02c
esp_eth: Update esp32's EMAC API to decouple driver and vendor config
2022-12-16 08:38:48 +01:00
David Cermak
71d9236275
mqtt: Fix sending log data; dup flag after queue
...
* Fix sending mqtt message longer than Tx buffer size
* Fix enqueue API to send data with correct dup flag
* Update submodule: git log --oneline b86d42c130ac64a916ce6cf299d99f9756692394..985078affa8a2d2b56b87c8e6455252850f895c6
Detailed description of the changes:
* Isolate IDF env for v4.4 and v5.0(master)
- See merge request espressif/esp-mqtt!111
- ci: Isolate IDF env for v4.4 and v5.0(master) (espressif/esp-mqtt@4c5a65c )
* Client: Remove usage of legacy FreeRTOS types
- See merge request espressif/esp-mqtt!120
- ci: Fix build issues with IDF-4.4 against master (espressif/esp-mqtt@c28a56d )
- See commit https://github.com/espressif/esp-mqtt/commit/6ef98d6
* mqtt_client: Fix mqtt send long data error
- See merge request espressif/esp-mqtt!117
- Closes https://github.com/espressif/esp-mqtt/issues/214
- See commit https://github.com/espressif/esp-mqtt/commit/372b323
* Client: Fix use esp_mqtt_client_enqueue API to send data, data dup flag will be set 1
- See merge request espressif/esp-mqtt!116
- See commit https://github.com/espressif/esp-mqtt/commit/df8dc92
2022-12-16 08:38:48 +01:00
David Cermak
f8cb9f7286
mqtt: Add docs on MQTT_CUSTOM_OUTBOX implentation
...
Closes https://github.com/espressif/esp-mqtt/issues/217
2022-12-16 08:38:48 +01:00
Mahavir Jain
47ac29b1e2
mqtt: replace nghttp with http_parser references
2022-12-16 08:38:48 +01:00
Jakob Hasse
174c6781de
refactor (test_utils)!: separate file for memory check functions
...
Memory check (leaks and heap tracing) functions for unit tests
now have a separate file now and are renamed for more consistency.
BREAKING CHANGE: renamed memory check function names which may be used
in unit tests outside IDF.
2022-12-16 08:38:48 +01:00
David Cermak
1766fd4d5b
MQTT: Fix disconnect/reconnect, Adds empty client id, ...
...
Updated MQTT submodule: git log --oneline 89894bd0c611b1392967fe90bb49682eba858383...b86d42c130ac64a916ce6cf299d99f9756692394
* Added support for client with empty id
* Fixed user requested disconnect to correctly send MQTT disconnection message
* Fixed reconnection request with disabled autoreconnect
* Added qos and dup flags to data events
* Added Support for suback massage payload in mqtt events
Detailed description of the changes (https://github.com/espressif/esp-mqtt/compare/89894bd0c611b1392967fe90bb49682eba858383...b86d42c130ac64a916ce6cf299d99f9756692394 ):
* Adds the possibility of client with empty id
- See merge request esp-mqtt!114
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/09287a11565fdd26f5c0deb2960566dff676509b
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/1fd50dd2cbbe9a7847d8e99d2d802c17122a0be9
- Related IDF-4124
* Client: Disconnect/Reconnect improvements
- See merge request esp-mqtt!113
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/3f05b1aedc4da048d3a41657339e77dfc0bfe0a8
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/86e40f86152a522b179b5dcc1dbbd0b288ee8321
- Related https://github.com/espressif/esp-mqtt/issues/206
- Related https://github.com/espressif/esp-mqtt/issues/208
* Events: Support qos/dup flags and suback payload in mqtt events (GitHub PR)
- See merge request esp-mqtt!112
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/de47f1c3415d38509d9fe3436dc6d35886556954
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/e1d5a9402f08a21e3ca755afbbcd8d99be681902
- Related https://github.com/espressif/esp-mqtt/issues/200
- Related https://github.com/espressif/esp-mqtt/pull/203
2022-12-16 08:38:48 +01:00
David Cermak
4afe71b132
MQTT: Add more tests
2022-12-16 08:38:48 +01:00
David Cermak
74882b18f0
MQTT: Add more unit tests with actual broker
2022-12-16 08:38:48 +01:00
Darian Leung
ff8a93585f
freertos: Add portTRY_ENTRY_CRITICAL() and deprecate legacy spinlock fucntions
...
Add TRY_ENTRY_CRITICAL() API to all for timeouts when entering critical sections.
The following port API were added:
- portTRY_ENTER_CRITICAL()
- portTRY_ENTER_CRITICAL_ISR()
- portTRY_ENTER_CRITICAL_SAFE()
Deprecated legacy spinlock API in favor of spinlock.h. The following API were deprecated:
- vPortCPUInitializeMutex()
- vPortCPUAcquireMutex()
- vPortCPUAcquireMutexTimeout()
- vPortCPUReleaseMutex()
Other Changes:
- Added portMUX_INITIALIZE() to replace vPortCPUInitializeMutex()
- The assembly of the critical section functions ends up being about 50 instructions longer,
thus the spinlock test pass threshold had to be increased to account for the extra runtime.
Closes https://github.com/espressif/esp-idf/issues/5301
2022-12-16 08:38:48 +01:00
Roland Dobai
b4474ac16d
Build & config: Remove leftover files from the unsupported "make" build system
2022-12-16 08:38:48 +01:00
Sudeep Mohanty
3c764f0fc1
freertos: update freertos folder structure to match upstream
...
The following changes have been made:
1. All FreeRTOS kernel source files are now placed in the
freertos/FreeRTOS-Kernel folder to match with the upstream folder structure.
2. All kernel include files are now placed in freertos/FreeRTOS-Kernel/include.
3. All port files are now placed in freertos/FreeRTOS-Kernel/portable.
4. All additions/customizations are placed in freertos/esp_additions.
5. All other miscellaneous files (README, License files etc.) are moved to
freertos/FreeRTOS-Kernel folder to match with the upstream.
6. Updated esp-cryptoauthlib to latest commit to resolve FreeRTOS
include dependencies.
Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com >
2022-12-16 08:38:48 +01:00
David Cermak
c03353333b
MQTT: Fix build if CONFIG_WS_TRANSPORT is not set and client cleanups
...
Updated MQTT submodule: git log --oneline f10321a53b53a146ee299cfecc320b89c0cf6611...89894bd0c611b1392967fe90bb49682eba858383
* Fix build issue if cert bundle disabled
* Fix build issue if ws transport disabled
* Add config to set retransmission interval
Detailed description of the changes (https://github.com/espressif/esp-mqtt/compare/f10321a53b53a146ee299cfecc320b89c0cf6611...89894bd0c611b1392967fe90bb49682eba858383 ):
* Added config option to configure custom retransmission interval
- See merge request espressif/esp-mqtt!110
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/1b009c840b78a14f59b6ada70d36aca9ad6303f0
- Related https://github.com/espressif/esp-mqtt/pull/199
* Configuration conflicts were verified, logged but not reported to the user.
- See merge request espressif/esp-mqtt!102
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/88f4b8ed50af6989efba3f87a14882b276e2deb7
* Fixed build issue if cert bundle disabled
- See merge request espressif/esp-mqtt!109
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/4a89bff610b86f534f67d032a3e1549d8c4da95f
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/1b719805756f60140312f8e314f732c0a177f74f
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/5b3c81ee482c815e2602f5d16adb0e197b9e3695
- Related https://github.com/espressif/esp-mqtt/pull/198
- Related https://github.com/espressif/esp-idf/issues/7535
* Removes unnecessary outbox_cleanup
- This function were used on old version to handle QoS 2 messages. It's no longer necessary in current implementation.
- See merge request espressif/esp-mqtt!108
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/ebef896b00c1e0b48107a074f786096479b8c9ee
* Fixed return an error when fail to enqueue
- The functions that enqueue messages didn't had a return for the handler, with this the error was only logged instead of returned whichmay cause the user to have an ID for a message that was not published.
- See merge request espressif/esp-mqtt!103
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/7471177fe77aea8c0d85d8008867aa8d6ff57424
* CI: Use qemu image based on esp-env:v4.4-1
- Replaced the temporary qemu image with the official qemu:v4.4-1-20210517 derived from the esp-env:v4.4-1 test environment
- See merge request espressif/esp-mqtt!107
- esp_mqtt commit https://github.com/espressif/esp-mqtt/commit/231b2749628b59df997750e82d6470d68735798b
Closes https://github.com/espressif/esp-idf/issues/7535
2022-12-16 08:38:48 +01:00