You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include <WiFi.h>
#include <FirebaseESP32.h>
#define FIREBASE_HOST "https://networks-af47e-default-rtdb.asia-southeast1.firebasedatabase.app/"
#define FIREBASE_AUTH "***"
#define WIFI_SSID "***"
#define WIFI_PASSWORD ""
//Define FirebaseESP32 data object
FirebaseData firebaseData;
FirebaseJson json;
void setup()
{
Serial.begin(115200);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to Wi-Fi");
while (WiFi.status() != WL_CONNECTED)
{
Serial.print(".");
delay(300);
}
Serial.println();
Serial.print("Connected with IP: ");
Serial.println(WiFi.localIP());
Serial.println();
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
Firebase.reconnectWiFi(true);
//Set database read timeout to 1 minute (max 15 minutes)
Firebase.setReadTimeout(firebaseData, 1000 * 60);
//tiny, small, medium, large and unlimited.
//Size and its write timeout e.g. tiny (1s), small (10s), medium (30s) and large (60s).
Firebase.setwriteSizeLimit(firebaseData, "tiny");
/*
This option allows get and delete functions (PUT and DELETE HTTP requests) works for device connected behind the
Firewall that allows only GET and POST requests.
Firebase.enableClassicRequest(firebaseData, true);
*/
//String path = "/data";
Serial.println("------------------------------------");
Serial.println("Connected...");
}
void loop()
{
int Sdata = random(0,1023) ;
Serial.println(Sdata);
delay(100);
json.set("/Reading1", Sdata); // Place your sensor data here
json.set("/Reading2", Sdata-100);
json.set("/Reading3", Sdata-59);
Firebase.updateNode(firebaseData,"/Sensor",json);
}
but get the following error
/Users/ryanng/Documents/Arduino/libraries/Firebase_ESP32_Client/src/signer/Signer.cpp: In member function 'bool Firebase_Signer::createJWT()':
/Users/ryanng/Documents/Arduino/libraries/Firebase_ESP32_Client/src/signer/Signer.cpp:1210:39: error: too few arguments to function 'int mbedtls_pk_parse_key(mbedtls_pk_context*, const unsigned char*, size_t, const unsigned char*, size_t, int (*)(void*, unsigned char*, size_t), void*)'
1210 | ret = mbedtls_pk_parse_key(config->signer.pk_ctx,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
1211 | (const unsigned char *)config->signer.pk.c_str(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1212 | config->signer.pk.length() + 1, NULL, 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/ryanng/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-3662303f31/esp32/include/mbedtls/mbedtls/include/mbedtls/ssl_ciphersuites.h:28,
from /Users/ryanng/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-3662303f31/esp32/include/mbedtls/mbedtls/include/mbedtls/ssl.h:32,
from /Users/ryanng/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-3662303f31/esp32/include/mbedtls/mbedtls/include/mbedtls/net_sockets.h:44,
from /Users/ryanng/Library/Arduino15/packages/esp32/hardware/esp32/3.0.0-alpha3/libraries/WiFiClientSecure/src/ssl_client.h:8,
from /Users/ryanng/Library/Arduino15/packages/esp32/hardware/esp32/3.0.0-alpha3/libraries/WiFiClientSecure/src/WiFiClientSecure.h:26,
from /Users/ryanng/Documents/Arduino/libraries/Firebase_ESP32_Client/src/FB_Network.h:21,
from /Users/ryanng/Documents/Arduino/libraries/Firebase_ESP32_Client/src/FB_Const.h:41,
from /Users/ryanng/Documents/Arduino/libraries/Firebase_ESP32_Client/src/FB_Utils.h:37,
from /Users/ryanng/Documents/Arduino/libraries/Firebase_ESP32_Client/src/signer/Signer.h:37,
from /Users/ryanng/Documents/Arduino/libraries/Firebase_ESP32_Client/src/signer/Signer.cpp:35:
/Users/ryanng/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-3662303f31/esp32/include/mbedtls/mbedtls/include/mbedtls/pk.h:881:5: note: declared here
881 | int mbedtls_pk_parse_key(mbedtls_pk_context *ctx,
| ^~~~~~~~~~~~~~~~~~~~
/Users/ryanng/Documents/Arduino/libraries/Firebase_ESP32_Client/src/signer/Signer.cpp:1214:39: error: too few arguments to function 'int mbedtls_pk_parse_key(mbedtls_pk_context*, const unsigned char*, size_t, const unsigned char*, size_t, int (*)(void*, unsigned char*, size_t), void*)'
1214 | ret = mbedtls_pk_parse_key(config->signer.pk_ctx,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
1215 | (const unsigned char *)config->service_account.data.private_key,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1216 | strlen_P(config->service_account.data.private_key) + 1, NULL, 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ryanng/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-3662303f31/esp32/include/mbedtls/mbedtls/include/mbedtls/pk.h:881:5: note: declared here
881 | int mbedtls_pk_parse_key(mbedtls_pk_context *ctx,
| ^~~~~~~~~~~~~~~~~~~~
/Users/ryanng/Documents/Arduino/libraries/Firebase_ESP32_Client/src/signer/Signer.cpp:1245:57: error: invalid conversion from 'size_t*' {aka 'unsigned int*'} to 'size_t' {aka 'unsigned int'} [-fpermissive]
1245 | config->signer.signature, &sigLen,
| ^~~~~~~
| |
| size_t* {aka unsigned int*}
/Users/ryanng/Documents/Arduino/libraries/Firebase_ESP32_Client/src/signer/Signer.cpp:1246:31: error: cannot convert 'int (*)(void*, unsigned char*, size_t)' {aka 'int (*)(void*, unsigned char*, unsigned int)'} to 'size_t*' {aka 'unsigned int*'}
1246 | mbedtls_ctr_drbg_random, config->signer.ctr_drbg_ctx);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(void*, unsigned char*, size_t) {aka int (*)(void*, unsigned char*, unsigned int)}
/Users/ryanng/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-3662303f31/esp32/include/mbedtls/mbedtls/include/mbedtls/pk.h:627:66: note: initializing argument 7 of 'int mbedtls_pk_sign(mbedtls_pk_context*, mbedtls_md_type_t, const unsigned char*, size_t, unsigned char*, size_t, size_t*, int (*)(void*, unsigned char*, size_t), void*)'
627 | unsigned char *sig, size_t sig_size, size_t *sig_len,
| ~~~~~~~~^~~~~~~
Multiple libraries were found for "SD.h"
Used: /Users/ryanng/Library/Arduino15/packages/esp32/hardware/esp32/3.0.0-alpha3/libraries/SD
Not used: /Users/ryanng/Library/Arduino15/libraries/SD
exit status 1
Compilation error: exit status 1
The text was updated successfully, but these errors were encountered:
I am trying to run the following code
but get the following error
The text was updated successfully, but these errors were encountered: