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
+1 -1
View File
@@ -3,4 +3,4 @@ description: "Calendink HTTP Client Component"
dependencies:
idf:
version: '>=5.0.0'
version: '>=5.0.0'
+19
View File
@@ -452,3 +452,22 @@ internal void blink_last_ip_octet()
}
}
#endif
// === MAC Address ===
esp_err_t get_mac_address(uint8_t *mac_out)
{
// Prefer Ethernet if connected, fall back to WiFi
if (s_eth_netif != nullptr)
{
return esp_netif_get_mac(s_eth_netif, mac_out);
}
if (s_wifi_netif != nullptr)
{
return esp_netif_get_mac(s_wifi_netif, mac_out);
}
ESP_LOGE("NET", "No active network interface for MAC address");
return ESP_ERR_INVALID_STATE;
}
+4
View File
@@ -15,3 +15,7 @@ esp_err_t connect_wifi(const char *ssid, const char *password,
bool blockUntilIPAcquired);
void disconnect_wifi();
esp_err_t check_wifi_connection(uint32_t timeoutSeconds);
// Get the MAC address of the active network interface (WiFi STA).
// mac_out must point to a buffer of at least 6 bytes.
esp_err_t get_mac_address(uint8_t *mac_out);