Merge pull request #424 from guiguid/patch-1

Allow User to manage ESP8266 Wifi if need
This commit is contained in:
Henrik Ekblad
2016-04-27 20:26:31 +02:00
@@ -100,6 +100,7 @@ typedef struct
bool gatewayTransportInit() { bool gatewayTransportInit() {
_w5100_spi_en(true); _w5100_spi_en(true);
#if defined(MY_GATEWAY_ESP8266) #if defined(MY_GATEWAY_ESP8266)
#if defined(MY_ESP8266_SSID)
(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD); (void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
#ifdef MY_IP_ADDRESS #ifdef MY_IP_ADDRESS
WiFi.config(_ethernetGatewayIP, gateway, subnet); WiFi.config(_ethernetGatewayIP, gateway, subnet);
@@ -112,6 +113,7 @@ bool gatewayTransportInit() {
} }
MY_SERIALDEVICE.print(F("IP: ")); MY_SERIALDEVICE.print(F("IP: "));
MY_SERIALDEVICE.println(WiFi.localIP()); MY_SERIALDEVICE.println(WiFi.localIP());
#endif
#else #else
#ifdef MY_IP_ADDRESS #ifdef MY_IP_ADDRESS