diff --git a/examples/Authentications/LegacyTokenAuthen/LegacyTokenAuthen.ino b/examples/Authentications/LegacyTokenAuthen/LegacyTokenAuthen.ino index be129548..207b31a4 100644 --- a/examples/Authentications/LegacyTokenAuthen/LegacyTokenAuthen.ino +++ b/examples/Authentications/LegacyTokenAuthen/LegacyTokenAuthen.ino @@ -83,9 +83,10 @@ void setup() config.database_url = DATABASE_URL; config.signer.tokens.legacy_token = DATABASE_SECRET; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/Authentications/ReAuthenticate/ReAuthenticate.ino b/examples/Authentications/ReAuthenticate/ReAuthenticate.ino index 2a6ce963..cfb69a00 100644 --- a/examples/Authentications/ReAuthenticate/ReAuthenticate.ino +++ b/examples/Authentications/ReAuthenticate/ReAuthenticate.ino @@ -116,9 +116,10 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); fbdo.setResponseSize(4096); diff --git a/examples/Authentications/SignInAsAdmin/AccessTokenFile/AccessTokenFile.ino b/examples/Authentications/SignInAsAdmin/AccessTokenFile/AccessTokenFile.ino index 3a95526d..24dcef70 100644 --- a/examples/Authentications/SignInAsAdmin/AccessTokenFile/AccessTokenFile.ino +++ b/examples/Authentications/SignInAsAdmin/AccessTokenFile/AccessTokenFile.ino @@ -118,9 +118,10 @@ void setup() */ // config.signer.tokens.scope = "Google Scope 1 Url, Google Scope 2 Url,.."; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); /* Assign the callback function for the long running token generation task */ diff --git a/examples/Authentications/SignInAsGuest/AnonymousSignin/AnonymousSignin.ino b/examples/Authentications/SignInAsGuest/AnonymousSignin/AnonymousSignin.ino index 03dc6275..a03a7af5 100644 --- a/examples/Authentications/SignInAsGuest/AnonymousSignin/AnonymousSignin.ino +++ b/examples/Authentications/SignInAsGuest/AnonymousSignin/AnonymousSignin.ino @@ -102,7 +102,7 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); // required for large file data, increase Rx size as needed. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); diff --git a/examples/Authentications/SignInAsUser/CustomToken/CustomToken.ino b/examples/Authentications/SignInAsUser/CustomToken/CustomToken.ino index fca485d5..57faa24c 100644 --- a/examples/Authentications/SignInAsUser/CustomToken/CustomToken.ino +++ b/examples/Authentications/SignInAsUser/CustomToken/CustomToken.ino @@ -196,9 +196,10 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); fbdo.setResponseSize(4096); diff --git a/examples/Authentications/SignInAsUser/CustomTokenFile/CustomTokenFile.ino b/examples/Authentications/SignInAsUser/CustomTokenFile/CustomTokenFile.ino index cf46ea93..304f959e 100644 --- a/examples/Authentications/SignInAsUser/CustomTokenFile/CustomTokenFile.ino +++ b/examples/Authentications/SignInAsUser/CustomTokenFile/CustomTokenFile.ino @@ -145,9 +145,10 @@ void setup() claims.add("admin", true); auth.token.claims = claims.raw(); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); fbdo.setResponseSize(4096); diff --git a/examples/Authentications/SignInAsUser/EmailPassword/EmailPassword.ino b/examples/Authentications/SignInAsUser/EmailPassword/EmailPassword.ino index a75b165d..427fac08 100644 --- a/examples/Authentications/SignInAsUser/EmailPassword/EmailPassword.ino +++ b/examples/Authentications/SignInAsUser/EmailPassword/EmailPassword.ino @@ -122,9 +122,10 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); fbdo.setResponseSize(4096); diff --git a/examples/Authentications/SignInWithAccessToken/SignInWithAccessToken.ino b/examples/Authentications/SignInWithAccessToken/SignInWithAccessToken.ino index 4342daa7..50f653b7 100644 --- a/examples/Authentications/SignInWithAccessToken/SignInWithAccessToken.ino +++ b/examples/Authentications/SignInWithAccessToken/SignInWithAccessToken.ino @@ -78,9 +78,10 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); /* Assign the callback function for the long running token generation task */ diff --git a/examples/Authentications/SignInWithCustomToken/SignInWithCustomToken.ino b/examples/Authentications/SignInWithCustomToken/SignInWithCustomToken.ino index 2838ece2..ab8dd1af 100644 --- a/examples/Authentications/SignInWithCustomToken/SignInWithCustomToken.ino +++ b/examples/Authentications/SignInWithCustomToken/SignInWithCustomToken.ino @@ -93,9 +93,10 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); /* Assign the callback function for the long running token generation task */ diff --git a/examples/Authentications/SignInWithIDToken/SignInWithIDToken.ino b/examples/Authentications/SignInWithIDToken/SignInWithIDToken.ino index 8d0ed2c9..39dd10e6 100644 --- a/examples/Authentications/SignInWithIDToken/SignInWithIDToken.ino +++ b/examples/Authentications/SignInWithIDToken/SignInWithIDToken.ino @@ -92,9 +92,10 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); /** To sign in as anonymous user, just sign up as anonymous user diff --git a/examples/Authentications/SignInWithRefreshAccessToken/SignInWithRefreshAccessToken.ino b/examples/Authentications/SignInWithRefreshAccessToken/SignInWithRefreshAccessToken.ino index e2338199..0369deac 100644 --- a/examples/Authentications/SignInWithRefreshAccessToken/SignInWithRefreshAccessToken.ino +++ b/examples/Authentications/SignInWithRefreshAccessToken/SignInWithRefreshAccessToken.ino @@ -78,9 +78,10 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); /* Assign the callback function for the long running token generation task */ diff --git a/examples/Authentications/SignInWithRefreshIDToken/SignInWithRefreshIDToken.ino b/examples/Authentications/SignInWithRefreshIDToken/SignInWithRefreshIDToken.ino index 6d3cce09..7ea1f7cf 100644 --- a/examples/Authentications/SignInWithRefreshIDToken/SignInWithRefreshIDToken.ino +++ b/examples/Authentications/SignInWithRefreshIDToken/SignInWithRefreshIDToken.ino @@ -95,9 +95,10 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); /* Assign the callback function for the long running token generation task */ diff --git a/examples/Authentications/TestMode/TestMode.ino b/examples/Authentications/TestMode/TestMode.ino index 2359915b..963f668e 100644 --- a/examples/Authentications/TestMode/TestMode.ino +++ b/examples/Authentications/TestMode/TestMode.ino @@ -93,9 +93,10 @@ void setup() */ - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/Authentications/UserManagement/ResetPassword/ResetPassword.ino b/examples/Authentications/UserManagement/ResetPassword/ResetPassword.ino index e48b699e..d7abef33 100644 --- a/examples/Authentications/UserManagement/ResetPassword/ResetPassword.ino +++ b/examples/Authentications/UserManagement/ResetPassword/ResetPassword.ino @@ -83,7 +83,7 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); // The WiFi credentials are required for Pico W // due to it does not have reconnect feature. diff --git a/examples/Authentications/UserManagement/SendVerification/SendVerification.ino b/examples/Authentications/UserManagement/SendVerification/SendVerification.ino index f9997ddf..1736e261 100644 --- a/examples/Authentications/UserManagement/SendVerification/SendVerification.ino +++ b/examples/Authentications/UserManagement/SendVerification/SendVerification.ino @@ -106,9 +106,10 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); /* Assign the user sign in credentials */ diff --git a/examples/Authentications/UserManagement/Signup/Signup.ino b/examples/Authentications/UserManagement/Signup/Signup.ino index 3e6aa654..bc55c963 100644 --- a/examples/Authentications/UserManagement/Signup/Signup.ino +++ b/examples/Authentications/UserManagement/Signup/Signup.ino @@ -99,9 +99,10 @@ void setup() /* Assign the RTDB URL */ config.database_url = DATABASE_URL; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); Serial.print("Sign up new user... "); diff --git a/examples/BackupRestore/Flash/Flash.ino b/examples/BackupRestore/Flash/Flash.ino index 00515b1c..13c0bf8c 100644 --- a/examples/BackupRestore/Flash/Flash.ino +++ b/examples/BackupRestore/Flash/Flash.ino @@ -90,12 +90,12 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); - // The WiFi credentials are required for Pico W // due to it does not have reconnect feature. #if defined(ARDUINO_RASPBERRY_PI_PICO_W) @@ -110,8 +110,7 @@ void setup() // To connect without auth in Test Mode, see Authentications/TestMode/TestMode.ino Firebase.begin(&config, &auth); - - } +} // The Firebase download callback function void rtdbDownloadCallback(RTDB_DownloadStatusInfo info) diff --git a/examples/BackupRestore/SD/SD.ino b/examples/BackupRestore/SD/SD.ino index 8e9e3534..0383160b 100644 --- a/examples/BackupRestore/SD/SD.ino +++ b/examples/BackupRestore/SD/SD.ino @@ -95,12 +95,12 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); - // The WiFi credentials are required for Pico W // due to it does not have reconnect feature. #if defined(ARDUINO_RASPBERRY_PI_PICO_W) diff --git a/examples/Basic/Basic.ino b/examples/Basic/Basic.ino index 55352470..2e5a1189 100644 --- a/examples/Basic/Basic.ino +++ b/examples/Basic/Basic.ino @@ -93,12 +93,12 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); - // The WiFi credentials are required for Pico W // due to it does not have reconnect feature. #if defined(ARDUINO_RASPBERRY_PI_PICO_W) @@ -127,8 +127,8 @@ void setup() /** Timeout options. - //WiFi reconnect timeout (interval) in ms (10 sec - 5 min) when WiFi disconnected. - config.timeout.wifiReconnect = 10 * 1000; + //Network reconnect timeout (interval) in ms (10 sec - 5 min) when network or WiFi disconnected. + config.timeout.networkReconnect = 10 * 1000; //Socket connection and SSL handshake timeout in ms (1 sec - 1 min). config.timeout.socketConnection = 10 * 1000; diff --git a/examples/BasicCert/BasicCert.ino b/examples/BasicCert/BasicCert.ino index 9648126f..b0b50f59 100644 --- a/examples/BasicCert/BasicCert.ino +++ b/examples/BasicCert/BasicCert.ino @@ -138,9 +138,10 @@ void setup() // Or custom set the root certificate for each FirebaseData object fbdo.setCert(rootCACert); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W @@ -176,8 +177,8 @@ void setup() /** Timeout options. - //WiFi reconnect timeout (interval) in ms (10 sec - 5 min) when WiFi disconnected. - config.timeout.wifiReconnect = 10 * 1000; + //Network reconnect timeout (interval) in ms (10 sec - 5 min) when network or WiFi disconnected. + config.timeout.networkReconnect = 10 * 1000; //Socket connection and SSL handshake timeout in ms (1 sec - 1 min). config.timeout.socketConnection = 10 * 1000; diff --git a/examples/BasicEthernet/BasicEthernet.ino b/examples/BasicEthernet/BasicEthernet.ino index b8ceb947..13038c22 100644 --- a/examples/BasicEthernet/BasicEthernet.ino +++ b/examples/BasicEthernet/BasicEthernet.ino @@ -101,9 +101,10 @@ void setupFirebase() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); /* Assign the pointer to Ethernet module lwip interface */ diff --git a/examples/Blob/Blob.ino b/examples/Blob/Blob.ino index dcc1552f..7f4492a6 100644 --- a/examples/Blob/Blob.ino +++ b/examples/Blob/Blob.ino @@ -101,9 +101,10 @@ void setup() config.wifi.addAP(WIFI_SSID, WIFI_PASSWORD); #endif - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // Or use legacy authenticate method diff --git a/examples/Blynk/Blynk.ino b/examples/Blynk/Blynk.ino index 9f1fc2e2..1aa50821 100644 --- a/examples/Blynk/Blynk.ino +++ b/examples/Blynk/Blynk.ino @@ -115,9 +115,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/DataChangesListener/Callback/Callback.ino b/examples/DataChangesListener/Callback/Callback.ino index 01442117..14f1af2e 100644 --- a/examples/DataChangesListener/Callback/Callback.ino +++ b/examples/DataChangesListener/Callback/Callback.ino @@ -125,9 +125,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W @@ -158,8 +159,8 @@ void setup() /** Timeout options, below is default config. - //WiFi reconnect timeout (interval) in ms (10 sec - 5 min) when WiFi disconnected. - config.timeout.wifiReconnect = 10 * 1000; + //Network reconnect timeout (interval) in ms (10 sec - 5 min) when network or WiFi disconnected. + config.timeout.networkReconnect = 10 * 1000; //Socket begin connection timeout (ESP32) or data transfer timeout (ESP8266) in ms (1 sec - 1 min). config.timeout.socketConnection = 30 * 1000; diff --git a/examples/DataChangesListener/MultiPath/MultiPath.ino b/examples/DataChangesListener/MultiPath/MultiPath.ino index a087ed15..b96cde4d 100644 --- a/examples/DataChangesListener/MultiPath/MultiPath.ino +++ b/examples/DataChangesListener/MultiPath/MultiPath.ino @@ -120,6 +120,9 @@ void setup() Serial.printf("Firebase Client v%s\n\n", FIREBASE_CLIENT_VERSION); + Serial.println("The MultipathStream is obsoleted, please use normal stream instead."); + Serial.println("In case of ESP8266, external Static RAM is recommend for multiple streaming."); + /* Assign the api key (required) */ config.api_key = API_KEY; @@ -133,9 +136,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W @@ -176,8 +180,8 @@ void setup() /** Timeout options, below is default config. - //WiFi reconnect timeout (interval) in ms (10 sec - 5 min) when WiFi disconnected. - config.timeout.wifiReconnect = 10 * 1000; + //Network reconnect timeout (interval) in ms (10 sec - 5 min) when network or WiFi disconnected. + config.timeout.networkReconnect = 10 * 1000; //Socket begin connection timeout (ESP32) or data transfer timeout (ESP8266) in ms (1 sec - 1 min). config.timeout.socketConnection = 30 * 1000; @@ -250,7 +254,6 @@ void loop() // stream.pauseFirebase(true); // stream.clear(); // close session and release memory - // To resume stream with callback // stream.pauseFirebase(false); // Firebase.setMultiPathStreamCallback(stream, streamCallback, streamTimeoutCallback); diff --git a/examples/DataChangesListener/NoCallback/NoCallback.ino b/examples/DataChangesListener/NoCallback/NoCallback.ino index 8af063e7..45e16fac 100644 --- a/examples/DataChangesListener/NoCallback/NoCallback.ino +++ b/examples/DataChangesListener/NoCallback/NoCallback.ino @@ -91,9 +91,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W @@ -122,8 +123,8 @@ void setup() /** Timeout options, below is default config. - //WiFi reconnect timeout (interval) in ms (10 sec - 5 min) when WiFi disconnected. - config.timeout.wifiReconnect = 10 * 1000; + //Network reconnect timeout (interval) in ms (10 sec - 5 min) when network or WiFi disconnected. + config.timeout.networkReconnect = 10 * 1000; //Socket begin connection timeout (ESP32) or data transfer timeout (ESP8266) in ms (1 sec - 1 min). config.timeout.socketConnection = 30 * 1000; diff --git a/examples/DataChangesListener/SingleDataObject/SingleDataObject.ino b/examples/DataChangesListener/SingleDataObject/SingleDataObject.ino index 5764428e..3e6a5cd2 100644 --- a/examples/DataChangesListener/SingleDataObject/SingleDataObject.ino +++ b/examples/DataChangesListener/SingleDataObject/SingleDataObject.ino @@ -96,9 +96,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/DataFilter/DataFilter.ino b/examples/DataFilter/DataFilter.ino index d63e5dc5..cbfe6ec0 100644 --- a/examples/DataFilter/DataFilter.ino +++ b/examples/DataFilter/DataFilter.ino @@ -95,9 +95,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W @@ -114,7 +115,6 @@ void setup() // To connect without auth in Test Mode, see Authentications/TestMode/TestMode.ino Firebase.begin(&config, &auth); - } void loop() diff --git a/examples/DataRetaining/DataRetaining.ino b/examples/DataRetaining/DataRetaining.ino index 69479ee4..8000e737 100644 --- a/examples/DataRetaining/DataRetaining.ino +++ b/examples/DataRetaining/DataRetaining.ino @@ -100,9 +100,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/DatabaseRules/DatabaseRules.ino b/examples/DatabaseRules/DatabaseRules.ino index 470a77de..58a7b2c0 100644 --- a/examples/DatabaseRules/DatabaseRules.ino +++ b/examples/DatabaseRules/DatabaseRules.ino @@ -100,9 +100,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W @@ -121,7 +122,8 @@ void setup() Firebase.begin(&config, &auth); #if defined(ESP8266) - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); #endif } diff --git a/examples/DownloadFileOTA/DownloadFileOTA.ino b/examples/DownloadFileOTA/DownloadFileOTA.ino index 7da877a3..4de0ee6f 100644 --- a/examples/DownloadFileOTA/DownloadFileOTA.ino +++ b/examples/DownloadFileOTA/DownloadFileOTA.ino @@ -94,9 +94,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W @@ -107,7 +108,8 @@ void setup() #endif #if defined(ESP8266) - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(2048 /* Rx buffer size in bytes from 512 - 16384 */, 512 /* Tx buffer size in bytes from 512 - 16384 */); #endif diff --git a/examples/ETag/ETag.ino b/examples/ETag/ETag.ino index b9ca04f0..b35111f6 100644 --- a/examples/ETag/ETag.ino +++ b/examples/ETag/ETag.ino @@ -93,9 +93,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/ExternalClient/Ethernet/Basic/Basic.ino b/examples/ExternalClient/Ethernet/Basic/Basic.ino index 163559d6..0cee79d8 100644 --- a/examples/ExternalClient/Ethernet/Basic/Basic.ino +++ b/examples/ExternalClient/Ethernet/Basic/Basic.ino @@ -100,9 +100,10 @@ void setup() fbdo.setEthernetClient(ð, Eth_MAC, WIZNET_CS_PIN, WIZNET_RESET_PIN); // The staIP can be assigned to the fifth param // Comment or pass false value when network reconnection will control by your code or third party library - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(2048 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); Firebase.setDoubleDigits(5); diff --git a/examples/ExternalClient/Ethernet/StreamCallback/StreamCallback.ino b/examples/ExternalClient/Ethernet/StreamCallback/StreamCallback.ino index 3d1e686f..a7c4a978 100644 --- a/examples/ExternalClient/Ethernet/StreamCallback/StreamCallback.ino +++ b/examples/ExternalClient/Ethernet/StreamCallback/StreamCallback.ino @@ -134,9 +134,10 @@ void setup() stream.setEthernetClient(ð2, Eth_MAC, WIZNET_CS_PIN, WIZNET_RESET_PIN); // The staIP can be assigned to the fifth param // Comment or pass false value when network reconnection will control by your code or third party library - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(2048 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); stream.setBSSLBufferSize(2048 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); diff --git a/examples/ExternalClient/GSM/Basic/Basic.ino b/examples/ExternalClient/GSM/Basic/Basic.ino index 62eba035..9b11c338 100644 --- a/examples/ExternalClient/GSM/Basic/Basic.ino +++ b/examples/ExternalClient/GSM/Basic/Basic.ino @@ -18,10 +18,10 @@ #include -#define ESP8266_RX_PIN 14 //ESP8266 GPIO 14 connected to SIM7600 Pin 71 (TX) -#define ESP8266_TX_PIN 12 //ESP8266 GPIO 12 connected to SIM7600 Pin 68 (RX) -#define ESP8266_PWR_PIN 5 //ESP8266 GPIO 5 connected to SIM7600 Pin 3 (PWRKEY) -#define ESP8266_RESET 4 //ESP8266 GPIO 4 connected to SIM7600 Pin 4 (RESET) +#define ESP8266_RX_PIN 14 // ESP8266 GPIO 14 connected to SIM7600 Pin 71 (TX) +#define ESP8266_TX_PIN 12 // ESP8266 GPIO 12 connected to SIM7600 Pin 68 (RX) +#define ESP8266_PWR_PIN 5 // ESP8266 GPIO 5 connected to SIM7600 Pin 3 (PWRKEY) +#define ESP8266_RESET 4 // ESP8266 GPIO 4 connected to SIM7600 Pin 4 (RESET) #define UART_BAUD 115200 SoftwareSerial softSerial; @@ -34,7 +34,6 @@ SoftwareSerial softSerial; // Set serial for AT commands (to the module) #define SerialAT softSerial - // See all AT commands, if wanted // #define DUMP_AT_COMMANDS @@ -160,9 +159,10 @@ void setup() fbdo.setGSMClient(&gsm_client, &modem, GSM_PIN, apn, gprsUser, gprsPass); // Comment or pass false value when WiFi reconnection will control by your code or third party library - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); Firebase.setDoubleDigits(5); diff --git a/examples/ExternalClient/GSM/StreamCallback/StreamCallback.ino b/examples/ExternalClient/GSM/StreamCallback/StreamCallback.ino index fdaed167..dc767dbc 100644 --- a/examples/ExternalClient/GSM/StreamCallback/StreamCallback.ino +++ b/examples/ExternalClient/GSM/StreamCallback/StreamCallback.ino @@ -207,9 +207,10 @@ void setup() stream.setGSMClient(&gsm_client2, &modem, GSM_PIN, apn, gprsUser, gprsPass); // Comment or pass false value when WiFi reconnection will control by your code or third party library - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(2048 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); stream.setBSSLBufferSize(2048 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); diff --git a/examples/ExternalClient/Generic/Basic/Basic.ino b/examples/ExternalClient/Generic/Basic/Basic.ino index 1ae69738..4fa26677 100644 --- a/examples/ExternalClient/Generic/Basic/Basic.ino +++ b/examples/ExternalClient/Generic/Basic/Basic.ino @@ -87,9 +87,10 @@ void setup() fbdo.setGenericClient(&client, networkConnection, networkStatusRequestCallback); // Comment or pass false value when network reconnection will control by your code or third party library - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(2048 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); Firebase.setDoubleDigits(5); diff --git a/examples/ExternalClient/Generic/StreamCallback/StreamCallback.ino b/examples/ExternalClient/Generic/StreamCallback/StreamCallback.ino index 31fd723d..c1da93d0 100644 --- a/examples/ExternalClient/Generic/StreamCallback/StreamCallback.ino +++ b/examples/ExternalClient/Generic/StreamCallback/StreamCallback.ino @@ -130,9 +130,10 @@ void setup() stream.setGenericClient(&client2, networkConnection, networkStatusRequestCallback); // Comment or pass false value when network reconnection will control by your code or third party library - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(2048 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); stream.setBSSLBufferSize(2048 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); diff --git a/examples/FastSend/FastSend.ino b/examples/FastSend/FastSend.ino index 09b52621..49af64da 100644 --- a/examples/FastSend/FastSend.ino +++ b/examples/FastSend/FastSend.ino @@ -96,9 +96,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/File/Flash/Flash.ino b/examples/File/Flash/Flash.ino index 404b7a68..fb4f72cd 100644 --- a/examples/File/Flash/Flash.ino +++ b/examples/File/Flash/Flash.ino @@ -101,9 +101,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/File/SD/SD.ino b/examples/File/SD/SD.ino index 1aebcd02..4e4b0943 100644 --- a/examples/File/SD/SD.ino +++ b/examples/File/SD/SD.ino @@ -100,9 +100,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/FirebaseJson/Client/Firebase/Firebase.ino b/examples/FirebaseJson/Client/Firebase/Firebase.ino index 41e592a2..c6c66115 100644 --- a/examples/FirebaseJson/Client/Firebase/Firebase.ino +++ b/examples/FirebaseJson/Client/Firebase/Firebase.ino @@ -83,6 +83,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h + // Since Firebase v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. + fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); + // Or use legacy authenticate method // config.database_url = DATABASE_URL; // config.signer.tokens.legacy_token = ""; @@ -90,7 +94,7 @@ void setup() Firebase.begin(&config, &auth); // Comment or pass false value when WiFi reconnection will control by your code or third party library - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); } void loop() diff --git a/examples/Messaging/AppInstanceInfo/AppInstanceInfo.ino b/examples/Messaging/AppInstanceInfo/AppInstanceInfo.ino index 377f63bc..1909d4ae 100644 --- a/examples/Messaging/AppInstanceInfo/AppInstanceInfo.ino +++ b/examples/Messaging/AppInstanceInfo/AppInstanceInfo.ino @@ -88,9 +88,10 @@ void setup() Firebase.FCM.setServerKey(FIREBASE_FCM_SERVER_KEY); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/Messaging/RegistAPNsTokens/RegistAPNsTokens.ino b/examples/Messaging/RegistAPNsTokens/RegistAPNsTokens.ino index ca8b43e5..6929ab64 100644 --- a/examples/Messaging/RegistAPNsTokens/RegistAPNsTokens.ino +++ b/examples/Messaging/RegistAPNsTokens/RegistAPNsTokens.ino @@ -89,9 +89,10 @@ void setup() Firebase.FCM.setServerKey(FIREBASE_FCM_SERVER_KEY); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/Messaging/Send/HTTPv1/SendMessage/SendMessage.ino b/examples/Messaging/Send/HTTPv1/SendMessage/SendMessage.ino index ae47d5d2..ed1c5148 100644 --- a/examples/Messaging/Send/HTTPv1/SendMessage/SendMessage.ino +++ b/examples/Messaging/Send/HTTPv1/SendMessage/SendMessage.ino @@ -104,9 +104,10 @@ void setup() config.service_account.data.project_id = FIREBASE_PROJECT_ID; config.service_account.data.private_key = PRIVATE_KEY; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/Messaging/Send/HTTPv1/SendTopic/SendTopic.ino b/examples/Messaging/Send/HTTPv1/SendTopic/SendTopic.ino index 885368a0..8239356b 100644 --- a/examples/Messaging/Send/HTTPv1/SendTopic/SendTopic.ino +++ b/examples/Messaging/Send/HTTPv1/SendTopic/SendTopic.ino @@ -106,9 +106,10 @@ void setup() config.service_account.data.project_id = FIREBASE_PROJECT_ID; config.service_account.data.private_key = PRIVATE_KEY; - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/Messaging/Send/LegacyAPI/BroadcastMessage/BroadcastMessage.ino b/examples/Messaging/Send/LegacyAPI/BroadcastMessage/BroadcastMessage.ino index 8a9ed4f9..3d8379f6 100644 --- a/examples/Messaging/Send/LegacyAPI/BroadcastMessage/BroadcastMessage.ino +++ b/examples/Messaging/Send/LegacyAPI/BroadcastMessage/BroadcastMessage.ino @@ -91,9 +91,10 @@ void setup() // required for legacy HTTP API Firebase.FCM.setServerKey(FIREBASE_FCM_SERVER_KEY); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); sendMessage(); diff --git a/examples/Messaging/Send/LegacyAPI/SendMessage/SendMessage.ino b/examples/Messaging/Send/LegacyAPI/SendMessage/SendMessage.ino index 0472b325..c063b52e 100644 --- a/examples/Messaging/Send/LegacyAPI/SendMessage/SendMessage.ino +++ b/examples/Messaging/Send/LegacyAPI/SendMessage/SendMessage.ino @@ -103,9 +103,10 @@ void setup() // required for legacy HTTP API Firebase.FCM.setServerKey(FIREBASE_FCM_SERVER_KEY); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // or to use ESP8266 Ethernet module diff --git a/examples/Messaging/Send/LegacyAPI/SendMessageEthernet/ESP32/ESP32.ino b/examples/Messaging/Send/LegacyAPI/SendMessageEthernet/ESP32/ESP32.ino index f417793a..d5353e98 100644 --- a/examples/Messaging/Send/LegacyAPI/SendMessageEthernet/ESP32/ESP32.ino +++ b/examples/Messaging/Send/LegacyAPI/SendMessageEthernet/ESP32/ESP32.ino @@ -184,9 +184,10 @@ void setupFCM() // required for legacy HTTP API Firebase.FCM.setServerKey(FIREBASE_FCM_SERVER_KEY); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); } diff --git a/examples/Messaging/Send/LegacyAPI/SendMessageEthernet/ESP8266/ESP8266.ino b/examples/Messaging/Send/LegacyAPI/SendMessageEthernet/ESP8266/ESP8266.ino index 3497595b..b2fcb0b5 100644 --- a/examples/Messaging/Send/LegacyAPI/SendMessageEthernet/ESP8266/ESP8266.ino +++ b/examples/Messaging/Send/LegacyAPI/SendMessageEthernet/ESP8266/ESP8266.ino @@ -123,9 +123,10 @@ void setup() #endif Firebase.FCM.setServerKey(FIREBASE_FCM_SERVER_KEY, &spi_ethernet_module); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); sendMessage(); diff --git a/examples/Messaging/Send/LegacyAPI/SendTopic/SendTopic.ino b/examples/Messaging/Send/LegacyAPI/SendTopic/SendTopic.ino index 6a1e1879..902e3ecf 100644 --- a/examples/Messaging/Send/LegacyAPI/SendTopic/SendTopic.ino +++ b/examples/Messaging/Send/LegacyAPI/SendTopic/SendTopic.ino @@ -86,9 +86,10 @@ void setup() // required for legacy HTTP API Firebase.FCM.setServerKey(FIREBASE_FCM_SERVER_KEY); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); sendMessage(); diff --git a/examples/Messaging/SubscribeTopic/SubscribeTopic.ino b/examples/Messaging/SubscribeTopic/SubscribeTopic.ino index b8bb34b4..03f016a5 100644 --- a/examples/Messaging/SubscribeTopic/SubscribeTopic.ino +++ b/examples/Messaging/SubscribeTopic/SubscribeTopic.ino @@ -89,9 +89,10 @@ void setup() Firebase.FCM.setServerKey(FIREBASE_FCM_SERVER_KEY); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/Messaging/UnsubscribeTopic/UnsubscribeTopic.ino b/examples/Messaging/UnsubscribeTopic/UnsubscribeTopic.ino index ffecdf40..5953b0a4 100644 --- a/examples/Messaging/UnsubscribeTopic/UnsubscribeTopic.ino +++ b/examples/Messaging/UnsubscribeTopic/UnsubscribeTopic.ino @@ -89,9 +89,10 @@ void setup() Firebase.FCM.setServerKey(FIREBASE_FCM_SERVER_KEY); - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/Priority/Priority.ino b/examples/Priority/Priority.ino index af4dfe54..4deb0ebb 100644 --- a/examples/Priority/Priority.ino +++ b/examples/Priority/Priority.ino @@ -97,9 +97,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/Queue/Queue.ino b/examples/Queue/Queue.ino index aa08770d..bff94bce 100644 --- a/examples/Queue/Queue.ino +++ b/examples/Queue/Queue.ino @@ -126,9 +126,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/ShallowedData/ShallowedData.ino b/examples/ShallowedData/ShallowedData.ino index dd5ea06a..7a727ef0 100644 --- a/examples/ShallowedData/ShallowedData.ino +++ b/examples/ShallowedData/ShallowedData.ino @@ -92,9 +92,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/examples/Timestamp/Timestamp.ino b/examples/Timestamp/Timestamp.ino index effa10f9..4728d73d 100644 --- a/examples/Timestamp/Timestamp.ino +++ b/examples/Timestamp/Timestamp.ino @@ -93,9 +93,10 @@ void setup() /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h - Firebase.reconnectWiFi(true); + Firebase.reconnectNetwork(true); - // required for large file data, increase Rx size as needed. + // Since v4.4.x, BearSSL engine was used, the SSL buffer need to be set. + // Large data transmission may require larger RX buffer, otherwise the data read time out can be occurred. fbdo.setBSSLBufferSize(4096 /* Rx buffer size in bytes from 512 - 16384 */, 1024 /* Tx buffer size in bytes from 512 - 16384 */); // The WiFi credentials are required for Pico W diff --git a/keywords.txt b/keywords.txt index 882d459f..fd6e65e5 100644 --- a/keywords.txt +++ b/keywords.txt @@ -49,7 +49,7 @@ isTokenExpired KEYWORD2 refreshToken KEYWORD2 reset KEYWORD2 deleteUser KEYWORD2 -reconnectWiFi KEYWORD2 +reconnectNetwork KEYWORD2 setFloatDigits KEYWORD2 setDoubleDigits KEYWORD2 setReadTimeout KEYWORD2 diff --git a/library.json b/library.json index 696955cb..afb5b89a 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Firebase ESP8266 Client", - "version": "4.4.5", + "version": "4.4.6", "keywords": "communication, REST, esp8266, arduino", "description": "The secure, fast and reliable Firebase Realtime database library to read, store, update, delete, listen, backup, and restore data. You can also read and modify the database security rules with this library.", "repository": { diff --git a/library.properties b/library.properties index 29e3bc31..29fdb40e 100644 --- a/library.properties +++ b/library.properties @@ -1,6 +1,6 @@ name=Firebase ESP8266 Client -version=4.4.5 +version=4.4.6 author=Mobizt diff --git a/src/FB_Const.h b/src/FB_Const.h index 0391f6bd..f7110d96 100644 --- a/src/FB_Const.h +++ b/src/FB_Const.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif @@ -80,8 +80,8 @@ #define MAX_REDIRECT 5 -#define MIN_WIFI_RECONNECT_TIMEOUT 10 * 1000 -#define MAX_WIFI_RECONNECT_TIMEOUT 5 * 60 * 1000 +#define MIN_NET_RECONNECT_TIMEOUT 10 * 1000 +#define MAX_NET_RECONNECT_TIMEOUT 5 * 60 * 1000 #define MIN_SOCKET_CONN_TIMEOUT 1 * 1000 #define DEFAULT_SOCKET_CONN_TIMEOUT 10 * 1000 @@ -1086,7 +1086,7 @@ struct firebase_cfg_int_t bool fb_rtoken_requested = false; uint8_t fb_stream_idx = 0; - bool fb_reconnect_wifi = false; + bool fb_reconnect_network = false; unsigned long fb_last_reconnect_millis = 0; bool net_once_connected = false; unsigned long fb_last_jwt_begin_step_millis = 0; @@ -1297,8 +1297,11 @@ typedef void (*TokenStatusCallback)(TokenInfo); struct firebase_client_timeout_t { - // WiFi reconnect timeout (interval) in ms (10 sec - 5 min) when WiFi disconnected. - uint16_t wifiReconnect = MIN_WIFI_RECONNECT_TIMEOUT; + // Network reconnect timeout (interval) in ms (10 sec - 5 min) when network or WiFi disconnected. + uint16_t networkReconnect = MIN_NET_RECONNECT_TIMEOUT; + + // Deprecated, please use networkReconnect instead + uint16_t wifiReconnect = 0; // Socket connection and ssl handshake timeout in ms (1 sec - 1 min). unsigned long socketConnection = DEFAULT_SOCKET_CONN_TIMEOUT; diff --git a/src/FB_Error.h b/src/FB_Error.h index 29afefab..ea6d266b 100644 --- a/src/FB_Error.h +++ b/src/FB_Error.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/FB_Network.h b/src/FB_Network.h index c813d222..9c050c9d 100644 --- a/src/FB_Network.h +++ b/src/FB_Network.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/FB_Utils.h b/src/FB_Utils.h index 27653eac..13a3dc99 100644 --- a/src/FB_Utils.h +++ b/src/FB_Utils.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/Firebase.cpp b/src/Firebase.cpp index 5b9de508..c88cb2b6 100644 --- a/src/Firebase.cpp +++ b/src/Firebase.cpp @@ -1,12 +1,12 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif /** - * The Firebase class, Firebase.cpp v1.2.7 + * The Firebase class, Firebase.cpp v1.2.8 * - * Created September 5, 2023 + * Created September 13, 2023 * * The MIT License (MIT) * Copyright (c) 2023 K. Suwatchai (Mobizt) @@ -309,7 +309,7 @@ void FIREBASE_CLASS::init(FirebaseConfig *config, FirebaseAuth *auth) if (!this->auth) this->auth = new FirebaseAuth(); - Core.internal.fb_reconnect_wifi = Core.autoReconnectWiFi; + Core.internal.fb_reconnect_network = Core.autoReconnectNetwork; config->signer.lastReqMillis = 0; @@ -321,12 +321,17 @@ void FIREBASE_CLASS::init(FirebaseConfig *config, FirebaseAuth *auth) config->signer.tokens.error.message.clear(); } -void FIREBASE_CLASS::reconnectWiFi(bool reconnect) +void FIREBASE_CLASS::reconnectNetwork(bool reconnect) { #if defined(FIREBASE_WIFI_IS_AVAILABLE) && (defined(ESP32) || defined(ESP8266)) WiFi.setAutoReconnect(reconnect); #endif - Core.setAutoReconnectWiFi(reconnect); + Core.setAutoReconnectNetwork(reconnect); +} + +void FIREBASE_CLASS::reconnectWiFi(bool reconnect) +{ + reconnectNetwork(reconnect); } time_t FIREBASE_CLASS::getCurrentTime() @@ -417,8 +422,6 @@ bool FIREBASE_CLASS::setSystemTime(time_t ts) return Core.setTime(ts); } - FIREBASE_CLASS Firebase = FIREBASE_CLASS(); - #endif /* Firebase_CPP */ \ No newline at end of file diff --git a/src/Firebase.h b/src/Firebase.h index a49d2ea3..4d9d60e6 100644 --- a/src/Firebase.h +++ b/src/Firebase.h @@ -1,12 +1,12 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif /** - * The Firebase class, Firebase.h v1.2.7 + * The Firebase class, Firebase.h v1.2.8 * - * Created September 5, 2023 + * Created September 13, 2023 * * The MIT License (MIT) * Copyright (c) 2023 K. Suwatchai (Mobizt) @@ -316,10 +316,13 @@ class FIREBASE_CLASS template bool sendResetPassword(FirebaseConfig *config, T email) { return mSendResetPassword(config, toStringPtr(email)); } - /** Reconnect WiFi if lost connection. + /** Reconnect network if lost connection. * * @param reconnect The boolean to set/unset WiFi AP reconnection. */ + void reconnectNetwork(bool reconnect); + + /* Deprecated, use reconnectNetwork instead. */ void reconnectWiFi(bool reconnect); /** Get currently used auth token string. @@ -2479,7 +2482,10 @@ class FIREBASE_CLASS #endif // RTDB #if defined(ENABLE_FCM) || defined(FIREBASE_ENABLE_FCM) - bool sendMessage(FirebaseData &fbdo, uint16_t index){ return false; } + bool sendMessage(FirebaseData &fbdo, uint16_t index) + { + return false; + } bool broadcastMessage(FirebaseData &fbdo) { return false; } bool sendTopic(FirebaseData &fbdo) { return false; } #endif // FCM diff --git a/src/FirebaseFS.h b/src/FirebaseFS.h index e01e9d61..c8f5d156 100644 --- a/src/FirebaseFS.h +++ b/src/FirebaseFS.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/core/FirebaseCore.cpp b/src/core/FirebaseCore.cpp index 47eb9854..0ae5b41b 100644 --- a/src/core/FirebaseCore.cpp +++ b/src/core/FirebaseCore.cpp @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif @@ -1581,9 +1581,9 @@ bool FirebaseCore::deleteIdToken(MB_StringPtr idToken) return true; } -void FirebaseCore::setAutoReconnectWiFi(bool reconnect) +void FirebaseCore::setAutoReconnectNetwork(bool reconnect) { - autoReconnectWiFi = reconnect; + autoReconnectNetwork = reconnect; } void FirebaseCore::setTCPClient(Firebase_TCP_Client *tcpClient) @@ -1660,9 +1660,12 @@ bool FirebaseCore::reconnect(Firebase_TCP_Client *client, firebase_session_info_ session->response.code = FIREBASE_ERROR_TCP_ERROR_CONNECTION_LOST; } + if (config && config->timeout.wifiReconnect > 0) + config->timeout.networkReconnect = config->timeout.wifiReconnect; + resumeNetwork(client, config ? internal.net_once_connected : net_once_connected, config ? internal.fb_last_reconnect_millis : last_reconnect_millis, - config ? config->timeout.wifiReconnect : wifi_reconnect_tmo); + config ? config->timeout.networkReconnect : net_reconnect_tmo); networkStatus = client->networkReady(); } @@ -1684,16 +1687,16 @@ bool FirebaseCore::reconnect(Firebase_TCP_Client *client, firebase_session_info_ return networkStatus; } -void FirebaseCore::resumeNetwork(Firebase_TCP_Client *client, bool &net_once_connected, unsigned long &last_reconnect_millis, uint16_t &wifi_reconnect_tmo) +void FirebaseCore::resumeNetwork(Firebase_TCP_Client *client, bool &net_once_connected, unsigned long &last_reconnect_millis, uint16_t &net_reconnect_tmo) { - if (autoReconnectWiFi || !net_once_connected) + if (autoReconnectNetwork || !net_once_connected) { - if (wifi_reconnect_tmo < MIN_WIFI_RECONNECT_TIMEOUT || - wifi_reconnect_tmo > MAX_WIFI_RECONNECT_TIMEOUT) - wifi_reconnect_tmo = MIN_WIFI_RECONNECT_TIMEOUT; + if (net_reconnect_tmo < MIN_NET_RECONNECT_TIMEOUT || + net_reconnect_tmo > MAX_NET_RECONNECT_TIMEOUT) + net_reconnect_tmo = MIN_NET_RECONNECT_TIMEOUT; - if (millis() - last_reconnect_millis > wifi_reconnect_tmo) + if (millis() - last_reconnect_millis > net_reconnect_tmo) { client->networkReconnect(); last_reconnect_millis = millis(); diff --git a/src/core/FirebaseCore.h b/src/core/FirebaseCore.h index 430932f8..c1fd87f6 100644 --- a/src/core/FirebaseCore.h +++ b/src/core/FirebaseCore.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif @@ -95,12 +95,12 @@ class FirebaseCore FirebaseJsonData *resultPtr = nullptr; int response_code = 0; time_t ts = 0; - bool autoReconnectWiFi = false; + bool autoReconnectNetwork = false; // Used as local vars in reconnect unsigned long last_reconnect_millis = 0; bool net_once_connected = false; - uint16_t wifi_reconnect_tmo = MIN_WIFI_RECONNECT_TIMEOUT; + uint16_t net_reconnect_tmo = MIN_NET_RECONNECT_TIMEOUT; volatile bool networkStatus = false; bool networkChecking = false; @@ -209,7 +209,7 @@ class FirebaseCore /* resume network connection */ bool reconnect(Firebase_TCP_Client *client, firebase_session_info_t *session, unsigned long dataTime = 0); bool reconnect(); - void resumeNetwork(Firebase_TCP_Client *client, bool &net_once_connected, unsigned long &last_reconnect_millis, uint16_t &wifi_reconnect_tmo); + void resumeNetwork(Firebase_TCP_Client *client, bool &net_once_connected, unsigned long &last_reconnect_millis, uint16_t &net_reconnect_tmo); /* close TCP session */ void closeSession(Firebase_TCP_Client *client, firebase_session_info_t *session); /* set external Client */ @@ -221,7 +221,7 @@ class FirebaseCore /* set the system time */ bool setTime(time_t ts); /* set the WiFi (or network) auto reconnection option */ - void setAutoReconnectWiFi(bool reconnect); + void setAutoReconnectNetwork(bool reconnect); #if defined(ESP8266) void set_scheduled_callback(callback_function_t callback) diff --git a/src/core/Firebase_Client_Version.h b/src/core/Firebase_Client_Version.h index 353e4111..93dc02b6 100644 --- a/src/core/Firebase_Client_Version.h +++ b/src/core/Firebase_Client_Version.h @@ -1,6 +1,6 @@ #ifndef FIREBASE_CLIENT_VERSION -#define FIREBASE_CLIENT_VERSION "4.4.4" -#define FIREBASE_CLIENT_VERSION_NUM 40405 +#define FIREBASE_CLIENT_VERSION "4.4.6" +#define FIREBASE_CLIENT_VERSION_NUM 40406 /* The inconsistent file version checking to prevent mixed versions compilation. */ #define FIREBASE_CLIENT_VERSION_CHECK(ver) (ver == FIREBASE_CLIENT_VERSION_NUM) diff --git a/src/message/FCM.cpp b/src/message/FCM.cpp index ea4cc209..2a8f655d 100644 --- a/src/message/FCM.cpp +++ b/src/message/FCM.cpp @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/message/FCM.h b/src/message/FCM.h index 86d02cf8..a691ef6a 100644 --- a/src/message/FCM.h +++ b/src/message/FCM.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/message/LFCM.h b/src/message/LFCM.h index 552e84f9..99f49822 100644 --- a/src/message/LFCM.h +++ b/src/message/LFCM.h @@ -1,6 +1,6 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/FB_RTDB.cpp b/src/rtdb/FB_RTDB.cpp index a5ba496e..2f5b7a3f 100644 --- a/src/rtdb/FB_RTDB.cpp +++ b/src/rtdb/FB_RTDB.cpp @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/FB_RTDB.h b/src/rtdb/FB_RTDB.h index eb7a9a0a..d5690ac0 100644 --- a/src/rtdb/FB_RTDB.h +++ b/src/rtdb/FB_RTDB.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/QueryFilter.cpp b/src/rtdb/QueryFilter.cpp index 82a15b19..36ff0d73 100644 --- a/src/rtdb/QueryFilter.cpp +++ b/src/rtdb/QueryFilter.cpp @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/QueryFilter.h b/src/rtdb/QueryFilter.h index 56d2faff..9a02d67e 100644 --- a/src/rtdb/QueryFilter.h +++ b/src/rtdb/QueryFilter.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/QueueInfo.cpp b/src/rtdb/QueueInfo.cpp index e7b0c8ce..c682b82a 100644 --- a/src/rtdb/QueueInfo.cpp +++ b/src/rtdb/QueueInfo.cpp @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/QueueInfo.h b/src/rtdb/QueueInfo.h index 36c0dfd0..351c1593 100644 --- a/src/rtdb/QueueInfo.h +++ b/src/rtdb/QueueInfo.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/QueueManager.cpp b/src/rtdb/QueueManager.cpp index 8780186d..d5931c4c 100644 --- a/src/rtdb/QueueManager.cpp +++ b/src/rtdb/QueueManager.cpp @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/QueueManager.h b/src/rtdb/QueueManager.h index c3e6b8a3..5c33e442 100644 --- a/src/rtdb/QueueManager.h +++ b/src/rtdb/QueueManager.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/stream/FB_MP_Stream.cpp b/src/rtdb/stream/FB_MP_Stream.cpp index eef4b847..b406b6da 100644 --- a/src/rtdb/stream/FB_MP_Stream.cpp +++ b/src/rtdb/stream/FB_MP_Stream.cpp @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/stream/FB_MP_Stream.h b/src/rtdb/stream/FB_MP_Stream.h index 41d257dd..25947f56 100644 --- a/src/rtdb/stream/FB_MP_Stream.h +++ b/src/rtdb/stream/FB_MP_Stream.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/stream/FB_Stream.cpp b/src/rtdb/stream/FB_Stream.cpp index 35f3c112..f1248bd6 100644 --- a/src/rtdb/stream/FB_Stream.cpp +++ b/src/rtdb/stream/FB_Stream.cpp @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/rtdb/stream/FB_Stream.h b/src/rtdb/stream/FB_Stream.h index 540d9d78..8f828a82 100644 --- a/src/rtdb/stream/FB_Stream.h +++ b/src/rtdb/stream/FB_Stream.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/session/FB_Session.cpp b/src/session/FB_Session.cpp index 325dfa59..89570a63 100644 --- a/src/session/FB_Session.cpp +++ b/src/session/FB_Session.cpp @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif diff --git a/src/session/FB_Session.h b/src/session/FB_Session.h index 8769c6d9..fd3d55e2 100644 --- a/src/session/FB_Session.h +++ b/src/session/FB_Session.h @@ -1,5 +1,5 @@ #include "./core/Firebase_Client_Version.h" -#if !FIREBASE_CLIENT_VERSION_CHECK(40405) +#if !FIREBASE_CLIENT_VERSION_CHECK(40406) #error "Mixed versions compilation." #endif