Skip to content

Commit b79a741

Browse files
committed
Fix ESP8266 Ethernet compilation error.
1 parent 60b3d7a commit b79a741

File tree

14 files changed

+33
-25
lines changed

14 files changed

+33
-25
lines changed

examples/ExternalClient/RTDB/Ethernet/ESP32/Basic/Basic.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void networkConnection()
119119
}
120120
else
121121
{
122-
Serial.println("Can't connected");
122+
Serial.println("Can't connect");
123123
}
124124
}
125125

examples/ExternalClient/RTDB/Ethernet/ESP32/StreamCallback/StreamCallback.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void networkConnection()
123123
}
124124
else
125125
{
126-
Serial.println("Can't connected");
126+
Serial.println("Can't connect");
127127
}
128128
}
129129

examples/ExternalClient/RTDB/Ethernet/ESP8266/Basic/Basic.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void networkConnection()
120120
}
121121
else
122122
{
123-
Serial.println("Can't connected");
123+
Serial.println("Can't connect");
124124
}
125125
}
126126

examples/ExternalClient/RTDB/Ethernet/ESP8266/StreamCallback/StreamCallback.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void networkConnection()
126126
}
127127
else
128128
{
129-
Serial.println("Can't connected");
129+
Serial.println("Can't connect");
130130
}
131131
}
132132

examples/ExternalClient/RTDB/Ethernet/Others/Basic/Basic.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
/** This example shows the basic RTDB usage with external Client.
14-
* This example used your Arduino device and WIZnet W5500 (Ethernet) device which SSLClient https://github.com/OPEnSLab-OSU/SSLClient
14+
* This example used your Arduino device (ESP32 in this case) and WIZnet W5500 (Ethernet) device which SSLClient https://github.com/OPEnSLab-OSU/SSLClient
1515
* will be used as the external Client.
1616
*
1717
* This SSLClient, https://github.com/OPEnSLab-OSU/SSLClient can't use in ESP8266 device due to wdt reset error.
@@ -130,7 +130,7 @@ void networkConnection()
130130
}
131131
else
132132
{
133-
Serial.println("Can't connected");
133+
Serial.println("Can't connect");
134134
}
135135
}
136136

examples/ExternalClient/RTDB/Ethernet/Pico/Basic/Basic.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void networkConnection()
134134
}
135135
else
136136
{
137-
Serial.println("Can't connected");
137+
Serial.println("Can't connect");
138138
}
139139
}
140140

examples/ExternalClient/RTDB/Ethernet/Pico/StreamCallback/StreamCallback.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void networkConnection()
140140
}
141141
else
142142
{
143-
Serial.println("Can't connected");
143+
Serial.println("Can't connect");
144144
}
145145
}
146146

examples/RTDB/BasicEthernet/ESP8266/ESP8266.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
*/
3131

3232
#include <ENC28J60lwIP.h>
33-
//#include <W5100lwIP.h>
34-
//#include <W5500lwIP.h>
33+
// #include <W5100lwIP.h>
34+
// #include <W5500lwIP.h>
3535

36-
/** For W5100 ethernet module, uncomment this line in FirebaseFS.h
37-
#define ENABLE_ESP8266_W5100_ETH
36+
/** Don't gorget to define this in FirebaseFS.h
37+
#define ENABLE_ESP8266_ENC28J60_ETH
3838
*/
3939

4040
/** For W5100 ethernet module and PlatformIO IDE, please set the lib_ldf_mode in platformio.ini as this

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Firebase Arduino Client Library for ESP8266 and ESP32",
3-
"version": "4.3.4",
3+
"version": "4.3.5",
44
"keywords": "communication, REST, esp32, esp8266, arduino",
55
"description": "The library supports Firebase products e.g. Realtime database, Cloud Firestore database, Firebase Storage and Google Cloud Storage, Cloud Functions for Firebase and Cloud Messaging. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.",
66
"repository": {

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name=Firebase Arduino Client Library for ESP8266 and ESP32
22

3-
version=4.3.4
3+
version=4.3.5
44

55
author=Mobizt
66

src/FB_Network.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Created January 7, 2023
2+
* Created January 27, 2023
33
*/
44

