WiFi connection issues

MP@L&T
Posts: 8
Joined: Wed Feb 17, 2021 11:34 am

WiFi connection issues

Postby MP@L&T » Mon Mar 01, 2021 2:53 pm

I have WiFi examples working on a ESP32-Lyrat board using IDF examples such as FileServing.
However whenver I try ADF examples such as "http_play_and_save_to_file" or "play_mp3_downloaded_from_http" the wifi seems not to work.

My code at the step it gets to looks like:
ESP_LOGI(TAG, "[4.0] Start and wait for Wi-Fi network");
esp_periph_config_t periph_cfg = DEFAULT_ESP_PERIPH_SET_CONFIG();
esp_periph_set_handle_t set = esp_periph_set_init(&periph_cfg);
periph_wifi_cfg_t wifi_cfg = {
.ssid = CONFIG_WIFI_SSID,
.password = CONFIG_WIFI_PASSWORD,
};
tcpip_adapter_init();
esp_periph_handle_t wifi_handle = periph_wifi_init(&wifi_cfg);
ESP_LOGI(TAG, "WIFI INIT");
esp_periph_start(set, wifi_handle);
ESP_LOGI(TAG, "PERIPH START"); // <----- GETTING HERE
periph_wifi_wait_for_connected(wifi_handle, portMAX_DELAY);
ESP_LOGI(TAG, "WIFI CONNECT"); // <----- NOT GETTING HERE


My terminal shows:
I (1470) PLAY_AND_SAVE_FILE: [4.0] Start and wait for Wi-Fi network
E (1477) gpio: gpio_install_isr_service(438): GPIO isr service already installed
I (1485) PLAY_AND_SAVE_FILE: WIFI INIT
I (1499) PLAY_AND_SAVE_FILE: PERIPH START
I (1500) wifi:wifi driver task: 3ffcb2dc, prio:23, stack:6656, core=0
I (1500) system_api: Base MAC address is not set
I (1505) system_api: read default base MAC address from EFUSE
I (1526) wifi:wifi firmware version: 1865b55
I (1526) wifi:wifi certification version: v7.0
I (1526) wifi:config NVS flash: enabled
I (1527) wifi:config nano formating: disabled
I (1531) wifi:Init data frame dynamic rx buffer num: 32
I (1536) wifi:Init management frame dynamic rx buffer num: 32
I (1541) wifi:Init management short buffer num: 32
I (1546) wifi:Init static tx buffer num: 16
I (1550) wifi:Init tx cache buffer num: 32
I (1554) wifi:Init static rx buffer size: 1600
I (1558) wifi:Init static rx buffer num: 16
I (1562) wifi:Init dynamic rx buffer num: 32
I (1566) wifi_init: rx ba win: 16
I (1570) wifi_init: tcpip mbox: 32
I (1574) wifi_init: udp mbox: 6
I (1577) wifi_init: tcp mbox: 6
I (1581) wifi_init: tcp tx win: 5744
I (1586) wifi_init: tcp rx win: 5744
I (1590) wifi_init: tcp mss: 1440
I (1594) wifi_init: WiFi/LWIP prefer SPIRAM
I (1599) wifi_init: WiFi IRAM OP enabled
I (1603) wifi_init: WiFi RX IRAM OP enabled
ets Jun 8 2016 00:22:57

I read the post viewtopic.php?f=20&t=18545 which says to add the line tcpip_adapter_init(); to get it to work and that it is solved.

Any help would be much appreciated.

Who is online

Users browsing this forum: No registered users and 33 guests