cotestatnt / AsyncTelegram2

Powerful, flexible and secure Arduino Telegram BOT library. Hardware independent, it can be used with any MCU capable of handling an SSL connection.
MIT License
83 stars 25 forks source link

Too much text seems to freeze MCU or API #136

Open DK9GZ opened 5 months ago

DK9GZ commented 5 months ago

Hi @cotestatnt,

I am using Async2 V2.3.0, ArduinoJson V7.0.2 and echoBot_wifiNINA example on Ardunio Nano 33 IoT.

It seems when sending a certain amount of text from TG to the device for an echo, the code or API freezes. Using 40 words of lorem lipsum , the message is echoed correctly, but the device freezes afterwards. After a manual reset via push button, the device comes back but get stuck again after repeating that last blocking message. This is a loop that can only be broken by loading another code onto the Nano that just "cleans the pipe" (API?) without echoing any message, but just sending minor amout of text. See screenshot:

grafik

Is the number of bytes allowed to be sent (or echoed) via the lib limited by the myBot.setJsonBufferSize(1024); or #define BUFFER_BIG 2048 in DataStructures.h or any other parameter that can be adjusted? I had the DEBUG enabled, but no error was listed in the serial console.

thanks! 73, DK9GZ