Compare commits

..

14 Commits

Author SHA1 Message Date
7c5a832821 Merge pull request #411 from gabsuren/bump_mdns_2
bump(mdns): 1.2.1 -> 1.2.2
2023-11-01 15:15:41 +04:00
0bb72f29be bump(mdns): 1.2.1 -> 1.2.2
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)
2023-11-01 13:27:40 +04:00
ebdac9cc01 Merge pull request #409 from zwx1995esp/fix/mdns_host_name_get
fix(mdns): add terminator for the getting host name
2023-11-01 13:25:15 +04:00
df04b14e2b Merge pull request #386 from gabsuren/fix/mdns_config_issue_2
Enable ESP_WIFI_CONFIG when ESP-IDF <= 5.1 (IDFGH-11221)
2023-10-31 16:11:51 +04:00
zwx
b6a4d94ab0 fix(mdns): add terminator for the getting host name 2023-10-31 19:45:35 +08:00
418791cf79 Merge pull request #408 from euripedesrocha/asio_docs_review
Updates asio docs
2023-10-31 12:08:20 +01:00
ce9337d332 docs(asio): Updates asio docs
- Removes mention to WolfSSL
- Fix links to examples
- Fix diagram markdwon.
2023-10-31 09:24:38 +01:00
0b783c01dd fix(mdns): Enable ESP_WIFI_CONFIG when ESP-IDF <= 5.1 2023-10-30 13:34:51 +04:00
425931a808 Merge pull request #407 from david-cermak/bump/modem_1.0.4
bump(modem): 1.0.3 -> 1.0.4
2023-10-30 09:42:35 +01:00
1b94554f1f bump(modem): 1.0.3 -> 1.0.4
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)
2023-10-30 07:30:47 +01:00
924f28e9c4 Merge pull request #373 from david-cermak/fix/at_client
fix(modem): Fix AT client example to use custom AT processing
2023-10-30 07:06:29 +01:00
6a74971d4b Merge pull request #395 from david-cermak/fix/modem_at_client_docs
fix(modem): Extend docs on AT client example
2023-10-30 07:06:05 +01:00
1f2ceedec5 fix(modem): Extend docs on AT client example 2023-10-23 17:08:39 +02:00
1a5ba98964 fix(modem): Fix AT client example to use custom AT processing
Need the callback reset upon removal of our custom AT command processing.
This issue has been introduced in cb6e03ac when refactoring DTE
callbacks.

Closes https://github.com/espressif/esp-protocols/issues/352
2023-10-09 17:49:15 +02:00
13 changed files with 61 additions and 14 deletions

View File

