Wifi AP crash when activated (ESP32 DEVKIT V1 board)

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
dan76
Posts: 8
Joined: Thu Jan 21, 2021 1:52 pm

[SOLVED] : Wifi AP crash when activated (ESP32 DEVKIT V1 board)

Post by dan76 » Mon Jan 24, 2022 2:56 pm

Finally
i get the solution. I had seen that a guy is waiting 1.5 s after boot to activate Wifi and his comment is for 5V line stabilisation.
I have inserted a time.sleep(5) before wlan.active(True)
:D
IT'S WORK

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Wifi AP crash when activated (ESP32 DEVKIT V1 board)

Post by davef » Mon Jan 24, 2022 6:18 pm

Glad to hear you got it working. I can see that I didn't recognise the actual problem you were having. One year down the track I would have suggested other things as I have also had some grief in this area.

If it is a matter of 5V stabilisation then there are hardware fixes for this. If the 5V to 3V3 regulator (AMS31117?) can supply the peak current required when you make the WiFi active then a 1000uF electro on the 5V DC input should sort it. This is if you are supplying the board from external 5V.

If the 5V to 3V3 regulator struggles to provide peak current than I would try 470 to 1000uF on the 3V3 line. If you supply the board from an external 3V3 maybe it has enough surge capacity.

Could you post a link?

Even with those hardware "fixes" I find I still have to:

Code: Select all

    if not sta_if.isconnected():
        print('connecting to hotspot...')
        sta_if.active(True)
        sta_if.ifconfig((config.WiFi_device, '255.255.255.0', config.gateway, '8.8.8.8'))
        sta_if.connect(config.hotspot, config.password)


        while (count < 5):
            count += 1

            if (sta_if.isconnected()):
                count = 0
                break

            print('.', end = '')
            utime.sleep(1)
Maybe it is the utime.sleep(1) that makes it work! I often see that it requires 2-3 attempts before connecting.

Post Reply