From f127702bef812433c7556b37ac849f4064ffe2ad Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Sat, 13 Dec 2025 09:23:23 +1100 Subject: [PATCH] Fix GPS Buffer full issue on NRF52480 (Seeed T1000E) (#8956) We set the buffer size to about a byte on NRF52480, less than other platforms: esp32.ini: -DSERIAL_BUFFER_SIZE=4096 esp32c6.ini: -DSERIAL_BUFFER_SIZE=4096 nrf52.ini: -DSERIAL_BUFFER_SIZE=1024 However, 115200 baud, like the T1000e uses is about 12 times that - almost 15 bytes per millisecond. 15 bytes * 200 millisecond (our GPS poll rate) = 3000 bytes, which is longer than our buffer on the nrf52 platform. This causes "GPS Buffer full" errors on the T1000e and other devices based on NRF52480 with newer GPS chips. This patch increases SERIAL_BUFFER_SIZE for nrf52480 to 4096 to align with other platforms. It keeps the original 1024 for the nrf52832, which has fewer resources. Fixes https://github.com/meshtastic/firmware/issues/5767 --- variants/nrf52840/nrf52.ini | 1 - variants/nrf52840/nrf52832.ini | 4 +++- variants/nrf52840/nrf52840.ini | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/variants/nrf52840/nrf52.ini b/variants/nrf52840/nrf52.ini index 5da1aebb5..48b7deeb5 100644 --- a/variants/nrf52840/nrf52.ini +++ b/variants/nrf52840/nrf52.ini @@ -19,7 +19,6 @@ build_type = release build_flags = -include variants/nrf52840/cpp_overrides/lfs_util.h ${arduino_base.build_flags} - -DSERIAL_BUFFER_SIZE=1024 -Wno-unused-variable -Isrc/platform/nrf52 -DLFS_NO_ASSERT ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818 diff --git a/variants/nrf52840/nrf52832.ini b/variants/nrf52840/nrf52832.ini index ce94283b1..5aed929e6 100644 --- a/variants/nrf52840/nrf52832.ini +++ b/variants/nrf52840/nrf52832.ini @@ -1,7 +1,9 @@ [nrf52832_base] extends = nrf52_base -build_flags = ${nrf52_base.build_flags} +build_flags = + ${nrf52_base.build_flags} + -DSERIAL_BUFFER_SIZE=1024 lib_deps = ${nrf52_base.lib_deps} diff --git a/variants/nrf52840/nrf52840.ini b/variants/nrf52840/nrf52840.ini index e13443152..09b2ef97d 100644 --- a/variants/nrf52840/nrf52840.ini +++ b/variants/nrf52840/nrf52840.ini @@ -1,7 +1,9 @@ [nrf52840_base] extends = nrf52_base -build_flags = ${nrf52_base.build_flags} +build_flags = + ${nrf52_base.build_flags} + -DSERIAL_BUFFER_SIZE=4096 lib_deps = ${nrf52_base.lib_deps}