@ -25,6 +25,7 @@ The control of lifetime of the class, done by `std::shared_ptr` usage, guarantee
async operations until it's not needed any more. This makes necessary that all of the async operation class must start
its lifetime as a `std::shared_ptr` due to the usage of `std::enable_shared_from_this`.
```
User creates a shared_ptr──┐
of AddressResolution and │
@ -47,6 +48,7 @@ its lifetime as a `std::shared_ptr` due to the usage of `std::enable_shared_from
is called. │
└────►Completion Handler()
```
The previous diagram shows the process and the life span of each of the tasks in this examples. At each stage the
object responsible for the last action inject itself to the completion handler of the next stage for reuse.

View File

@ -3,6 +3,6 @@ commitizen:
bump_message: 'bump(modem): $current_version -> $new_version'
pre_bump_hooks: python ../../ci/changelog.py esp_modem
tag_format: modem-v$version
version: 1.0.3
version: 1.0.4
version_files:
- idf_component.yml

View File

@ -1,5 +1,16 @@
# Changelog
## [1.0.4](https://github.com/espressif/esp-protocols/commits/modem-v1.0.4)
### Bug Fixes
- Added USB runner with ESP32S2 with A7670 ([edeb936](https://github.com/espressif/esp-protocols/commit/edeb936))
- Extend docs on AT client example ([1f2ceed](https://github.com/espressif/esp-protocols/commit/1f2ceed))
- Fix pytest exclusion, gitignore, and changelog checks ([2696221](https://github.com/espressif/esp-protocols/commit/2696221))
- Fix DTE to post fragments to parsers for USB term ([1db1e15](https://github.com/espressif/esp-protocols/commit/1db1e15))
- Fix DUAL_MODE regression from cb6e03ac ([2aada0f](https://github.com/espressif/esp-protocols/commit/2aada0f))
- Fix AT client example to use custom AT processing ([1a5ba98](https://github.com/espressif/esp-protocols/commit/1a5ba98), [#352](https://github.com/espressif/esp-protocols/issues/352))
## [1.0.3](https://github.com/espressif/esp-protocols/commits/modem-v1.0.3)
### Bug Fixes

View File

@ -9,6 +9,20 @@ This example could be used in two different configurations:
1) Custom TCP transport: Implements a TCP transport in form of AT commands and uses it as custom transport for mqtt client.
2) Localhost listener: Uses standard transports to connect and forwards socket layer data from the client to the modem using AT commands.
### Custom TCP transport
This configuration expects that the network library, that is used to communicate with the endpoint uses `tcp_transport` component. In this example, we use `esp-mqtt` which supports custom transports so that we can implement a transport layer that communicate on TCP layer using AT commands. If we want to use TLS, we could add an SSL layer on top of this TCP layer.
To enable this mode, please set `EXAMPLE_CUSTOM_TCP_TRANSPORT=y`
![with custom tcp transport](at_client_tcp_transport.png)
### Localhost listener
This configuration could be used with any network library, which is connecting to a localhost endpoint instead of remote one. This example creates a localhost listener which basically mimics the remote endpoint by forwarding the traffic between the library and the TCP/socket layer of the modem (which is already secure if the TLS is used in the network library)
![with localhost listener](at_client_localhost.png)
### Supported IDF versions
This example is supported from IDF `v5.0`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

View File

@ -1,4 +1,4 @@
version: "1.0.3"
version: "1.0.4"
description: esp modem
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_modem
dependencies:

View File

@ -313,6 +313,7 @@ void DTE::on_read(got_line_cb on_read_cb)
if (on_read_cb == nullptr) {
primary_term->set_read_cb(nullptr);
internal_lock.unlock();
set_command_callbacks();
return;
}
internal_lock.lock();

View File

@ -3,6 +3,6 @@ commitizen:
bump_message: 'bump(mdns): $current_version -> $new_version'
pre_bump_hooks: python ../../ci/changelog.py mdns
tag_format: mdns-v$version
version: 1.2.1
version: 1.2.2
version_files:
- idf_component.yml

View File

@ -1,5 +1,15 @@
# Changelog
## [1.2.2](https://github.com/espressif/esp-protocols/commits/mdns-v1.2.2)
### Bug Fixes
- add terminator for the getting host name ([b6a4d94](https://github.com/espressif/esp-protocols/commit/b6a4d94))
- Enable ESP_WIFI_CONFIG when ESP-IDF <= 5.1 ([0b783c0](https://github.com/espressif/esp-protocols/commit/0b783c0))
- set host list NULL on destroy ([ea54eef](https://github.com/espressif/esp-protocols/commit/ea54eef))
- removed Wno-format flag and fixed formatting warnings ([c48e442](https://github.com/espressif/esp-protocols/commit/c48e442))
- remove the the range of MDNS_MAX_SERVICES and fix issues of string functions ([3dadce2](https://github.com/espressif/esp-protocols/commit/3dadce2))
## [1.2.1](https://github.com/espressif/esp-protocols/commits/mdns-v1.2.1)
### Features

View File

@ -1,4 +1,4 @@
version: "1.2.1"
version: "1.2.2"
description: mDNS
url: https://github.com/espressif/esp-protocols/tree/master/components/mdns
dependencies:

View File

@ -25,6 +25,12 @@
#include "esp_wifi.h"
#endif
#if ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(5, 1, 0)
// IDF <= v5.1 does not support enabling/disabling esp-wifi
#define MDNS_ESP_WIFI_ENABLED 1
#else
#define MDNS_ESP_WIFI_ENABLED CONFIG_ESP_WIFI_ENABLED
#endif
#ifdef MDNS_ENABLE_DEBUG
void mdns_debug_packet(const uint8_t *data, size_t len);
@ -4158,7 +4164,7 @@ void mdns_preset_if_handle_system_event(void *arg, esp_event_base_t event_base,
}
esp_netif_dhcp_status_t dcst;
#if CONFIG_ESP_WIFI_ENABLED
#if MDNS_ESP_WIFI_ENABLED
if (event_base == WIFI_EVENT) {
switch (event_id) {
case WIFI_EVENT_STA_CONNECTED:
@ -5360,7 +5366,7 @@ static inline void set_default_duplicated_interfaces(void)
static inline void unregister_predefined_handlers(void)
{
#if defined(CONFIG_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
#if defined(MDNS_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event);
#endif
#if CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP || CONFIG_MDNS_PREDEF_NETIF_ETH
@ -5457,7 +5463,7 @@ esp_err_t mdns_init(void)
goto free_queue;
}
#if defined(CONFIG_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
#if defined(MDNS_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
if ((err = esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event, NULL)) != ESP_OK) {
goto free_event_handlers;
}
@ -5607,7 +5613,9 @@ esp_err_t mdns_hostname_get(char *hostname)
}
MDNS_SERVICE_LOCK();
strncpy(hostname, _mdns_server->hostname, strnlen(_mdns_server->hostname, MDNS_NAME_BUF_LEN));
size_t len = strnlen(_mdns_server->hostname, MDNS_NAME_BUF_LEN - 1);
strncpy(hostname, _mdns_server->hostname, len);
hostname[len] = 0;
MDNS_SERVICE_UNLOCK();
return ESP_OK;
}

View File

@ -17,7 +17,6 @@ ESP platform port currently supports only network asynchronous socket operations
SSL/TLS support is disabled by default and could be enabled in component configuration menu by choosing TLS library from
- mbedTLS with OpenSSL translation layer (default option)
- wolfSSL
SSL support is very basic at this stage and it does include following features:
@ -32,11 +31,13 @@ Internal asio settings for ESP include
Application Example
-------------------
ESP examples are based on standard asio :example:`examples <../examples>`:
ESP examples are based on standard asio :example:`examples <../../../components/asio/examples>`:
- :example:`udp_echo_server <../examples/udp_echo_server>`
- :example:`tcp_echo_server <../examples/tcp_echo_server>`
- :example:`asio_chat <../examples/asio_chat>`
- :example:`ssl_client_server <../examples/ssl_client_server>`
- :example:`asio_chat <../../../components/asio/examples/asio_chat>`
- :example:`async_request <../../../components/asio/examples/async_request>`
- :example:`socks4 <../../../components/asio/examples/socks4>`
- :example:`ssl_client_server <../../../components/asio/examples/ssl_client_server>`
- :example:`tcp_echo_server <../../../components/asio/examples/tcp_echo_server>`
- :example:`udp_echo_server <../../../components/asio/examples/udp_echo_server>`
Please refer to the specific example README.md for details