55
#ifndef FB_Network_H
@@ -56,11 +56,11 @@
5656

5757
#if defined __has_include
5858

59-
#if __has_include(<LwipIntfDev.h>)
59+
#if __has_include(<LwipIntfDev.h>) && (defined(ENABLE_ESP8266_ENC28J60_ETH) || defined(ENABLE_ESP8266_W5500_ETH) || defined(ENABLE_ESP8266_W5500_ETH))
6060
#include <LwipIntfDev.h>
6161
#endif
6262

63-
#if __has_include(<ENC28J60lwIP.h>)
63+
#if __has_include(<ENC28J60lwIP.h>) && defined(ENABLE_ESP8266_ENC28J60_ETH)
6464
#define INC_ENC28J60_LWIP
6565
#include <ENC28J60lwIP.h>
6666
#endif
@@ -78,7 +78,6 @@
7878
#include <W5500lwIP.h>
7979
#endif
8080

81-
8281
#endif
8382

8483
#endif

src/FB_Utils.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*
33
* This library supports Espressif ESP8266, ESP32 and Raspberry Pi Pico (RP2040)
44
*
5-
* Created January 21, 2023
5+
* Created January 22, 2023
66
*
77
* This work is a part of Firebase ESP Client library
88
* Copyright (c) 2023 K. Suwatchai (Mobizt)
@@ -1707,6 +1707,12 @@ namespace TimeHelper
17071707
uint32_t &tm = *mb_ts;
17081708
#if defined(FB_ENABLE_EXTERNAL_CLIENT) || defined(PICO_RP2040)
17091709
tm = *mb_ts_offset + millis() / 1000;
1710+
1711+
#if defined(PICO_RP2040)
1712+
if (tm < time(nullptr))
1713+
tm = time(nullptr);
1714+
#endif
1715+
17101716
#elif defined(ESP32) || defined(ESP8266)
17111717
tm = time(nullptr);
17121718
#endif

src/FirebaseFS.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ static SdFat sd_fat_fs; // should declare as static here
107107

108108
// To enable external Client for ESP8266, ESP32 and Raspberry Pi Pico.
109109
// This will enable automatically for other devices.
110-
// #define FB_ENABLE_EXTERNAL_CLIENT
110+
// #define FB_ENABLE_EXTERNAL_CLIENT
111+
112+
// For ESP8266 ENC28J60 Ethernet module
113+
// #define ENABLE_ESP8266_ENC28J60_ETH
111114

112115
// For ESP8266 W5100 Ethernet module
113116
// #define ENABLE_ESP8266_W5100_ETH

src/Firebase_ESP_Client.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
#ifndef FIREBASE_CLIENT_VERSION
2-
#define FIREBASE_CLIENT_VERSION "4.3.4"
2+
#define FIREBASE_CLIENT_VERSION "4.3.5"
33
#endif
44

55
/**
6-
* Google's Firebase ESP Client Main class, Firebase_ESP_Client.h v4.3.4
6+
* Google's Firebase ESP Client Main class, Firebase_ESP_Client.h v4.3.5
77
*
88
* This library supports Espressif ESP8266 and ESP32 MCUs and Raspberry Pi RP2040 Pico MCUs.
99
*
10-
* Created January 22, 2023
10+
* Created January 27, 2023
1111
*
1212
* Updates:
13-
* - Fix NTP issue and update.
14-
* - Fix netwok management task issue.
13+
* - Fix ESP8266 SDK lwip driver with Ethernet.h compilation error.
14+
* - Update examples.
1515
*
1616
*
1717
* This work is a part of Firebase ESP Client library

0 commit comments

Comments
 (0)