From d071ca8d0e86e574923bb99eb5620bea3040e428 Mon Sep 17 00:00:00 2001 From: 1technophile Date: Sat, 25 Mar 2017 21:41:06 +0100 Subject: [PATCH] correct compilation error for arduino --- OpenMQTTGateway.ino | 10 ++++------ User_config.h | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/OpenMQTTGateway.ino b/OpenMQTTGateway.ino index 87b3700..3febb52 100644 --- a/OpenMQTTGateway.ino +++ b/OpenMQTTGateway.ino @@ -155,7 +155,7 @@ void setup_wifi() { IPAddress ip_adress(ip); IPAddress gateway_adress(gateway); IPAddress subnet_adress(subnet); - IPAddress dns_adress(dns); + IPAddress dns_adress(Dns); WiFi.begin(wifi_ssid, wifi_password); WiFi.config(ip_adress,gateway_adress,subnet_adress); //Uncomment this line if you want to use advanced network config trc("OpenMQTTGateway ip adress: "); @@ -169,12 +169,10 @@ void setup_wifi() { } #else void setup_ethernet() { - Ethernet.begin(mac, ip); //Comment and uncomment the following line if you want to use advanced network config - //Ethernet.begin(mac, ip, dns, gateway, subnet); - trc("My IP address is: "); - trc(String(Ethernet.localIP())); - + //Ethernet.begin(mac, ip, Dns, gateway, subnet); + trc("OpenMQTTGateway ip adress: "); + Serial.println(Ethernet.localIP()); trc(F("Ethernet connected")); } #endif diff --git a/User_config.h b/User_config.h index 3864ae5..49a896f 100644 --- a/User_config.h +++ b/User_config.h @@ -47,9 +47,9 @@ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT #endif const byte ip[] = { 192, 168, 1, 99 }; //ip adress -// Advanced network config (optional) if you want to use these parameters uncomment line 158 and 172 of OpenMQTTGateway.ino +// Advanced network config (optional) if you want to use these parameters uncomment line 158, 172 and comment line 171 of OpenMQTTGateway.ino const byte gateway[] = { 192, 168, 1, 1 }; //ip adress -const byte dns[] = { 192, 168, 1, 1 }; //ip adress +const byte Dns[] = { 192, 168, 1, 1 }; //ip adress const byte subnet[] = { 255, 255, 255, 0 }; //ip adress //Addons management, comment the line if you don't use