Skip to content

Commit 1543642

Browse files
committed
Fix mac address formatting and disable aesio for ESP
1 parent 390c280 commit 1543642

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ports/espressif/common-hal/wifi/__init__.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ void common_hal_wifi_init(bool user_initiated) {
212212
char cpy_default_hostname[board_len + (MAC_ADDRESS_LENGTH * 2) + 6];
213213
uint8_t mac[MAC_ADDRESS_LENGTH];
214214
esp_wifi_get_mac(ESP_IF_WIFI_STA, mac);
215-
snprintf(cpy_default_hostname, sizeof(cpy_default_hostname), "cpy-%s-%x", CIRCUITPY_BOARD_ID + board_trim, (unsigned int)mac);
215+
snprintf(cpy_default_hostname, sizeof(cpy_default_hostname), "cpy-%s-%02x%02x%02x%02x%02x%02x", CIRCUITPY_BOARD_ID + board_trim, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
216+
216217
const char *default_lwip_local_hostname = cpy_default_hostname;
217218
ESP_ERROR_CHECK(esp_netif_set_hostname(self->netif, default_lwip_local_hostname));
218219
// set station mode to avoid the default SoftAP

ports/espressif/mpconfigport.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ CIRCUITPY_WATCHDOG ?= 1
5858
CIRCUITPY_WIFI ?= 1
5959
CIRCUITPY_SOCKETPOOL_IPV6 ?= 1
6060

61+
# Turn off aesio. It is a custom API that no one uses.
62+
CIRCUITPY_AESIO = 0
63+
6164
# Enable _eve module
6265
CIRCUITPY__EVE ?= 1
6366

0 commit comments

Comments
 (0)