← index #5261Issue #16131
Related · medium · value 1.627
QUERY · ISSUE

ESP8266 stuck in network.STAT_CONNECTING although connected

openby kevinkk525opened 2019-10-26updated 2019-10-27
port-esp8266

Somehow between multiple soft resets I was able to get the esp8266 stuck in a state where sta.isconnect() returns False and s.status() returns network.STAT_CONNECTING forever.
However it was perfectly connected and I could use the webrepl.
Only a disconnect followed by a connect fixed that.

I know that without a reproducable testcase this issue might be worthless, in which case feel free to close it. But maybe someone familiar with the esp8266 network code can see a possibility for this to happen now that he has the information.

(Well I can "reproduce" it by doing multiple resets in a wdt interrupt routine and repl reconnects but I can't provide a real testcase at the moment)

CANDIDATE · ISSUE

ESP8266 is difficult to obtain an IP address from soft-routing WIFI

openby yfyungitopened 2024-11-02updated 2026-03-24
bugport-esp8266proposed-close

Port, board and/or hardware

esp8266

MicroPython version

ESP8266_GENERIC-FLASH_1M-20241025-v1.24.0

Reproduction

wlan = network.WLAN(network.STA_IF)
def connect_static_ip(ssid, password):
wlan.active(True)
while not wlan.isconnected():
print("connecting...", _, wlan.isconnected(), wlan.status())
time.sleep(1)
print("IP :", wlan.ifconfig(), wlan.isconnected())

Expected behaviour

I tried to use esp8266 to connect to wifi and found it difficult to connect, occasionally I can get the ip address

After that, I tried to use ARDUINO for programming, and connected to the same WIFI. I found that every time I connected to WIFI under Arduino, I could get the DHCP IP smoothly and correctly.

Observed behaviour

I tried to use esp8266 to connect to wifi and found it difficult to connect, occasionally I can get the ip address

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied