Skip to content

Evaluate the removed AsyncTCP tuning flags against Firebase heap pressure #1

Description

@TigerTag-Project

The root build_opt.h carried five AsyncTCP flags that were applied nowhere and were removed in the initial commit rather than silently activated:

-D CONFIG_ASYNC_TCP_MAX_ACK_TIME=5000
-D CONFIG_ASYNC_TCP_PRIORITY=10
-D CONFIG_ASYNC_TCP_QUEUE_SIZE=64
-D CONFIG_ASYNC_TCP_RUNNING_CORE=0
-D CONFIG_ASYNC_TCP_STACK_SIZE=4096

They did nothing because the Arduino IDE reads build_opt.h from the sketch folder (where the file was empty) and PlatformIO ignores it entirely. So the firmware has never run with them.

Why this might matter. Free heap has been observed dropping to ~15–23 KB during Firebase HTTPS bursts, with frequent SSL - Memory allocation failed. A reported reset-after-two-weighings could not be reproduced across 11 follow-up cycles, so it is an open watch item — and a larger AsyncTCP queue with a bigger stack and higher priority is plausibly related to that area.

Why it wasn't just enabled. Turning these on changes network and RAM behaviour on a firmware that currently runs fine. That needs a bench test on real hardware, not a decision inside a cleanup commit.

To resolve: add the flags to [common] build_flags in platformio.ini, flash a unit, and measure free heap through repeated weighing cycles with Firebase connected — against a baseline without them. If they help, keep them and note it in the CHANGELOG. If not, close this and the question is settled.

Context: docs/FIRMWARE.md (Memory), CHANGELOG.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions