Critical fix: DUE with WIZ5500 working again now: EthernetX lib mess fixed, IP stack startup code fixed

This commit is contained in:
2018-09-10 01:40:35 +03:00
parent b2238e5f6f
commit b33c621926
4 changed files with 21 additions and 7 deletions

13
lighthub/lighthub.ino.cpp Normal file
View File

@@ -0,0 +1,13 @@
# 1 "/var/folders/kt/8psth65x03v6tw_phdhbj12r0000gn/T/tmpFdKT_0"
#include <Arduino.h>
# 1 "/Users/andrey/Documents/Arduino/lighthub/lighthub/lighthub.ino"
#include "main.h"
void setup();
void loop();
#line 2 "/Users/andrey/Documents/Arduino/lighthub/lighthub/lighthub.ino"
void setup(){
setup_main();
}
void loop(){
loop_main();
}

View File

@@ -107,7 +107,7 @@ EthernetClient ethClient;
#endif
#ifndef SYSLOG_DISABLE
#include <EthernetUdp.h>
//#include <EthernetUdp.h>
#include <Syslog.h>
EthernetUDP udpSyslogClient;
Syslog udpSyslog(udpSyslogClient, SYSLOG_PROTO_IETF);
@@ -490,7 +490,7 @@ void onInitialStateInitLAN() {
}
#endif
#if defined(__AVR__) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32F1)
#if defined(__AVR__) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32F1)
IPAddress ip, dns, gw, mask;
int res = 1;
debugSerial.println(F("Starting lan"));
@@ -510,6 +510,8 @@ void onInitialStateInitLAN() {
} else Ethernet.begin(mac, ip, dns, gw);
} else Ethernet.begin(mac, ip, dns);
} else Ethernet.begin(mac, ip);
debugSerial.println();
lanStatus = HAVE_IP_ADDRESS;
}
else {
debugSerial.println("No IP data found in flash");
@@ -522,7 +524,7 @@ void onInitialStateInitLAN() {
#endif
wdt_en();
wdt_res();
}
if (res == 0) {
debugSerial.println(F("Failed to configure Ethernet using DHCP. You can set ip manually!"));
@@ -533,10 +535,11 @@ void onInitialStateInitLAN() {
resetHard();
#endif
} else {
debugSerial.print(F("Got IP address:"));
debugSerial.println(F("Got IP address:"));
printIPAddress(Ethernet.localIP());
lanStatus = HAVE_IP_ADDRESS;//1;
}
}
#endif
}

View File

@@ -50,7 +50,7 @@
#endif
#ifndef CUSTOM_FIRMWARE_MAC
#define DEFAULT_FIRMWARE_MAC {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xFE}
#define DEFAULT_FIRMWARE_MAC {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xFF}
#endif
#ifndef MY_CONFIG_SERVER

View File

@@ -86,7 +86,6 @@ lib_deps =
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet
https://github.com/anklimov/Ethernet2
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
@@ -184,7 +183,6 @@ lib_deps =
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet
https://github.com/anklimov/Ethernet2
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git