Skip to content

WiFiMulti hangs if no DHCP Server is available #3993

Closed
@manholl

Description

@manholl

ESP12F
SDK Version 2.3

I use Wifi.begin(SSID, key) to connect to my WLAN - if the DHCP-Server is available- everythink works ok and the "onStationModeGotIP" Event is fired - see last line..

scandone
.f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt 

connected with TML4, channel 1
dhcp client start...
ip:192.168.0.112,mask:255.255.255.0,gw:192.168.0.1
12334 DEBUG  | GOT IP!!!!: 192.168.0.112

But if the DHCP Server is not available the Programm hangs until the Server is available again.
I tried to use the onStationModeDHCPTimeout but it never gets fired..

scandone
.f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt 

connected with TML4, channel 1
dhcp client start...
pm open,type:2 0

I have expected that after some time the "onStationModeDHCPTimeout" Event is fired, or i get a wifi.status so that i can handle that i have no IP. But now my Program hangs - this is a big problem for me, because my ESP is battery powered.. and will not enter deep sleep mode.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions