Page 1 of 1

WROOM32 wifi connection takes too long

Posted: Mon Mar 19, 2018 4:53 pm
by Azaelyus
Hello guys,

im working on my latest project and im having some issues. Im trying to connect to wifi with code like this:

Code: Select all

    WiFi.mode(WIFI_STA);
    WiFi.enableSTA(true);
    WiFi.begin(ssid, password);
    while (WiFi.status() != WL_CONNECTED) delay(1);
The problem is that it takes 3200 ms everytime. Im using my own board with WROOM32 revision 1, which is the same as on ESP32 DevkitC. On DevkitC i get 900 in average with the same code and same upload program. Any ideas? I can give u my wiring scheme if needed.

Thank you.

Re: WROOM32 wifi connection takes too long

Posted: Tue Mar 20, 2018 10:23 am
by Azaelyus
Any ideas please? This can help me saving like 200 running days with this module, because im powering ESP with LiFePo4 battery. Any second for me is really important.

Re: WROOM32 wifi connection takes too long

Posted: Tue Mar 20, 2018 10:35 am
by WiFive
From the limited information it is most likely an antenna or power problem or bad calibration. Try erasing the flash. Post a photo and a schematic and serial debug output.

Re: WROOM32 wifi connection takes too long

Posted: Tue Mar 20, 2018 11:27 am
by Azaelyus
Heres the schematic:
Image

Battery im using: http://lygte-info.dk/review/batteries20 ... %20UK.html

Heres the PCB layout:
Image

Heres the photo of my product:
Image

Heres the detailed look of Wroom module:
Image

Im running my code like this:

Turning HIGH pin 13, meassuring values (this goes with no problem). Then i turn the pin low and run the WiFi. Heres the critical momment, it takes 3200 ms everytime. Then i send those data to the server, which takes about 800 ms in average (the same as ESP DevkitC V2).

Uploading sketch:
Image

What do you mean by printing serial output? This?
Image

How can I erase the flash please? I have never done this and im not able to find anything for esp32, only ESP8266.

Re: WROOM32 wifi connection takes too long

Posted: Tue Mar 20, 2018 12:04 pm
by luisonoff

Re: WROOM32 wifi connection takes too long

Posted: Tue Mar 20, 2018 1:14 pm
by Azaelyus
Seems like there is a problem with arduino firmware. I have upload espidf-http-request and its connecting almost immediately (under 1 sec). I dont know what can be wrong tho.

Re: WROOM32 wifi connection takes too long

Posted: Tue Mar 20, 2018 3:05 pm
by Azaelyus
Ok guys, did not know what happend but its working now. I just deleted platformio packages and deleted compiled code from this project. Did clean compile and its working. Strange :D
Thanks tho!