Page 1 of 1

Low-memory communication

Posted: Mon Sep 27, 2021 1:03 pm
by Fredckx
Hi,

I have an application which requires communication with the outside world. Preferably I would like to use Wifi and MQTT. I implemented this using the esp_wifi and mqtt_client components. I now have a problem that the size of the firmware is too large. I already applied some measures described here: https://docs.espressif.com/projects/esp ... /size.html

However most of these measures come at a cost of getting less info about exceptions etc. Also, the size reduction is not sufficient.
I now wonder if usage of another means of communication , e.g with a nearby second ESP32 board as a "hub" can help me out. My questions:

- is communication via e.g. ESP-NOW or BT/BLE less demanding with respect to memory usage compared with the esp_wifi/mqtt_client combination?
- how do ESP-NOW and BT/BLE compare in this respect?
- any other suggestions?

EDIT: If that helps, even a wired connection between to ESP32 boards would be acceptable (I2C ?)

Thanks
Fred

Re: Low-memory communication

Posted: Mon Sep 27, 2021 2:36 pm
by chegewara
NimBLE should have less memory requirements than wifi + mqtt, especially if its secured mqtt connection.
For sure I2C and UART are less memory hungry comparing to all wireless connection types.

Re: Low-memory communication

Posted: Mon Sep 27, 2021 3:18 pm
by Fredckx
Thanks @chegewara.

Does anyone know about existence of a well-written lib for communication via I2C / UART between peers?

Re: Low-memory communication

Posted: Mon Sep 27, 2021 4:47 pm
by WiFive