Fix MDNS. C3 works

This commit is contained in:
Scott Shawcroft 2023-09-14 15:04:07 -07:00
parent 952118f6c3
commit 4087960dfd
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
6 changed files with 19 additions and 5 deletions

View File

@ -3,6 +3,6 @@ CIRCUITPY_CREATION_ID = 0x00C30001
IDF_TARGET = esp32c3
CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_MODE = qio
CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 4MB

View File

@ -9,5 +9,9 @@ CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 16MB
CIRCUITPY_ESP_PSRAM_SIZE = 8MB
CIRCUITPY_ESP_PSRAM_MODE = opi
CIRCUITPY_ESP_PSRAM_FREQ = 80m
CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1
UF2_BOOTLOADER = 0

View File

@ -190,7 +190,8 @@ void common_hal_wifi_init(bool user_initiated) {
&self->handler_instance_got_ip));
wifi_init_config_t config = WIFI_INIT_CONFIG_DEFAULT();
#ifdef CONFIG_IDF_TARGET_ESP32
#ifdef CONFIG_ESP32_WIFI_NVS_ENABLED
// Generally we don't use this because we store ssid and passwords ourselves in the filesystem.
esp_err_t err = nvs_flash_init();
if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
// NVS partition was truncated and needs to be erased
@ -210,7 +211,7 @@ void common_hal_wifi_init(bool user_initiated) {
if (gc_alloc_possible()) {
raise_esp_error(result);
}
ESP_LOGE(TAG, "WiFi error code: %d", result);
ESP_LOGE(TAG, "WiFi error code: %x", result);
return;
}
// set station mode to avoid the default SoftAP

View File

@ -49,6 +49,15 @@ CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y
# end of Driver Configurations
#
# Wi-Fi
#
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16
# CONFIG_ESP32_WIFI_NVS_ENABLED is not set
# end of Wi-Fi
#
# Newlib
#

View File

@ -23,6 +23,7 @@ CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
# end of Memory Settings
CONFIG_BT_NIMBLE_EXT_ADV=y
# CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV is not set
# end of NimBLE Options
#

View File

@ -347,8 +347,7 @@ bool supervisor_start_web_workflow(bool reload) {
#if CIRCUITPY_MDNS
// Try to start MDNS if the user deinited it.
if (mdns.base.type != &mdns_server_type ||
common_hal_mdns_server_deinited(&mdns) ||
reload) { // Always reconstruct on reload, since we don't know if the net changed.
common_hal_mdns_server_deinited(&mdns)) {
mdns_server_construct(&mdns, true);
mdns.base.type = &mdns_server_type;
if (!common_hal_mdns_server_deinited(&mdns)) {