Weird ESP32 issue

I have a ESP32 board that will ONLY connect to wifi when I plug it in via USB and open the logs…as soon as I close the logs, the wifi disconnects. I have deleted the board and re-installed it several times as well as tried different boards (same make/model). I set up a ping loop so I can see when it connects/disconnects and it will only connect when I open the logs. I haven’t added anything except the default configuration to the yaml file. Anyone else seen this before?

Looks similar issue discussed here.

Yea I tried those things and this seems to be a different issue. Mine only connects to Wifi when I open the logs and it stay connected for as long as I have the logs open. As soon as I close the logs, it disconnects.

How do you know it disconnects if you aren’t watching the logs?

I set up a ping loop so I can see when it connects and disconnects…

Are you reading the logs over wifi or serial?

serial…can’t read them over wifi because it disconnects. I’m suspecting the cable so I’ll try a different one and see if that does anything.

Figured out the issue and it was as I suspected a cabling issue. Found the proper cable and it now stays connected and seems to be working fine. Thanks everyone!