From 67ed933a67b893a745d34868c35caba2f62f8563 Mon Sep 17 00:00:00 2001 From: mikecarper Date: Wed, 19 Aug 2026 17:32:05 -0700 Subject: [PATCH] Expand companion offline queues --- build.sh | 10 +-- docs/companion_offline_queue.md | 51 +++++++++++ docs/companion_radio_full.md | 10 +++ docs/faq.md | 5 +- docs/index.md | 1 + docs/ota_easy.md | 2 +- docs/ota_protocol.md | 2 +- examples/companion_radio/MyMesh.cpp | 84 ++++++++++++++++--- examples/companion_radio/MyMesh.h | 23 +++++ examples/companion_radio/main.cpp | 5 +- variants/ebyte_eora_s3/platformio.ini | 2 +- variants/heltec_e213/platformio.ini | 4 +- variants/heltec_e290/platformio.ini | 4 +- variants/heltec_rc32/platformio.ini | 8 +- variants/heltec_t190/platformio.ini | 4 +- variants/heltec_v2/platformio.ini | 1 + variants/heltec_v4/platformio.ini | 6 +- variants/heltec_v4_r8/platformio.ini | 8 +- variants/lilygo_t3s3/platformio.ini | 2 +- variants/lilygo_t3s3_sx1276/platformio.ini | 2 +- variants/lilygo_tbeam_1w/platformio.ini | 4 +- .../platformio.ini | 4 +- variants/lilygo_tdeck/platformio.ini | 4 +- variants/lilygo_teth_elite/platformio.ini | 4 +- variants/lilygo_tlora_v2_1/platformio.ini | 1 + variants/meshnology_w12/platformio.ini | 4 +- variants/station_g2/platformio.ini | 4 +- variants/station_g3_esp32/platformio.ini | 4 +- variants/thinknode_m7/platformio.ini | 8 +- variants/thinknode_m9/platformio.ini | 6 +- 30 files changed, 213 insertions(+), 64 deletions(-) create mode 100644 docs/companion_offline_queue.md diff --git a/build.sh b/build.sh index 263ef535..9041ede1 100755 --- a/build.sh +++ b/build.sh @@ -1972,12 +1972,12 @@ is_nrf52_companion_radio_full_target() { } requires_esp32_companion_full_ota_fallback() { - # Some ESP32 companions cannot hold their configured high-capacity contact, + # Some non-PSRAM ESP32 companions cannot hold their configured high-capacity contact, # channel, and offline-queue tables together with BLE, WiFi, and LoRa OTA in # internal DRAM. Keep their ordinary high-capacity image unchanged and emit - # a separately named FULL OTA image with the companion default capacities. + # a separately named FULL OTA image with measured-safe capacities. case "${1,,}" in - heltec_v2_companion_radio_wifi|lilygo_tbeam_1w_companion_radio_wifi|lilygo_tlora_v2_1_1_6_companion_radio_wifi|meshadventurer_sx1262_companion_radio_usb|meshadventurer_sx1268_companion_radio_usb) return 0 ;; + heltec_v2_companion_radio_wifi|lilygo_tlora_v2_1_1_6_companion_radio_wifi|meshadventurer_sx1262_companion_radio_usb|meshadventurer_sx1268_companion_radio_usb) return 0 ;; *) return 1 ;; esac } @@ -2188,7 +2188,7 @@ apply_esp32_full_size_profile() { fi if requires_esp32_companion_full_ota_fallback "$env_name"; then - append_platformio_build_unflags "-DMAX_CONTACTS=350 -DMAX_CONTACTS=160 -DMAX_GROUP_CHANNELS=40 -DOFFLINE_QUEUE_SIZE=256 -DOFFLINE_QUEUE_SIZE=128" + append_platformio_build_unflags "-DMAX_CONTACTS=350 -DMAX_CONTACTS=160 -DMAX_GROUP_CHANNELS=40 -DOFFLINE_QUEUE_SIZE=512 -DOFFLINE_QUEUE_SIZE=256 -DOFFLINE_QUEUE_SIZE=128" export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -DMAX_CONTACTS=100 -DMAX_GROUP_CHANNELS=8 -DOFFLINE_QUEUE_SIZE=16" fi } @@ -2398,7 +2398,7 @@ apply_companion_radio_full_profile() { # measured-safe tables for FULL OTA without changing ordinary USB/BLE/WiFi # companion builds. if requires_esp32_companion_full_ota_fallback "$pio_env_name"; then - append_platformio_build_unflags "-DMAX_CONTACTS=350 -DMAX_CONTACTS=160 -DMAX_GROUP_CHANNELS=40 -DOFFLINE_QUEUE_SIZE=256 -DOFFLINE_QUEUE_SIZE=128" + append_platformio_build_unflags "-DMAX_CONTACTS=350 -DMAX_CONTACTS=160 -DMAX_GROUP_CHANNELS=40 -DOFFLINE_QUEUE_SIZE=512 -DOFFLINE_QUEUE_SIZE=256 -DOFFLINE_QUEUE_SIZE=128" export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -DMAX_CONTACTS=100 -DMAX_GROUP_CHANNELS=8 -DOFFLINE_QUEUE_SIZE=16" fi diff --git a/docs/companion_offline_queue.md b/docs/companion_offline_queue.md new file mode 100644 index 00000000..b88f617d --- /dev/null +++ b/docs/companion_offline_queue.md @@ -0,0 +1,51 @@ +# Companion Offline Message Queue + +Companion firmware keeps received channel data, channel messages, and direct +messages in one pending queue until a Companion client requests them with the +sync-next-message command. This is volatile RAM, not message history in flash. +A reboot clears it. + +## Default capacities + +| Platform or memory profile | Pending frames | +| --- | ---: | +| ESP32 with configured PSRAM | 512 | +| ESP32 without PSRAM | 256 | +| nRF52840 | 256 | +| RP2040 | 256 | +| STM32 | 16 | +| Known constrained classic ESP32 target override | 128 | +| Constrained Full ESP32 fallback | 16 | + +An explicit target `OFFLINE_QUEUE_SIZE` overrides the platform default. The +Heltec V2 and TLora V2 Full Companion profiles, for example, use 16 frames so +their combined WiFi, BLE, and LoRa mOTA image retains enough internal DRAM. +Standard, logging, MQTT, and Cascade build overlays retain the selected target +capacity; they do not silently shrink the queue. + +Each queue slot currently costs 177 bytes. A 256-frame queue reserves 45,312 +bytes, while a 512-frame queue reserves 90,624 bytes. There is no 256-frame +protocol limit: the queue length and indexes can represent 512 or more. The +practical limit is available RAM and the heap and stack headroom required by +the transports and display. + +On ESP32 boards marked with `BOARD_HAS_PSRAM`, the queue is allocated from +PSRAM before WiFi and BLE start. A failed 512-frame allocation retries at 256, +then 128, and finally uses a 16-frame internal fallback. Full Companion prints +the capacity actually allocated in its startup memory line as +`offline_queue=`. + +## Full queue behavior + +The capacity is shared across Public, other channels, channel data, and direct +messages. It is not a per-channel count. When the queue is full, firmware +replaces the oldest queued channel frame so newer traffic can still arrive. If +the full queue contains only direct messages, a new frame is dropped rather +than deleting a direct message. + +Queue order is preserved. Removal uses a ring index, so delivering one pending +message no longer copies every remaining frame; only the less-common removal +of an old channel frame from a full queue may shift entries. + +Capacity is selected when firmware is compiled. There is no CLI or Companion +protocol setting to resize it at runtime. diff --git a/docs/companion_radio_full.md b/docs/companion_radio_full.md index c9927685..7b189573 100644 --- a/docs/companion_radio_full.md +++ b/docs/companion_radio_full.md @@ -146,6 +146,16 @@ layout. Other boards with 8 MB or more retain dual application partitions. Heltec V2 and TLora V2 use 100 contacts, 8 group channels, and a 16-frame offline queue in this combined profile because of internal DRAM limits. +Full Companions normally retain 256 pending Companion message frames. ESP32 +boards with configured PSRAM retain 512 and allocate that queue from PSRAM +before WiFi and BLE start. If PSRAM is unavailable at runtime, allocation falls +back through 256 and 128 frames, then to a 16-frame internal buffer. The Full +Companion startup memory line reports the capacity actually allocated as +`offline_queue=`. The queue is volatile and shared by all channels and +direct messages; it is not flash-backed history. See +[Companion offline message queue](./companion_offline_queue.md) for all platform +defaults and full-queue behavior. + The nRF52 target inherits the board's ordinary USB Companion installation format and adds BLE plus the serial mOTA source. It does not enable an SD cache or any other board-specific storage behavior; host files are streamed as they diff --git a/docs/faq.md b/docs/faq.md index ab684441..dcf250e9 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -135,7 +135,10 @@ Companion radios connect MeshCore client software to LoRa. Depending on the board and build profile, the companion protocol can be exposed over BLE, USB serial, Wi-Fi, or Ethernet. Some boards also provide a Full Companion profile with additional local administration features. Check the exact build name and -transport before flashing. See and the web client at +transport before flashing. Pending messages are held in a volatile shared queue; +capacity depends on the platform and memory profile. See the +[Companion offline message queue](./companion_offline_queue.md) for the exact +defaults and limitations. See and the web client at . #### 1.2.4. Repeater diff --git a/docs/index.md b/docs/index.md index 61edebe3..24b09ded 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,6 +14,7 @@ Below are a few quick start guides. - [MeshTower V2 microSD self-updates](./ota_meshtower_v2_sdcard.md) - [GPS Tracking](./gps_tracking.md) - [Companion Protocol](./companion_protocol.md) +- [Companion Offline Message Queue](./companion_offline_queue.md) - [Full Companion: ESP32 and nRF52](./companion_radio_full.md) - [Packet Format](./packet_format.md) - [QR Codes](./qr_codes.md) diff --git a/docs/ota_easy.md b/docs/ota_easy.md index a3053038..89a5b1cd 100644 --- a/docs/ota_easy.md +++ b/docs/ota_easy.md @@ -89,7 +89,7 @@ FULL ESP32 roles include the required transport. A serves host images but cannot stage or install one for itself. ESP32 full combines USB, BLE, and WiFi; nRF52 full combines USB and BLE because nRF52840 has no WiFi. -A small set of high-capacity classic ESP32 companions +A small set of high-capacity, non-PSRAM classic ESP32 companions keep their normal image and provide a separate `-full-ota-` image with 100 contacts, 8 group channels, and a 16-frame offline queue. Install that variant's merged image over USB once before using it. Connect the source by USB serial or, when supported, by WiFi. For an ordinary raw-text USB diff --git a/docs/ota_protocol.md b/docs/ota_protocol.md index 4e7564ab..9e33b86d 100644 --- a/docs/ota_protocol.md +++ b/docs/ota_protocol.md @@ -112,7 +112,7 @@ The "reconstructed image" referenced by the manifest is the full `BODY || EndF` ESP32 companion firmware is exempt from the portable-slot limit. USB and WiFi companion artifacts retain LoRa OTA and carry `-ota-` in their filenames so they can seed a host folder over serial or TCP; they keep -their target partition table rather than using the FULL profile. A small set of high-capacity classic ESP32 +their target partition table rather than using the FULL profile. A small set of high-capacity, non-PSRAM classic ESP32 companions cannot combine their configured contact, group-channel, and offline-queue capacities with LoRa OTA in internal DRAM. Their normal artifacts remain unchanged, and option 3 also emits `-full-ota-` and `-full-logging-ota-` variants with 100 contacts, 8 group channels, and a 16-frame offline queue. MQTT diff --git a/examples/companion_radio/MyMesh.cpp b/examples/companion_radio/MyMesh.cpp index 425e6096..d50d7d1d 100644 --- a/examples/companion_radio/MyMesh.cpp +++ b/examples/companion_radio/MyMesh.cpp @@ -6,6 +6,10 @@ #include "helpers/radiolib/RXPowerSaving.h" #include "helpers/radiolib/RxBoostedGainDefaults.h" +#if defined(ESP32_PLATFORM) && defined(BOARD_HAS_PSRAM) +#include +#endif + #if defined(ESP32) && defined(WIFI_SSID) #include "CompanionWiFi.h" #include @@ -331,42 +335,90 @@ void MyMesh::updateContactFromFrame(ContactInfo &contact, uint32_t& last_mod, co } bool MyMesh::Frame::isChannelMsg() const { - return buf[0] == RESP_CODE_CHANNEL_MSG_RECV || buf[0] == RESP_CODE_CHANNEL_MSG_RECV_V3 || - buf[0] == RESP_CODE_CHANNEL_DATA_RECV; + return len > 0 && (buf[0] == RESP_CODE_CHANNEL_MSG_RECV || buf[0] == RESP_CODE_CHANNEL_MSG_RECV_V3 || + buf[0] == RESP_CODE_CHANNEL_DATA_RECV); +} + +int MyMesh::getOfflineQueueCapacity() const { +#if defined(ESP32_PLATFORM) && defined(BOARD_HAS_PSRAM) + return offline_queue_capacity; +#else + return OFFLINE_QUEUE_SIZE; +#endif +} + +MyMesh::Frame& MyMesh::offlineQueueFrameAt(int logical_index) { + return offline_queue[(offline_queue_head + logical_index) % getOfflineQueueCapacity()]; +} + +void MyMesh::initializeOfflineQueue() { +#if defined(ESP32_PLATFORM) && defined(BOARD_HAS_PSRAM) + if (offline_queue != offline_queue_fallback || OFFLINE_QUEUE_SIZE <= offline_queue_capacity) return; + + int requested_capacity = OFFLINE_QUEUE_SIZE; + while (requested_capacity > offline_queue_capacity) { + void* storage = heap_caps_malloc(sizeof(Frame) * requested_capacity, + MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT); + if (storage) { + offline_queue = static_cast(storage); + offline_queue_capacity = requested_capacity; + return; + } + + if (requested_capacity > 256) { + requested_capacity = 256; + } else if (requested_capacity > 128) { + requested_capacity = 128; + } else { + requested_capacity = offline_queue_capacity; + } + } +#endif } void MyMesh::addToOfflineQueue(const uint8_t frame[], int len) { - if (offline_queue_len >= OFFLINE_QUEUE_SIZE) { + const int capacity = getOfflineQueueCapacity(); + if (!frame || len <= 0 || len > MAX_FRAME_SIZE || capacity <= 0) { + MESH_DEBUG_PRINTLN("WARN: invalid offline queue frame length: %d", len); + return; + } + + if (offline_queue_len >= capacity) { MESH_DEBUG_PRINTLN("WARN: offline_queue is full!"); int pos = 0; while (pos < offline_queue_len) { - if (offline_queue[pos].isChannelMsg()) { + if (offlineQueueFrameAt(pos).isChannelMsg()) { for (int i = pos; i < offline_queue_len - 1; i++) { // delete oldest channel msg from queue - offline_queue[i] = offline_queue[i + 1]; + offlineQueueFrameAt(i) = offlineQueueFrameAt(i + 1); } MESH_DEBUG_PRINTLN("INFO: removed oldest channel message from queue."); - offline_queue[offline_queue_len - 1].len = len; - memcpy(offline_queue[offline_queue_len - 1].buf, frame, len); + Frame& tail = offlineQueueFrameAt(offline_queue_len - 1); + tail.len = len; + memcpy(tail.buf, frame, len); return; } pos++; } MESH_DEBUG_PRINTLN("INFO: no channel messages to remove from queue."); } else { - offline_queue[offline_queue_len].len = len; - memcpy(offline_queue[offline_queue_len].buf, frame, len); + Frame& tail = offlineQueueFrameAt(offline_queue_len); + tail.len = len; + memcpy(tail.buf, frame, len); offline_queue_len++; } } int MyMesh::getFromOfflineQueue(uint8_t frame[]) { if (offline_queue_len > 0) { // check offline queue - size_t len = offline_queue[0].len; // take from top of queue - memcpy(frame, offline_queue[0].buf, len); + Frame& head = offlineQueueFrameAt(0); + size_t len = head.len; // take from top of queue + memcpy(frame, head.buf, len); offline_queue_len--; - for (int i = 0; i < offline_queue_len; i++) { // delete top item from queue - offline_queue[i] = offline_queue[i + 1]; + if (offline_queue_len == 0) { + offline_queue_head = 0; + } else { + offline_queue_head = (offline_queue_head + 1) % getOfflineQueueCapacity(); } return len; } @@ -1330,6 +1382,11 @@ MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMe _temp_radio_applied = false; #endif offline_queue_len = 0; + offline_queue_head = 0; +#if defined(ESP32_PLATFORM) && defined(BOARD_HAS_PSRAM) + offline_queue = offline_queue_fallback; + offline_queue_capacity = OFFLINE_QUEUE_PSRAM_FALLBACK_SIZE; +#endif app_target_ver = 0; clearPendingReqs(); memset(expected_ack_table, 0, sizeof(expected_ack_table)); @@ -1393,6 +1450,7 @@ MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMe void MyMesh::begin(bool has_display, bool radio_available) { _radio_available = radio_available; setRadioAvailable(radio_available); + initializeOfflineQueue(); BaseChatMesh::begin(); const bool is_new_install = !_store->loadMainIdentity(self_id) diff --git a/examples/companion_radio/MyMesh.h b/examples/companion_radio/MyMesh.h index 178c2651..fb43f98e 100644 --- a/examples/companion_radio/MyMesh.h +++ b/examples/companion_radio/MyMesh.h @@ -73,8 +73,17 @@ #endif #ifndef OFFLINE_QUEUE_SIZE +#if defined(ESP32_PLATFORM) && defined(BOARD_HAS_PSRAM) +#define OFFLINE_QUEUE_SIZE 512 +#elif defined(COMPANION_RADIO_FULL) || defined(ESP32_PLATFORM) \ + || defined(NRF52_PLATFORM) || defined(RP2040_PLATFORM) +#define OFFLINE_QUEUE_SIZE 256 +#else #define OFFLINE_QUEUE_SIZE 16 #endif +#endif + +static_assert(OFFLINE_QUEUE_SIZE > 0, "OFFLINE_QUEUE_SIZE must be positive"); #ifndef ROOM_MESSAGE_TIMESTAMP_CACHE_SIZE #define ROOM_MESSAGE_TIMESTAMP_CACHE_SIZE 16 @@ -121,6 +130,7 @@ public: const char *getNodeName(); CompanionNodePrefs *getNodePrefs(); uint32_t getBLEPin(); + int getOfflineQueueCapacity() const; #if defined(WITH_MQTT_BRIDGE) && defined(ESP32_PLATFORM) && defined(WIFI_SSID) void serviceMQTT(const char* wifi_ssid, const char* wifi_password); @@ -423,8 +433,21 @@ private: bool isChannelMsg() const; }; + Frame& offlineQueueFrameAt(int logical_index); + void initializeOfflineQueue(); int offline_queue_len; + int offline_queue_head; +#if defined(ESP32_PLATFORM) && defined(BOARD_HAS_PSRAM) + enum { + OFFLINE_QUEUE_PSRAM_FALLBACK_SIZE = + OFFLINE_QUEUE_SIZE < 16 ? OFFLINE_QUEUE_SIZE : 16 + }; + Frame* offline_queue; + Frame offline_queue_fallback[OFFLINE_QUEUE_PSRAM_FALLBACK_SIZE]; + int offline_queue_capacity; +#else Frame offline_queue[OFFLINE_QUEUE_SIZE]; +#endif struct AckTableEntry { unsigned long msg_sent; diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index 95ce1f89..fc96ef73 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -886,10 +886,11 @@ void halt() { #if defined(ESP32_PLATFORM) && defined(COMPANION_RADIO_FULL) static void logFullCompanionMemory(const char* stage) { Serial.printf( - "Full Companion memory %s: heap=%u largest_internal=%u psram_free=%u/%u\r\n", + "Full Companion memory %s: heap=%u largest_internal=%u psram_free=%u/%u offline_queue=%d\r\n", stage, (unsigned)ESP.getFreeHeap(), (unsigned)heap_caps_get_largest_free_block(MALLOC_CAP_INTERNAL), - (unsigned)ESP.getFreePsram(), (unsigned)ESP.getPsramSize()); + (unsigned)ESP.getFreePsram(), (unsigned)ESP.getPsramSize(), + the_mesh.getOfflineQueueCapacity()); } #endif diff --git a/variants/ebyte_eora_s3/platformio.ini b/variants/ebyte_eora_s3/platformio.ini index 71e83951..1bbcdad5 100644 --- a/variants/ebyte_eora_s3/platformio.ini +++ b/variants/ebyte_eora_s3/platformio.ini @@ -127,7 +127,7 @@ build_flags = -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${Ebyte_EoRa-S3.build_src_filter} diff --git a/variants/heltec_e213/platformio.ini b/variants/heltec_e213/platformio.ini index 02193819..a0b28620 100644 --- a/variants/heltec_e213/platformio.ini +++ b/variants/heltec_e213/platformio.ini @@ -52,7 +52,7 @@ build_flags = -D AUTO_OFF_MILLIS=0 -D BLE_PIN_CODE=123456 ; dynamic, random PIN -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${Heltec_E213_base.build_src_filter} + + @@ -72,7 +72,7 @@ build_flags = -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=E213Display -D AUTO_OFF_MILLIS=0 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D ENABLE_USB_INTERFACE build_src_filter = ${Heltec_E213_base.build_src_filter} + diff --git a/variants/heltec_e290/platformio.ini b/variants/heltec_e290/platformio.ini index c7cd5f21..79f16558 100644 --- a/variants/heltec_e290/platformio.ini +++ b/variants/heltec_e290/platformio.ini @@ -46,7 +46,7 @@ build_flags = -D AUTO_OFF_MILLIS=0 -D BLE_PIN_CODE=123456 ; dynamic, random PIN -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${Heltec_E290_base.build_src_filter} + + @@ -67,7 +67,7 @@ build_flags = -D DISPLAY_CLASS=E290Display -D AUTO_OFF_MILLIS=0 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${Heltec_E290_base.build_src_filter} + + diff --git a/variants/heltec_rc32/platformio.ini b/variants/heltec_rc32/platformio.ini index 354004f0..6e728686 100644 --- a/variants/heltec_rc32/platformio.ini +++ b/variants/heltec_rc32/platformio.ini @@ -155,7 +155,7 @@ build_flags = -D BLE_PIN_CODE=123456 -D AUTO_SHUTDOWN_MILLIVOLTS=3400 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${Heltec_RC32.build_src_filter} + + @@ -179,7 +179,7 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${Heltec_RC32.build_src_filter} + + @@ -298,7 +298,7 @@ build_flags = -D BLE_PIN_CODE=123456 -D AUTO_SHUTDOWN_MILLIVOLTS=3400 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${Heltec_RC32_with_display.build_src_filter} + + @@ -320,7 +320,7 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${Heltec_RC32_with_display.build_src_filter} + + diff --git a/variants/heltec_t190/platformio.ini b/variants/heltec_t190/platformio.ini index f24291e7..377cb7f4 100644 --- a/variants/heltec_t190/platformio.ini +++ b/variants/heltec_t190/platformio.ini @@ -57,7 +57,7 @@ build_flags = -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 ; dynamic, random PIN -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${Heltec_T190_base.build_src_filter} + +<../examples/companion_radio/*.cpp> @@ -73,7 +73,7 @@ build_flags = -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D ENABLE_USB_INTERFACE build_src_filter = ${Heltec_T190_base.build_src_filter} + diff --git a/variants/heltec_v2/platformio.ini b/variants/heltec_v2/platformio.ini index 29d4fb13..8f572c84 100644 --- a/variants/heltec_v2/platformio.ini +++ b/variants/heltec_v2/platformio.ini @@ -139,6 +139,7 @@ build_flags = -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=160 -D MAX_GROUP_CHANNELS=8 + -D OFFLINE_QUEUE_SIZE=128 -D ENABLE_USB_INTERFACE ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1 ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 diff --git a/variants/heltec_v4/platformio.ini b/variants/heltec_v4/platformio.ini index b6d15343..707ebbdf 100644 --- a/variants/heltec_v4/platformio.ini +++ b/variants/heltec_v4/platformio.ini @@ -463,7 +463,7 @@ build_flags = -D BLE_PIN_CODE=123456 ; dynamic, random PIN -D AUTO_SHUTDOWN_MILLIVOLTS=3400 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${heltec_v4_oled.build_src_filter} @@ -687,7 +687,7 @@ build_flags = -D BLE_PIN_CODE=123456 ; dynamic, random PIN -D AUTO_SHUTDOWN_MILLIVOLTS=3400 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${heltec_v4_tft.build_src_filter} @@ -729,7 +729,7 @@ build_flags = -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D DISPLAY_CLASS=ST7789LCDDisplay -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' diff --git a/variants/heltec_v4_r8/platformio.ini b/variants/heltec_v4_r8/platformio.ini index b71b1790..98390416 100644 --- a/variants/heltec_v4_r8/platformio.ini +++ b/variants/heltec_v4_r8/platformio.ini @@ -159,7 +159,7 @@ build_flags = -D BLE_PIN_CODE=123456 -D AUTO_SHUTDOWN_MILLIVOLTS=3400 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${heltec_v4_r8_oled.build_src_filter} + + @@ -180,7 +180,7 @@ build_flags = -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D DISPLAY_CLASS=SSD1306Display -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' @@ -287,7 +287,7 @@ build_flags = -D BLE_PIN_CODE=123456 -D AUTO_SHUTDOWN_MILLIVOLTS=3400 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${heltec_v4_r8_tft.build_src_filter} + + @@ -305,7 +305,7 @@ build_flags = -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D DISPLAY_CLASS=ST7789LCDDisplay -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' diff --git a/variants/lilygo_t3s3/platformio.ini b/variants/lilygo_t3s3/platformio.ini index e4d02302..e282d7c9 100644 --- a/variants/lilygo_t3s3/platformio.ini +++ b/variants/lilygo_t3s3/platformio.ini @@ -247,7 +247,7 @@ build_flags = -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_T3S3_sx1262.build_src_filter} diff --git a/variants/lilygo_t3s3_sx1276/platformio.ini b/variants/lilygo_t3s3_sx1276/platformio.ini index 8c23680c..0a997872 100644 --- a/variants/lilygo_t3s3_sx1276/platformio.ini +++ b/variants/lilygo_t3s3_sx1276/platformio.ini @@ -160,7 +160,7 @@ build_flags = -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} diff --git a/variants/lilygo_tbeam_1w/platformio.ini b/variants/lilygo_tbeam_1w/platformio.ini index 0665b4d5..3ea0a689 100644 --- a/variants/lilygo_tbeam_1w/platformio.ini +++ b/variants/lilygo_tbeam_1w/platformio.ini @@ -134,7 +134,7 @@ build_flags = -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D PERSISTANT_GPS=1 -D ENV_SKIP_GPS_DETECT=1 ; -D BLE_DEBUG_LOGGING=1 @@ -160,7 +160,7 @@ build_flags = -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' diff --git a/variants/lilygo_tbeam_supreme_SX1262/platformio.ini b/variants/lilygo_tbeam_supreme_SX1262/platformio.ini index 6e48021e..3e4c84a4 100644 --- a/variants/lilygo_tbeam_supreme_SX1262/platformio.ini +++ b/variants/lilygo_tbeam_supreme_SX1262/platformio.ini @@ -209,7 +209,7 @@ build_flags = -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=8 ; -D MESH_DEBUG=1 @@ -232,7 +232,7 @@ build_flags = -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D WIFI_SSID='"WIFI_SSID"' -D WIFI_PWD='"Password"' ; -D WIFI_DEBUG_LOGGING=1 diff --git a/variants/lilygo_tdeck/platformio.ini b/variants/lilygo_tdeck/platformio.ini index 00571db9..5cfb46bc 100644 --- a/variants/lilygo_tdeck/platformio.ini +++ b/variants/lilygo_tdeck/platformio.ini @@ -70,7 +70,7 @@ build_flags = -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D ENABLE_USB_INTERFACE build_src_filter = ${LilyGo_TDeck.build_src_filter} + @@ -89,7 +89,7 @@ build_flags = -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${LilyGo_TDeck.build_src_filter} + + diff --git a/variants/lilygo_teth_elite/platformio.ini b/variants/lilygo_teth_elite/platformio.ini index 2debb039..9c001af1 100644 --- a/variants/lilygo_teth_elite/platformio.ini +++ b/variants/lilygo_teth_elite/platformio.ini @@ -71,7 +71,7 @@ build_flags = ${LilyGo_TETH_Elite_sx1262.build_flags} -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D ENABLE_USB_INTERFACE ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 @@ -89,7 +89,7 @@ build_flags = -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_TETH_Elite_sx1262.build_src_filter} diff --git a/variants/lilygo_tlora_v2_1/platformio.ini b/variants/lilygo_tlora_v2_1/platformio.ini index a4a158ce..ae617123 100644 --- a/variants/lilygo_tlora_v2_1/platformio.ini +++ b/variants/lilygo_tlora_v2_1/platformio.ini @@ -95,6 +95,7 @@ build_flags = -I examples/companion_radio/ui-new -D MAX_CONTACTS=160 -D MAX_GROUP_CHANNELS=8 + -D OFFLINE_QUEUE_SIZE=128 -D ENABLE_USB_INTERFACE ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1 ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 diff --git a/variants/meshnology_w12/platformio.ini b/variants/meshnology_w12/platformio.ini index 84225584..744d6a6e 100644 --- a/variants/meshnology_w12/platformio.ini +++ b/variants/meshnology_w12/platformio.ini @@ -153,7 +153,7 @@ build_flags = -D BLE_PIN_CODE=123456 ; dynamic, random PIN ; -D AUTO_SHUTDOWN_MILLIVOLTS=3400 ; disabled by default, otherwise reading bounce causes shutdown when there's no battery connected. ; -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${meshnology_w12.build_src_filter} @@ -173,7 +173,7 @@ build_flags = -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D DISPLAY_CLASS=SSD1306Display ; -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' diff --git a/variants/station_g2/platformio.ini b/variants/station_g2/platformio.ini index 990b0e71..c316d79a 100644 --- a/variants/station_g2/platformio.ini +++ b/variants/station_g2/platformio.ini @@ -284,7 +284,7 @@ build_flags = -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${Station_G2.build_src_filter} @@ -307,7 +307,7 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${Station_G2.build_src_filter} diff --git a/variants/station_g3_esp32/platformio.ini b/variants/station_g3_esp32/platformio.ini index 82bb5b81..141cd781 100644 --- a/variants/station_g3_esp32/platformio.ini +++ b/variants/station_g3_esp32/platformio.ini @@ -124,7 +124,7 @@ build_flags = -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 -D BLE_DEBUG_LOGGING=1 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${Station_G3_ESP32.build_src_filter} @@ -145,7 +145,7 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${Station_G3_ESP32.build_src_filter} diff --git a/variants/thinknode_m7/platformio.ini b/variants/thinknode_m7/platformio.ini index 7da14112..580db356 100644 --- a/variants/thinknode_m7/platformio.ini +++ b/variants/thinknode_m7/platformio.ini @@ -98,7 +98,7 @@ build_flags = -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 build_src_filter = ${ThinkNode_M7.build_src_filter} @@ -120,7 +120,7 @@ build_flags = -I examples/companion_radio/ui-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D ENABLE_USB_INTERFACE build_src_filter = ${ThinkNode_M7.build_src_filter} + @@ -142,7 +142,7 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 build_src_filter = ${ThinkNode_M7.build_src_filter} + @@ -163,7 +163,7 @@ build_flags = -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=NullDisplayDriver - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 build_src_filter = ${ThinkNode_M7.build_src_filter} ${ThinkNode_M7_ethernet.build_src_filter} + diff --git a/variants/thinknode_m9/platformio.ini b/variants/thinknode_m9/platformio.ini index 09b1391d..f77dc503 100755 --- a/variants/thinknode_m9/platformio.ini +++ b/variants/thinknode_m9/platformio.ini @@ -98,7 +98,7 @@ build_flags = -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 build_src_filter = ${ThinkNode_M9.build_src_filter} @@ -119,7 +119,7 @@ build_flags = -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 -D ENABLE_USB_INTERFACE build_src_filter = ${ThinkNode_M9.build_src_filter} + @@ -142,7 +142,7 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' - -D OFFLINE_QUEUE_SIZE=256 + -D OFFLINE_QUEUE_SIZE=512 ; -D MESH_PACKET_LOGGING=1 build_src_filter = ${ThinkNode_M9.build_src_filter} +