client can connect to provider and download an image.

Updated network component to add get mac address
This commit is contained in:
2026-03-28 14:59:49 -04:00
parent 46d1ab6358
commit 2ced2f0b0a
10 changed files with 229 additions and 14 deletions
+6 -8
View File
@@ -1,19 +1,17 @@
#include <stdio.h>
#include <cstdio>
#include "esp_event.h"
#include "esp_log.h"
#include "esp_pm.h"
#include "esp_system.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "nvs.h"
#include "nvs_flash.h"
#include "sdkconfig.h"
#include "soc/gpio_num.h"
#include "led.hpp"
#include "network.hpp"
#include "types.hpp"
#include "provider.hpp"
static const char *TAG = "ClientMain";
@@ -21,8 +19,7 @@ extern "C" void app_main()
{
ESP_LOGI(TAG, "Hello, Calendink Client!");
// Initialize NVS (required for some Wi-Fi configurations and network
// features)
// Initialize NVS
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND)
{
@@ -35,7 +32,8 @@ extern "C" void app_main()
setup_led();
// Connect to WiFi ESP_LOGI(TAG, "Initializing WiFi connection");
// Connect to WiFi
ESP_LOGI(TAG, "Initializing WiFi connection");
initialize_network();
esp_err_t err = connect_wifi(CONFIG_CALENDINK_WIFI_SSID,
@@ -51,7 +49,6 @@ extern "C" void app_main()
{
ESP_LOGW(TAG, "WiFi connection check timeout, retrying... (%d)",
retries);
led_blink_number(3, 255, 0, 0);
}
retries++;
@@ -62,6 +59,7 @@ extern "C" void app_main()
if (err == ESP_OK)
{
ESP_LOGI(TAG, "Successfully connected to WiFi!");
test_provider_communication();
}
else
{