-
-
Notifications
You must be signed in to change notification settings - Fork 896
Fix for ESP8266 Gateway with static IP #1101
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
Conversation
Thanks for reporting this @tobof |
According to this: esp8266/Arduino#128 Wifi.config() needs to be called after Wifi.begin(). Otherwise the static IP issn't used by the ESP8266 gateway.
6ac57ad
to
ab57f29
Compare
Good idea @mfalkvidd ! |
I can probably test a mqtt gateway some time this week. I am not sure the fix you did will work though, there is a begin call here: https://github.com/mysensors/MySensors/pull/1101/files#diff-d700e8d31fad8e7369cc0cdab2d76fa3R158 |
Yes, but the |
Ah. Stupid me :) I'll set up a mqtt gw and verify. |
TL;DR: this fix breaks static IP on mqtt gw. I am not able to reproduce the problem using ESP8266 board version 2.4.0
(reset the device)
(change IP address)
Updated to ESP8266 board version 2.4.1 (latest version at the moment)
change IP address and upload:
But when using tobof/ESP8266_static_ip_fix the static IP address configuration is ignored:
I used the GatewayESP8266MQTTClient sketch with these defines:
and #define MY_RADIO_NRF24 commented so no radio was active. So this fix seems no good for MQTT :( |
Thanks for testing @mfalkvidd ! After doing some testing I'm no longer able to reproduce the initial problem, so I'll close the PR for now and wait for the problem to come up again. :-) |
Strange. Thanks for checking. If the problem happens again just reopen this issue. |
According to this: esp8266/Arduino#128
Wifi.config() needs to be called after Wifi.begin().
Otherwise the static IP issn't used by the ESP8266 gateway.