summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp8266/tutorial
diff options
context:
space:
mode:
authorThomas Watson <twatson52@icloud.com>2025-01-22 17:17:03 -0600
committerDamien George <damien@micropython.org>2025-02-14 12:32:00 +1100
commitaef6705a321fbefb06288b5be1f5931bf8c42fe3 (patch)
tree0c2b2ebfff5ac8cbb43c58c0c19173b9572c3d82 /docs/esp8266/tutorial
parent842e3617a0f152f837b2e8cc4e9d4efae6cb52a4 (diff)
downloadmicropython-aef6705a321fbefb06288b5be1f5931bf8c42fe3.tar.gz
micropython-aef6705a321fbefb06288b5be1f5931bf8c42fe3.zip
extmod/lwip-include: Increase number of lwIP timers when mDNS enabled.
Despite the code comments claiming one is sufficient, the mDNS application is capable of using up to twelve timers. Three per IP protocol are started at once in `mdns_start_multicast_timeouts_ipvX`, then another two per protocol can be started in `mdns_handle_question`. Further timers can be started for two additional callbacks. Having certain timers, such as `MDNS_MULTICAST_TIMEOUT`, fail to start due to none being free will break mDNS forever as the app will never realize it's safe to transmit a packet. Therefore, this commit goes somewhat overkill and allocates the maximal amount of timers; it's uncertain if all can run simultaneously, or how many callback timers are needed. Each timer struct is 16 bytes on standard 32 bit builds. Plus, say, 8 bytes of allocater overhead, that's 288 more bytes of RAM used which shouldn't be too horrible. Users who don't need mDNS can manually disable it to recover the RAM if necessary. This fixes mDNS on W5500_EVB_PICO (among other boards). Before, mDNS would work for a bit after connection until the host's cache expired a minute or two later. Then the board would never respond to further queries. With this patch, all works well. Signed-off-by: Thomas Watson <twatson52@icloud.com>
Diffstat (limited to 'docs/esp8266/tutorial')
0 files changed, 0 insertions, 0 deletions