Problems with WiFi STA mode

apalazzi
Posts: 9
Joined: Sun Aug 17, 2025 6:28 pm

Problems with WiFi STA mode

Postby apalazzi » Tue Sep 23, 2025 5:52 pm

Hi,

I had a code that worked as expected in esp-idf v5.1.6, but after upgrading to v5.5.1 doesn't connect any longer to my wifi network... here is the log:

Code: Select all

I (1569) wifi:wifi driver task: 3ffd0b8c, prio:23, stack:6656, core=0
I (1589) wifi:wifi firmware version: 14da9b7
I (1589) wifi:wifi certification version: v7.0
I (1589) wifi:config NVS flash: enabled
I (1589) wifi:config nano formatting: disabled
I (1594) wifi:Init data frame dynamic rx buffer num: 32
I (1599) wifi:Init static rx mgmt buffer num: 5
I (1603) wifi:Init management short buffer num: 32
I (1607) wifi:Init dynamic tx buffer num: 32
I (1611) wifi:Init static rx buffer size: 1600
I (1616) wifi:Init static rx buffer num: 4
I (1619) wifi:Init dynamic rx buffer num: 32
(1625) wifi_init: rx ba win: 6
I (1628) wifi_init: accept mbox: 6
I (1632) wifi_init: tcpip mbox: 32
I (1636) wifi_init: udp mbox: 6
I (1640) wifi_init: tcp mbox: 6
I (1644) wifi_init: tcp tx win: 5760
I (1648) wifi_init: tcp rx win: 5760
I (1652) wifi_init: tcp mss: 1440
I (1656) wifi_init: WiFi IRAM OP enabled
I (1661) wifi_init: WiFi RX IRAM OP enabled
I (1671) phy_init: phy_version 4861,b71b5ad,Aug  5 2025,11:16:06
I (1745) wifi:mode : sta (88:13:bf:36:c2:60)
I (1745) wifi:enable tsf
[  1282][E][STA.cpp:306] begin(): Failed to start STA!
I (1750) wifi:Set ps type: 1, coexist: 0
I disabled the globals on the Arduino library, so i create the WiFi object with WiFi(), that should be just like IDF does this.

I looked at the documentation and googled around but couldn't find any solution... does somebody have any hint?

Bye
Andrea

lbernstone
Posts: 1131
Joined: Mon Jul 22, 2019 3:20 pm

Re: Problems with WiFi STA mode

Postby lbernstone » Tue Sep 23, 2025 7:59 pm

Try just taking out lines 305-308 in STA.cpp
https://github.com/espressif/arduino-es ... 2e6df63a01

apalazzi
Posts: 9
Joined: Sun Aug 17, 2025 6:28 pm

[SOLVED] Re: Problems with WiFi STA mode

Postby apalazzi » Tue Sep 23, 2025 8:20 pm

Solved... the issue was that when you #define NO_GLOBAL_INSTANCES then the global extern WiFiClass WiFi is not declared, but other classes rely on that global to be available.

Declaring a global WiFi solves the issue... not sure why it didn't throw an error during compilation but anyway now it works.

Bye
Andrea

Who is online

Users browsing this forum: PerplexityBot and 3 guests