examples: protocol examples which use common connection component
updated to use esp_netif_init instead of tcpip_adapter in initialization code
This commit is contained in:
parent
21464465ea
commit
a49b934ef8
|
@ -440,7 +440,7 @@ clean_up:
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -306,7 +306,7 @@ clean_up:
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
#include "esp_tls.h"
|
#include "esp_tls.h"
|
||||||
|
|
||||||
|
@ -541,7 +541,7 @@ void app_main(void)
|
||||||
ret = nvs_flash_init();
|
ret = nvs_flash_init();
|
||||||
}
|
}
|
||||||
ESP_ERROR_CHECK(ret);
|
ESP_ERROR_CHECK(ret);
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
|
|
||||||
#include "sh2lib.h"
|
#include "sh2lib.h"
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ static void http2_task(void *args)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -122,7 +122,7 @@ static void http_get_task(void *pvParameters)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "esp_eth.h"
|
#include "esp_eth.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ void app_main(void)
|
||||||
static httpd_handle_t server = NULL;
|
static httpd_handle_t server = NULL;
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "esp_spiffs.h"
|
#include "esp_spiffs.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
/* This example demonstrates how to create file server
|
/* This example demonstrates how to create file server
|
||||||
|
@ -67,7 +67,7 @@ esp_err_t start_file_server(const char *base_path);
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <esp_log.h>
|
#include <esp_log.h>
|
||||||
#include <esp_system.h>
|
#include <esp_system.h>
|
||||||
#include <nvs_flash.h>
|
#include <nvs_flash.h>
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "esp_eth.h"
|
#include "esp_eth.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ void app_main(void)
|
||||||
static httpd_handle_t server = NULL;
|
static httpd_handle_t server = NULL;
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "esp_spiffs.h"
|
#include "esp_spiffs.h"
|
||||||
#include "sdmmc_cmd.h"
|
#include "sdmmc_cmd.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "mdns.h"
|
#include "mdns.h"
|
||||||
|
@ -126,7 +126,7 @@ esp_err_t init_fs(void)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
initialise_mdns();
|
initialise_mdns();
|
||||||
netbiosns_init();
|
netbiosns_init();
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <nvs_flash.h>
|
#include <nvs_flash.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "esp_eth.h"
|
#include "esp_eth.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ void app_main(void)
|
||||||
static httpd_handle_t server = NULL;
|
static httpd_handle_t server = NULL;
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
#include "lwip/sockets.h"
|
#include "lwip/sockets.h"
|
||||||
|
@ -274,7 +274,7 @@ static void https_get_task(void *pvParameters)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
#include "lwip/sockets.h"
|
#include "lwip/sockets.h"
|
||||||
|
@ -151,7 +151,7 @@ static void https_get_task(void *pvParameters)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <esp_system.h>
|
#include <esp_system.h>
|
||||||
#include <nvs_flash.h>
|
#include <nvs_flash.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "esp_eth.h"
|
#include "esp_eth.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ void app_main(void)
|
||||||
static httpd_handle_t server = NULL;
|
static httpd_handle_t server = NULL;
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* Register event handlers to start server when Wi-Fi or Ethernet is connected,
|
/* Register event handlers to start server when Wi-Fi or Ethernet is connected,
|
||||||
|
|
|
@ -186,7 +186,7 @@ static void mdns_example_task(void *pvParameters)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
ESP_ERROR_CHECK(esp_netif_init());
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
initialise_mdns();
|
initialise_mdns();
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
|
@ -169,7 +169,7 @@ void app_main(void)
|
||||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
@ -139,7 +139,7 @@ void app_main(void)
|
||||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
|
@ -111,7 +111,7 @@ void app_main(void)
|
||||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
|
@ -138,7 +138,7 @@ void app_main(void)
|
||||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
|
@ -111,7 +111,7 @@ void app_main(void)
|
||||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
|
@ -120,7 +120,7 @@ void app_main(void)
|
||||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "lwip/sockets.h"
|
#include "lwip/sockets.h"
|
||||||
|
@ -174,7 +174,7 @@ void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ static void openssl_server_init(void)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -119,7 +119,7 @@ void app_main(void)
|
||||||
static void obtain_time(void)
|
static void obtain_time(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK( esp_event_loop_create_default() );
|
ESP_ERROR_CHECK( esp_event_loop_create_default() );
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
@ -112,7 +112,7 @@ static void tcp_client_task(void *pvParameters)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
@ -137,7 +137,7 @@ CLEAN_UP:
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
@ -111,7 +111,7 @@ static void udp_client_task(void *pvParameters)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
@ -62,8 +62,8 @@ static int socket_add_ipv4_multicast_group(int sock, bool assign_source_if)
|
||||||
#if LISTEN_ALL_IF
|
#if LISTEN_ALL_IF
|
||||||
imreq.imr_interface.s_addr = IPADDR_ANY;
|
imreq.imr_interface.s_addr = IPADDR_ANY;
|
||||||
#else
|
#else
|
||||||
tcpip_adapter_ip_info_t ip_info = { 0 };
|
esp_netif_ip_info_t ip_info = { 0 };
|
||||||
err = tcpip_adapter_get_ip_info(EXAMPLE_INTERFACE, &ip_info);
|
err = esp_netif_get_ip_info(get_example_netif(), &ip_info);
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
ESP_LOGE(V4TAG, "Failed to get IP address info. Error 0x%x", err);
|
ESP_LOGE(V4TAG, "Failed to get IP address info. Error 0x%x", err);
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -203,7 +203,7 @@ static int create_multicast_ipv6_socket(void)
|
||||||
// (Note the interface may have other non-LL IPV6 addresses as well,
|
// (Note the interface may have other non-LL IPV6 addresses as well,
|
||||||
// but it doesn't matter in this context as the address is only
|
// but it doesn't matter in this context as the address is only
|
||||||
// used to identify the interface.)
|
// used to identify the interface.)
|
||||||
err = tcpip_adapter_get_ip6_linklocal(EXAMPLE_INTERFACE, &if_ipaddr);
|
err = esp_netif_get_ip6_linklocal(EXAMPLE_INTERFACE, (esp_ip6_addr_t*)&if_ipaddr);
|
||||||
inet6_addr_from_ip6addr(&if_inaddr, &if_ipaddr);
|
inet6_addr_from_ip6addr(&if_inaddr, &if_ipaddr);
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
ESP_LOGE(V6TAG, "Failed to get IPV6 LL address. Error 0x%x", err);
|
ESP_LOGE(V6TAG, "Failed to get IPV6 LL address. Error 0x%x", err);
|
||||||
|
@ -212,7 +212,7 @@ static int create_multicast_ipv6_socket(void)
|
||||||
#endif // LISTEN_ALL_IF
|
#endif // LISTEN_ALL_IF
|
||||||
|
|
||||||
// search for netif index
|
// search for netif index
|
||||||
netif_index = tcpip_adapter_get_netif_index(EXAMPLE_INTERFACE);
|
netif_index = esp_netif_get_netif_index(EXAMPLE_INTERFACE);
|
||||||
if(netif_index < 0) {
|
if(netif_index < 0) {
|
||||||
ESP_LOGE(V6TAG, "Failed to get netif index");
|
ESP_LOGE(V6TAG, "Failed to get netif index");
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -484,7 +484,7 @@ static void mcast_example_task(void *pvParameters)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "tcpip_adapter.h"
|
#include "esp_netif.h"
|
||||||
#include "protocol_examples_common.h"
|
#include "protocol_examples_common.h"
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
@ -112,7 +112,7 @@ static void udp_server_task(void *pvParameters)
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -90,7 +90,7 @@ void app_main(void)
|
||||||
esp_log_level_set("TRANS_TCP", ESP_LOG_DEBUG);
|
esp_log_level_set("TRANS_TCP", ESP_LOG_DEBUG);
|
||||||
|
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -125,7 +125,7 @@ void app_main(void)
|
||||||
}
|
}
|
||||||
ESP_ERROR_CHECK( err );
|
ESP_ERROR_CHECK( err );
|
||||||
|
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -278,7 +278,7 @@ void app_main(void)
|
||||||
}
|
}
|
||||||
ESP_ERROR_CHECK( err );
|
ESP_ERROR_CHECK( err );
|
||||||
|
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
|
@ -112,7 +112,7 @@ void app_main(void)
|
||||||
}
|
}
|
||||||
ESP_ERROR_CHECK(err);
|
ESP_ERROR_CHECK(err);
|
||||||
|
|
||||||
tcpip_adapter_init();
|
esp_netif_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||||
|
|
||||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||||
|
|
Loading…
Reference in a new issue