Getting empty errorReason
CapableMule opened this issue · 1 comments
Hello! I am using the Arduino Uno WiFi Rev2.
When I try to use the any of the methods (get/set/push), I get a newline as the errorReason in my serial monitor. I have excluded http:// from the host string, as well as excluding a "/" at the end, and can successfully connect to my WiFi access point.
Here is a piece of my code, where I am trying to access the int value stored at this key. And I defined the firebase constants like how it is done in the basic example ino.
Would this be a problem with my Firebase.begin, or an issue with how I am trying to read the data?
#include <Firebase_Arduino_WiFiNINA.h>
#include <Firebase_Arduino_WiFiNINA_HTTPClient.h>
// WiFi Connection
Serial.print("Connecting to Wi-Fi");
int status = WL_IDLE_STATUS;
while (status != WL_CONNECTED)
{
status = WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print(".");
delay(300);
}
Serial.println();
Serial.print("Connected with IP: ");
Serial.println(WiFi.localIP());
Serial.println();
// Firebase Connection
FirebaseData firebaseData;
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH, WIFI_SSID, WIFI_PASSWORD);
Firebase.reconnectWiFi(true);
// Firebase data retrieval
if (Firebase.getInt(firebaseData, "/test")) {
if (firebaseData.dataType() == "int")
Serial.println(firebaseData.intData());
} else {
//Failed, then print out the error detail
Serial.println("----------Can't get data--------");
Serial.println("REASON: " + firebaseData.errorReason());
Serial.println("--------------------------------");
Serial.println();
}
And for reference, my serial monitor output:
Connecting to Wi-Fi..
Connected with IP: xxx.xxx.x.xx
----------Can't get data--------
--------------------------------
This library seems awesome and I would love to get it working for me, so any help would be appreciated!
You may need to update the firmware.
In Arduino IDE, choose menu Tools, WiFi101 /WiFiNINA Firmware Updater, follow the instructions from the popup window.