0

I have a strange behavior, using ESP32 devkit v.1 boards. Everything works, I can upload blink sketch, serial works, led blinks. However, once I upload any sketch which is using the wifi.h (and utilizing it for example calling WiFi.mode(WIFI_STA);), upon upload, the board keeps resetting the serial connection, stays up for not more then 1 second, resets again, and so on. I could not debug the issue, since serial is unusable. Any ideas what is wrong? I did a fresh ArduinoIDE, ESP32 board manager install, etc. and normal sketches work flawlessly.

  • based on esp8266 experience. try to erase the flash with esptool. – Juraj Nov 1 '18 at 18:12
  • Could be a power problem. WiFi needs a lot of power. – Majenko Nov 1 '18 at 19:38
  • @Majenko, the devkit has USB connector. I assume Miro powers the board from USB. – Juraj Nov 1 '18 at 19:47
  • Yes, but what from? An unpowered hub would be fatal... – Majenko Nov 1 '18 at 20:30
  • Guys, Juraj was right, I had a too long usb cable, no idea that the power loss could be high enough not to run the esp. Sorry for an unnecesaary question. If anyone has reboots with wifi ON, try a shorter cable.. – Miro Krsjak Nov 3 '18 at 5:30
1

The USB cable was too long, and hence power loss.

Sorry, I figured it out a day after I asked this question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.