-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 Gateway crashing in addInputMsgQueue function #18
Comments
Hi. When in debug mode there is a lot of info coming out from serial port. It may happen that Serial is not fast enough to deliver all data and a bigger overflow occurs, resulting in a watchdog exception and consequent reboot. Try to reduce debug to warning level and test again. If the error keeps happening you may try to change DEBUG_DBG lines to DEBUG_WARN so you are able to see some messages in warning only mode. Anyway you can use mqtt gateway code as it is without any change. I've been using it for months with 10 different nodes now. I recommend to use Platformio to compile the code. |
@gmag11 . Thank you. That helped. After lowering debug level, it is not crashing. But i am really curious about it, how could it lead to crash, it's not a memory overflow problem, also, serial in esp32 is definitely faster than esp8266. Is enigmaIoT functions running in timers or some async manner? I was assuming everything is running in the same thread and is handled by EnigmaIOTGateway.handle() method. |
You can try to increase baudrate to 921600 bps here |
Got it working. Thanks. Closing. |
Hello,
Thank you very much @gmag11 for this project. I started using it recently for one of my application. So far it has been working great, i was using esp8266 gateway. But then due to heap shortage, i decided to switch to esp32 for the gateway.
But i think something is crashing esp32 in the addInputMsqQueue function. I am realtively new to esp32, so i could not pinpoint the reason.
I am using a slightly modified version of EnigmaIOTGatewayDummy example. Its working with esp8266 perfectly.
In esp8266i get this in logs
But in esp32
It did not reach EnigmaIOTGateway.cpp:815. And i saw something like
portENTER_CRITICAL (&myMutex);
in addInputMsgQueue. So i understand something is special here. But i could not understand why is it crashing here.The text was updated successfully, but these errors were encountered: