mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-09 07:44:21 +00:00
Documents why the largest allocatable block on a non-PSRAM observer walks down in 16 KiB steps at every TLS reconnect, and what to do about it. The framework builds mbedTLS with the symmetric buffer configuration (CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN 16384), so each broker slot holds two 16 KiB record buffers in internal DRAM and two slots cost 64 KiB on a board with about 80 KiB free. Confirmed against the sdkconfig the Heltec env actually links, not the IDF 5.3 libs package that belongs to the esp32c6 env. Rebuilding only the mbedTLS archives with an asymmetric outbound buffer of 4 KiB is ABI-safe, because in_buf/out_buf are heap pointers sized in ssl_setup() and no public struct embeds a CONTENT_LEN-sized array. Dropping KEEP_PEER_CERTIFICATE is not, since it changes mbedtls_ssl_session layout, so it is excluded. Also records two traps worth not rediscovering: esp32-arduino-lib-builder's release/v4.4 clones its dependencies at master and no longer resolves, and pointing platform_packages at a file:// framework copy overwrites the shared package for every other project on the machine.