Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ports/espressif/boards/sunton_esp32_8048S050/sdkconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#
# LWIP
#
CONFIG_LWIP_LOCAL_HOSTNAME="sunton-esp32-8048S050"
# end of LWIP

# end of Component config
Expand Down
8 changes: 4 additions & 4 deletions ports/espressif/common-hal/wifi/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include "py/gc.h"
#include "py/mpstate.h"
#include "py/runtime.h"
#include "py/objstr.h"
#include "py/objint.h"

#include "components/esp_wifi/include/esp_wifi.h"

Expand All @@ -42,6 +40,8 @@ wifi_radio_obj_t common_hal_wifi_radio_obj;
#include "nvs_flash.h"
#endif

#define MAC_ADDRESS_LENGTH 6

static const char *TAG = "CP wifi";

static void schedule_background_on_cp_core(void *arg) {
Expand Down Expand Up @@ -200,8 +200,8 @@ void common_hal_wifi_init(bool user_initiated) {
return;
}
// set the default lwip_local_hostname
char cpy_default_hostname[80];
uint8_t mac[6];
char cpy_default_hostname[strlen(CIRCUITPY_BOARD_ID) + (MAC_ADDRESS_LENGTH * 2) + 6];
uint8_t mac[MAC_ADDRESS_LENGTH];
esp_wifi_get_mac(ESP_IF_WIFI_STA, mac);
sprintf(cpy_default_hostname, "cpy_%s_%x", CIRCUITPY_BOARD_ID, (unsigned int)mac);
const char *default_lwip_local_hostname = cpy_default_hostname;
Expand Down