Compare commits

...

6 Commits

Author SHA1 Message Date
44bae24c78 esp_modem: Return true from on_data callback in data mode
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.
2023-02-23 20:32:13 +01:00
02be2b76f8 Merge pull request #227 from gabsuren/docs/mdns_document_link_fix
docs: fix of mdns link translation
2023-02-20 16:19:30 +04:00
1c850ddacf docs: fix of mdns link translation 2023-02-20 16:11:24 +04:00
9ae88aab48 Merge pull request #223 from AndriiFilippov/master
Unite all tags under common structure (IDFGH-9399)
2023-02-17 15:08:18 +01:00
c6db3ea84c unite all tags under common structure
py test: update tags under common structure
2023-02-17 14:27:34 +01:00
b23eedac3a Merge pull request #189 from euripedesrocha/master
Adds esp_mqtt_cxx component
2023-02-16 06:17:08 -03:00
14 changed files with 21 additions and 23 deletions

View File

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

View File

@ -87,7 +87,7 @@ void Netif::start()
{
ppp_dte->set_read_cb([this](uint8_t *data, size_t len) -> bool {
receive(data, len);
return false;
return true;
});
esp_netif_action_start(driver.base.netif, nullptr, 0, nullptr);
signal.set(PPP_STARTED);

View File

@ -39,7 +39,7 @@ void Netif::start()
{
ppp_dte->set_read_cb([this](uint8_t *data, size_t len) -> bool {
receive(data, len);
return false;
return true;
});
netif->transmit = esp_modem_dte_transmit;
netif->ctx = (void *)this;

View File

@ -125,9 +125,7 @@ void UartTerminal::task()
case UART_DATA:
uart_get_buffered_data_len(uart.port, &len);
if (len && on_read) {
if (on_read(nullptr, len)) {
on_read = nullptr;
}
on_read(nullptr, len);
}
break;
case UART_FIFO_OVF:

View File

@ -20,7 +20,7 @@
#include "esp_timer.h"
#include "esp_tls_crypto.h"
static const char *TAG = "WEBSOCKET_CLIENT";
static const char *TAG = "websocket_client";
#define WEBSOCKET_TCP_DEFAULT_PORT (80)
#define WEBSOCKET_SSL_DEFAULT_PORT (443)

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
@ -32,7 +32,7 @@
#define NO_DATA_TIMEOUT_SEC 5
static const char *TAG = "WEBSOCKET";
static const char *TAG = "websocket";
static TimerHandle_t shutdown_signal_timer;
static SemaphoreHandle_t shutdown_sema;
@ -154,9 +154,9 @@ void app_main(void)
ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size());
ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version());
esp_log_level_set("*", ESP_LOG_INFO);
esp_log_level_set("WEBSOCKET_CLIENT", ESP_LOG_DEBUG);
esp_log_level_set("TRANSPORT_WS", ESP_LOG_DEBUG);
esp_log_level_set("TRANS_TCP", ESP_LOG_DEBUG);
esp_log_level_set("websocket_client", ESP_LOG_DEBUG);
esp_log_level_set("transport_ws", ESP_LOG_DEBUG);
esp_log_level_set("trans_tcp", ESP_LOG_DEBUG);
ESP_ERROR_CHECK(nvs_flash_init());
ESP_ERROR_CHECK(esp_netif_init());

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0
import json
import random
@ -81,7 +81,7 @@ def test_examples_protocol_websocket(dut):
def test_close(dut):
code = dut.expect(
re.compile(
b'WEBSOCKET: Received closed message with code=(\\d*)'))[0]
b'websocket: Received closed message with code=(\\d*)'))[0]
print('Received close frame with code {}'.format(code))
def test_json(dut, websocket):

View File

@ -1,6 +1,6 @@
mDNS Service
============
:link_to_translation:`zh_CN:[中文]`
`zh_CN:[中文] <https://espressif.github.io/esp-protocols/mdns/zh_CN/index.html>`_
Overview
--------

View File

@ -1,6 +1,6 @@
mDNS 服务
=========
:link_to_translation:`en:[English]`
`en:[English] <https://espressif.github.io/esp-protocols/mdns/en/index.html>`_
概述
----

View File

@ -45,7 +45,7 @@ mdns_server_t *_mdns_server = NULL;
static mdns_host_item_t *_mdns_host_list = NULL;
static mdns_host_item_t _mdns_self_host;
static const char *TAG = "MDNS";
static const char *TAG = "mdns";
static volatile TaskHandle_t _mdns_service_task_handle = NULL;
static SemaphoreHandle_t _mdns_service_semaphore = NULL;

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -27,7 +27,7 @@ extern mdns_server_t *_mdns_server;
* MDNS Server Networking
*
*/
static const char *TAG = "MDNS_Networking";
static const char *TAG = "mdns_networking";
static struct udp_pcb *_pcb_main = NULL;

View File

@ -29,7 +29,7 @@
extern mdns_server_t *_mdns_server;
static const char *TAG = "MDNS_Networking";
static const char *TAG = "mdns_networking";
static bool s_run_sock_recv_task = false;
static int create_socket(esp_netif_t *netif);
static int join_mdns_multicast_group(int sock, esp_netif_t *netif, mdns_ip_protocol_t ip_protocol);

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -13,7 +13,7 @@
#include "protocol_examples_common.h"
#include "mdns.h"
static const char *TAG = "MDNS_TEST";
static const char *TAG = "mdns_test";
void mdns_test(char *line);
static void get_string(char *line, size_t size)

View File

@ -10,7 +10,7 @@
#include "esp_log.h"
#include "esp_netif.h"
static const char *TAG = "MDNS_TEST_APP";
static const char *TAG = "mdns_test_app";
static const int RETRY_COUNT = 10;
static void mdns_print_results(mdns_result_t *results)