This commit introduces a custom DNS module for ESP32, enabling DNS resolution capabilities
over various protocols including UDP, TCP, DNS over TLS (DoT), and DNS over HTTPS (DoH).
The module includes initialization and cleanup functionalities, along with
protocol-specific implementations for each DNS type.
1.7.0
Features
- Support user defined allocators (88162d1f)
- Allow allocate memory with configured caps (7d29b476)
Bug Fixes
- Adjust some formatting per indent-cont=120 (5b2077e3)
Defines mem-alloc function optionally weak, so users can override them
and implement their own allocation, or a static/bss memory for the mdns
task stack.
This resolves:
1) Deadlock when trying to reserve a lock in WEBSOCKET_EVENT_DATA,
but lock is held by a thread trying to send a websocket message.
2) High latency caused by writers serialized with WEBSOCKET_EVENT_DATA
while calling esp_websocket_client_send(), even when TCP window
has enough space for the entire message being queued to send.
Multiple writers are still serialized at fragment boundaries, but
only with other writers and websocket error updates.
Fixes#625
1.6.0
Features
- support allocating mDNS task from SPIRAM (8fcad10c)
Bug Fixes
- Use correct task delete function (eb4ab524)
Updated
- ci(mdns): Fix mdns host test layers with static task creation (0690eba3)
1.32.0
Features
- Upgrade asio to 1.32 (9bdd429c)
- Drop esp/asio patches in favor of sock-utils (27435b7f)
Bug Fixes
- Fix chat example to print only the message body (76aaea08)
- Make asio enable if_nametoindex to fix linking (5db32cce)
- Re-applie refs to common comps idf_component.yml (9fe44a45)
- Reference common component from IDF (74fc228c)
- Revert referencing protocol_examples_common from IDF (f9e0281a)
- reference protocol_examples_common from IDF (09abb18b)
- specify override_path in example manifest files (1d8923cf)
Updated
- docs(asio): Updates asio docs (ce9337d3)
1.5.0
Features
- supported removal of subtype when updating service (4ad88e29)
Bug Fixes
- Fix zero-sized VLA clang-tidy warnings (196198ec)
- Remove dead store to arg variable shared (e838bf03)
- Fix name mangling not to use strcpy() (99b54ac3)
- Fix potential null derefernce in _mdns_execute_action() (f5be2f41)
- Fix AFL test mock per espressif/esp-idf@a5bc08fb55 (3d8835cf)
- Fixed potential out-of-bound interface error (24f55ce9)
- Fixed incorrect error conversion (8f8516cc)
- Fixed potential overflow when allocating txt data (75a8e864)
- Move MDNS_NAME_BUF_LEN to public headers (907087c0, #724)
- Cleanup includes in mdns.c (68a9e148, #725)
- Allow advertizing service with port==0 (827ea65f)
- Fixed complier warning if MDNS_MAX_SERVICES==0 (95377216, #611)
We did check for null-deref before checking 'a->type', but contol
continues and passes potential null-ptr to the processing function
_mdns_execute_action()
Fixed by asserting action != NULL, since it is an invalid state which
should never happen.
Previous gai_strerror() returned numeric representation of the code,
but used TLS storage, which might cause issues with stack sizes on all
tasks in the system. Alternatively we can leave the storage to static
only (which wouldn't be thread-safe) or we could one-time allocate and
never free (which is wrong).
This option uses hardcoded strings for common error codes used in lwip.
The disadvantage is that we might need to update the impl in the future
when lwip adds more codes.
2.0.20~0
Features
- Upgrade to mosquitto v2.0.20 (3b2c614d)
- Add support for on-message callback (cdeab8f5)
- Add example with two brokers synced on P2P (d57b8c5b)
Bug Fixes
- Fix dependency issues moving esp-tls to public deps (6cce87e4)
Adding a reverse dependency to lwip and define macros, which
enable declarations of socketpair() and gai_strerror() in standard
heders (sys/socket.h and netdb.h)
1.3.0
Features
- Add mode detection to the example (18f196fa)
- Support for pausing network in C-API (1db83cd1)
- Add support for pausing netif (247f1681, #699)
Bug Fixes
- Minor cleanup of pppos example (5e929902)
- Fix PPP mode detection to accept LCP/conf (c989c6ad)
- Refine mode switch data->command (8b6ea331, #692)
- Detect serial ports properly (0cb59ff8)
- Fix CMUX enter to ignore URC before transition (1284f66d, #669)
* Use CONFIG_EXAMPLE_DETECT_MODE_BEFORE_CONNECT to demonstrate mode
detect
* Use disconnection flag to indicate conneciton issue and gracefully
degrade to command mode
* Remove IDF-verion < v5.0 code
* netif.stop() moved after setting the transition callback
* send PPP escape sequence if enabled before waiting for transition to
complete
* add newline character before sync() command (after the "+++")
Closes https://github.com/espressif/esp-protocols/issues/692
1.2.1
Bug Fixes
- Use higher GPIO range to support new chips (428fdbbd, #558)
- Remove tests and support for IDFv4.4, added IDFv5.4 (433a033f)
- Fix typo GENETIC -> GENERIC in mode types (090b1ff8, #667)
- Add support for URC handler into C-API (295d99df, #180)
1.4.1
Features
- Send PTR query for mdns browse when interface is ready (010a404a)
Bug Fixes
- Prevent deadlock when deleting a browse request (3f48f9ea)
- Fix use after free reported by coverity (25b3d5fd)
- Fixed dead-code reported by coverity (11846c7d)
1.2.0
Features
- Add support for guessing mode (52598e5f)
- Delete CMUX internal implementation even if terminal exit fails (0e0cbd6b)
- Add support for handling URC (1b6a3b3b, #180)
- add ability to change ESP_MODEM_C_API_STR_MAX from Kconfig (17909892)
- Added target test config with CHAP authentication (f8ae7def)
- example add esp32p4 usb support (adafeae5)
- Publish mbedtls component (0140455f)
- host test support of the latest ESP-IDF release (3f74b4e8)
Bug Fixes
- Fix console example to use urc/detect features (1a9eaf3e)
- Update target test builds to use external Catch2 (554f022c)
- Fix arguments names when spawn esp_modem_xxx declarations (b6792c52)
- Remove catch dependency (c3480768)
- Examples: use local configs for MQTT topic/data (f5c13b92)
- Fixed clang-tidy warnings (70fa3af7)
- Fix CI build per IDFv5.3 (d0c17ef0)
- Fixed UART task to check for buffered data periodically (4bdd90cc, #536)
- Cleanup unused configs from PPPoS example (08a62ccc)
- Update CMUX example with SIM7070_gnss cleaned-up (56fe5327)
- Update console example with SIM7070_gnss format comments (5baaf542)
- Fix remaining print format warnings (3b80181d)
Updated
- docs(modem): Fix esp_modem_at_raw() description (C-API) (492a6a00)
- ci(common): updated github actions(checkout, upload, download) v3 to 4, Ubuntu 20.04 to v22.04 (a23a0027)
1.3.0
Features
- add events for begin/end thread (d7fa24bc)
- Make example to use certificate bundle (aecf6f80)
- propagate esp_tls stack error and cert verify flags (234f579b)
- Add option to set and use cert_common_name in Websocket client (3a6720de)
- adding support for `if_name` when using WSS transport (333a6893)
- allow updating reconnect timeout for retry backoffs (bd9f0627)
- allow using external tcp transport handle (83ea2876)
- adding support for `keep_alive_enable` when using WSS transport (c728eae5)
Bug Fixes
- Prevent crash on network disconnect during send (a453ca1f)
- use proper interface to delete semaphore (991ac40d)
- Move client to different state when disconnecting (0d8f2a6d)
- fix of websocket host example (5ccc018a)
- don't get transport from the list if external transport is used (9d4d5d2d)
- Fix locking issues of `esp_websocket_client_send_with_exact_opcode` API (6393fcd7)
When WiFi disconnects, `esp_websocket_client_task` continues polling
`esp_transport_poll_read()` with a default 1-second timeout.
If a timeout triggers `esp_websocket_client_abort_connection`,
certain resources are released.
However, if `esp_websocket_client_send_with_exact_opcode`
is still blocked at this point, it will cause a crash
when it times out and accesses the released handle.
This fix prevents potential crashes by ensuring proper
synchronization between abort and send functions.
Merges: https://github.com/espressif/esp-protocols/pull/629
On most implementations, including ESP-IDF FreeRTOS, vSemaphoreDelete()
is a macro that calls vQueueDelete(). But since the client semaphore is
created with xSemaphoreCreateRecursiveMutex(), delete it as a semaphore with vSemaphoreDelete().
0.4.0
Features
- Make esp_hosted default RPC library (1b62adbd)
- Add build test for current IDF examples (50c113e4)
- Support for IDF v5.3 in a separate directory (bde97203)
- Support for IDF v5.4 via a separate dir (e9ac41e1)
- Add slave selection and peview targets (345c4577)
Bug Fixes
- Fix CMake to use inherent IDF build vars (c454ec09)
- Update per v5.4 espressif/esp-idf@97e42349 (ff5dac70)
- Fix CI builds to generate configs per slave selection (8795d164)
- Depend on esp_hosted only on targets with no WiFi (7ca5ed1d)
- Update per espressif/esp-idf@27f61966 (2e53b81f)
- Fix checking API compat against reference dir (1a57a878)
Switched from the deprecated Catch framework (IDF/tools) to Catch2,
as Catch will be removed in v6.0.
Note that Catch2 has higher memory requirements,
necessitating an increase in stack size and partition table.
Additionally, Catch2 increases compilation time due to its larger footprint.
Fixes CID 467739: Use after free in mdns.c, mdns_service_remove_for_host
We should look only for one match in the service list, since if we
assume there could be aliases, we might free one and reference the
other.
Fixes CID 467738: Logically dead code in mdns.c, _copy_mdns_txt_items
Introduced by probably by a merge confilict, as the fix was added in
two separate PRs, merging d4da9cb0 first and 8a690503 later
1.4.0
Major changes
- Fixed mdns API issues when add/remove/update records from multiple threads (Fix services API races to directly add/remove services)
Features
- Unit tests for add/remove/update deleg/selfhosted services (0660ece1)
- Add console command for mdns browsing (1e8ede33)
- Console test: set instance for service (f107dcd1)
- Console test: add subtype for service (ee00e97b)
- Console test: set port for (delegated) srvs (07b79abf)
- Console test: add/remove TXT recs for delegated srvs (c9a58d73)
- Console test for changing TXT records (6b9a6ce6)
- Console test for add/remove delegated service APIs (43de7e5c)
- Console test for add/remove delegated host APIs (ce7f326a)
- Console test for lookup service APIs (a91ead8e)
- Add linux console functional tests (50d059af)
- check if the txt items is changed when browsing (e2f0477a)
Bug Fixes
- Fix mdns_delegate_hostname_add() to block until done (2c1b1661)
- Fix API races when removing all services (169405b5)
- Fix API races setting instance name for services (643dc6d4)
- Fix API races while adding subtypes for services (f9f234c4)
- Fix API races removing txt item for services (3f97a822)
- Fix API races adding txt item for services (c62b920b)
- Fix API races while setting txt for services (a927bf3a)
- Fix API races while setting port for services (99d5fb27)
- Fix services API races to directly add/remove services (8a690503)
- Fix mdns mdns_lookup_service() to handle empty TXT (d4da9cb0)
Adds action semaphore the same way it's done in mdns_hostname_add()
There could still potentially be a minor issue when calling these two APIs
simultanously. Will solve the same ways as in 8a690503 (tracked as
IDF-10913)
Original issue (data race when updating hostname): mdns_service_add()
makes a copy of the local hostname and calls using the local copy
mdns_service_add_for_host().
When mdns's hostname is updated the local copy gets out of sync.
**API race issue**: Most of the current API correctly lock the mdns service,
but sometimes unlocks it before sending an action to the action queue,
so it's possible that the situation changes before the actual action
takes place.
**Fix**: After locking the mdns service, we proceed directly with updating
internal structures and do not post actions into the action queue.
**Fix wrtt hostname**: Use mdns_service_add_for_host(hostname=NULL)
for all self hosted services.
MAJOR CHANGE: Fixed mdns API issues when add/remove/update records from multiple threads
This and the following commits fix the API race issues for these mdns APIs:
* mdns_service_add_for_host
* mdns_service_port_set_for_host
* mdns_service_txt_set_for_host
* mdns_service_txt_item_set_for_host_with_explicit_value_len
* mdns_service_txt_item_remove_for_host
* mdns_service_subtype_add_for_host
* mdns_service_instance_name_set_for_host
* mdns_service_remove_for_host
* mdns_service_remove_all
the lookup_service API calls _copy_mdns_txt_items(), which tries to
allocate new TXT records, but didn't handle the case with no TXT.
Originally the _copy_mdns_txt_items() called calloc() with zero's which
returned NULL (on espressif toolchain), so it's safe, but we could see
an error message:
E (1170) mdns: Cannot allocate memory (line: 6191, free heap: 281368 bytes)
This commit addresses the empty TXT case and gets rid of the error
message.
0.2.0
Features
- Add support for SDIO transport (085dd790)
Bug Fixes
- Fixed strict prototype API decl issue in SDIO (eb09e426)
- Fix SIDO host to check/clear interrupts atomically (402176c9)
* private field 'netif' is not used [clang-diagnostic-unused-private-field]
* private field 'instance' is not used [clang-diagnostic-unused-private-field]
* Call to virtual method 'FdTerminal::stop' during destruction bypasses virtual dispatch [clang-analyzer-optin.cplusplus.VirtualCall]
* unused variable 'TAG' [clang-diagnostic-unused-const-variable]
* Null pointer passed as 2nd argument to memory copy function [clang-analyzer-unix.cstring.NullArg]
* Array access (from variable 'data') results in a null pointer dereference [clang-analyzer-core.NullDereference]
1.3.2
Features
- add check of instance when handling PTR query (6af6ca5)
Bug Fixes
- Fix of mdns afl tests (139166c)
- remove same protocol services with different instances (042533a)
0.1.0
Features
- Added CI job to build examples and tests (7eefcf0)
Bug Fixes
- Fixed to select PPP LWIP opts which are OFF by default (16be2f9)
- Example to use iperf component from the registry (bd6b66d)
- Fixed defalt config designated init issue in C++ (8bd4712)
0.2.0
Features
- Add support for simple eppp based RPC (fd168d8)
Bug Fixes
- Make services restartable, code cleanup (6c82ce2)
- Add examples to CI (d2b7c55)
1.3.0
Features
- add a new mdns query mode `browse` (af330b6)
- Make including mdns_console KConfigurable (27adbfe)
Bug Fixes
- Schedule all queued Tx packets from timer task (d4e693e)
- add lock for some common apis (21c84bf)
- fix mdns answer append while host is invalid (7be16bc)
1.2.3
Features
- Expanded example to demonstrate the transfer over TLS (0d0630ed76)
Bug Fixes
- fix esp_event dependency management (1fb02a9a60)
- Skip warn on zero timeout and auto reconnect is disabled (5b467cbf5c)
- Fixed to use int return value in Tx functions (9c54b72e1f)
- Fixed Tx functions with DYNAMIC_BUFFER (16174470ee)
- added dependency checks, sdkconfig.defaults and refined README.md (312982e4aa)
- Close websocket and dispatch event if server does not close within a reasonable amount of time. (d85311880d)
- Continue waiting for TCP connection to be closed (2b092e0db4)
Updated
- docs(websocket): Added README for websocket host example (2f7c58259d)
Move esp_event from PRIV_REQUIRES to REQUIRES, as it is
included by esp_websocket_client.h, so any code including
that header also requires esp_event.
This resolves the following build error for files not
explicitly requiring esp_event:
ninja: build stopped: subcommand failed.
Compilation failed because esp_websocket_client.h (in "espressif__esp_websocket_client" component) includes esp_event.h, provided by esp_event component(s).
However, esp_event component(s) is in the private requirements list of "espressif__esp_websocket_client".
To fix this, move esp_event from PRIV_REQUIRES into REQUIRES list of idf_component_register call in ...\managed_components\espressif__esp_websocket_client\CMakeLists.txt.
ninja failed with exit code 1, output of the command is in...
1.2.4
Bug Fixes
- Correction on 6d2c475 MDNS_PREDEF_NETIF_ETH fix (fc59f87c4e)
- fix the logic of creating pcb for networking socket (5000a9a20a)
- fix compiling issue when disabling IPv4 (2646dcd23a)
- Fix compile error when MDNS_PREDEF_NETIF_ETH is defined, but ETH_ENABLED is not (#459) (6d2c475c20)
The CLI that mdns_console offers is very useful for debugging
and bootstrapping mDNS onto new projects, but some projects
may not want console CLI in place to reduce binary size.
This gives a KConfig option to do so.
1.1.0
Features
- Added support for at_raw() command (ae38110, #471)
- Added iperf test for PPP netifs (976e98d)
- Added test that performs OTA to exercise modem layers (f2223dd)
Bug Fixes
- Fixed OTA test to gracefully fail with no verification (1dc4299)
- Added C-API to configure APN (ce7dadd, #485)
- Fixed AT commands to copy strings to prevent overrides (741d166, #463)
- Fixed incorrect dial command format (0998f3d, #433)
- Fixed documentation and example on creating custom device (577de67, #452)
- Removed CI jobs for IDF v4.2 (d88cd61)
- Fixed OAT test to verify server cert and CN (edc3e72)
- Fixed set_pdp_context() command timeout (1d80cbc, #455)
Updated
- docs(modem): Added description of manual test procedure (68ce794)
Previously we used std::string_view, which pointed to the lower-layers
buffer which might have been reused for other asynchronous operations
before processing it, thus causing corruption of replies.
Closes https://github.com/espressif/esp-protocols/issues/463
ATD command is used to switch generic device to the data mode
by dialing GPRS_SRC. The generic version of the command was incorrect
`ATD*99##` (containing extra trailing # char, which is accepted by most
devices). Command has been fixed, but the extra #'s been kept for devices
that we cannot test (to be fixed in IDFGH-9470).
Closes https://github.com/espressif/esp-protocols/issues/433
Updates docs and examples per recent changes:
* Modem example does no longer demonstrate how to overwrite an AT method
* PPPoS client example now contains much simpler custom module
definition
Closes https://github.com/espressif/esp-protocols/issues/452
at_raw() sends raw string and supports custom pass/fail phrases for the
API to return OK/FAIL. It also returns raw, unprocessed string as
output.
This allows sending custom requests, such as:
* dce->at_raw("", resp, "RDY", "...", 20000) -- waiting for reset
* esp_modem_at_raw(dce, "+++", resp, "DISCONNECTED", "ERROR", 5000) --
exits PPP mode
Closes https://github.com/espressif/esp-protocols/issues/471
Partially addresses https://github.com/espressif/esp-protocols/issues/468
1.2.3
Bug Fixes
- fixed CI issues for host and afl tests (4be5efc84e)
- fix copy delegated host addr (19fb36000c)
- enable CONFIG_ESP_WIFI_ENABLED if CONFIG_SOC_WIFI_SUPPORTED is also enabled (for ESP-IDF <= 5.1) (d20a718320)
- remove protocol_examples_common (1ee9dae6bf)
- move the example into a subdirectory (d28232b9f8)
- reference protocol_examples_common from IDF (c83b76ea8f)
1.0.5
Major changes
- Added support for implementing user defined modules in standard C-API (Support for custom modules with C-API)
Bug Fixes
- Added test injecting unexpected replies (b220d1e, #426)
- Fixed inconsistent state on data after OK (bf99f28, #426)
- TLS example: Added restore session support in mbedtls-wrap (79d38e5)
- Fixed examples to show netif on ppp-changed event (a70b197)
- remove unused GNU Make based buildsystem files (d6b6f63)
- specify override_path in example manifest files (5b78da4)
- Added test-cases that exercise mode transitions (aff571d)
- Fixed mode transitions between any state and UNDEF (93cb2ca, #320)
- Fixed API docs within doxygen comments (020b407)
- Support for custom modules with C-API (0254d50)
- Fix CRLF issue with esp_modem_c_api.cpp (2661b4d)
Updated
- ci(common): Created reusable action for host and coverage tests (9ad04de)
This test exhibits an issue of getting unexpected data just after
completing a command. The DTE rewrites the state to TIMEOUT, but the
signal has been already triggered, thus results in an unexpected state.
Related to Closes https://github.com/espressif/esp-protocols/issues/426
If we received response in two chunks and the first one completes the
command (result=OK or FAIL), and the second chunk pre-empts command processing,
then we performed processing again rewritting the result back to
TIMEOUT. This would invalidate the command, but also causes an
exception: ESP_MODEM_THROW_IF_ERROR(ESP_ERR_INVALID_STATE)
Fixed by checking if the processing already finished in process_line().
Closes https://github.com/espressif/esp-protocols/issues/426
1.2.1
Bug Fixes
- consider failure if return value of `esp_websocket_client_send_with_exact_opcode` less than 0 (f523b4d)
- fix of return value for `esp_websocket_client_send_with_opcode` API (ba33588)
1.2.0
Features
- Added new API `esp_websocket_client_append_header` (39e9725)
- Added new APIs to support fragmented messages transmission (fae80e2)
Bug Fixes
- Reference common component from IDF (74fc228)
- Revert referencing protocol_examples_common from IDF (b176d3a)
- reference protocol_examples_common from IDF (025ede1)
- specify override_path in example manifests (d5e7898)
- Return status code correctly on esp_websocket_client_send_with_opcode (ac8f1de)
- Fix pytest exclusion, gitignore, and changelog checks (2696221)
Reusable component in modem_tcp_client example implements a simple
mbedtls wrapper. This update add support for mbedtls deinit() and for
saving and restoring TLS session.
Remaining references to protocol_examples_common are replaced with
references to ESP-IDF.
We will later re-add protocol_examples_common or some equivalent of it
under components/, and release it to the Component Registry.
This makes the 'target' example usable from the component registry.
'linux' example still has a bunch of EXTRA_COMPONENT_DIRS, but at
least we can delete the protocol_examples_common copy.
1.2.2
Bug Fixes
- add terminator for the getting host name (b6a4d94)
- Enable ESP_WIFI_CONFIG when ESP-IDF <= 5.1 (0b783c0)
- set host list NULL on destroy (ea54eef)
- removed Wno-format flag and fixed formatting warnings (c48e442)
- remove the the range of MDNS_MAX_SERVICES and fix issues of string functions (3dadce2)
1.0.4
Bug Fixes
- Added USB runner with ESP32S2 with A7670 (edeb936)
- Extend docs on AT client example (1f2ceed)
- Fix pytest exclusion, gitignore, and changelog checks (2696221)
- Fix DTE to post fragments to parsers for USB term (1db1e15)
- Fix DUAL_MODE regression from cb6e03ac (2aada0f)
- Fix AT client example to use custom AT processing (1a5ba98, #352)
1.28.0~0
Features
- Updates asio to 1.28 (b310abe)
Bug Fixes
- Makes the examples to override path (842b2b2)
- Removes esp_exception and make all examples to use exceptions (c1c9350)
- removed Wno-format flag and fixed formatting warnings (c48e442)
- added idf_component.yml for examples (d273e10)
- Reintroduce missing CHANGELOGs (200cbb3)
Updated
- docs(common): updated component and example links (f48d9b2)
- docs(common): improving documentation (ca3fce0)
- Add homepage URL and License to all components (ef3f0ee)
- Added badges with version of components to the respective README files (e4c8a59)
- CI: Fix ASIO example test (6e2bb51)
- Examples: using pytest.ini from top level directory (aee016d)
- CI: fixing the files to be complient with pre-commit hooks (945bd17)
In the recent DTE refactoring (cb6e03ac) we install terminal callbacks
in the constructor, but the change missed initializing modem_state
in DTE constructors which take two terminals as arguments to work in
DUAL mode.
The usage of esp_exception header defining the exception handler
prevents users to customize the exception treatment. By removing it
we allow users that want to run without exceptions to customize the
behavior.
1.0.2
Features
- Add factory method for simple creation of custom DCEs (4cf9e50)
- Support custom transport in AT TCP client example (ae629ed)
Bug Fixes
- Fix host test race with async read and d'structor (c89d42f)
- More error handling in cmux protocol (8edbac6)
- Fix netif to set PPP config in C++ way (5287432)
- Fix vfs terminal not to reset read_cb() automatically (25a35e2)
- Fix netif data race causing PPP startup delays (c8c0507, #308)
- Added support for inflatable buffer (cb6e03a, #272)
- Fix LoadProhibited after failed CMUX initialization (IDFGH-10845) (60c87dd)
Loopback terminal uses std::async to inject test data to the test
terminal. There was a hazardeous condition when destructing the terminal
while async batch_read() was in progress. Adding a signal and waiting
for destruction solves the issue.
This change is needed for the fs terminal to work correctly again, after
merging 44bae24c78 which shifted
responsibility of thread safety from a terminal to the DTE. (Before it
was the terminal, which removed this callback safely when processing completed,
and thus we had to check the callback return value). Not the DTE layers
are responsible for thread safety and the return value indicates
success/failure from processing.
Also uses the default clock, the same way as UART terminal.
Event type was introduced in the original version and wasn't used in the
code. In 5.1 the leftover type was removed from esp_mqtt breaking this
wrapper.
This allows calling directly:
auto dce = dce_factory::Factory::create_unique_dce_from<SIM7600>(&dce_config, uart_dte, esp_netif);
instead of:
auto dce = create_SIM7600_dce(&dce_config, uart_dte, esp_netif);
Which is very useful when adding a custom module, so we won't need to
update factory layers and add the new device to enums, etc.
To add a new module, you just:
1) Define the module class NewModule: public GenericModule { };
2) Implement the specific commands:
command_result do_work_new_module(CommandableIf *t, params) {}
3) Connect 1) and 2)
command_result NewModule::do_work_new_module(params...)
{
return dce_commands::do_work_new_module(dte.get(), params...);
}
1.2.0
Features
- add an API for setting address to a delegated host (ddc3eb6)
- Add support for lwip build under linux (588465d)
- Allow for adding a delegated host with no address (c562461)
- Add APIs for looking up self hosted services and getting the self hostname (f0df12d)
Bug Fixes
- Refactor freertos linux compat layers (79a0e57)
- Fix delegated service PTR response (cab0e1d)
- Added unit tests to CI + minor fix to pass it (c974c14)
Updated
- docs: update documentation links (4de5298)
If the merged PR is a few commits behind master, the merge commit could
show changes in the version files as well. This fix checks if the
version already exists and updates the envirionment only if the tag
is not present.
Similar to pppos-client, but without PPP mode.
This uses standard mqtt client and a loopback service that forwards the
TCP traffic from localhost to the modem and vice-versa.
(next step is to create a dedicated tcp-transport layer for modem)
Console example uses DCE commandable to demontrate how to handle URC
Some targets don't support UART_SCLK_APB (e.g. esp32c2)
This change is applicable only for IDFv5.0 and later, as older version
didn't define UART_SCLK_DEFAULT.
Closes https://github.com/espressif/esp-protocols/issues/241
The callback should return false only if there is a problem with the received data.
The updated UART Terminal implementation cannot longer clear is callback.
It is DTE's responsibility to clear the callback.
* Error handling improved to show status code from server
* Added new API `esp_websocket_client_set_headers`
* Dispatches 'WEBSOCKET_EVENT_BEFORE_CONNECT' event before tcp connection
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.
- Base class with separated event handlers for each Mqtt client event.
- Topic matcher added to support data events.
- Filter class to allow only mqtt valid topic filters.
- Initial code for unit test on the host.
Strict mode was introduced to support "one-shot" queries (described in
RFC6762/sec5.1) that are sent by lwip or dig. It was incorrectly assumed
that responding to such queries violates the spec, as we have to repeat
queries in responces, which is forbidden in RFC6762/sec6. It is however
required to repeat query fields according to the Section 6.7. Legacy
Unicast Responses: "it MUST repeat the query ID and the question
given in the query message."
This example enables Power saving mode in Sim70XX modem and tries to synchronise the sleep cycle of the modem with esp32.
When the modem wakes up from PSM sleep it wakes up the esp32. While the modem is awake esp32 is set to light sleep.
Closes: https://github.com/espressif/esp-protocols/issues/54
* extended simple_cmux_client
* add the Descriptions as proposed by @david-cermak
* EXAMPLE_FLOW_CONTROL
Co-authored-by: Franz Höpfinger <krone-trailer@franzhoepfinger.de>
Commands are registered in Constructor. But there is now of deregistering it
This is needed for correct console re-construction,
for example with USB modem replugging.
* bool flag to defragment CMUX payload (useful for devices that send longer messages)
* int flag to force a delay between creating virtual terminals (useful for chatty devices that send some requests)
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.
* Original commit: espressif/esp-idf@facab8c5a7
This commit removes the usage of all legacy FreeRTOS data types that
are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can
still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY.
* Original commit: espressif/esp-idf@57fd78f5ba
Apply the pre-commit hook whitespace fixes to all files in the repo.
(Line endings, blank lines at end of file, trailing whitespace)
* Original commit: espressif/esp-idf@66fb5a29bb
description:Before submitting a new issue, please follow the checklist and try to find the answer.
options:
- label:I have read the documentation for esp-protocols [components](https://github.com/espressif/esp-protocols#readme) and the issue is not addressed there.
required:true
- label:I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
required:true
- label:I have searched the issue tracker for a similar issue and not found a similar issue.
required:true
- type:dropdown
id:component
attributes:
label:What component are you using? If you choose Other, provide details in More Information.
multiple:false
options:
- ASIO port
- esp_modem
- esp_websocket_client
- mDNS
- Other
validations:
required:true
- type:input
id:component_id
attributes:
label:component version
description:Which component version does this issue occur on? (see your `idf_component.yml`)
placeholder:ex. 1.0.0
- type:input
id:idf_version
attributes:
label:IDF version.
description:Onwhich IDF version does this issue occur on? Run `git describe --tags` to find it.
placeholder:ex. v3.2-dev-1148-g96cd3b75c
validations:
required:true
- type:textarea
id:more-info
attributes:
label:More Information.
description:Do you have any other information from investigating this?
placeholder:ex. I tried on my friend's Windows 10 PC and the command works there.
description:Suggest an idea or new component for this project.
labels: ['Type:Feature Request']
body:
- type:markdown
attributes:
value:|
* We welcome any ideas or feature requests! It’s helpful if you can explain exactly why the feature would be useful.
* There are usually some outstanding feature requests in the [existing issues list](https://github.com/espressif/esp-protocols/labels/Type%3A%20Feature%20Request), feel free to add comments to them.
- type:textarea
id:problem-related
attributes:
label:Is your feature request related to a problem?
description:Please provide a clear and concise description of what the problem is.
placeholder:ex. I'm always frustrated when ...
- type:textarea
id:solution
attributes:
label:Describe the solution you'd like.
description:Please provide a clear and concise description of what you want to happen.
placeholder:ex. When building my application ...
- type:textarea
id:alternatives
attributes:
label:Describe alternatives you've considered.
description:Please provide a clear and concise description of any alternative solutions or features you've considered.
placeholder:ex. Choosing other approach wouldn't work, because ...
- type:textarea
id:context
attributes:
label:Additional context.
description:Please add any other context or screenshots about the feature request here.
description:Before submitting a new issue, please follow the checklist and try to find the answer.
options:
- label:I have read the documentation for esp-protocols [components](https://github.com/espressif/esp-protocols#readme) and the issue is not addressed there.
required:true
- label:I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
required:true
- label:I have searched the issue tracker for a similar issue and not found a similar issue.
Contributions in the form of pull requests, issue reports, and feature requests are welcome!
## Common Terminology:
* [Type]: Examples include feat (for new features), fix (for bug fixes), ci (for continuous integration), bump (for version updates), etc. You can find a comprehensive list of types in .pre-commit-config.yaml on line 65.
* [Scope]: Refers to specific sections or areas within the project, such as mdns, modem, common, console, etc. You can discover additional scopes in .pre-commit-config.yaml on line 65.
* [Component]: This is the name of the component, and it should match the directory name where the component code is located.
## Submitting a PR
- [ ] Fork the [esp-protocols repository on GitHub](https://github.com/espressif/esp-protocols) to start making your changes.
- [ ] Send a pull request (PR) and work with us until it gets merged and published. Contributions may need some modifications, so a few rounds of review and fixing may be necessary.
For quick merging, the contribution should be short, and concentrated on a single feature or topic. The larger the contribution is, the longer it would take to review it and merge it.
Please follow the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) rule when writing commit messages.
2. Run the following command to bump the version of the component:
`ci/bump [component] [version] --bump-message "bump([scope]): First version [version]"`
Replace [component], [version] and [scope] with the specific component name, version and scope you are working with. This command will help you bump the version of the component with the provided details.
Note: It is crucial to adhere to the above steps when introducing a new component. Never merge the code for a new component without first implementing a bump commit.
## Release process
When releasing a new component version we have to:
* Update the version number
* Update the changelog
* Create the version tag in this repository
* Deploy the component to component registry
* Update the documentation
This process is not fully automated, the first step needs to be performed manually by project maintainers running the `bump` command. Release procedure is as follows:
* Run `ci/bump [component] [version]` (version number is optional, `cz` would automatically increment it if not present)
* Check the updated `CHANGELOG.md` and the generated bump commit message
* Create a PR
Once the PR is merged, the CI job tags the merge commit, creates a new release, builds and deploys documentation and the new component to the component registry
[Documentation of esp-protocol](https://espressif.github.io/esp-protocols)
## How to use
The [ESP-Protocols](https://github.com/espressif/esp-protocols) repository contains a collection of protocol components for [ESP-IDF](https://github.com/espressif/esp-idf).
Additionally, each component is available in [IDF Component Registry](https://components.espressif.com).
Please refer to instructions in [ESP-IDF](https://github.com/espressif/esp-idf)
- ASIO: Initial version based on IDF 5.0 with history ([055f051](https://github.com/espressif/esp-protocols/commit/055f051))
- asio: Disable concepts support Fix example for compatibility with C++20 ([ac7bf46](https://github.com/espressif/esp-protocols/commit/ac7bf46), [IDF@9dba047](https://github.com/espressif/esp-idf/commit/9dba0476a01cd80d76e21706ad350009606b877e))
- lwip: Update socket API to include port-version of sockets/netdb ([057a5d2](https://github.com/espressif/esp-protocols/commit/057a5d2), [IDF@53c009e](https://github.com/espressif/esp-idf/commit/53c009e62631bae569fa849c6b6c9e70a10b3afe))
- esp_netif/lwip: Implement basic support for vanilla-lwip (2.1.3-REL) ([63bff63](https://github.com/espressif/esp-protocols/commit/63bff63), [IDF@5b471a1](https://github.com/espressif/esp-idf/commit/5b471a18489b056f65fe8dcbb2c992d27909ebc9))
- mbedtls: Remove certs.c and certs.h from port directory ([e3c4391](https://github.com/espressif/esp-protocols/commit/e3c4391), [IDF@f31d8dd](https://github.com/espressif/esp-idf/commit/f31d8dd2955be0fe949340dcf3b043ec6daf4378))
- mbedtls-3 update: 1) Fix build issue in mbedtls 2) skip the public headers check in IDF 3)Update Kconfig Macros 4)Remove deprecated config options 5) Update the sha API according to new nomenclature 6) Update mbedtls_rsa_init usage 7) Include mbedtls/build_info.h instead of mbedtls/config.h 8) Dont include check_config.h 9) Add additional error message in esp_blufi_api.h ([9813818](https://github.com/espressif/esp-protocols/commit/9813818), [IDF@4512253](https://github.com/espressif/esp-idf/commit/45122533e0bca5d538585e22308f14b74c33e474))
- asio: Use internal ssl context and engine impl ([f605fdd](https://github.com/espressif/esp-protocols/commit/f605fdd), [IDF@d823106](https://github.com/espressif/esp-idf/commit/d823106aa6b24b8bdcc30373513c8688c61438c4))
- Build & config: Remove leftover files from the unsupported "make" build system ([abbc8d9](https://github.com/espressif/esp-protocols/commit/abbc8d9), [IDF@766aa57](https://github.com/espressif/esp-idf/commit/766aa5708443099f3f033b739cda0e1de101cca6))
- openssl: Add deprecation warning to ssl.h ([a029774](https://github.com/espressif/esp-protocols/commit/a029774), [IDF@cfc0018](https://github.com/espressif/esp-idf/commit/cfc001870c5e0afed7b42b6bf8c326eae053fe96))
- asio coap: If LWIP IPV6 is disabled, automatically don't build asio & coap ([cc0f2b3](https://github.com/espressif/esp-protocols/commit/cc0f2b3), [IDF@e305f29](https://github.com/espressif/esp-idf/commit/e305f2938278c2a39e75c21a3ed59d8f4d4e62fa))
- asio: option to use wolfSSL as TLS stack for ASIO ([c05558b](https://github.com/espressif/esp-protocols/commit/c05558b), [IDF@1c8171c](https://github.com/espressif/esp-idf/commit/1c8171c3e8d5a67e47dc8d6abac27ad2989470c3))
- asio: Basic SSL/TLS support in asio port for ESP platform ([dab1230](https://github.com/espressif/esp-protocols/commit/dab1230), [IDF@9459c0d](https://github.com/espressif/esp-idf/commit/9459c0dd432fdd0fccb49ea65bb5c72d1849e1ba))
- asio: updated ASIO port to use latest asio and esp-idf features ([9190917](https://github.com/espressif/esp-protocols/commit/9190917), [IDF@13d603e](https://github.com/espressif/esp-idf/commit/13d603e486624380d49f2e89614b10425c208d14))
- components: use new component registration api ([9e83b1e](https://github.com/espressif/esp-protocols/commit/9e83b1e), [IDF@9eccd7c](https://github.com/espressif/esp-idf/commit/9eccd7c0826d6cc2e9de59304d1e5f76c0063ccf))
- cmake: make main a component again ([57672d5](https://github.com/espressif/esp-protocols/commit/57672d5), [IDF@d9939ce](https://github.com/espressif/esp-idf/commit/d9939cedd9b44d63dc148354c3a0a139b9c7113d))
- asio: initial idf port of asio library without ssl ([5472d5c](https://github.com/espressif/esp-protocols/commit/5472d5c), [IDF@1ef13c5](https://github.com/espressif/esp-idf/commit/1ef13c524c484e9fb62e6c0b11482c30c5383728))
Contributions in the form of pull requests, issue reports, and feature requests are welcome!
## Updating ASIO
ASIO is managed as a submodule, to updated the version first the [espressif](github.com/espressif/asio) ASIO fork must be updated.
## Release process
When releasing a new component version we have to:
* Update the submodule reference
* Update the version number
* Update the changelog
And the automation process takes care of the last steps:
* Create the version tag in this repository
* Deploy the component to component registry
* Update the documentation
This process needs to be manually handled for ASIO component since commitizen doesn't accept the versioning schema used.
* Increment manually the version in the [manifest file](idf_component.yml)
* Export environment variables for changelog generation:
- CZ_PRE_CURRENT_TAG_VERSION
- CZ_PRE_NEW_TAG_VERSION
- CZ_PRE_NEW_VERSION
* Run `python ../../ci/changelog.py asio` from this directory to generate the change log
* Check the updated `CHANGELOG.md`
* Commit the changes with the adequated message format.
```
bump(asio): $current_version -> $new_version
$Changelog for the version
```
* Create a PR
Once the PR is merged, the CI job tags the merge commit, creates a new release, builds and deploys documentation and the new component to the component registry
# Leave some room for larger apps without needing to reduce other features
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.