diff --git a/components/ota_server/CMakeLists.txt b/components/ota_server/CMakeLists.txt index df33e34..98bb8b9 100644 --- a/components/ota_server/CMakeLists.txt +++ b/components/ota_server/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRCS "ota_server.c" INCLUDE_DIRS "include" - REQUIRES app_update dsp_processor wifi_interface lightsnapcast wifi_logger) + REQUIRES app_update dsp_processor wifi_interface lightsnapcast) diff --git a/components/ota_server/ota_server.c b/components/ota_server/ota_server.c index e31458a..27e6558 100644 --- a/components/ota_server/ota_server.c +++ b/components/ota_server/ota_server.c @@ -22,8 +22,6 @@ #include "ota_server.h" -#include "wifi_logger.h" - extern xTaskHandle t_http_get_task; const int OTA_CONNECTED_BIT = BIT0; @@ -196,7 +194,6 @@ ota_server_start_my (void) // dsp_i2s_task_deinit(); vTaskDelete (t_http_get_task); deinit_player (); // ensure this is called after http_task was killed - stop_wifi_logger (); int recv_len; char ota_buff[OTA_BUFF_SIZE] = { 0 }; diff --git a/components/protocol_examples_common/CMakeLists.txt b/components/protocol_examples_common/CMakeLists.txt deleted file mode 100644 index 357e064..0000000 --- a/components/protocol_examples_common/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -idf_component_register(SRCS "connect.c" "stdin_out.c" "addr_from_stdin.c" - INCLUDE_DIRS "include" - PRIV_REQUIRES esp_netif wifi_interface - ) diff --git a/components/protocol_examples_common/Kconfig.projbuild b/components/protocol_examples_common/Kconfig.projbuild deleted file mode 100644 index eccf778..0000000 --- a/components/protocol_examples_common/Kconfig.projbuild +++ /dev/null @@ -1,218 +0,0 @@ -menu "Example Connection Configuration" - - config EXAMPLE_CONNECT_WIFI - bool "connect using WiFi interface" - default y - help - Protocol examples can use Wi-Fi and/or Ethernet to connect to the network. - Choose this option to connect with WiFi - - if EXAMPLE_CONNECT_WIFI - config EXAMPLE_WIFI_SSID - string "WiFi SSID" - default "myssid" - help - SSID (network name) for the example to connect to. - - config EXAMPLE_WIFI_PASSWORD - string "WiFi Password" - default "mypassword" - help - WiFi password (WPA or WPA2) for the example to use. - Can be left blank if the network has no security set. - endif - - config EXAMPLE_CONNECT_ETHERNET - bool "connect using Ethernet interface" - default n - help - Protocol examples can use Wi-Fi and/or Ethernet to connect to the network. - Choose this option to connect with Ethernet - - if EXAMPLE_CONNECT_ETHERNET - choice EXAMPLE_USE_ETHERNET - prompt "Ethernet Type" - default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32 - default EXAMPLE_USE_DM9051 if !IDF_TARGET_ESP32 - help - Select which kind of Ethernet will be used in the example. - - config EXAMPLE_USE_INTERNAL_ETHERNET - depends on IDF_TARGET_ESP32 - select ETH_USE_ESP32_EMAC - bool "Internal EMAC" - help - Select internal Ethernet MAC controller. - - config EXAMPLE_USE_DM9051 - bool "DM9051 Module" - select ETH_USE_SPI_ETHERNET - select ETH_SPI_ETHERNET_DM9051 - help - Select external SPI-Ethernet module. - - config EXAMPLE_USE_OPENETH - bool "OpenCores Ethernet MAC (EXPERIMENTAL)" - select ETH_USE_OPENETH - help - When this option is enabled, the example is built with support for - OpenCores Ethernet MAC, which allows testing the example in QEMU. - Note that this option is used for internal testing purposes, and - not officially supported. Examples built with this option enabled - will not run on a real ESP32 chip. - - endchoice - - if EXAMPLE_USE_INTERNAL_ETHERNET - choice EXAMPLE_ETH_PHY_MODEL - prompt "Ethernet PHY Device" - default EXAMPLE_ETH_PHY_IP101 - help - Select the Ethernet PHY device to use in the example. - - config EXAMPLE_ETH_PHY_IP101 - bool "IP101" - help - IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver. - Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it. - - config EXAMPLE_ETH_PHY_RTL8201 - bool "RTL8201/SR8201" - help - RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX. - Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it. - - config EXAMPLE_ETH_PHY_LAN8720 - bool "LAN8720" - help - LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support. - Goto https://www.microchip.com/LAN8720A for more information about it. - - config EXAMPLE_ETH_PHY_DP83848 - bool "DP83848" - help - DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver. - Goto http://www.ti.com/product/DP83848J for more information about it. - endchoice - - config EXAMPLE_ETH_MDC_GPIO - int "SMI MDC GPIO number" - default 23 - help - Set the GPIO number used by SMI MDC. - - config EXAMPLE_ETH_MDIO_GPIO - int "SMI MDIO GPIO number" - default 18 - help - Set the GPIO number used by SMI MDIO. - endif - - if EXAMPLE_USE_DM9051 - config EXAMPLE_DM9051_SPI_HOST - int "SPI Host Number" - range 0 2 - default 1 - help - Set the SPI host used to communicate with DM9051. - - config EXAMPLE_DM9051_SCLK_GPIO - int "SPI SCLK GPIO number" - range 0 33 - default 19 - help - Set the GPIO number used by SPI SCLK. - - config EXAMPLE_DM9051_MOSI_GPIO - int "SPI MOSI GPIO number" - range 0 33 - default 23 - help - Set the GPIO number used by SPI MOSI. - - config EXAMPLE_DM9051_MISO_GPIO - int "SPI MISO GPIO number" - range 0 33 - default 25 - help - Set the GPIO number used by SPI MISO. - - config EXAMPLE_DM9051_CS_GPIO - int "SPI CS GPIO number" - range 0 33 - default 22 - help - Set the GPIO number used by SPI CS. - - config EXAMPLE_DM9051_SPI_CLOCK_MHZ - int "SPI clock speed (MHz)" - range 20 80 - default 20 - help - Set the clock speed (MHz) of SPI interface. - - config EXAMPLE_DM9051_INT_GPIO - int "Interrupt GPIO number" - default 4 - help - Set the GPIO number used by DM9051 interrupt. - endif - - config EXAMPLE_ETH_PHY_RST_GPIO - int "PHY Reset GPIO number" - default 5 - help - Set the GPIO number used to reset PHY chip. - Set to -1 to disable PHY chip hardware reset. - - config EXAMPLE_ETH_PHY_ADDR - int "PHY Address" - range 0 31 if EXAMPLE_USE_INTERNAL_ETHERNET - range 1 1 if !EXAMPLE_USE_INTERNAL_ETHERNET - default 1 - help - Set PHY address according your board schematic. - endif - - config EXAMPLE_CONNECT_IPV6 - bool "Obtain IPv6 address" - default y - help - By default, examples will wait until IPv4 and IPv6 local link addresses are obtained. - Disable this option if the network does not support IPv6. - Choose the preferred IPv6 address type if the connection code should wait until other than - the local link address gets assigned. - - if EXAMPLE_CONNECT_IPV6 - choice EXAMPLE_CONNECT_PREFERRED_IPV6 - prompt "Preferred IPv6 Type" - default EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK - help - Select which kind of IPv6 address the connect logic waits for. - - config EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK - bool "Local Link Address" - help - Blocks until Local link address assigned. - - config EXAMPLE_CONNECT_IPV6_PREF_GLOBAL - bool "Global Address" - help - Blocks until Global address assigned. - - config EXAMPLE_CONNECT_IPV6_PREF_SITE_LOCAL - bool "Site Local Address" - help - Blocks until Site link address assigned. - - config EXAMPLE_CONNECT_IPV6_PREF_UNIQUE_LOCAL - bool "Unique Local Link Address" - help - Blocks until Unique local address assigned. - - endchoice - - endif - - -endmenu diff --git a/components/protocol_examples_common/addr_from_stdin.c b/components/protocol_examples_common/addr_from_stdin.c deleted file mode 100644 index a01c010..0000000 --- a/components/protocol_examples_common/addr_from_stdin.c +++ /dev/null @@ -1,75 +0,0 @@ -#include "esp_log.h" -#include "esp_netif.h" -#include "esp_system.h" -#include "protocol_examples_common.h" -#include - -#include "lwip/sockets.h" -#include -#include - -#define HOST_IP_SIZE 128 - -esp_err_t -get_addr_from_stdin (int port, int sock_type, int *ip_protocol, - int *addr_family, struct sockaddr_in6 *dest_addr) -{ - char host_ip[HOST_IP_SIZE]; - int len; - static bool already_init = false; - - // this function could be called multiple times -> make sure UART init runs - // only once - if (!already_init) - { - example_configure_stdin_stdout (); - already_init = true; - } - - // ignore empty or LF only string (could receive from DUT class) - do - { - fgets (host_ip, HOST_IP_SIZE, stdin); - len = strlen (host_ip); - } - while (len <= 1 && host_ip[0] == '\n'); - host_ip[len - 1] = '\0'; - - struct addrinfo hints, *addr_list, *cur; - memset (&hints, 0, sizeof (hints)); - - // run getaddrinfo() to decide on the IP protocol - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = sock_type; - hints.ai_protocol = IPPROTO_TCP; - if (getaddrinfo (host_ip, NULL, &hints, &addr_list) != 0) - { - return ESP_FAIL; - } - for (cur = addr_list; cur != NULL; cur = cur->ai_next) - { - memcpy (dest_addr, cur->ai_addr, sizeof (*dest_addr)); - if (cur->ai_family == AF_INET) - { - *ip_protocol = IPPROTO_IP; - *addr_family = AF_INET; - // add port number and return on first IPv4 match - ((struct sockaddr_in *)dest_addr)->sin_port = htons (port); - freeaddrinfo (addr_list); - return ESP_OK; - } - // else if (cur->ai_family == AF_INET6) { - // *ip_protocol = IPPROTO_IPV6; - // *addr_family = AF_INET6; - // // add port and interface number and return on first IPv6 - // match dest_addr->sin6_port = htons(port); - // dest_addr->sin6_scope_id = - // esp_netif_get_netif_impl_index(EXAMPLE_INTERFACE); - // freeaddrinfo( addr_list ); - // return ESP_OK; - // } - } - // no match found - freeaddrinfo (addr_list); - return ESP_FAIL; -} diff --git a/components/protocol_examples_common/component.mk b/components/protocol_examples_common/component.mk deleted file mode 100644 index e69de29..0000000 diff --git a/components/protocol_examples_common/connect.c b/components/protocol_examples_common/connect.c deleted file mode 100644 index b3b24b2..0000000 --- a/components/protocol_examples_common/connect.c +++ /dev/null @@ -1,488 +0,0 @@ -/* Common functions for protocol examples, to establish Wi-Fi or Ethernet - connection. - - This example code is in the Public Domain (or CC0 licensed, at your option.) - - Unless required by applicable law or agreed to in writing, this - software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. - */ - -#include "esp_event.h" -#include "esp_wifi.h" -#include "esp_wifi_default.h" -#include "protocol_examples_common.h" -#include "sdkconfig.h" -#include -#if CONFIG_EXAMPLE_CONNECT_ETHERNET -#include "esp_eth.h" -#endif -#include "driver/gpio.h" -#include "esp_log.h" -#include "esp_netif.h" -#include "freertos/FreeRTOS.h" -#include "freertos/event_groups.h" -#include "freertos/task.h" -#include "lwip/err.h" -#include "lwip/sys.h" -#include "wifi_interface.h" - -#ifdef CONFIG_EXAMPLE_CONNECT_IPV6 -#define MAX_IP6_ADDRS_PER_NETIF (5) -#define NR_OF_IP_ADDRESSES_TO_WAIT_FOR (s_active_interfaces * 2) - -#if defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK) -#define EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE ESP_IP6_ADDR_IS_LINK_LOCAL -#elif defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_GLOBAL) -#define EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE ESP_IP6_ADDR_IS_GLOBAL -#elif defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_SITE_LOCAL) -#define EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE ESP_IP6_ADDR_IS_SITE_LOCAL -#elif defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_UNIQUE_LOCAL) -#define EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE ESP_IP6_ADDR_IS_UNIQUE_LOCAL -#endif // if-elif CONFIG_EXAMPLE_CONNECT_IPV6_PREF_... - -#else -#define NR_OF_IP_ADDRESSES_TO_WAIT_FOR (s_active_interfaces) -#endif - -static int s_active_interfaces = 0; -static xSemaphoreHandle s_semph_get_ip_addrs; -static esp_ip4_addr_t s_ip_addr; -// static esp_netif_t *s_example_esp_netif = NULL; - -// extern esp_netif_t *esp_wifi_netif; - -#ifdef CONFIG_EXAMPLE_CONNECT_IPV6 -static esp_ip6_addr_t s_ipv6_addr; - -/* types of ipv6 addresses to be displayed on ipv6 events */ -static const char *s_ipv6_addr_types[] - = { "ESP_IP6_ADDR_IS_UNKNOWN", "ESP_IP6_ADDR_IS_GLOBAL", - "ESP_IP6_ADDR_IS_LINK_LOCAL", "ESP_IP6_ADDR_IS_SITE_LOCAL", - "ESP_IP6_ADDR_IS_UNIQUE_LOCAL", "ESP_IP6_ADDR_IS_IPV4_MAPPED_IPV6" }; -#endif - -static const char *TAG = "example_connect"; - -#if CONFIG_EXAMPLE_CONNECT_WIFI -static esp_netif_t *wifi_start (void); -static void wifi_stop (void); -#endif -#if CONFIG_EXAMPLE_CONNECT_ETHERNET -static esp_netif_t *eth_start (void); -static void eth_stop (void); -#endif - -/** - * @brief Checks the netif description if it contains specified prefix. - * All netifs created withing common connect component are prefixed with the - * module TAG, so it returns true if the specified netif is owned by this - * module - */ -static bool -is_our_netif (const char *prefix, esp_netif_t *netif) -{ - return strncmp (prefix, esp_netif_get_desc (netif), strlen (prefix) - 1) - == 0; -} - -/* set up connection, Wi-Fi and/or Ethernet */ -static void -start (void) -{ - -#if CONFIG_EXAMPLE_CONNECT_WIFI - esp_wifi_netif = wifi_start (); - s_active_interfaces++; -#endif - -#if CONFIG_EXAMPLE_CONNECT_ETHERNET - esp_wifi_netif = eth_start (); - s_active_interfaces++; -#endif - -#if CONFIG_EXAMPLE_CONNECT_WIFI && CONFIG_EXAMPLE_CONNECT_ETHERNET - /* if both intefaces at once, clear out to indicate that multiple netifs are - * active */ - esp_wifi_netif = NULL; -#endif - - s_semph_get_ip_addrs - = xSemaphoreCreateCounting (NR_OF_IP_ADDRESSES_TO_WAIT_FOR, 0); -} - -/* tear down connection, release resources */ -static void -stop (void) -{ -#if CONFIG_EXAMPLE_CONNECT_WIFI - wifi_stop (); - s_active_interfaces--; -#endif - -#if CONFIG_EXAMPLE_CONNECT_ETHERNET - eth_stop (); - s_active_interfaces--; -#endif -} - -static void -on_got_ip (void *arg, esp_event_base_t event_base, int32_t event_id, - void *event_data) -{ - ip_event_got_ip_t *event = (ip_event_got_ip_t *)event_data; - if (!is_our_netif (TAG, event->esp_netif)) - { - ESP_LOGW (TAG, "Got IPv4 from another interface \"%s\": ignored", - esp_netif_get_desc (event->esp_netif)); - return; - } - ESP_LOGI (TAG, "Got IPv4 event: Interface \"%s\" address: " IPSTR, - esp_netif_get_desc (event->esp_netif), - IP2STR (&event->ip_info.ip)); - memcpy (&s_ip_addr, &event->ip_info.ip, sizeof (s_ip_addr)); - xSemaphoreGive (s_semph_get_ip_addrs); -} - -#ifdef CONFIG_EXAMPLE_CONNECT_IPV6 - -static void -on_got_ipv6 (void *arg, esp_event_base_t event_base, int32_t event_id, - void *event_data) -{ - ip_event_got_ip6_t *event = (ip_event_got_ip6_t *)event_data; - if (!is_our_netif (TAG, event->esp_netif)) - { - ESP_LOGW (TAG, "Got IPv6 from another netif: ignored"); - return; - } - esp_ip6_addr_type_t ipv6_type - = esp_netif_ip6_get_addr_type (&event->ip6_info.ip); - ESP_LOGI (TAG, - "Got IPv6 event: Interface \"%s\" address: " IPV6STR ", type: %s", - esp_netif_get_desc (event->esp_netif), - IPV62STR (event->ip6_info.ip), s_ipv6_addr_types[ipv6_type]); - if (ipv6_type == EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE) - { - memcpy (&s_ipv6_addr, &event->ip6_info.ip, sizeof (s_ipv6_addr)); - xSemaphoreGive (s_semph_get_ip_addrs); - } -} - -#endif // CONFIG_EXAMPLE_CONNECT_IPV6 - -esp_err_t -example_connect (void) -{ - if (s_semph_get_ip_addrs != NULL) - { - return ESP_ERR_INVALID_STATE; - } - start (); - ESP_ERROR_CHECK (esp_register_shutdown_handler (&stop)); - // ESP_LOGI(TAG, "Waiting for IP(s)"); - // for (int i=0; idel (s_phy)); - ESP_ERROR_CHECK (s_mac->del (s_mac)); - - esp_netif_destroy (eth_netif); - esp_wifi_netif = NULL; -} - -#endif // CONFIG_EXAMPLE_CONNECT_ETHERNET - -esp_netif_t * -get_example_netif (void) -{ - return get_current_netif (); -} - -esp_netif_t * -get_example_netif_from_desc (const char *desc) -{ - esp_netif_t *netif = NULL; - char *expected_desc; - asprintf (&expected_desc, "%s: %s", TAG, desc); - while ((netif = esp_netif_next (netif)) != NULL) - { - if (strcmp (esp_netif_get_desc (netif), expected_desc) == 0) - { - free (expected_desc); - return netif; - } - } - free (expected_desc); - return netif; -} diff --git a/components/protocol_examples_common/include/addr_from_stdin.h b/components/protocol_examples_common/include/addr_from_stdin.h deleted file mode 100644 index 3a20f61..0000000 --- a/components/protocol_examples_common/include/addr_from_stdin.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Common utilities for socket address input interface: - The API get_addr_from_stdin() is mainly used by socket client examples - which read IP address from stdin (if configured). This option is typically - used in the CI, but could be enabled in the project configuration. In that - case this component is used to receive a string that is evaluated and - processed to output socket structures to open a connectio This example code - is in the Public Domain (or CC0 licensed, at your option.) - - Unless required by applicable law or agreed to in writing, this - software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. - */ - -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "lwip/sys.h" -#include -#include - - /** - * @brief Read and evaluate IP address from stdin - * - * This API reads stdin and parses the input address using getaddrinfo() - * to fill in struct sockaddr_in6 (for both IPv4 and IPv6) used to open - * a socket. IP protocol is guessed from the IP address string. - * - * @param[in] port port number of expected connection - * @param[in] sock_type expected protocol: SOCK_STREAM or SOCK_DGRAM - * @param[out] ip_protocol resultant IP protocol: IPPROTO_IP or IPPROTO_IP6 - * @param[out] addr_family resultant address family: AF_INET or AF_INET6 - * @param[out] dest_addr sockaddr_in6 structure (for both IPv4 and IPv6) - * @return ESP_OK on success, ESP_FAIL otherwise - */ - esp_err_t get_addr_from_stdin (int port, int sock_type, int *ip_protocol, - int *addr_family, - struct sockaddr_in6 *dest_addr); - -#ifdef __cplusplus -} -#endif diff --git a/components/protocol_examples_common/include/protocol_examples_common.h b/components/protocol_examples_common/include/protocol_examples_common.h deleted file mode 100644 index 6faee41..0000000 --- a/components/protocol_examples_common/include/protocol_examples_common.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Common functions for protocol examples, to establish Wi-Fi or Ethernet - connection. - - This example code is in the Public Domain (or CC0 licensed, at your option.) - - Unless required by applicable law or agreed to in writing, this - software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. - */ - -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "esp_err.h" -#include "esp_netif.h" - -#ifdef CONFIG_EXAMPLE_CONNECT_ETHERNET -#define EXAMPLE_INTERFACE get_example_netif () -#endif - -#ifdef CONFIG_EXAMPLE_CONNECT_WIFI -#define EXAMPLE_INTERFACE get_example_netif () -#endif - - /** - * @brief Configure Wi-Fi or Ethernet, connect, wait for IP - * - * This all-in-one helper function is used in protocols examples to - * reduce the amount of boilerplate in the example. - * - * It is not intended to be used in real world applications. - * See examples under examples/wifi/getting_started/ and examples/ethernet/ - * for more complete Wi-Fi or Ethernet initialization code. - * - * Read "Establishing Wi-Fi or Ethernet Connection" section in - * examples/protocols/README.md for more information about this function. - * - * @return ESP_OK on successful connection - */ - esp_err_t example_connect (void); - - /** - * Counterpart to example_connect, de-initializes Wi-Fi or Ethernet - */ - esp_err_t example_disconnect (void); - - /** - * @brief Configure stdin and stdout to use blocking I/O - * - * This helper function is used in ASIO examples. It wraps installing the - * UART driver and configuring VFS layer to use UART driver for console I/O. - */ - esp_err_t example_configure_stdin_stdout (void); - - /** - * @brief Returns esp-netif pointer created by example_connect() - * - * @note If multiple interfaces active at once, this API return NULL - * In that case the get_example_netif_from_desc() should be used - * to get esp-netif pointer based on interface description - */ - esp_netif_t *get_example_netif (void); - - /** - * @brief Returns esp-netif pointer created by example_connect() described by - * the supplied desc field - * - * @param desc Textual interface of created network interface, for example - * "sta" indicate default WiFi station, "eth" default Ethernet interface. - * - */ - esp_netif_t *get_example_netif_from_desc (const char *desc); - -#ifdef __cplusplus -} -#endif diff --git a/components/protocol_examples_common/stdin_out.c b/components/protocol_examples_common/stdin_out.c deleted file mode 100644 index b318c5b..0000000 --- a/components/protocol_examples_common/stdin_out.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Common functions for protocol examples, to configure stdin and stdout. - - This example code is in the Public Domain (or CC0 licensed, at your option.) - - Unless required by applicable law or agreed to in writing, this - software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. - */ - -#include "driver/uart.h" -#include "esp_err.h" -#include "esp_vfs_dev.h" -#include "protocol_examples_common.h" -#include "sdkconfig.h" - -esp_err_t -example_configure_stdin_stdout (void) -{ - // Initialize VFS & UART so we can use std::cout/cin - setvbuf (stdin, NULL, _IONBF, 0); - /* Install UART driver for interrupt-driven reads and writes */ - ESP_ERROR_CHECK (uart_driver_install ( - (uart_port_t)CONFIG_ESP_CONSOLE_UART_NUM, 256, 0, 0, NULL, 0)); - /* Tell VFS to use UART driver */ - esp_vfs_dev_uart_use_driver (CONFIG_ESP_CONSOLE_UART_NUM); - esp_vfs_dev_uart_port_set_rx_line_endings (CONFIG_ESP_CONSOLE_UART_NUM, - ESP_LINE_ENDINGS_CR); - /* Move the caret to the beginning of the next line on '\n' */ - esp_vfs_dev_uart_port_set_tx_line_endings (CONFIG_ESP_CONSOLE_UART_NUM, - ESP_LINE_ENDINGS_CRLF); - return ESP_OK; -} diff --git a/components/wifi_logger b/components/wifi_logger deleted file mode 160000 index 23bf246..0000000 --- a/components/wifi_logger +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 23bf246c863c15d118c46cce47dd3f1657809ab7 diff --git a/main/main.c b/main/main.c index a10cc55..b9f0aec 100644 --- a/main/main.c +++ b/main/main.c @@ -31,8 +31,6 @@ #include "mdns.h" #include "net_functions.h" -#include "wifi_logger.h" - // Web socket server #include "websocket_if.h" //#include "websocket_server.h" @@ -3885,8 +3883,6 @@ app_main (void) HTTP_TASK_PRIORITY, &t_http_get_task, HTTP_TASK_CORE_ID); - // start_wifi_logger(); // Start wifi logger - while (1) { // audio_event_iface_msg_t msg; diff --git a/sdkconfig b/sdkconfig index eb43ca9..e21031c 100644 --- a/sdkconfig +++ b/sdkconfig @@ -152,14 +152,6 @@ CONFIG_SNTP_TIMEZONE="UTC" CONFIG_SNTP_SERVER="pool.ntp.org" # end of SNTP Configuration -# -# Example Connection Configuration -# -# CONFIG_EXAMPLE_CONNECT_WIFI is not set -# CONFIG_EXAMPLE_CONNECT_ETHERNET is not set -# CONFIG_EXAMPLE_CONNECT_IPV6 is not set -# end of Example Connection Configuration - # # Wifi Configuration # @@ -1189,19 +1181,6 @@ CONFIG_WEBSOCKET_SERVER_TASK_STACK_DEPTH=3000 CONFIG_WEBSOCKET_SERVER_TASK_PRIORITY=5 # CONFIG_WEBSOCKET_SERVER_PINNED is not set # end of WebSocket Server - -# -# WiFi Logger configuration -# -CONFIG_TRANSPORT_PROTOCOL_UDP=y -# CONFIG_TRANSPORT_PROTOCOL_TCP is not set -# CONFIG_TRANSPORT_PROTOCOL_WEBSOCKET is not set -CONFIG_ROUTE_ESP_IDF_API_LOGS_TO_WIFI=y -CONFIG_SERVER_IP_ADDRESS="192.168.0.10" -CONFIG_SERVER_PORT=9999 -CONFIG_MESSAGE_QUEUE_SIZE=1000 -CONFIG_BUFFER_SIZE=512 -# end of WiFi Logger configuration # end of Component config #