MQTT errors, other board work OK

ronbreukers
Posts: 19
Joined: Tue Dec 14, 2021 2:45 pm

Re: MQTT errors, other board work OK

Postby ronbreukers » Tue Mar 04, 2025 8:18 am

Thank you so much for your offer. I will do that. However I am under some time pressure now, and have to finish things using the one board I have. I hope to finalize in about a week, and I will come back to the second board then.
I really appreciate your help!
Ron

ronbreukers
Posts: 19
Joined: Tue Dec 14, 2021 2:45 pm

Re: MQTT errors, other board work OK

Postby ronbreukers » Tue Mar 04, 2025 8:11 pm

I just realized, after re-reading your post - that I neglected to mention I am using the ESP32. (Wrover module 16 MB). I am not sure if that helps or not. I will come back to the issue after I have delivered what I promised my customer.
Thanks,
Ron

ronbreukers
Posts: 19
Joined: Tue Dec 14, 2021 2:45 pm

Re: MQTT errors, other board work OK

Postby ronbreukers » Sun Mar 09, 2025 9:19 pm

I found the problem. Today I had put an SD card in the slot of the board that worked fine. Suddenly it showed the same errors as my previous board (MQTT errors). After some searching I realized the SD card was still inn the slot. After removal of the SD card, the board worked again.
Now I took the non-working board, which also had an SD card mounted. Again after removal the "defective" board worked!
The next step was putting the FATFS initialization code later in the program,after I had detected the presence of WiFi. I thought to avoid the login problems that way. Now I got a memory allocation error! Eureka! The application uses LVGL, obviously rainmaker and some more memory intensive tasks. I went through the sdkconfig and the memory allocations I used and shaved off some memory usage in several places. Now both boards function as they should.
The interesting thing was that the memory error only popped up after I had moved the FatFS init code.
I hope my experience may be a pointer for someone else.

ronbreukers
Posts: 19
Joined: Tue Dec 14, 2021 2:45 pm

Re: MQTT errors, other board work OK

Postby ronbreukers » Mon Mar 10, 2025 10:35 am

As I am getting close to the RAM limit, I wonder if changing to a more modern ESP32 module (ESP32-S3?) would be beneficial. Could anyone please comment. I looked at the different specifications, but with the RAM split up the way it is, it is difficult for me to be certain.
I use now the ESP32-WROOM 16 MB module.

Piyush
Espressif staff
Espressif staff
Posts: 372
Joined: Wed Feb 20, 2019 7:02 am

Re: MQTT errors, other board work OK

Postby Piyush » Tue Mar 11, 2025 5:55 pm

Please have a look at the docs here once and see if you can reduce your RAM usage by changing some config options.

ronbreukers
Posts: 19
Joined: Tue Dec 14, 2021 2:45 pm

Re: MQTT errors, other board work OK

Postby ronbreukers » Tue Mar 11, 2025 9:53 pm

Thank you so much ESP_Piyush for your suggestion! Once I started to read, I realized I had, when I started, created a bunch of tasks with some stack size "just to be safe". I never touched them again after they worked.
Really stupid! Thanks, I expect to be rid ,for a while at least, of the memory errors.

Who is online

Users browsing this forum: No registered users and 1 guest