mirror of
https://github.com/anklimov/lighthub
synced 2025-12-10 13:49:50 +03:00
Critical fix: DUE with WIZ5500 working again now: EthernetX lib mess fixed, IP stack startup code fixed
This commit is contained in:
13
lighthub/lighthub.ino.cpp
Normal file
13
lighthub/lighthub.ino.cpp
Normal 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();
|
||||||
|
}
|
||||||
@@ -107,7 +107,7 @@ EthernetClient ethClient;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SYSLOG_DISABLE
|
#ifndef SYSLOG_DISABLE
|
||||||
#include <EthernetUdp.h>
|
//#include <EthernetUdp.h>
|
||||||
#include <Syslog.h>
|
#include <Syslog.h>
|
||||||
EthernetUDP udpSyslogClient;
|
EthernetUDP udpSyslogClient;
|
||||||
Syslog udpSyslog(udpSyslogClient, SYSLOG_PROTO_IETF);
|
Syslog udpSyslog(udpSyslogClient, SYSLOG_PROTO_IETF);
|
||||||
@@ -490,7 +490,7 @@ void onInitialStateInitLAN() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__AVR__) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32F1)
|
#if defined(__AVR__) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32F1)
|
||||||
IPAddress ip, dns, gw, mask;
|
IPAddress ip, dns, gw, mask;
|
||||||
int res = 1;
|
int res = 1;
|
||||||
debugSerial.println(F("Starting lan"));
|
debugSerial.println(F("Starting lan"));
|
||||||
@@ -510,6 +510,8 @@ void onInitialStateInitLAN() {
|
|||||||
} else Ethernet.begin(mac, ip, dns, gw);
|
} else Ethernet.begin(mac, ip, dns, gw);
|
||||||
} else Ethernet.begin(mac, ip, dns);
|
} else Ethernet.begin(mac, ip, dns);
|
||||||
} else Ethernet.begin(mac, ip);
|
} else Ethernet.begin(mac, ip);
|
||||||
|
debugSerial.println();
|
||||||
|
lanStatus = HAVE_IP_ADDRESS;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
debugSerial.println("No IP data found in flash");
|
debugSerial.println("No IP data found in flash");
|
||||||
@@ -522,7 +524,7 @@ void onInitialStateInitLAN() {
|
|||||||
#endif
|
#endif
|
||||||
wdt_en();
|
wdt_en();
|
||||||
wdt_res();
|
wdt_res();
|
||||||
}
|
|
||||||
|
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
debugSerial.println(F("Failed to configure Ethernet using DHCP. You can set ip manually!"));
|
debugSerial.println(F("Failed to configure Ethernet using DHCP. You can set ip manually!"));
|
||||||
@@ -533,10 +535,11 @@ void onInitialStateInitLAN() {
|
|||||||
resetHard();
|
resetHard();
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
debugSerial.print(F("Got IP address:"));
|
debugSerial.println(F("Got IP address:"));
|
||||||
printIPAddress(Ethernet.localIP());
|
printIPAddress(Ethernet.localIP());
|
||||||
lanStatus = HAVE_IP_ADDRESS;//1;
|
lanStatus = HAVE_IP_ADDRESS;//1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CUSTOM_FIRMWARE_MAC
|
#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
|
#endif
|
||||||
|
|
||||||
#ifndef MY_CONFIG_SERVER
|
#ifndef MY_CONFIG_SERVER
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ lib_deps =
|
|||||||
https://github.com/anklimov/CmdArduino
|
https://github.com/anklimov/CmdArduino
|
||||||
https://github.com/anklimov/ModbusMaster
|
https://github.com/anklimov/ModbusMaster
|
||||||
https://github.com/anklimov/Ethernet
|
https://github.com/anklimov/Ethernet
|
||||||
https://github.com/anklimov/Ethernet2
|
|
||||||
https://github.com/knolleary/pubsubclient.git
|
https://github.com/knolleary/pubsubclient.git
|
||||||
https://github.com/anklimov/Artnet.git
|
https://github.com/anklimov/Artnet.git
|
||||||
FastLED
|
FastLED
|
||||||
@@ -184,7 +183,6 @@ lib_deps =
|
|||||||
https://github.com/anklimov/aJson
|
https://github.com/anklimov/aJson
|
||||||
https://github.com/anklimov/CmdArduino
|
https://github.com/anklimov/CmdArduino
|
||||||
https://github.com/anklimov/ModbusMaster
|
https://github.com/anklimov/ModbusMaster
|
||||||
https://github.com/anklimov/Ethernet
|
|
||||||
https://github.com/anklimov/Ethernet2
|
https://github.com/anklimov/Ethernet2
|
||||||
https://github.com/knolleary/pubsubclient.git
|
https://github.com/knolleary/pubsubclient.git
|
||||||
https://github.com/anklimov/Artnet.git
|
https://github.com/anklimov/Artnet.git
|
||||||
|
|||||||
Reference in New Issue
Block a user