added udp logger to log over network and not uart

Added modem sleep for wif
This commit is contained in:
2026-03-14 17:27:24 -04:00
parent b702839f8e
commit a9d5aa83dc
9 changed files with 171 additions and 4 deletions

View File

@@ -3,11 +3,13 @@
#include <string.h>
// SDK
#include "driver/gpio.h"
#include "esp_err.h"
#include "esp_eth.h"
#include "esp_eth_driver.h"
#include "esp_event.h"
#include "esp_log.h"
#include "esp_sleep.h"
#include "esp_wifi.h"
#include "ethernet_init.h"
#include "freertos/FreeRTOS.h"
@@ -340,6 +342,10 @@ internal esp_err_t connect_wifi(const char *ssid, const char *password,
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config));
ESP_ERROR_CHECK(esp_wifi_start());
// Reverting to MIN_MODEM because MAX_MODEM causes disconnects on many routers
ESP_ERROR_CHECK(esp_wifi_set_ps(WIFI_PS_MAX_MODEM));
ESP_ERROR_CHECK(esp_wifi_connect());
ESP_ERROR_CHECK(esp_register_shutdown_handler(&teardown_wifi));