-
Notifications
You must be signed in to change notification settings - Fork 7.6k
ESP32-D0WD-V3 wifi.begin() does not connect but fine on ESP32-D0WDQ6 #7562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please enable core debug to level Verbose and post the logs from UART |
Same problem here (arduino 1.8.19), with the ESP32-D0WD-V3. I just compiled the WiFiClientBasic example (with verbose debug level), but when the new D0WD-V3 chip tries to connect to my wifi network, it simply doesn't work. Got the following log (anonymized): [ 4][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz Waiting for WiFi... [ 50][D][WiFiGeneric.cpp:931] _eventCallback(): Arduino Event: 0 - WIFI_READY So the reason seems to be something like an expired authentication .... Actually boards with the new chip (like the Wemos D1 R32) can not be used as expected. From my point of view, this is a major issue ! edit#1: Log with connection to open "MyIoT-Test": [ 4][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz Waiting for WiFi... [ 34][D][WiFiGeneric.cpp:931] _eventCallback(): Arduino Event: 0 - WIFI_READY WiFi connected Curious, isn't it? By the way, my "mynetwork" uses WPA+WPA2. edit#2, update: The problem seems to be related to the WPA+WPA2 password. My genuine password was a string with 16 numerical characters (like "1234567890123456" as an example). But when I use a different password, like "Hokuspokus", it works like magic. Hope this observation helps to track down the problem. |
Interesting. I wonder if the numeric nature of the password makes the library think it's a PSK? Worth digging into the Arduino and IDF libraries. |
And what if you only use HEX characters? |
16 bytes is a valid WEP key length. https://www.speedguide.net/faq/what-is-a-valid-wep-key-110 |
It doesn't seem to be an arduino related problem. I guess there's something fishy with the RTOS of the new core. |
i try several tests with ESP32-D0WDQ5 Rev 3 (WEMOS D1 R32):
it didn't connect :-( |
There's something really fishy going on with these -V3 chips. I've got an AZ-Delivery ESP32 Dev KitC V4 ESP32-WROOM-32, where I made several tests and was able to connect to my wifi with the restrictions mentioned above. The verbose log shows a lot of different "reasons" for the disconnection: [108959][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: MyIoT-Test, BSSID: f6:cf:a2:68:XX:XX, Reason: 202 but other reasons occur as well: |
Thats a general issue with a lot of the D1 R32 boards (arduino UNO design). But sohtamei and Ibernstone figured out that there is a design error at the WEMOS D1 R32 boards. Problem is that the D1 R32 has a CH340C on board and drives these two pins through a transistor logic, so that you don't need to press a button, when uploading a sketch. But unfortunately the chinese engineers didn't notice that the CH340C runs with 5V and that this leads to approximately 4.1V at the collectors. Look here: #2144. Anyway, the problem with the D0WD-V3 and the wifi passwords (as described above) still persists. |
thank you. |
Thank You Jeff, |
Just to make sure I do understand it well... The higher voltages applied to GPIO-0 and RST on those boards, causes issues with WiFi? |
At least the higher voltage at GPIO-0 (which is a "touch" capable pin as well). It really is a pita, when you try to track down the wifi connection problems and you run into a further problem (design issue of the D1 R32) that affects the behaviour too. It reminds me of a saying from my doc: "you can have lice and fleas at the same time." |
Not that weird. The WiFi RF calibration relates to the voltage supplied to the ESP. This makes me realize why on some nodes I may get a good and stable WiFi connection when running in AP+STA mode and not in STA mode. |
Yes, as you've mentioned, usually the IO-pins are protected with diodes to +Vcc and GND (the latter in case of negative voltages). |
Do you have any idea/guess about the current drawn through this diode? |
Ok, just desoldered the diode to measure the current. |
Thanks a lot! I will also have a look at the datasheet of the CH340 to see what pins should be set to what level to set the chip into "3V3 mode" |
so you think it's better to sold diode rather than resistor ? and for RST pin ? |
I don't care about the RST pin anymore, because it doesn't affect the wifi calibration and is still protected by the internal diodes of the ESP32. When you cure the problem using the resistor and you like to drive some load between the GPIO-0 pin and GND (like a resistor / LED combination), the load will always get some current through the resistor (i.e. the LED will emit light), even if the ESP32 doesn't drive the pin with output = high. |
Really don't know why the board designers didn't hook up the CH340G's Vcc pin (#16) to the output of the 3.3V voltage regulator (AMS1117 3.3) and connected V3 (pin #4) to +3.3V as well. Might be that they were ancious about the additional current for the CH340G... but it's only max. 7mA more load for the regulator. So a fix without any schottky diodes or resistors would be to lift up pin#16 of the CH340G, connect it to V3 (pin #4) and then to the +3.3V. Update: just removed the diode and made the fix described above. Everything works nice now. Uploading a sketch works as previously (without pressing any "boot mode button") and the wifi calibration seems to work perfect as well. |
@AussieMakerGeek Is this issue related to Wemos hardware, or is there also a software issue with 16 character numeric passwords? |
The problem with the 16 character numeric password seems to be related to the D0WD-V3 chip itself. The fix for the WEMOS board only targets the problem, that the ESP32 doesn't connect to some routers and access-points, because of an unsuccessful calibration sequence of the wifi hardware during the bootup sequence. The reported bug with the encryption password is still an issue with the D0WD-V3 chip. So, you can call the WEMOS board problem the flea and the password issue a louse.... according to the above mentioned saying. |
Thank you, it did the job. Also put wire between pin#16 - pin#4 - 3.3V |
I'm just waiting for two more D1 R32 boards as well. But they are actually in transit from China to Germany :-P. |
RE: 16 char password issue |
Yeah, meanwhile I don't think that the issue is library / arduino related. |
I have read in some errata document that the older revisions needed some extra NOP operations to make sure things are consistently read and processed. |
At the time beeing, I can't rule out that the "numerical-only password" issue is related to the chip anymore. Could be an issue of my router (Fritz!Box7590) as well. |
Still, if it does work on older silicon revisions and doesn't work on newer revisions, then there is still some causal relation between silicon revision and WiFi connection issues. |
@Jeff-Jordan I am not sure what conclusion can be drawn from your experience and mine. I don't think we can rule out or whittle it down any more from where we're at. Ultimately, it would appear that this is an issue in the RTOS or something like that, but does not explain why the other method of connecting is working ok. It may be that there is not a fix, but a workaround in the back end of the wifi.connect() function to use the same method as WiFiMulti.run() instead so it's just transparent to the user. |
@AussieMakerGeek |
Hello, |
@Jeff-Jordan > 1N1587 Are you sure about 1N1587? Shouldn't it be 1N5817 instead? |
Board
Generic ESP32 WROOM Module
Device Description
Various - Hardware independent other than specific ESP Chip
Hardware Configuration
No External connections
Version
v2.0.5
IDE Name
Arduino IDE 1.8.16
Operating System
Windows 10
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
921600
Description
Testing Generic wifiClient Example
Entering known good SSID/Pass code
ESP32-D0WD-V3 it does not connect to wifi
ESP32-D0WDQ6 Immediately connects with identical code
Loading the WiFiScan example lists all of the wireless networks around me with no issue on both ESP32 Versions.
I have discovered though that the WiFiMulti.addAP()/WiFiMulti.run() method DOES allow connecting to the network with the newer chip.
Sketch
Debug Message
Other Steps to Reproduce
Consistently on the newer ESP32 V3 chip across various different dev boards, it will not connect with WiFi.begin()
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: