Library Updates affecting Features and general usage understanding #477
-
Thanks a lot for this great library, I make this discussion to understand several key points about its usage and to report several problems I've been facing over the last year and a half.
Code runs smooth on 3.3.5, as soon as esp connects to the internet, Firebase begins, streams connect, hardware states get patched to RTDB as well as server TimeStamp, TimeStamp updates return Success as well to the code, Commands from the mobile app have 0.5 secs max lag till they get executed on my boards if not instantaneously. Issue 2 ) OTA Cloud Storage Updates don't work (apparently with RTDB streams) : Issue 3 ) How does BSSL Buffer Size work : |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
The library works normally for all provided functions and the recent functions are more stable and reliable. It works on Raspberry Pi Pico smoothly that guarantees the reliability as the platform does not use the wdt to reset the device as in ESP device. There are two things in your code that you need to avoid.
You should update your code based on my suggestion. The OTA updates work normally, your device free flash space should be twice of firmware file size and you should set the partition correctly in IDE. The BSSL (BearSSL) buffer size function was used to set the tx and rx buffer size of BearSSL engine used in TCP client directly. This is the size of memory that will be one time allocated for SSL engine to use for buffer the cryptographic data which some server may support SSL/TLS fragmentation that we can send/receive SSL data as small chunks from 512 bytes to 16k which is maximum size of SSL/TLS record. Firebase supports SSL/TLS fragmentation, we can choose any tx buffer size from smallest 512 to 16k without restriction. But for rx, the buffer size should large enough to cover the payload in case of large size payload otherwise no decrypted data from SSL engine. |
Beta Was this translation helpful? Give feedback.
-
I recommend Raspberry Pi Pico W as ESP8266 replacement. It uses the BearSSL for SSL engine which 16k memory buffer is small enough for this device when compare to nearly 200k available. You can use many FirebaseData objects you want. In ESP32 that uses mbedTLS for SSL engine, it takes 50k+ for mbedTLS to work and you cannot use more than three FirebaseData objects that sessions opened simultaneously. |
Beta Was this translation helpful? Give feedback.
-
On a side note, after having read my code, if you have the time to answer me further I would like to know your assessment/impression of the quality of my software and the way I designed things, I appreciate your time and effort a lot so you don't have to give a detailed answer but just your impression after having read it, was it easy to understand what each block and each method does ?, was it clear what tasks are done and why they're needed ?, variable names ?, was my documentation any good and if there's room for improvement, would be a great help. |
Beta Was this translation helpful? Give feedback.
The library works normally for all provided functions and the recent functions are more stable and reliable. It works on Raspberry Pi Pico smoothly that guarantees the reliability as the platform does not use the wdt to reset the device as in ESP device.
There are two things in your code that you need to avoid.
I see that you use async function that it's not really async it's just a function that keeps the session open and sending request by skipping server response reading. The nearly first hundred requests may be ok but after that it fails unexpectedly due to server rejection. Then the library will close the session every 3 minutes. You should avoid using it.
You should not rely on …