Calling WiFi.config() before WiFi.begin()
This commit is contained in:
@@ -106,10 +106,10 @@ bool gatewayTransportInit() {
|
|||||||
#if defined(MY_ESP8266_HOSTNAME)
|
#if defined(MY_ESP8266_HOSTNAME)
|
||||||
WiFi.hostname(MY_ESP8266_HOSTNAME);
|
WiFi.hostname(MY_ESP8266_HOSTNAME);
|
||||||
#endif
|
#endif
|
||||||
(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
|
|
||||||
#ifdef MY_IP_ADDRESS
|
#ifdef MY_IP_ADDRESS
|
||||||
WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
|
WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
|
||||||
#endif
|
#endif
|
||||||
|
(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
|
||||||
while (WiFi.status() != WL_CONNECTED)
|
while (WiFi.status() != WL_CONNECTED)
|
||||||
{
|
{
|
||||||
delay(500);
|
delay(500);
|
||||||
|
|||||||
Reference in New Issue
Block a user