I have been pulling my hair out trying to understand why I see UART data corruption when trying to connect to a wifi network. Moreover, the board itself never actually connects to wifi. I am using the Sparkfun esp32 board which is stuck into a breadboard.
Below is the log:
The code is straight from an example:ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0010,len:4
load:0x3fff0014,len:4448
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:11460
entry 0x40078cc4
W (26) rtc_clk: Possibly invalid CONFIG_ESP32_XTAL_FREQ setting (26MHz). Detected 26 MHz.
I (1251) cpu_start: Pro cpu up.
I (1251) cpu_start: Single core mode
I (1254) heap_init: Initializing. RAM available for dynamic allocation:
I (1289) heap_init: At 3FFAE2A0 len 00001D60 (7 KiB): DRAM
I (1346) heap_init: At 3FFB7CC8 len 00028338 (160 KiB): DRAM
I (1404) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (1463) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1524) heap_init: At 4008F294 len 00010D6C (67 KiB): IRAM
I (1582) cpu_start: Pro cpu start user code
I (1743) cpu_start: Starting scheduler on PRO CPU.
I (1852) wifi: wifi firmware version: ac8c7da
I (1852) wifi: config NVS flash: enabled
I (1852) wifi: config nano formating: disabled
I (1853) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1863) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1887) wifi: Init dynamic tx buffer num: 32
I (1887) wifi: Init data frame dynamic rx buffer num: 32
I (1887) wifi: Init management frame dynamic rx buffer num: 32
I (1891) wifi: wifi driver task: 3ffc2534, prio:23, stack:4096
I (1896) wifi: Init static rx buffer num: 10
I (1900) wifi: Init dynamic rx buffer num: 32
I (1904) wifi: Init rx ampdu len mblock:7
I (1908) wifi: Init lldesc rx ampdu entry mblock:4
I (1913) wifi: wifi power manager task: 0x3ffc79b0 prio: 21 stack: 2560
Setting WiFi configuration SSID cloud...
I (1947) phy: phy_version: 359.0, ������������
՝�������b��҂�҂�b�b�ڴj5RJB�ʢ�J�����j����Қх�B��҂
����2��"�Jj�� (2672) wifi: n:6 0, o:1 0, ap:255 255, sta:6 0, prof:1
I (3330) wi������������ѕ�?���������-> auth (b0)
Code: Select all
static void initialise_wifi(void)
{
tcpip_adapter_init();
wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK( esp_event_loop_init(event_handler, NULL) );
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
wifi_config_t wifi_config = {
.sta = {
.ssid = WIFI_SSID,
.password = WIFI_PASS,
},
};
fprintf(stderr, "Setting WiFi configuration SSID %s...\n", wifi_config.sta.ssid);
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) );
ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) );
ESP_ERROR_CHECK( esp_wifi_start() );
}