paylload time out #322
Closed
yassinhawari
started this conversation in
General
Replies: 1 comment 6 replies
-
You have to remove this line when using WiFiManager.
FYI. Firebase-ESP32/examples/Basic/Basic.ino Lines 81 to 82 in 891b780 |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
this my code:
#include <WiFiManager.h>
#include <FirebaseESP32.h>
#include <addons/TokenHelper.h>
#include <addons/RTDBHelper.h>
#define DATABASE_URL ""
#define API_KEY "****"
#define LED1_PIN 12
#define LED2_PIN 14
#define LDR_PIN 36
FirebaseData fbdo;
FirebaseConfig config;
FirebaseAuth auth;
unsigned long sendDataPrevMillis = 0;
bool signupOK = false;
int LdrData = 0;
float voltage = 0.0;
WiFiManager wm;
void setup() {
Serial.begin(115200);
bool res = wm.autoConnect();
if (!res) {
Serial.println("Failed to connect");
} else {
Serial.println("Connected to WiFi");
}
config.api_key = API_KEY;
config.database_url = DATABASE_URL;
if (Firebase.signUp(&config, &auth, "", "")) {
Serial.println("OK connected to Firebase");
signupOK = true;
} else {
Serial.printf("%s\n", config.signer.signupError.message.c_str());
}
config.token_status_callback = tokenStatusCallback;
// Enable TCP KeepAlive
fbdo.keepAlive(5/* idle /, 3 / interval /, 2 / count */);
Firebase.begin(&config, &auth);
Firebase.reconnectWiFi(true);
}
void loop() {
if (Firebase.ready() && signupOK && (millis() - sendDataPrevMillis > 5000 || sendDataPrevMillis == 0)) {
sendDataPrevMillis = millis();
}
}
this is my serail
Connected to WiFi
OK connected to Firebase
826
--successfully saved to:/Sensor/ldr_data
FAILED:response payload read timed out
816
--successfully saved to:/Sensor/ldr_data
FAILED:response payload read timed out
870
--successfully saved to:/Sensor/ldr_data
FAILED:response payload read timed out
845
--successfully saved to:/Sensor/ldr_data
FAILED:response payload read timed out
873
--successfully saved to:/Sensor/ldr_data
FAILED:response payload read timed out
815
--successfully saved to:/Sensor/ldr_data
FAILED:response payload read timed out
865
--successfully saved to:/Sensor/ldr_data
FAILED:response payload read timed out
749
--successfully saved to:/Sensor/ldr_data
what is the problem,thanks
Beta Was this translation helpful? Give feedback.
All reactions