mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-19 13:32:21 +02:00
feat(eppp): Added CI job to build examples and tests
This commit is contained in:
@ -121,27 +121,23 @@ void app_main(void)
|
||||
dns.ip.type = ESP_IPADDR_TYPE_V4;
|
||||
ESP_ERROR_CHECK(esp_netif_set_dns_info(eppp_netif, ESP_NETIF_DNS_MAIN, &dns));
|
||||
|
||||
// Initialize console REPL
|
||||
ESP_ERROR_CHECK(console_cmd_init());
|
||||
|
||||
#if CONFIG_EXAMPLE_IPERF
|
||||
register_iperf();
|
||||
|
||||
printf("\n =======================================================\n");
|
||||
printf(" | Steps to Test PPP Client Bandwidth |\n");
|
||||
printf(" | Steps to Test EPPP-host bandwidth |\n");
|
||||
printf(" | |\n");
|
||||
printf(" | 1. Enter 'help', check all supported commands |\n");
|
||||
printf(" | 2. Start PPP server on host system |\n");
|
||||
printf(" | - pppd /dev/ttyUSB1 115200 192.168.11.1:192.168.11.2 modem local noauth debug nocrtscts nodetach +ipv6\n");
|
||||
printf(" | 3. Wait ESP32 to get IP from PPP server |\n");
|
||||
printf(" | 4. Enter 'pppd info' (optional) |\n");
|
||||
printf(" | 5. Server: 'iperf -u -s -i 3' |\n");
|
||||
printf(" | 6. Client: 'iperf -u -c SERVER_IP -t 60 -i 3' |\n");
|
||||
printf(" | 1. Wait for the ESP32 to get an IP |\n");
|
||||
printf(" | 2. Server: 'iperf -u -s -i 3' (on host) |\n");
|
||||
printf(" | 3. Client: 'iperf -u -c SERVER_IP -t 60 -i 3' |\n");
|
||||
printf(" | |\n");
|
||||
printf(" =======================================================\n\n");
|
||||
|
||||
#endif // CONFIG_EXAMPLE_IPERF
|
||||
|
||||
// Initialize console REPL
|
||||
ESP_ERROR_CHECK(console_cmd_init());
|
||||
|
||||
// Register the ping command
|
||||
ESP_ERROR_CHECK(console_cmd_ping_register());
|
||||
// start console REPL
|
||||
|
1
components/eppp_link/examples/host/sdkconfig.ci.spi
Normal file
1
components/eppp_link/examples/host/sdkconfig.ci.spi
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_EPPP_LINK_DEVICE_SPI=y
|
1
components/eppp_link/examples/host/sdkconfig.ci.uart
Normal file
1
components/eppp_link/examples/host/sdkconfig.ci.uart
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_EPPP_LINK_DEVICE_UART=y
|
@ -1,7 +1,3 @@
|
||||
# This file was generated using idf.py save-defconfig. It can be edited manually.
|
||||
# Espressif IoT Development Framework (ESP-IDF) 5.3.0 Project Minimal Configuration
|
||||
#
|
||||
CONFIG_UART_ISR_IN_IRAM=y
|
||||
CONFIG_LWIP_PPP_SUPPORT=y
|
||||
CONFIG_LWIP_PPP_SERVER_SUPPORT=y
|
||||
CONFIG_LWIP_PPP_VJ_HEADER_COMPRESSION=n
|
||||
|
@ -1,2 +1,2 @@
|
||||
idf_component_register(SRCS "station_example_main.c"
|
||||
idf_component_register(SRCS "eppp_slave.c"
|
||||
INCLUDE_DIRS ".")
|
||||
|
@ -14,6 +14,10 @@
|
||||
#include "nvs_flash.h"
|
||||
#include "eppp_link.h"
|
||||
|
||||
static const char *TAG = "eppp_slave";
|
||||
|
||||
#if CONFIG_SOC_WIFI_SUPPORTED
|
||||
|
||||
/* FreeRTOS event group to signal when we are connected*/
|
||||
static EventGroupHandle_t s_wifi_event_group;
|
||||
|
||||
@ -23,7 +27,6 @@ static EventGroupHandle_t s_wifi_event_group;
|
||||
#define WIFI_CONNECTED_BIT BIT0
|
||||
#define WIFI_FAIL_BIT BIT1
|
||||
|
||||
static const char *TAG = "sta2pppos";
|
||||
|
||||
static int s_retry_num = 0;
|
||||
|
||||
@ -48,7 +51,7 @@ static void event_handler(void *arg, esp_event_base_t event_base, int32_t event_
|
||||
}
|
||||
}
|
||||
|
||||
void wifi_init_sta(void)
|
||||
void init_network_interface(void)
|
||||
{
|
||||
s_wifi_event_group = xEventGroupCreate();
|
||||
|
||||
@ -105,6 +108,14 @@ void wifi_init_sta(void)
|
||||
ESP_LOGE(TAG, "UNEXPECTED EVENT");
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
void init_network_interface(void)
|
||||
{
|
||||
// placeholder to initialize any other network interface if WiFi is not available
|
||||
}
|
||||
|
||||
#endif // SoC WiFi capable chip
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
@ -116,8 +127,7 @@ void app_main(void)
|
||||
}
|
||||
ESP_ERROR_CHECK(ret);
|
||||
|
||||
ESP_LOGI(TAG, "ESP_WIFI_MODE_STA");
|
||||
wifi_init_sta();
|
||||
init_network_interface(); // WiFi station if withing SoC capabilities (otherwise a placeholder)
|
||||
|
||||
eppp_config_t config = EPPP_DEFAULT_SERVER_CONFIG();
|
||||
#if CONFIG_EPPP_LINK_DEVICE_SPI
|
1
components/eppp_link/examples/slave/sdkconfig.ci.spi
Normal file
1
components/eppp_link/examples/slave/sdkconfig.ci.spi
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_EPPP_LINK_DEVICE_SPI=y
|
1
components/eppp_link/examples/slave/sdkconfig.ci.uart
Normal file
1
components/eppp_link/examples/slave/sdkconfig.ci.uart
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_EPPP_LINK_DEVICE_UART=y
|
@ -1,8 +1,6 @@
|
||||
CONFIG_UART_ISR_IN_IRAM=y
|
||||
CONFIG_LWIP_IP_FORWARD=y
|
||||
CONFIG_LWIP_IPV4_NAPT=y
|
||||
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096
|
||||
CONFIG_LWIP_PPP_SUPPORT=y
|
||||
CONFIG_LWIP_PPP_SERVER_SUPPORT=y
|
||||
CONFIG_LWIP_PPP_VJ_HEADER_COMPRESSION=n
|
||||
CONFIG_EPPP_LINK_DEVICE_SPI=y
|
||||
|
Reference in New Issue
Block a user