-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device is unable to retrieve domain IP after DNS change on router without interrupting the WiFi network #9138
Comments
It would be interesting to have a network dump from esp8266's pov of what's happening between the moments when the sim is removed and replugged. If that's a bug, we shall fix it. You can enable it with the included netdump library. Did you try with git-master version version of the core ? |
I didn't try master, will try to do so. Just need some time (few days) to get one of my devices as I don't have any 8266 devkit around. I'll also add the dump. Repro is simple, not random at all, so it shouldn't take much time. I'll come back with the details. |
~ 13:18:35 -> sim ejected There's some MDNS as I have three other boards in my LAN. |
Are we looking for DNS or MDNS requests though? |
No, just trying to resolve external domain like google.com. Maybe I should put some logic from my app into the sketch. |
Platform
Settings in IDE
Problem Description - short
After pulling out SIM card from my LTE router and plugging it back again, the esp8266 based device is unable to reconnect to the server via domain name - getHostByName fails with timeout (-3). WiFi is uninterrupted during this operation (no reconnection etc.)
The workaround is to set fixed DNS just after WiFi connection setup.
Problem Description - long
I'm working on home automation system since 2017 or so. My hardware platform is based on various ESP versions. I've also built a library that integrates shared device functionality, like MQTT and so on. The library is open source: https://github.com/cziter15/ksIotFrameworkLib.
The issue appear only on arduino for esp8266 and is not observed on esp32 arduino core.
I have ksMqttConnector component in the library that manages MQTT connection. The user can pass domain name, which will be used to retry connection after disconnect. It's very flexible, because it also handles the case when domain's IP changes (dyn DNS configurations or public domains).
For refrence, please check:
https://github.com/cziter15/ksIotFrameworkLib/blob/master/src/ksf/comp/ksMqttConnector.cpp
Reproduction steps:
MCVE Sketch
N/A
The text was updated successfully, but these errors were encountered: