client can connect to provider and download an image.
Updated network component to add get mac address
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user