SDIO & WIFI

DiEitch
Posts: 9
Joined: Wed May 22, 2019 11:23 am

SDIO & WIFI

Postby DiEitch » Wed May 22, 2019 3:31 pm

Hi.
When I turn on WiFi
  1. esp_err_t wifi_setup() {
  2.     esp_err_t ret;
  3.  
  4.     WiFi.mode(WIFI_STA);
  5.     WiFi.disconnect(true);
  6.     WiFi.onEvent(WiFiEvent); //not depend
  7.     delay(100);
  8.     return ESP_OK;
  9. }
sdio_slave is hangs.

I also try init with low level:
  1. esp_err_t wifi_setup(void)
  2. {
  3.     //s_wifi_event_group = xEventGroupCreate();
  4.     esp_err_t ret;
  5.     tcpip_adapter_init();
  6.     ret = esp_event_loop_create_default();
  7.     if (ret != ESP_OK) return ret;
  8.     wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
  9.     //cfg.event_handler = NULL;
  10.     ret = esp_wifi_init(&cfg); //OK BUT SDIO HALTED AFTER
  11.     if (wf_debug)
  12.     {
  13.       if (ret==ESP_OK) Serial.println("WiFi= Init OK ");
  14.       else Serial.println("WiFi= Init ERR ");
  15.     }
  16.     if (ret != ESP_OK) return ret;
  17.     ret = esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL);
  18.     if (ret != ESP_OK) return ret;
  19.     ret = esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL);
  20.  
  21. //    wifi_config = {
  22. //        .sta = {
  23. //            .ssid = DEFAULT_SSID,
  24. //            .password = DEFAULT_PWD,
  25. ////            scan_method : DEFAULT_SCAN_METHOD,
  26. ////            sort_method : DEFAULT_SORT_METHOD,
  27. ////            .threshold.rssi = DEFAULT_RSSI,
  28. ////            .threshold.authmode = DEFAULT_AUTHMODE,
  29. //        }
  30. //
  31. //    };
  32.     return ret;
  33. }
sdio hangs after esp_wifi_init() :twisted:

Please help, what happened?

felixcollins
Posts: 123
Joined: Fri May 24, 2019 2:02 am

Re: SDIO & WIFI

Postby felixcollins » Mon May 27, 2019 1:24 am

Try selecting the following option in "make menuconfig"

Component config / LWIP /USE_ONLY_LWIP_SELECT [=y].

DiEitch
Posts: 9
Joined: Wed May 22, 2019 11:23 am

Re: SDIO & WIFI

Postby DiEitch » Mon May 27, 2019 10:23 am

Hi felixcollins.
Thank for reply.
I had no find this option in LWIP section.
:?:

With the best regards.
Attachments
option.JPG
option.JPG (95.72 KiB) Viewed 7660 times

DiEitch
Posts: 9
Joined: Wed May 22, 2019 11:23 am

Re: SDIO & WIFI

Postby DiEitch » Mon May 27, 2019 10:37 am

I check "Support LWIP socket select() only" because
https://github.com/espressif/esp-idf/bl ... ip/Kconfig.

DiEitch
Posts: 9
Joined: Wed May 22, 2019 11:23 am

Re: SDIO & WIFI

Postby DiEitch » Mon May 27, 2019 1:28 pm

Hi.
I tried to change, but nothing has changed. Can there be something else?
Also I tried to change directly in sdkconfig.

Who can tell, after changing sdkconfig, I need to do something else if I work in the Arduino IDE?

felixcollins
Posts: 123
Joined: Fri May 24, 2019 2:02 am

Re: SDIO & WIFI

Postby felixcollins » Tue May 28, 2019 10:02 pm

Sorry, I'm not sure what your problem is. You will need to debug deeper in the code and figure out where it is broken - you will probably need JTAG debugging for this.

I just had a problem similar to your one where httpd failed after mounting a file using fat https://www.esp32.com/viewtopic.php?f=13&t=10733

DiEitch
Posts: 9
Joined: Wed May 22, 2019 11:23 am

Re: SDIO & WIFI

Postby DiEitch » Thu Jun 06, 2019 9:47 am

Hallo.

In any case, thanks for the reply!
I create issue: https://github.com/espressif/arduino-esp32/issues/2860
This problem be in arduino and in eclipse too. :shock:
But when I use eps32-at with SDIO mode - all works fine in 1 bit mode. :?:

With the best regards.

Who is online

Users browsing this forum: raywo_esp and 106 guests