Weird issue with socket.getaddrinfo /router #9365
Unanswered
krishnak
asked this question in
Using MicroPython
Replies: 2 comments
-
When I was trying to sort out WiFi connect issues I resorted to checking getaddrinfo as well. For the ESP32 I always to a STA disconnect before trying to connect. Also, the ESP8266 might benefit from a first call that disconnects the AP, disconnect STA, wait a second then STA connect. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The issue appears to occur when two boards are connecting the WiFi router - as both of them have AP active, so there are 3 AP's including the router operating on the same channel, I wonder whether this results in UDP packet being lost due to collision |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a router which is working normally and any DNS lookup from my computer works fine.
I have a separate thread regarding my issue with micropython crashing when awakened from asyncio.sleep
Since last night the ESP8266 will connect to the router and get an IP DNS etc but the getaddrinfo will return a OS -2 error.
I took a separate fresh ESP8266 board, then flashed the micropython v 1.19 prebuilt from here. It was also giving the same error (however it had a different IP)
I was doing network.WLAN(WLAN.STA_IF).ifconfig() to find out whether the IP has been assigned to the ESP which was showing the Ip address of my local subnet.
Even this morning the status continued i.e IP assigned but no luck with getaddrinfo.
I thought of rebooting the router. And after the router reboot, getaddrinfo works on both the boards.
Has anyone else had such an experience
Beta Was this translation helpful? Give feedback.
All reactions